/* ============================================================
   Digital Signage Selected - Yönetim Paneli Tasarımı
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --border: #e6e9f0;
  --text: #1c2333;
  --text-muted: #6b7488;
  --text-faint: #9aa3b8;
  --accent: #4f6bff;
  --accent-dark: #3d55e0;
  --accent-light: #eef1ff;
  --green: #16a34a;
  --green-bg: #e7f8ee;
  --red: #e0445c;
  --red-bg: #fdedef;
  --amber: #c8860a;
  --amber-bg: #fff5df;
  --sidebar-bg: #12162280;
  --sidebar-from: #131826;
  --sidebar-to: #1c2338;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(20, 24, 40, 0.06), 0 1px 2px rgba(20, 24, 40, 0.05);
  --shadow-lift: 0 8px 24px rgba(20, 24, 40, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* ---------- Kenar Çubuğu ---------- */
.sidebar {
  width: 232px;
  background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
  color: #fff;
  padding: 22px 0 26px;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(0,0,0,0.12);
}
.sidebar h2 {
  padding: 0 22px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar a {
  display: block;
  padding: 11px 22px;
  color: #aab2c8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sidebar a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar a.active {
  background: rgba(79,107,255,0.16);
  color: #fff;
  border-left: 3px solid var(--accent);
  font-weight: 600;
}
.sidebar a.logout { margin-top: 26px; color: #ff8f8f; }
.sidebar a.logout:hover { background: rgba(224,68,92,0.12); color: #ffb3b3; }

/* ---------- İçerik Alanı ---------- */
.content { flex: 1; padding: 34px 42px; max-width: 1600px; }
h1 { margin: 0 0 14px; font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.hint { color: var(--text-muted); font-size: 13px; line-height: 1.55; }
a { color: var(--accent); }

/* ---------- İstatistik Kartları ---------- */
.stat-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 26px;
  min-width: 140px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease;
}
.stat-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.stat-card .num { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat-card .label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.stat-card.good .num { color: var(--green); }
.stat-card.warn .num { color: var(--amber); }

/* ---------- Paneller ---------- */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.panel h3 { margin-top: 0; margin-bottom: 10px; }

/* ---------- Tablolar ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
.table tbody tr:hover { background: #fafbff; }
.drag-handle { cursor: grab; color: var(--text-faint); font-size: 16px; text-align: center; width: 24px; user-select: none; }
.draggable-row.dragging { opacity: 0.4; background: var(--accent-light); }
.draggable-row { transition: background 0.15s; }
.table th {
  background: #f8f9fd;
  font-weight: 700;
  color: #4a5268;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.table input[type=text], .table select, .table input[type=number], .table input[type=date] {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.table input[type=text]:focus, .table select:focus, .table input[type=number]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

/* Çok sütunlu sayfalar (örn. Cihazlar) için daha sıkı boşluklu tablo -
   diğer sayfalardaki normal .table boşluğunu etkilemez. */
.table-compact th, .table-compact td { padding: 6px 8px; font-size: 12px; }
.table-compact input[type=text], .table-compact select, .table-compact input[type=number] { padding: 5px 6px; font-size: 12px; }

/* ---------- Formlar ---------- */
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.inline-form input:focus, .inline-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

/* ---------- Butonlar ---------- */
.btn, .btn-sm {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(79,107,255,0.25);
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover, .btn-sm:hover { background: var(--accent-dark); box-shadow: 0 3px 10px rgba(79,107,255,0.35); }
.btn:active, .btn-sm:active { transform: translateY(1px); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-green { background: var(--green); box-shadow: 0 1px 2px rgba(22,163,74,0.25); }
.btn-green:hover { background: #128a3e; box-shadow: 0 3px 10px rgba(22,163,74,0.35); }
.btn-red { background: var(--red); box-shadow: 0 1px 2px rgba(224,68,92,0.25); }
.btn-red:hover { background: #c9384e; box-shadow: 0 3px 10px rgba(224,68,92,0.35); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

/* ---------- Rozetler ---------- */
.badge { padding: 4px 11px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-gray { background: #eef0f4; color: #6b7488; }
.badge-warn { background: var(--amber-bg); color: var(--amber); margin-left: 6px; }

/* ---------- Medya Kütüphanesi ---------- */
.media-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.media-card {
  width: 168px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease;
}
.media-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.media-card img, .media-card video { width: 100%; height: 102px; object-fit: cover; border-radius: 6px; background:#000; }
.media-info { font-size: 12px; margin: 8px 0; color: var(--text-muted); }
.webpage-thumb {
  width: 100%; height: 102px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #eef1ff, #e4e9ff); border-radius:6px; font-size:24px;
}

/* ---------- Onay Kutuları / Gün Seçimi ---------- */
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.checkbox-item {
  display: flex; flex-direction: column; align-items: center; width: 92px; font-size: 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px; background: #fff;
}
.checkbox-item img { width: 72px; height: 52px; object-fit: cover; border-radius: 4px; }
.day-check { margin-right: 8px; font-size: 13px; }

/* ---------- Giriş Sayfası ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center; height: 100vh;
  background: radial-gradient(circle at 30% 20%, #1f2a4a 0%, #0d1117 55%, #090c12 100%);
}
.login-box {
  background: var(--card-bg);
  padding: 42px 40px;
  border-radius: 16px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.login-box h1 { text-align: center; font-size: 19px; margin-bottom: 6px; letter-spacing: -.2px; }
.login-box input {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.login-box button {
  padding: 11px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(79,107,255,0.35);
  transition: background .15s ease;
}
.login-box button:hover { background: var(--accent-dark); }
.error { color: var(--red); font-size: 13px; font-weight: 600; }
