
/* ====== Inter değişken font — yerel servis, CDN bağımlılığı yok ====== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ====== Tasarım tokenları ====== */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e4e7ec;
  --border-soft: #eef0f4;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-soft: #eff4ff;
  --primary-ring: rgba(37, 99, 235, 0.15);
  --accent: #f59e0b;
  --accent-soft: #fffaeb;

  --success: #12b76a;
  --success-soft: #ecfdf3;
  --success-text: #027a48;
  --warning: #f79009;
  --warning-soft: #fffaeb;
  --warning-text: #b54708;
  --danger: #ef4444;
  --danger-strong: #d92d20;
  --danger-soft: #fef3f2;
  --danger-text: #b42318;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --purple: #7a5af8;
  --purple-soft: #f4f3ff;
  --purple-text: #5925dc;

  --sidebar-bg: #0c111d;
  --sidebar-bg-2: #111827;
  --sidebar-ink: #94a3b8;
  --sidebar-ink-strong: #e2e8f0;
  --sidebar-border: rgba(148, 163, 184, 0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px -1px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.10), 0 4px 6px -2px rgba(16, 24, 40, 0.05);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Legacy takma adlar — sayfa içi gömülü stiller bunları kullanıyor, SİLME */
  --primary-dark: var(--primary-600);
  --primary-light: #60a5fa;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e4e7ec;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --gray-900: #101828;
}

/* ====== Reset + taban ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

::selection { background: var(--primary-soft); }

/* İnce kaydırma çubukları */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd2dc; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #98a2b3; }

/* ====== Sidebar ====== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 264px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}

.logo {
  padding: 13px 20px 12px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
  flex-shrink: 0;
}

.logo h1 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo p {
  color: var(--sidebar-ink);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

/* Menü (iş "menu-sade", 26.11.2026; Panel P3 #187, 29.11.2026'dan beri altı başlık + kapalı alt gruplar). 1440 × 900'de menü kaydırmadan
   sığsın diye satırlar sıkı (bağ 26 px, başlık 22 px; P3'e kadar 28 / 24); telefonda (çekmece) her dokunma satırı en az 44 px. Menüde yazı en az 12 px. */
.nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-section { margin-bottom: 6px; }
.nav-section:last-child { margin-bottom: 0; }

.nav-section-title {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  user-select: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-section-title:hover { color: var(--sidebar-ink-strong); background: rgba(255, 255, 255, 0.04); }
.nav-section-title .toggle-arrow { transition: transform 0.2s; font-size: 12px; opacity: 0.6; }
.nav-section.collapsed .nav-section-title .toggle-arrow { transform: rotate(-90deg); }
.nav-section.collapsed .nav-links { display: none; }
.nav-section .nav-links { display: block; margin-top: 0; }

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 12px;
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 18px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 1px;
  position: relative;
  transition: background 0.15s, color 0.15s;
}

.nav a .icon { font-size: 15px; line-height: 18px; width: 20px; text-align: center; flex-shrink: 0; filter: saturate(0.85); }

.nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--sidebar-ink-strong); }

.nav a.active {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}
.nav a.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.alarm-badge {
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 700;
  margin-left: auto;
}

.nav-badge {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 10px;
  margin-left: auto;
  color: #fff;
}
.nav-badge.critical { background: var(--danger-strong); }
.nav-badge.warning { background: var(--warning); }

/* "Tümü (N)": kapalı gelir (betiksiz <details>); kapalıyken içerideki rozet aynı tonda nokta olarak görünür */
.nav-more { margin: 0; }
.nav-more > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 3px 12px;
  color: var(--sidebar-ink);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 1px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s, color 0.15s;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::marker { content: ''; }
.nav-more > summary:hover { background: rgba(255, 255, 255, 0.05); color: var(--sidebar-ink-strong); }
.nav-more > summary .icon { width: 20px; text-align: center; flex-shrink: 0; opacity: 0.7; }
.nav-more-arrow { margin-left: auto; font-size: 12px; opacity: 0.6; transform: rotate(-90deg); transition: transform 0.2s; }
.nav-more[open] > summary .nav-more-arrow { transform: none; }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nav-dot + .nav-more-arrow { margin-left: 8px; }
.nav-dot.critical { background: var(--danger-strong); box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.25); }
.nav-dot.warning { background: var(--warning); box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.25); }
.nav-more[open] > summary .nav-dot { display: none; }
.nav-more[open] > summary .nav-dot + .nav-more-arrow { margin-left: auto; }
/* Panel P3 (#187): adlı alt grup ("Sayaç verisi", "Girdiler", "Gelişmiş") "Tümü" ile aynı çekmece; açıkken içindekiler biraz içeride (hangi
   gruba ait oldukları görünsün). Başlık kapalıyken (Yönetim varsayılan kapalı; kullanıcı da kapatabilir) içerideki rozet başlıkta nokta olur. */
.nav-more > a { padding-left: 22px; }
.nav-title-dot { display: none; }
.nav-section.collapsed .nav-title-dot { display: inline-block; }
.nav-title-dot + .toggle-arrow { margin-left: 2px; }

.user-section {
  padding: 10px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 0; flex: 1; min-width: 0; }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-name { color: var(--sidebar-ink-strong); font-size: 13px; font-weight: 600; }
.user-role { color: var(--sidebar-ink); font-size: 12px; }

.logout-btn {
  display: block;
  flex-shrink: 0;
  text-align: center;
  padding: 7px 12px;
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  transition: all 0.15s;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }

/* ====== Ana alan ====== */
.main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  height: 58px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header h2 {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.header-date { font-size: 12.5px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success-text);
  background: var(--success-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Durum lambası — TEK yardımcı: lamp(state) (Panel P1, 29.11.2026). Hâl renkle VE biçimle okunur (renk körlüğü):
   ok dolu yeşil · warning turuncu + halka · critical kırmızı + geniş halka · unknown taralı gri, kesik kenar · info dolu mavi ·
   none boş halka ("yok": tanımlı değil, arıza değil). Saha hattının ton adları (warn, bad) da kabul edilir (lamp içinde eşlenir).
   (Saha ekranlarının lambası hâlâ dashboard/ui/site-line.js'te; öteki sayfaların kopyaları P3–P10'da buna birleşir.) */
.eh-lamp { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; vertical-align: middle; background: var(--success); }
.eh-lamp-warning { background: var(--warning); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #fedf89; }
.eh-lamp-critical { background: var(--danger-strong); box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px #fecdca; }
.eh-lamp-unknown { background: repeating-linear-gradient(45deg, #f3f5f8 0 2px, #cdd3dc 2px 4px); border: 1.5px dashed #8793a6; }
.eh-lamp-info { background: var(--info); }
.eh-lamp-none { background: var(--surface); border: 1.5px solid #c9d0da; }
.eh-lamp-big { width: 22px; height: 22px; margin: 4px; }
.eh-lamp-big.eh-lamp-warning { box-shadow: 0 0 0 3px var(--surface), 0 0 0 7px #fedf89; }
.eh-lamp-big.eh-lamp-critical { box-shadow: 0 0 0 3px var(--surface), 0 0 0 9px #fecdca; }
.eh-lamp-big.eh-lamp-unknown { border-width: 2px; }

/* Üst şeritteki durum rozeti: lamba + kısa söz, "Bugün"e bağ (eskiden sabit yeşil "Sistem Aktif"). .security-badge sınıfı korunur. */
a.status-badge { text-decoration: none; border: 1px solid transparent; gap: 8px; padding: 5px 12px 5px 10px; }
a.status-badge:hover { filter: brightness(0.97); }
a.status-badge:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.status-badge.status-critical { color: var(--danger-text); background: var(--danger-soft); border-color: #fecdca; }
.status-badge.status-warning { color: var(--warning-text); background: var(--warning-soft); border-color: #fedf89; }
.status-badge.status-ok { color: var(--success-text); background: var(--success-soft); border-color: #abefc6; }
.status-badge.status-unknown { color: var(--ink-2); background: #f2f4f7; border-color: #d0d5dd; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink-2);
  flex-shrink: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 99;
}

.container { padding: 24px 28px 40px; flex: 1; }

/* ====== Kart ====== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.card-body { padding: 18px; }

/* ====== İstatistik kartları ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card .icon-box {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  margin-bottom: 12px;
}
.icon-box.purple { background: var(--purple-soft); }
.icon-box.blue { background: var(--primary-soft); }
.icon-box.green { background: var(--success-soft); }
.icon-box.orange { background: var(--accent-soft); }
.icon-box.red { background: var(--danger-soft); }

.stat-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-card p { color: var(--ink-3); font-size: 12.5px; font-weight: 500; margin-top: 2px; }

/* stat-card'ın .value/.label deseni (bazı sayfalar bunu kullanıyor) */
.stat-card .value { font-size: 21px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-card .label { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 3px; }
.stat-value { font-size: 21px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }

.value { font-weight: 650; font-variant-numeric: tabular-nums; }
.value-lg { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.summary-item { display: flex; flex-direction: column; gap: 2px; }
.si-value { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.si-label { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

/* ====== Tablolar ====== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td { padding: 10px 14px; text-align: left; }

th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink-2);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

.data-table th { position: static; }

/* ====== Butonlar ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  color: var(--ink-2);
  background: var(--surface);
}

.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }

.btn-outline { background: var(--surface); color: var(--ink-2); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-danger { background: var(--danger-strong); color: #fff; border-color: var(--danger-strong); }
.btn-danger:hover { background: #b42318; border-color: #b42318; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #039855; border-color: #039855; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ====== Rozetler ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--gray-100);
  color: var(--ink-2);
  white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-purple { background: var(--purple-soft); color: var(--purple-text); }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

/* ====== Uyarılar ====== */
.alert {
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid transparent;
  border-left-width: 3px;
}

.alert-danger { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(217, 45, 32, 0.18); border-left-color: var(--danger-strong); }
.alert-success { background: var(--success-soft); color: var(--success-text); border-color: rgba(18, 183, 106, 0.18); border-left-color: var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(247, 144, 9, 0.18); border-left-color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: rgba(23, 92, 211, 0.15); border-left-color: var(--info); }

/* ====== Formlar ====== */
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-control::placeholder { color: var(--ink-3); }

select.form-control { cursor: pointer; }

.form-group { margin-bottom: 14px; }

.form-label, .form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.form-hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; line-height: 1.45; }

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.form-section-title { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.form-section-desc { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Filtre satırı — sayfalarda inline form + select + btn kombinasyonu */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.filters .form-control { width: auto; min-width: 140px; }

/* ====== Layout yardımcıları ====== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.page-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }

.spacer { flex: 1; }

.breadcrumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.pagination {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active, .pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ====== Boş durum ====== */
.empty-state { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty-state .icon { font-size: 34px; margin-bottom: 10px; opacity: 0.75; }
.empty-state h4 { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.empty-state-msg { font-size: 13px; color: var(--ink-3); }

/* ====== Grafik ====== */
.chart-container { position: relative; height: 300px; }

/* ====== Kod ====== */
code {
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--gray-100);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 1.5px 6px;
  color: var(--purple-text);
}

pre { overflow-x: auto; }
pre code { display: block; padding: 12px 14px; line-height: 1.55; }

/* ====== Ufak yardımcılar ====== */
.copy-btn {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--font);
}
.copy-btn:hover { background: var(--border-soft); }

.confirm-form { display: inline; }

/* ====== Ortak bileşenler (Panel P2, 29.11.2026) ======
   İşlevleri aşağıda (answer, bigTile, tile, bigButton, details, tableShell, field; lamba: lamp). Her biri HTML dizgisi döndüren saf
   işlevdir ve satır içi stil yazmaz: görünüş yalnız buradaki sınıflardan gelir. Yeni sayfa önce bunlara bakar; kendi rengini, karosunu,
   düğmesini uydurmaz. Satır içi stil sayısı scripts/test-satir-ici-stil.js ile tutulur (artamaz). Saha ekranları dashboard/ui/site-line.js. */

/* Cevap cümlesi başlığı: lamba + sayfanın cevabı ("3 sayaçtan veri gelmiyor") + alt söz */
.eh-answer { display: flex; align-items: center; gap: 14px; min-width: 0; }
.eh-answer-text { flex: 1 1 0; min-width: 0; }
.eh-answer-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.eh-answer-sub { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.eh-answer-note { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* Büyük karo: sayfanın ilk hâli — cevap + tek büyük düğme */
.eh-bigtile-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; }
.eh-bigtile-body > .eh-answer { flex: 1 1 320px; }
.eh-bigtile .eh-answer-title { font-size: 24px; }

/* Durum karosu (küçük): değer + ad; hâli varsa lamba ve sol kenar rengi. Kabı .stat-card (eski karolarla aynı boy) */
.eh-tile-value .eh-lamp { margin: 0 10px 3px 0; }
.eh-tile-unit { font-size: 14px; font-weight: 400; color: var(--gray-500); letter-spacing: 0; }
.eh-tile-sub { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.eh-tile-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.eh-tile-link:hover { text-decoration: underline; }
.stat-card.eh-tile-critical { border-left: 3px solid var(--danger-strong); }
.stat-card.eh-tile-warning { border-left: 3px solid var(--warning); }
.stat-card.eh-tile-unknown { border-left: 3px solid #98a2b3; }
.icon-box.gray { background: #f2f4f7; }

/* Büyük ana düğme: sayfada tek */
.btn.eh-btn-big { padding: 12px 22px; font-size: 15px; min-height: 44px; }

/* Kapalı ayrıntı ("Teknik ayrıntı"): teşhis ilk ekranda değil, burada */
.eh-details > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink-2); }
.eh-details > summary:hover { color: var(--ink); }
.eh-details-hint { font-weight: 400; color: var(--ink-3); }

/* Tablo kabuğu: kart başlığı + tablo, satır yoksa boş hâl sözü */
.card-body.eh-table-body { padding: 0; }
.empty-state.eh-table-empty { padding: 20px; font-size: 13px; }
.eh-alert-list { margin: 8px 0 0 20px; }

/* "Bugün" gelen kutusu (dashboard/today-status.js renderInbox): cevap → konular (her satırda tek düğme) → okunamayanlar → yolunda olanlar */
.eh-answer + .eh-inbox-list { margin-top: 14px; }
.eh-inbox-list { display: flex; flex-direction: column; gap: 8px; }
.eh-inbox .task-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--surface); }
.eh-issue-text { min-width: 0; }
.eh-issue-title { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.eh-issue-detail { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; line-height: 1.45; }
.eh-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.eh-answer + .eh-note { margin-top: 8px; }
.eh-inbox-list + .eh-note, .eh-note + .eh-note { margin-top: 12px; }
.eh-note-unknown { background: #f2f4f7; border: 1px dashed #98a2b3; color: var(--ink-2); }
.eh-note-ok { background: var(--success-soft); color: var(--success-text); }
/* "Bugün" kutusunun altındaki "Teknik ayrıntı" bağı (Panel P3, #187): "Sistem durumu" (/health) menüden çıktı, buradan açılır */
.eh-page-more { margin: -10px 0 18px; text-align: right; font-size: 13px; line-height: 1.5; }
.eh-page-more a { font-weight: 600; text-decoration: none; }
.eh-page-more a:hover { text-decoration: underline; }
.eh-page-more-hint { color: var(--ink-3); }

/* ====== Duyarlılık ====== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .header { padding: 0 16px; }
  .container { padding: 16px 16px 32px; }
  .header-date { display: none; }
  /* telefonda / tablette menü çekmecedir: her dokunma satırı en az 44 px */
  .nav a, .nav-more > summary, .nav-section-title { min-height: 44px; }
  .nav-section-title { padding-top: 0; padding-bottom: 0; }
  .logout-btn { min-height: 44px; display: flex; align-items: center; justify-content: center; }
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px 0; }
.table-tools .form-control { max-width: 260px; padding: 6px 10px; font-size: 13px; }
.table-tools-count { font-size: 12px; color: var(--ink-3); margin-left: auto; }
th.sorted-asc::after { content: ' ▲'; font-size: 9px; opacity: .7; }
th.sorted-desc::after { content: ' ▼'; font-size: 9px; opacity: .7; }

@media (max-width: 640px) {
  .task-row { grid-template-columns: 12px 1fr !important; }
  .task-row > .btn, .task-row > a.btn { grid-column: 2; justify-self: start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .security-badge { display: none; }
  /* durum rozeti telefonda da görünür: yalnız lamba (söz ipucunda ve ekran okuyucuda) */
  .security-badge.status-badge { display: inline-flex; justify-content: center; min-width: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
  .status-badge .status-badge-text { display: none; }
  th, td { padding: 8px 10px; }
  .card-body { padding: 14px; }
}

@media print {
  .sidebar, .header-actions, .menu-toggle, .page-actions, .filters { display: none !important; }
  .main { margin-left: 0; }
  body { background: #fff; }
  .card, .stat-card { box-shadow: none; break-inside: avoid; }
}
