@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   ProWAF — Command Console Design System
   Identity: "Midnight Ops" — deep ink-navy SOC console.
   Two-color tension: azure (protected) vs coral (threat).
   Dark is the default; [data-theme="light"] is the override.
   ============================================================ */
:root {
  /* — Type — */
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* — Spacing scale (4pt) — */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* — Radius — */
  --radius-xs: 5px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  /* — Motion — */
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --ease-out:    cubic-bezier(0.16,1,0.3,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --transition:  150ms var(--ease);
  --transition-slow: 280ms var(--ease-out);

  /* — Layout — */
  --sidebar-w:           232px;
  --sidebar-w-collapsed: 68px;
  --topbar-h:            58px;

  /* — Z-index scale — */
  --z-sticky: 20;
  --z-dropdown: 600;
  --z-topbar: 700;
  --z-overlay: 1000;
  --z-modal: 1010;
  --z-toast: 9999;

  /* ===== DARK THEME (default) — Midnight Ops ===== */
  --bg:       #070B14;
  --bg-grid:  rgba(120,150,210,0.025);
  --surface:  #0E1424;
  --surface2: #131B2E;
  --surface3: #1B2438;
  --surface-hi: #212C44;
  --border:   rgba(140,165,215,0.12);
  --border2:  rgba(140,165,215,0.07);
  --border-strong: rgba(140,165,215,0.20);

  --text:  #E7EDF9;
  --text2: #9DB0D0;
  --text3: #61728F;

  --primary:      #4D8DFF;
  --primary-dim:  #2E6FE6;
  --primary-fg:   #84B2FF;
  --primary-pale: rgba(77,141,255,0.12);
  --primary-soft: rgba(77,141,255,0.12);
  --primary-line: rgba(77,141,255,0.30);
  --primary-glow: rgba(77,141,255,0.28);

  --success:      #2FD98B;
  --success-fg:   #46E3A0;
  --success-pale: rgba(47,217,139,0.12);
  --success-soft: rgba(47,217,139,0.12);
  --success-line: rgba(47,217,139,0.28);

  --danger:       #FF4D5E;
  --danger-fg:    #FF7E8B;
  --danger-pale:  rgba(255,77,94,0.12);
  --danger-soft:  rgba(255,77,94,0.12);
  --danger-line:  rgba(255,77,94,0.30);

  --warning:      #FBB03B;
  --warning-fg:   #FFC766;
  --warning-pale: rgba(251,176,59,0.12);
  --warning-soft: rgba(251,176,59,0.12);
  --warning-line: rgba(251,176,59,0.28);

  --purple:       #9B7BFF;
  --purple-fg:    #B79BFF;
  --purple-pale:  rgba(155,123,255,0.12);
  --purple-soft:  rgba(155,123,255,0.12);
  --purple-line:  rgba(155,123,255,0.28);

  --cyan:         #34C8E8;
  --cyan-fg:      #5BD6F0;
  --cyan-pale:    rgba(52,200,232,0.12);
  --cyan-soft:    rgba(52,200,232,0.12);
  --cyan-line:    rgba(52,200,232,0.28);

  --info:         #34C8E8;
  --info-fg:      #5BD6F0;
  --info-soft:    rgba(52,200,232,0.12);
  --info-line:    rgba(52,200,232,0.28);

  --brand-grad: linear-gradient(135deg, #4D8DFF 0%, #34C8E8 100%);
  --scrollbar:  rgba(140,165,215,0.18);
  --scrollbar-hi: rgba(140,165,215,0.34);
  --overlay-bg: rgba(4,7,14,0.62);
  --select-arrow: %2361728F;
  --skeleton: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.34), 0 1px 2px rgba(0,0,0,0.26);
  --shadow:    0 4px 10px rgba(0,0,0,0.36), 0 1px 3px rgba(0,0,0,0.30);
  --shadow-md: 0 8px 22px rgba(0,0,0,0.42), 0 2px 6px rgba(0,0,0,0.30);
  --shadow-lg: 0 18px 44px rgba(0,0,0,0.50), 0 4px 12px rgba(0,0,0,0.34);
  --shadow-xl: 0 32px 68px rgba(0,0,0,0.58), 0 10px 24px rgba(0,0,0,0.40);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg:       #EEF2F8;
  --bg-grid:  rgba(15,23,42,0.018);
  --surface:  #FFFFFF;
  --surface2: #F6F9FC;
  --surface3: #EBF0F7;
  --surface-hi: #E2E9F3;
  --border:   rgba(15,23,42,0.10);
  --border2:  rgba(15,23,42,0.06);
  --border-strong: rgba(15,23,42,0.16);

  --text:  #0B1424;
  --text2: #475569;
  --text3: #8595AD;

  --primary:      #2563EB;
  --primary-dim:  #1D4ED8;
  --primary-fg:   #1D4ED8;
  --primary-pale: rgba(37,99,235,0.08);
  --primary-soft: rgba(37,99,235,0.09);
  --primary-line: rgba(37,99,235,0.20);
  --primary-glow: rgba(37,99,235,0.16);

  --success:      #16A34A;
  --success-fg:   #15803D;
  --success-pale: rgba(22,163,74,0.08);
  --success-soft: rgba(22,163,74,0.10);
  --success-line: rgba(22,163,74,0.20);

  --danger:       #DC2626;
  --danger-fg:    #B91C1C;
  --danger-pale:  rgba(220,38,38,0.08);
  --danger-soft:  rgba(220,38,38,0.10);
  --danger-line:  rgba(220,38,38,0.20);

  --warning:      #D97706;
  --warning-fg:   #B45309;
  --warning-pale: rgba(217,119,6,0.08);
  --warning-soft: rgba(217,119,6,0.10);
  --warning-line: rgba(217,119,6,0.20);

  --purple:       #7C3AED;
  --purple-fg:    #6D28D9;
  --purple-pale:  rgba(124,58,237,0.08);
  --purple-soft:  rgba(124,58,237,0.10);
  --purple-line:  rgba(124,58,237,0.20);

  --cyan:         #0891B2;
  --cyan-fg:      #0369A1;
  --cyan-pale:    rgba(8,145,178,0.08);
  --cyan-soft:    rgba(8,145,178,0.10);
  --cyan-line:    rgba(8,145,178,0.20);

  --info:         #0891B2;
  --info-fg:      #0369A1;
  --info-soft:    rgba(8,145,178,0.10);
  --info-line:    rgba(8,145,178,0.20);

  --brand-grad: linear-gradient(135deg, #2563EB 0%, #0891B2 100%);
  --scrollbar:  rgba(15,23,42,0.14);
  --scrollbar-hi: rgba(15,23,42,0.24);
  --overlay-bg: rgba(15,23,42,0.32);
  --select-arrow: %238595AD;
  --skeleton: linear-gradient(90deg, #EEF2F8 25%, #E2E9F3 50%, #EEF2F8 75%);

  --shadow-xs: 0 1px 2px rgba(15,23,42,0.05);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:    0 4px 6px rgba(15,23,42,0.05), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.08), 0 1px 4px rgba(15,23,42,0.05);
  --shadow-lg: 0 8px 32px rgba(15,23,42,0.10), 0 2px 8px rgba(15,23,42,0.05);
  --shadow-xl: 0 20px 48px rgba(15,23,42,0.12), 0 8px 16px rgba(15,23,42,0.06);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--transition-slow), color var(--transition-slow);
}
/* Ambient grid texture for the console feel */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 40px 40px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== Sidebar ===== */
aside.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.logo-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.logo-full {
  display: block;
  width: 100%;
  max-width: 152px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.logo-mark {
  display: none;
  width: 32px;
  height: auto;
  object-fit: contain;
}
/* Dark default: img_1 (logo-dark). Light theme: img_2 (logo-light). */
html[data-theme="light"] .logo-for-dark { display: none !important; }
html:not([data-theme="light"]) .logo-for-light { display: none !important; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--brand-grad);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.18);
}
.logo-icon svg { width: 18px; height: 18px; color: #fff; }
.logo h1 { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.2; }
.logo h1 .version-badge {
  font-size: 10px; font-weight: 600; background: var(--primary-pale);
  color: var(--primary); border: 1px solid rgba(37,99,235,0.15);
  border-radius: 999px; padding: 1px 6px; vertical-align: middle;
  margin-left: 4px; letter-spacing: 0; font-size: 10px;
}
.logo p { font-size: 11px; color: var(--text3); font-weight: 500; margin-top: 1px; }

.nav {
  padding: 4px 0 12px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.nav:hover { scrollbar-color: var(--border) transparent; }
.nav::-webkit-scrollbar { width: 3px; }
.nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.nav:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }
.nav-group-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 12px 14px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; margin: 1px 5px;
  border-radius: 7px; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--text2);
  transition: background var(--transition), color var(--transition);
  user-select: none;
  text-decoration: none;
}
a.nav-item { color: var(--text2); }
.nav-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px;
}
.nav-icon svg { width: 15px; height: 15px; opacity: 0.7; transition: opacity var(--transition); }
.nav-item:hover { background: var(--surface3); color: var(--text); }
.nav-item:hover .nav-icon svg { opacity: 0.95; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active .nav-icon svg { opacity: 1; }

.sidebar-bottom {
  padding: 8px 10px 12px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.lockdown-badge {
  display: none;
  background: var(--danger-pale);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,0.18);
  border-radius: 7px; padding: 5px 8px;
  font-size: 11px; font-weight: 700;
  text-align: center; letter-spacing: 0.04em;
}
.lockdown-badge.visible { display: block; }
.mode-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
}
.mode-badge.block   { background: rgba(220,38,38,0.08); color: #B91C1C; border: 1px solid rgba(220,38,38,0.15); }
.mode-badge.monitor { background: rgba(124,58,237,0.08); color: #6D28D9; border: 1px solid rgba(124,58,237,0.15); }
.mode-badge.allow   { background: rgba(22,163,74,0.08);  color: #15803D; border: 1px solid rgba(22,163,74,0.15); }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: blink 2s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }
/* Sağlık göstergesi: tablo satırında yanıp sönmeyen sabit renk noktası. */
.health-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--text3);
}
.health-dot.ok      { background: var(--success); }
.health-dot.danger  { background: var(--danger); }
.health-dot.unknown { background: var(--text3); opacity: .55; }
.logout-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 7px;
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 12.5px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  width: 100%; text-align: left;
}
.logout-btn:hover { background: var(--danger-pale); color: var(--danger); }
.logout-btn svg { width: 14px; height: 14px; }

/* ===== Main ===== */
.main {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0; height: 100vh;
}

/* Topbar altındaki içerik alanı: sayfa + sağ panel yan yana */
.content-area {
  flex: 1; display: flex; overflow: hidden; min-width: 0;
}

.page {
  display: none; flex-direction: column;
  flex: 1; overflow-y: auto;
  padding: 22px 24px; gap: 16px;
}
.page.active { display: flex; }

/* Flex children must not shrink — otherwise long rules pages collapse top cards */
.page > * { flex-shrink: 0; }

.page-header {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  flex-shrink: 0; padding-bottom: 2px;
}
.page-header h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.page-header .subtitle { font-size: 13px; color: var(--text3); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.section-gap { margin-top: 8px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 12px; font-size: 12.5px; color: var(--text3); }
.report-meta strong { color: var(--text2, var(--text)); font-weight: 600; }
.report-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-range .input { width: auto; }
.report-range-sep { color: var(--text3); font-size: 13px; }

.reports-page { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: none; }
.reports-page.is-loading { opacity: 0.72; pointer-events: none; }
.report-live-status { font-size: 11.5px; color: var(--text3); white-space: nowrap; align-self: center; }
.report-live-status.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 6px; vertical-align: middle; }
.reports-page .section-gap { margin-top: 0; }
.reports-page .grid-2 { gap: 14px; }
.report-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 16px; padding: 12px 14px; margin-bottom: 2px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.report-toolbar-period,
.report-toolbar-export {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.report-toolbar-label {
  font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text3); margin-right: 2px;
}
.report-toolbar #reportPeriod { width: auto; min-width: 140px; }
.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}
@media (max-width: 720px) {
  .report-toolbar { align-items: stretch; }
  .report-toolbar-period,
  .report-toolbar-export { width: 100%; }
}
.stat-delta { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.stat-delta.up { color: var(--danger); }
.stat-delta.down { color: var(--success); }
.stat-delta.flat { color: var(--text3); }

/* Yönetici özeti */
.report-narrative { margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--text2, var(--text)); }
.report-narrative strong { color: var(--text); font-weight: 600; }
.report-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.report-chip { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2, rgba(255,255,255,.02)); min-width: 130px; }
.report-chip .chip-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text3); }
.report-chip .chip-val { font-size: 13px; font-weight: 600; color: var(--text); }
.report-actionbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--border); }
.report-actionseg.allowed { background: var(--success); }
.report-actionseg.monitored { background: var(--purple, #8b5cf6); }
.report-actionseg.blocked { background: var(--danger); }
.report-actionbar-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text3); }
.report-actionleg { display: inline-flex; align-items: center; gap: 6px; }
.report-actionleg .dot { width: 9px; height: 9px; border-radius: 50%; }
.report-actionleg .dot.allowed { background: var(--success); }
.report-actionleg .dot.monitored { background: var(--purple, #8b5cf6); }
.report-actionleg .dot.blocked { background: var(--danger); }

.report-export-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Yazdırma başlığı — ekranda gizli, yalnızca baskıda görünür */
.print-header { display: none; }

@media print {
  .sidebar, .topbar, .right-panel, .page-subnav, .scrim, .cmdk-overlay,
  .ddos-banner, .origin-banner, .page-header, .header-actions, .report-range,
  .report-export-group, .report-toolbar, .page-guide, .unban-btn, .sidebar-bottom, .no-print { display: none !important; }
  html, body, .main, .content-area, .page, .page.active, .reports-page {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    position: static !important;
  }
  body, .main, .content-area, .page { background: #fff !important; color: #111 !important; margin: 0 !important; }
  .main { margin-left: 0 !important; }
  .content-area { display: block !important; padding: 0 !important; }
  .page, .page.active {
    display: block !important;
    flex: none !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .reports-page { display: block !important; width: 100% !important; }
  .print-header { display: block; margin-bottom: 16px; border-bottom: 2px solid #111; padding-bottom: 10px; }
  .print-header .print-brand { font-size: 12px; color: #555; letter-spacing: .3px; }
  .print-header .print-title { font-size: 22px; font-weight: 700; margin-top: 2px; }
  .print-header .print-sub { font-size: 12px; color: #444; margin-top: 4px; }
  .card, .stat-card, .report-chip { background: #fff !important; border: 1px solid #ccc !important; color: #111 !important; box-shadow: none !important; break-inside: auto; page-break-inside: auto; margin-bottom: 10px !important; }
  .card-header h3, .stat-card .label, .stat-card .value, .report-narrative, .report-narrative strong, .chip-val, .chip-label, table, th, td { color: #111 !important; }
  .table-wrap, table, tbody, tr, td { background: #fff !important; }
  thead th { background: #f1f1f1 !important; color: #111 !important; }
  tr, td, th { border-color: #ddd !important; }
  .badge { background: #eee !important; color: #111 !important; border: 1px solid #ccc !important; }
  .bar-bg, .report-actionbar { background: #e5e5e5 !important; }
  .threat-bar .name, .threat-bar .count { color: #111 !important; }
  .report-meta, .report-actionbar-legend { color: #333 !important; }
  .grid-2 { display: block !important; }
  .grid-2 > .card { margin-bottom: 12px !important; page-break-inside: avoid; }
  .stats-grid, .report-stats { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .timeseries-chart { display: flex !important; flex-wrap: wrap !important; height: auto !important; min-height: 80px !important; overflow: visible !important; }
  .timeseries-chart .ts-col { min-width: 36px !important; page-break-inside: avoid; }
  .ts-bar.allowed { background: #16a34a !important; }
  .ts-bar.monitored { background: #7c3aed !important; }
  .ts-bar.blocked { background: #dc2626 !important; }
  .ts-label, .ts-legend-item { color: #333 !important; }
  button, .btn { display: none !important; }
  a { color: #111 !important; text-decoration: none; }
  @page { margin: 14mm; size: A4 portrait; }
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  gap: 10px;
}
.card-header h3 {
  font-size: 13px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.card-body { padding: 14px 16px; }

.info-box {
  margin-bottom: 1rem; padding: .75rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); font-size: 13px; color: var(--text3);
}
.info-box.tight { margin-bottom: 0; margin-top: .5rem; padding: .5rem .75rem; font-size: 12px; }

/* Kompakt satır-içi form araç çubuğu (legacy). */
.inline-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-toolbar label { display: flex; flex-direction: column; font-size: 12px; gap: 2px; color: var(--text2); }
.inline-toolbar .input,
.inline-toolbar input,
.inline-toolbar select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 13.5px; font-family: inherit; padding: 8px 11px;
  outline: none; min-width: 0;
}
.inline-toolbar input:focus,
.inline-toolbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.inline-result-box {
  display: none; margin-top: .75rem; padding: .75rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface2); font-size: 13px; color: var(--text);
}

/* vService route dry-run */
.vs-dryrun-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.7fr 0.7fr auto;
  gap: 12px;
  align-items: end;
}
.vs-dryrun-actions .btn { width: 100%; min-width: 100px; }
.vs-dryrun-result {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface2);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.vs-dryrun-result[hidden] { display: none; }
.vs-dryrun-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.vs-dryrun-summary { margin: 0 0 12px; color: var(--text2); }
.vs-dryrun-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 14px;
  font-size: 12.5px;
}
.vs-dryrun-details .subtitle { color: var(--text3); margin-right: 4px; }
.vs-dryrun-err { color: var(--danger-fg); font-weight: 600; }
@media (max-width: 960px) {
  .vs-dryrun-grid { grid-template-columns: 1fr 1fr; }
  .vs-dryrun-actions { grid-column: 1 / -1; }
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.total::before     { background: linear-gradient(90deg, #2563EB, #60A5FA); }
.stat-card.allowed::before   { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.stat-card.blocked::before   { background: linear-gradient(90deg, #DC2626, #FB7185); }
.stat-card.monitored::before { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.stat-card.warning::before   { background: linear-gradient(90deg, #D97706, #FCD34D); }
.stat-card.info::before      { background: linear-gradient(90deg, #0891B2, #22D3EE); }

.stat-card .label  { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.stat-card .value  { font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.stat-card .sub    { font-size: 11px; color: var(--text3); }
.stat-card.total    .value { color: var(--primary); }
.stat-card.allowed  .value { color: var(--success); }
.stat-card.blocked  .value { color: var(--danger); }
.stat-card.monitored .value { color: var(--purple); }
.stat-card.warning  .value { color: var(--warning); }
.stat-card.info     .value { color: var(--info); }
/* .stat-grid / .stat-label / .stat-value: bazı sayfalarda (origins, blocklist, learning,
   mitre-reports, custom-coraza-rules) kullanılan alternatif isimlendirme — .stats-grid /
   .stat-card .label/.value ile aynı görünüme eşleniyor, tek kaynak stil korunuyor. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.stat-card .stat-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.stat-card.total     .stat-value { color: var(--primary); }
.stat-card.allowed   .stat-value { color: var(--success); }
.stat-card.blocked   .stat-value { color: var(--danger); }
.stat-card.monitored .stat-value { color: var(--purple); }
.stat-card.warning   .stat-value { color: var(--warning); }
.stat-card.info      .stat-value { color: var(--info); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge.allowed   { background: var(--success-soft); color: var(--success-fg); border: 1px solid var(--success-line); }
.badge.blocked   { background: var(--danger-soft);  color: var(--danger-fg);  border: 1px solid var(--danger-line); }
.badge.monitored { background: var(--purple-soft);  color: var(--purple-fg);  border: 1px solid var(--purple-line); }
.badge.info      { background: var(--info-soft);    color: var(--info-fg);    border: 1px solid var(--info-line); }
.badge.auto      { background: var(--warning-soft); color: var(--warning-fg); border: 1px solid var(--warning-line); }
.badge.warn      { background: var(--warning-soft); color: var(--warning-fg); border: 1px solid var(--warning-line); }
.badge.success   { background: var(--success-soft); color: var(--success-fg); border: 1px solid var(--success-line); }
.badge.danger    { background: var(--danger-soft);  color: var(--danger-fg);  border: 1px solid var(--danger-line); }
.badge.neutral   { background: var(--surface3);     color: var(--text2);      border: 1px solid var(--border); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1px solid transparent;
  transition: all var(--transition); white-space: nowrap;
  text-decoration: none; line-height: 1; user-select: none;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary-dim); box-shadow: 0 1px 2px rgba(37,99,235,0.18); }
.btn-primary:hover { background: var(--primary-dim); box-shadow: 0 2px 8px rgba(37,99,235,0.22); }
.btn-outline { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-outline:hover { background: var(--surface3); color: var(--text); border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger-dim, var(--danger)); box-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.btn-danger:hover { filter: brightness(1.08); box-shadow: 0 2px 10px var(--danger-pale); }
.btn-success { background: var(--success); color: #06281A; border-color: var(--success); box-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.btn-success:hover { filter: brightness(1.06); }
.btn-warning { background: var(--warning); color: #2A1A02; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface3); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn-icon { padding: 7px; }

/* ===== Inputs ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text2); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.input, select.input, textarea.input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 13.5px; font-family: inherit; padding: 8px 11px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; width: 100%;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.input::placeholder { color: var(--text3); }
select.input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2361728F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
textarea.input { resize: vertical; line-height: 1.55; }

/* Toggle switch (old style) */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #CBD5E1;
  border-radius: 999px; cursor: pointer;
  transition: background var(--transition);
}
.slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; left: 3px; top: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.14);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 0;
}
.sw-label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }
.sw-desc { font-size: 11.5px; color: var(--text3); margin-top: 2px; line-height: 1.4; }

.pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.pill-blue  { background: var(--primary-soft); color: var(--primary-fg); border: 1px solid var(--primary-line); }
.pill-green { background: var(--success-soft); color: var(--success-fg); border: 1px solid var(--success-line); }
.pill-red   { background: var(--danger-soft); color: var(--danger-fg); border: 1px solid var(--danger-line); }
.pill-amber { background: var(--warning-soft); color: var(--warning-fg); border: 1px solid var(--warning-line); }
.pill-gray  { background: var(--surface3); color: var(--text3); border: 1px solid var(--border); }

.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table thead th {
  padding: 8px 10px; font-size: 10.5px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface2); border-bottom: 1px solid var(--border); text-align: left;
}
.data-table tbody td {
  padding: 8px 10px; color: var(--text); border-bottom: 1px solid var(--border2); vertical-align: middle;
}
.range-value {
  min-width: 24px; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--primary); font-family: 'JetBrains Mono', monospace;
}

/* ===== Live / SSE ===== */
.live-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--success);
  animation: blink 1.8s ease infinite;
}
.live-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--success);
}

/* ===== Live Feed Table ===== */
.live-feed-wrap {
  max-height: 360px;
  overflow: auto;
  padding: 0;
}
.live-feed-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.live-feed-table th,
.live-feed-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.live-feed-table th:nth-child(1), .live-feed-table td:nth-child(1) { width: 78px; }
.live-feed-table th:nth-child(2), .live-feed-table td:nth-child(2) { width: 76px; }
.live-feed-table th:nth-child(3), .live-feed-table td:nth-child(3) { width: 44px; text-align: center; }
.live-feed-table th:nth-child(4), .live-feed-table td:nth-child(4) { width: 108px; }
.live-feed-table th:nth-child(5), .live-feed-table td:nth-child(5) { width: 58px; }
.live-feed-table th:nth-child(6), .live-feed-table td:nth-child(6) { width: 22%; }
.live-feed-table th:nth-child(7), .live-feed-table td:nth-child(7) { width: 14%; }
.live-feed-table th:nth-child(8), .live-feed-table td:nth-child(8) { width: 26%; }
.live-feed-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface2);
  box-shadow: 0 1px 0 var(--border);
}
.live-feed-table tbody td {
  padding: 8px 10px;
  font-size: 12px;
}
.live-feed-table .badge {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Event Feed (legacy — removed) ===== */
.event-list {
  display: none;
}
.event-row {
  display: flex; gap: 8px; align-items: center;
  padding: 5px 4px; border-radius: 6px;
  cursor: pointer; transition: background var(--transition);
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:none} }
.event-row:hover { background: var(--surface2); }
.event-row .ev-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text3); flex-shrink: 0; }
.event-row .ev-ip   { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; min-width: 120px; flex-shrink: 0; }
.event-row .ev-path { color: var(--text2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-btn.active, .event-filter.active {
  background: var(--primary); color: #fff; border-color: var(--primary-dim);
}

/* ===== Toggle Group (Mode) ===== */
.toggle-group {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--surface2);
}
.toggle-group button {
  padding: 6px 14px; border: none; background: none;
  font-size: 12px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.toggle-group button.active { background: var(--primary); color: #fff; }
.toggle-group button:hover:not(.active) { background: var(--surface3); color: var(--text); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  padding: 9px 11px; font-size: 10.5px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
tbody td { padding: 9px 11px; color: var(--text); border-bottom: 1px solid var(--border2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr:hover td { background: var(--surface2); }
.truncate { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.empty-state { text-align: center; color: var(--text3); padding: 24px 12px; font-size: 13px; }

/* ===== Slim tablo (ince tablo + detay çekmecesi deseni) =====
   Az kolon, satır tıklanabilir, sol kenarda durum şeridi, sağda ok. */
.slim-table { font-size: 13.5px; }
.slim-table thead th { padding: 12px 14px; font-size: 10.5px; }
.slim-table tbody td { padding: 0 14px; height: 54px; border-bottom: 1px solid var(--border2); }
.slim-table tbody tr { cursor: pointer; transition: background .12s; }
.slim-table tbody tr:hover td { background: var(--surface2); }
.slim-table tbody tr.dd-selected td { background: var(--primary-soft); }
/* Sol durum şeridi: ilk hücreye box-shadow ile çizilir (border-collapse dostu). */
.slim-table td.stripe-cell { position: relative; padding-left: 22px; }
.slim-table td.stripe-cell::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 5px; border-radius: 4px;
  background: var(--text3);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text3) 35%, transparent);
}
.slim-table td.stripe-cell::after {
  content: ''; position: absolute; left: 1px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--text3); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text3) 50%, transparent);
}
.slim-table tr.st-block   td.stripe-cell::before { background: var(--danger); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent), 0 2px 8px -2px color-mix(in srgb, var(--danger) 55%, transparent); }
.slim-table tr.st-block   td.stripe-cell::after { background: var(--danger); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 60%, transparent); }
.slim-table tr.st-monitor td.stripe-cell::before { background: var(--cyan); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 45%, transparent), 0 2px 8px -2px color-mix(in srgb, var(--cyan) 50%, transparent); }
.slim-table tr.st-monitor td.stripe-cell::after { background: var(--cyan); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 55%, transparent); }
.slim-table tr.st-learning td.stripe-cell::before { background: var(--purple); box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 45%, transparent), 0 2px 8px -2px color-mix(in srgb, var(--purple) 50%, transparent); }
.slim-table tr.st-learning td.stripe-cell::after { background: var(--purple); box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 55%, transparent); }
.slim-table tr.st-passive td.stripe-cell::before { background: var(--text3); }
.slim-table tr.st-passive td.stripe-cell::after { background: var(--text3); }
.slim-table tr.st-ok      td.stripe-cell::before { background: var(--success); box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 45%, transparent), 0 2px 10px -2px color-mix(in srgb, var(--success) 60%, transparent); }
.slim-table tr.st-ok      td.stripe-cell::after { background: var(--success); box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 65%, transparent); }
.slim-table tr.st-warn    td.stripe-cell::before { background: var(--warning); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warning) 45%, transparent), 0 2px 8px -2px color-mix(in srgb, var(--warning) 55%, transparent); }
.slim-table tr.st-warn    td.stripe-cell::after { background: var(--warning); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warning) 60%, transparent); }
.slim-table .row-name { font-weight: 600; color: var(--text); }
.slim-table .row-sub { font-size: 11.5px; color: var(--text3); margin-top: 1px; }
.slim-table .row-arrow { color: var(--text3); text-align: right; font-size: 18px; line-height: 1; width: 24px; }
.slim-table tbody tr:hover .row-arrow { color: var(--primary-fg); }
.slim-table td.slim-actions { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle; padding-right: 12px; }
.slim-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.slim-row-actions .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 28px; padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid transparent;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}
.slim-row-actions a.btn,
.slim-row-actions button.btn:not(.btn-danger-ghost) {
  background: var(--primary-soft, var(--primary-pale));
  color: var(--primary-fg, var(--primary));
  border-color: var(--primary-line, rgba(77, 141, 255, 0.28));
}
.slim-row-actions a.btn:hover,
.slim-row-actions button.btn:not(.btn-danger-ghost):hover {
  filter: brightness(1.08);
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}
.slim-row-actions .btn-danger-ghost {
  background: var(--danger-soft);
  color: var(--danger-fg);
  border-color: var(--danger-line);
}
.slim-row-actions .btn-danger-ghost:hover {
  filter: brightness(1.1);
  border-color: var(--danger-fg);
  background: var(--danger-soft);
  color: var(--danger-fg);
}

/* ===== Alert Banner ===== */
.alert-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
}
.alert-banner.info    { background: var(--primary-pale); color: var(--primary); border: 1px solid rgba(37,99,235,0.15); }
.alert-banner.success { background: rgba(22,163,74,0.08); color: var(--success); border: 1px solid rgba(22,163,74,0.15); }
.alert-banner.warning { background: rgba(217,119,6,0.08); color: var(--warning); border: 1px solid rgba(217,119,6,0.15); }
.alert-banner.danger  { background: rgba(220,38,38,0.08); color: var(--danger);  border: 1px solid rgba(220,38,38,0.15); }

/* ===== Info Grid ===== */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.info-item {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 9px 12px;
}
.info-item .label { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.info-item .val { font-size: 13px; font-weight: 600; color: var(--text); font-family: 'JetBrains Mono', monospace; }

/* ===== Toast ===== */
#toast, .toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface-hi); color: var(--text);
  padding: 11px 18px 11px 16px; border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  display: inline-flex; align-items: center; gap: 9px;
  opacity: 1; pointer-events: none; white-space: nowrap;
  animation: toastIn 0.32s var(--ease-spring);
}
#toast::before, .toast::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); flex-shrink: 0;
}
@keyframes toastIn { from { transform: translateX(-50%) translateY(60px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
#toast.show { opacity: 1; }
#toast.error, .toast.error { border-color: var(--danger-line); }
#toast.error::before, .toast.error::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.toast.success::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.toast.warning::before { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
  z-index: var(--z-overlay);
  animation: overlayIn 0.18s var(--ease-out);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 560px;
  max-height: 85vh; display: flex; flex-direction: column;
  overflow: hidden; border: 1px solid var(--border-strong);
  z-index: var(--z-modal);
  animation: modalIn 0.26s var(--ease-out);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-lg { max-width: 720px; }

/* ===== Reusable Detay Çekmecesi (detail drawer) — liste sayfaları için =====
   Slim tablo satırına tıklanınca sağdan kayarak açılır; tüm ayrıntı + aksiyonları taşır. */
.dd-scrim {
  position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); z-index: var(--z-overlay);
}
.dd-scrim.open { opacity: 1; pointer-events: auto; }
.detail-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
  background: var(--surface); border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xl); z-index: var(--z-modal);
  transform: translateX(100%); transition: transform .26s var(--ease-out);
  display: flex; flex-direction: column;
}
.detail-drawer.open { transform: translateX(0); }
.dd-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 60%);
}
.dd-head-main { min-width: 0; }
.dd-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; word-break: break-all; color: var(--text); }
.dd-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.dd-close {
  flex-shrink: 0; background: var(--surface3); border: 1px solid var(--border); color: var(--text2);
  width: 30px; height: 30px; border-radius: var(--radius); cursor: pointer;
  display: grid; place-items: center; transition: background .15s, color .15s, border-color .15s;
}
.dd-close svg { width: 15px; height: 15px; }
.dd-close:hover { background: var(--surface-hi); color: var(--text); border-color: var(--border-strong); }
.dd-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.dd-section h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3);
  margin: 0 0 10px; font-weight: 700;
}
.dd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px dashed var(--border2); font-size: 13px; min-height: 20px;
}
.dd-row:last-child { border-bottom: 0; }
.dd-row .dd-k { color: var(--text3); flex-shrink: 0; }
.dd-row .dd-v { color: var(--text); text-align: right; word-break: break-word; }
.dd-row .dd-v.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dd-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-quick .btn { flex: 1 1 auto; }
.dd-foot {
  padding: 16px 22px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.dd-foot .btn { flex: 1; text-align: center; justify-content: center; min-width: 90px; }
@media (max-width: 520px) {
  .detail-drawer { width: 100vw; max-width: 100vw; }
}

.sp-modal { max-width: 860px; border-radius: 16px; box-shadow: 0 24px 48px rgba(0,0,0,0.22), 0 0 0 1px var(--border-strong); }
.ccr-modal { max-width: 920px; }
.ccr-page .mr-inner-full { grid-template-columns: 280px 1fr; }
.ccr-page #runtimeStatusContent .mm-sidebar-empty { margin: 0; }
.ccr-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 750; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  white-space: nowrap;
}
.ccr-status.ccr-active { background: var(--danger-soft); color: var(--danger-fg); border-color: var(--danger-line); }
.ccr-status.ccr-testing { background: var(--warning-soft); color: var(--warning-fg); border-color: var(--warning-line); }
.ccr-status.ccr-disabled { background: var(--surface2); color: var(--text2); border-color: var(--border2); }
.sp-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 55%);
  border-bottom: 1px solid var(--border);
}
.sp-modal-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sp-modal-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft, rgba(37,99,235,0.12));
  color: var(--primary); border: 1px solid rgba(37,99,235,0.2);
}
.sp-modal-icon svg { width: 22px; height: 22px; }
.sp-modal-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text3); font-weight: 500; }
.sp-modal-tabs {
  display: flex; gap: 4px; padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
}
.sp-modal-tab {
  padding: 11px 14px; border: none; background: transparent;
  color: var(--text3); font-size: 12.5px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap; font-family: inherit;
}
.sp-modal-tab:hover { color: var(--text2); }
.sp-modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sp-modal-body { padding: 18px 22px 22px; gap: 0; }
.sp-tab-panel { display: none; flex-direction: column; gap: 14px; animation: spTabIn 0.2s var(--ease-out); }
.sp-tab-panel.active { display: flex; }
@keyframes spTabIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sp-modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface2);
}

/* Kurum Servisi create/edit modal — geniş iki kolon */
.bs-modal { max-width: 920px; width: min(920px, calc(100vw - 32px)); }
.bs-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 22px 20px;
}
.bs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.bs-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.bs-col-hc {
  height: 100%;
}
.bs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.bs-section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text3);
}
.bs-hc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bs-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.bs-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
.bs-req { color: var(--danger); }
.bs-opt {
  color: var(--text3);
  font-weight: 500;
  font-size: 11.5px;
  margin-left: 4px;
}
.bs-field--switch { justify-content: flex-end; }
.bs-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.bs-details-meta {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text3);
  white-space: nowrap;
}
.bs-help {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text3);
}
.bs-modal-footer .btn-primary {
  min-width: 120px;
  justify-content: center;
}
@media (max-width: 820px) {
  .bs-modal { max-width: 100%; width: 100%; border-radius: 14px 14px 0 0; }
  .bs-layout { grid-template-columns: 1fr; }
  .bs-form-grid { grid-template-columns: 1fr; }
}
.sp-field-card {
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
}
.sp-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.sp-textarea { resize: vertical; min-height: 56px; line-height: 1.45; }
.sp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sp-pill-val {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--primary-soft, rgba(37,99,235,0.12)); color: var(--primary);
  border: 1px solid rgba(37,99,235,0.2);
}
.sp-range { width: 100%; accent-color: var(--primary); cursor: pointer; }
.sp-range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text3); margin-top: 4px; }
.sp-segment {
  display: inline-flex; padding: 3px; border-radius: 10px;
  background: var(--surface3); border: 1px solid var(--border); gap: 2px;
}
.sp-segment-btn {
  padding: 7px 14px; border: none; border-radius: 8px; background: transparent;
  color: var(--text2); font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
}
.sp-segment-btn:hover { color: var(--text); background: var(--surface); }
.sp-segment-btn.active {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid var(--border);
}
.sp-segment-btn[data-v="block"].active { color: var(--danger-fg); background: var(--danger-soft); border-color: var(--danger-line); }
.sp-segment-btn[data-v="monitor"].active { color: var(--warning-fg); background: var(--warning-soft); border-color: var(--warning-line); }
.sp-segment-btn[data-v="learning"].active { color: var(--purple-fg); background: var(--purple-soft); border-color: var(--purple-line); }
.sp-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.sp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sp-switch-ui {
  width: 44px; height: 24px; border-radius: 999px; flex-shrink: 0;
  background: var(--surface3); border: 1px solid var(--border);
  position: relative; transition: background var(--transition), border-color var(--transition);
}
.sp-switch-ui::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--transition);
}
.sp-switch input:checked + .sp-switch-ui { background: var(--primary); border-color: var(--primary-dim); }
.sp-switch input:checked + .sp-switch-ui::after { transform: translateX(20px); }
.sp-switch-text { display: flex; flex-direction: column; gap: 2px; }
.sp-switch-text strong { font-size: 13px; color: var(--text); }
.sp-switch-text small { font-size: 11px; color: var(--text3); }
.sp-toggle-card { display: flex; align-items: center; min-height: 100%; }
.sp-input-unit { display: flex; align-items: center; gap: 8px; }
.sp-input-unit .input { flex: 1; }
.sp-input-unit span { font-size: 12px; font-weight: 600; color: var(--text3); }
.sp-pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-pill-toggle { position: relative; cursor: pointer; }
.sp-pill-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.sp-pill-toggle span {
  display: inline-flex; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--border);
  background: var(--surface); color: var(--text2); transition: all var(--transition);
}
.sp-pill-toggle input:checked + span {
  background: var(--primary-soft, rgba(37,99,235,0.12)); color: var(--primary);
  border-color: rgba(37,99,235,0.35);
}
.sp-pill-toggle:hover span { border-color: var(--border-strong); color: var(--text); }
.sp-pill-grid--rules .sp-pill-toggle span { font-size: 11.5px; padding: 5px 10px; }
.sp-module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sp-module-card {
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.sp-module-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sp-mode-chips { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: var(--surface3); border: 1px solid var(--border); }
.sp-mode-chips button {
  flex: 1; padding: 5px 6px; border: none; border-radius: 6px; background: transparent;
  font-size: 10.5px; font-weight: 700; color: var(--text3); cursor: pointer;
  font-family: inherit; transition: all var(--transition); text-transform: uppercase; letter-spacing: 0.03em;
}
.sp-mode-chips button:hover { color: var(--text2); }
.sp-mode-chips button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.sp-mode-chips button[data-v="block"].active { color: var(--danger-fg); background: var(--danger-soft); }
.sp-mode-chips button[data-v="monitor"].active { color: var(--warning-fg); background: var(--warning-soft); }
.sp-link { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--primary); text-decoration: none; }
.sp-link:hover { text-decoration: underline; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) {
  .sp-modal { max-width: 100%; border-radius: 14px 14px 0 0; max-height: 92vh; align-self: flex-end; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .sp-module-grid { grid-template-columns: 1fr; }
}

/* ── Bot Management ── */
.bm-page { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: none; }

.bm-hero {
  position: relative; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.bm-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(79,70,229,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(37,99,235,0.08) 0%, transparent 50%);
}
.bm-hero-live .bm-hero-glow {
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(79,70,229,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(22,163,74,0.1) 0%, transparent 50%);
}
.bm-hero-inner {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 22px 24px;
}
.bm-hero-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bm-hero-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #6366F1 0%, #4F46E5 55%, #4338CA 100%);
  color: #fff; box-shadow: 0 6px 20px rgba(79,70,229,0.38);
}
.bm-hero-icon svg { width: 26px; height: 26px; }
.bm-hero-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bm-title { font-family: var(--font-display); font-size: 24px; font-weight: 650; letter-spacing: -0.025em; margin: 0; }
.bm-subtitle { margin: 5px 0 0; font-size: 13px; color: var(--text3); font-weight: 500; }
.bm-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bm-status-pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px;
  background: var(--surface3); color: var(--text3); border: 1px solid var(--border);
}
.bm-status-pill.on { background: var(--success-soft); color: var(--success-fg); border-color: var(--success-line); }
.bm-status-pill.off { background: var(--surface3); color: var(--text3); }

.bm-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.bm-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.bm-toggle-track {
  width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong);
  position: relative; transition: background 0.2s;
}
.bm-toggle input:checked + .bm-toggle-track { background: var(--primary); }
.bm-toggle-thumb {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.22); transition: transform 0.2s;
}
.bm-toggle input:checked + .bm-toggle-track .bm-toggle-thumb { transform: translateX(18px); }
.bm-toggle-label { font-size: 12px; font-weight: 600; color: var(--text2); }

.bm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bm-stat {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px !important;
}
.bm-stat-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--text3); border: 1px solid var(--border);
}
.bm-stat-icon svg { width: 18px; height: 18px; }
.stat-card.total .bm-stat-icon { color: var(--primary); background: var(--primary-soft); border-color: rgba(37,99,235,0.2); }
.stat-card.blocked .bm-stat-icon { color: var(--danger-fg); background: var(--danger-soft); border-color: var(--danger-line); }
.stat-card.info .bm-stat-icon { color: var(--info-fg); background: var(--info-soft); border-color: var(--info-line); }
.stat-card.warning .bm-stat-icon { color: var(--warning-fg); background: var(--warning-soft); border-color: var(--warning-line); }

.bm-shell { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.bm-shell-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
}
.bm-shell-body { padding: 20px; }
.bm-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.bm-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: none; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--text3); cursor: pointer; transition: all 0.15s;
}
.bm-tab:hover { color: var(--text2); background: var(--surface3); }
.bm-tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.07); border: 1px solid var(--border); }
.bm-tab-count {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--surface3); color: var(--text3); font-variant-numeric: tabular-nums;
}
.bm-tab.active .bm-tab-count { background: var(--primary-soft); color: var(--primary); }

.bm-panel { display: none; }
.bm-panel.active { display: block; animation: bmFadeIn 0.2s ease; }
@keyframes bmFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.bm-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.bm-sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.bm-sidebar-block {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface2);
}
.bm-sidebar-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text3); margin: 0 0 12px;
}
.bm-sidebar-empty { font-size: 12px; color: var(--text3); margin: 0; }

.bm-cat-bar-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px;
  width: 100%; padding: 6px 4px; margin-bottom: 4px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; text-align: left; transition: background 0.12s;
}
.bm-cat-bar-row:hover { background: var(--surface3); }
.bm-cat-bar-row.active { background: var(--primary-soft); }
.bm-cat-bar-label {
  grid-column: 1; display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--text2);
}
.bm-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bm-cat-bar-track {
  grid-column: 1; height: 4px; border-radius: 999px; background: var(--surface3); overflow: hidden;
}
.bm-cat-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.bm-cat-bar-num { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12px; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }

.bm-tier-list {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
}
.bm-tier-list li {
  display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; color: var(--text2);
}
.bm-tier-list li span {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; background: var(--surface); border: 1px solid var(--border);
  color: var(--primary);
}

.bm-callout {
  padding: 12px 14px; border-radius: 10px;
  background: var(--warning-soft); border: 1px solid var(--warning-line);
  font-size: 12px; color: var(--text2); line-height: 1.45;
}
.bm-callout strong { display: block; font-size: 12px; margin-bottom: 4px; color: var(--warning-fg); }
.bm-callout p { margin: 0; }
.bm-callout code { font-size: 11px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,0.06); }

.bm-main { min-width: 0; }
.bm-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.bm-toolbar-right { display: flex; align-items: center; gap: 10px; }
.bm-search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 380px; }
.bm-search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text3); pointer-events: none;
}
.bm-search { padding-left: 38px !important; border-radius: 10px; }
.bm-result-count { font-size: 12px; font-weight: 600; color: var(--text3); font-variant-numeric: tabular-nums; }

.bm-view-toggle {
  display: flex; padding: 3px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2);
}
.bm-view-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 28px; border: none; border-radius: 6px; background: transparent;
  color: var(--text3); cursor: pointer; transition: all 0.12s;
}
.bm-view-btn svg { width: 15px; height: 15px; }
.bm-view-btn:hover { color: var(--text2); }
.bm-view-btn.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.bm-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.bm-cat-chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 11.5px; font-weight: 600; color: var(--text2); cursor: pointer;
  transition: all 0.15s;
}
.bm-cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.bm-cat-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.bm-system-grid.view-grid { display: flex; flex-direction: column; gap: 20px; }
.bm-cat-section-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.bm-cat-section-head h3 { font-size: 13px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -0.01em; }
.bm-cat-section-count {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--surface3); color: var(--text3);
}
.bm-cat-section-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}

.bm-system-grid.view-list { display: flex; flex-direction: column; gap: 6px; }

.bm-bot-card {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  border-top: 2px solid var(--border-strong);
}
.bm-bot-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.bm-bot-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bm-bot-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; letter-spacing: -0.02em;
  background: var(--surface2); color: var(--text2); border: 1px solid var(--border);
}
.bm-bot-name { font-size: 13.5px; font-weight: 650; margin: 0 0 6px; color: var(--text); letter-spacing: -0.01em; line-height: 1.3; }
.bm-bot-pattern {
  display: block; font-size: 11px; padding: 5px 8px; border-radius: 6px;
  background: var(--surface2); color: var(--text2); margin-bottom: 10px; word-break: break-all;
  font-family: 'JetBrains Mono', monospace;
}
.bm-bot-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bm-bot-overridden { box-shadow: 0 0 0 1px var(--success-line); }
.bm-override-tag {
  display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px;
  background: var(--success-soft); color: var(--success-fg); vertical-align: middle;
}
.bm-bot-cat-pill { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.bm-allow-btn { font-size: 10px !important; padding: 2px 6px !important; opacity: 0; transition: opacity 0.12s; }
.bm-bot-card:hover .bm-allow-btn, .bm-bot-row:hover .bm-allow-btn { opacity: 1; }

.bm-bot-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  transition: background 0.12s, box-shadow 0.12s;
}
.bm-bot-row:hover { background: var(--surface2); box-shadow: var(--shadow-xs); }
.bm-bot-row-main { flex: 1; min-width: 0; }
.bm-bot-row-main strong { display: block; font-size: 13px; margin-bottom: 2px; }
.bm-bot-row-main code { font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }
.bm-bot-row-cat { font-size: 11px; font-weight: 600; color: var(--text3); white-space: nowrap; }

.bm-cat-search { border-top-color: #2563EB; } .bm-cat-search .bm-bot-avatar { color: #2563EB; background: rgba(37,99,235,0.08); }
.bm-cat-social { border-top-color: #7C3AED; } .bm-cat-social .bm-bot-avatar { color: #7C3AED; background: rgba(124,58,237,0.08); }
.bm-cat-monitor { border-top-color: #0891B2; }
.bm-cat-seo { border-top-color: #D97706; }
.bm-cat-scraper { border-top-color: #EA580C; }
.bm-cat-headless { border-top-color: #DC2626; }
.bm-cat-attack { border-top-color: #991B1B; }
.bm-cat-suspicious { border-top-color: #64748B; }

.bm-panel-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.bm-panel-desc { margin: 0; font-size: 13px; color: var(--text3); font-weight: 500; }
.bm-filter-select { max-width: 220px; border-radius: 8px; }

.bm-sig-list { display: flex; flex-direction: column; gap: 8px; }
.bm-sig-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); transition: box-shadow 0.12s, border-color 0.12s;
}
.bm-sig-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.bm-sig-card-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 180px; }
.bm-sig-status {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text3);
}
.bm-sig-status.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.bm-sig-status.off { background: var(--text3); opacity: 0.4; }
.bm-sig-title { font-size: 14px; font-weight: 650; color: var(--text); margin-bottom: 3px; }
.bm-sig-pattern { font-size: 11.5px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }
.bm-sig-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bm-sig-priority { font-size: 11px; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }
.bm-sig-actions { display: flex; gap: 6px; margin-left: auto; }

.bm-events-wrap { border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.bm-events-table tbody tr { transition: background 0.1s; }
.bm-events-table tbody tr:hover { background: var(--surface2); }
.bm-table .mono, .bm-table .bm-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.bm-time { white-space: nowrap; color: var(--text2); }
.bm-ev-cat { font-size: 12px; font-weight: 600; }

.bm-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 48px 24px; text-align: center; color: var(--text3);
}
.bm-empty svg { opacity: 0.35; }
.bm-empty p { margin: 0; font-size: 13px; }
.bm-empty-lg h4 { margin: 4px 0 0; font-size: 15px; font-weight: 650; color: var(--text); }
.bm-empty-lg p { max-width: 360px; line-height: 1.5; }
.bm-empty.inline { padding: 24px; flex-direction: row; }
.bm-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px; color: var(--text3); font-size: 13px; }
.bm-loading.inline { flex-direction: row; padding: 16px; }
.bm-spinner {
  width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: bmSpin 0.7s linear infinite;
}
@keyframes bmSpin { to { transform: rotate(360deg); } }

.bm-modal { max-width: 620px; }
.bm-action-seg { width: 100%; }
.bm-ptype-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bm-ptype-chip {
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface2); font-size: 11px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all 0.12s; font-family: 'JetBrains Mono', monospace;
}
.bm-ptype-chip:hover { border-color: var(--primary); color: var(--primary); }
.bm-ptype-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* Bot picker (imza modal) */
.bm-sig-pick-card { margin-bottom: 4px; }
.bm-sig-pick-card.manual-mode .bm-bot-pick,
.bm-sig-pick-card.manual-mode .bm-bot-pick-selected { opacity: 0.55; pointer-events: none; }
.bm-link-btn {
  margin-top: 10px; padding: 0; border: none; background: none;
  font-size: 12px; font-weight: 600; color: var(--primary); cursor: pointer;
}
.bm-link-btn:hover { text-decoration: underline; }
.bm-bot-pick { position: relative; }
.bm-bot-pick-input-wrap { position: relative; display: flex; align-items: center; }
.bm-bot-pick-input-wrap svg {
  position: absolute; left: 12px; width: 16px; height: 16px; color: var(--text3); pointer-events: none;
}
.bm-bot-pick-input { padding-left: 38px !important; padding-right: 36px !important; border-radius: 10px; }
.bm-bot-pick-clear {
  position: absolute; right: 8px; width: 28px; height: 28px; border: none; border-radius: 6px;
  background: var(--surface3); color: var(--text2); font-size: 18px; line-height: 1; cursor: pointer;
}
.bm-bot-pick-clear:hover { background: var(--border); color: var(--text); }
.bm-bot-pick-menu {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 280px; overflow-y: auto; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: var(--shadow-lg); padding: 6px;
}
.bm-bot-pick-group-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text3); padding: 8px 10px 4px;
}
.bm-bot-pick-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 10px;
  width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 2px;
  border: none; border-radius: 9px; background: transparent; cursor: pointer; transition: background 0.1s;
}
.bm-bot-pick-item:hover, .bm-bot-pick-item.active { background: var(--primary-soft); }
.bm-bot-pick-item-name { grid-column: 1; font-size: 13px; font-weight: 650; color: var(--text); }
.bm-bot-pick-item-pattern {
  grid-column: 1; font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace;
}
.bm-bot-pick-item-sys { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.bm-bot-pick-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--text3); }
.bm-bot-pick-selected { margin-top: 12px; }
.bm-bot-pick-chip {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface2); border-top: 2px solid var(--border-strong);
}
.bm-bot-pick-chip-av {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; background: var(--surface); border: 1px solid var(--border);
}
.bm-bot-pick-chip-body strong { display: block; font-size: 14px; margin-bottom: 2px; }
.bm-bot-pick-chip-body code { display: block; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.bm-field-locked { background: var(--surface2) !important; color: var(--text2); cursor: not-allowed; }
.sp-segment-btn[data-v="allow"].active { color: var(--success-fg); background: var(--success-soft); border-color: var(--success-line); }

@media (max-width: 960px) {
  .bm-layout { grid-template-columns: 1fr; }
  .bm-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .bm-sidebar-block { flex: 1; min-width: 200px; }
  .bm-callout { flex: 1 1 100%; }
  .bm-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bm-shell-body { padding: 14px; }
  .bm-sig-card { flex-direction: column; align-items: flex-start; }
  .bm-sig-actions { margin-left: 0; width: 100%; }
  .bm-stats { grid-template-columns: 1fr 1fr; }
  .bm-cat-section-grid { grid-template-columns: 1fr; }
  .bm-page .header-actions { width: 100%; }
}
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs .tab {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface2); color: var(--text2); font-size: 12px; cursor: pointer;
}
.tabs .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-panel { display: block; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title  { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.modal-body   { padding: 18px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.close-btn { background: none; border: none; cursor: pointer; color: var(--text3); padding: 4px; border-radius: 6px; display: flex; transition: color var(--transition), background var(--transition); }
.close-btn:hover { color: var(--text); background: var(--surface3); }
.close-btn svg { width: 18px; height: 18px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dk { font-size: 10.5px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.dv { font-size: 12.5px; font-weight: 500; color: var(--text); word-break: break-all; font-family: 'JetBrains Mono', monospace; }

/* ===== Charts ===== */
.threat-chart {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 120px;
}
.timeseries-chart {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 3px;
  min-height: 130px;
  padding: 8px 2px 2px;
  overflow-x: auto;
}
.ts-col {
  flex: 1;
  min-width: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ts-bar-group {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  height: 90px;
  width: 100%;
}
.ts-bar {
  width: 14px;
  border-radius: 2px 2px 0 0;
  transition: height 0.35s ease;
}
.ts-bar.allowed { background: var(--success); }
.ts-bar.blocked { background: var(--danger); }
.ts-bar.monitored { background: var(--purple, #8b5cf6); }
.ts-label {
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}
.ts-legend { display: flex; gap: 12px; align-items: center; }
.ts-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); font-weight: 500; }
.ts-legend-dot { width: 8px; height: 8px; border-radius: 2px; }

.chart-bars { display: flex; flex-direction: column; gap: 7px; }
.chart-bar-row { display: flex; align-items: center; gap: 8px; }
.chart-bar-label { width: 65px; font-size: 10.5px; color: var(--text2); text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar-track { flex: 1; background: var(--surface3); border-radius: 999px; height: 7px; overflow: hidden; }
.chart-bar-fill  { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.chart-bar-count { width: 34px; font-size: 10.5px; font-weight: 600; color: var(--text2); text-align: right; flex-shrink: 0; }
.threat-bar { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.threat-bar .name { width: 110px; font-size: 11px; color: var(--text2); flex-shrink: 0; }
.threat-bar .bar-bg { flex: 1; background: var(--surface3); border-radius: 999px; height: 7px; overflow: hidden; }
.threat-bar .bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.threat-bar .count { width: 34px; font-size: 11px; font-weight: 600; color: var(--text2); text-align: right; }

/* ===== Pipeline ===== */
.pipeline-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pipe-step {
  padding: 6px 12px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text2);
}
.pipe-step.active-step { background: var(--primary-pale); color: var(--primary); border-color: rgba(37,99,235,0.2); font-weight: 700; }
.pipe-arrow { color: var(--text3); font-size: 16px; }

/* ===== Status Chips ===== */
.status-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border2);
}
.status-chip.on .chip-dot { background: var(--success); box-shadow: 0 0 6px rgba(22,163,74,0.5); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); flex-shrink: 0; }
.chip-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.chip-detail { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ===== Engine Grid ===== */
.engine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 4px; }
.engine-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; box-shadow: var(--shadow-xs); }
.engine-card .name { font-size: 10.5px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.engine-card .status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.status-dot-sm { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot-sm.ok   { background: var(--success); box-shadow: 0 0 6px rgba(22,163,74,0.45); }
.status-dot-sm.warn { background: var(--warning); }
.status-dot-sm.err  { background: var(--danger); }
.status-dot-sm.off  { background: var(--text3); }

/* ===== Infra — full-width ops console ===== */
.infra-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none;
}
.infra-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(105deg, var(--surface3) 0%, var(--surface) 42%, var(--surface) 100%);
}
.infra-topbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.infra-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--success-line);
  background: var(--success-soft);
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.infra-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: infraPulse 1.8s ease-out infinite;
}
@keyframes infraPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .infra-live-dot { animation: none; }
}
.infra-title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.15;
}
.infra-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text3);
  line-height: 1.35;
}
.infra-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.infra-pulse {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
}

.infra-rail-wrap,
.infra-kpi-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 12px;
}
.infra-rail-label,
.infra-section-label {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}
.infra-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.infra-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 10px 10px 12px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}
.infra-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--text3);
}
.infra-card.active {
  border-color: var(--success-line);
  background: var(--success-soft);
}
.infra-card.active::before { background: var(--success); }
.infra-card.warn {
  border-color: var(--warning-line);
  background: var(--warning-soft);
}
.infra-card.warn::before { background: var(--warning); }
.infra-card.inactive { opacity: 0.88; }
.infra-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.infra-status {
  font-size: 11px;
  color: var(--text2);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.infra-card.active .infra-status { color: var(--success); }
.infra-card.warn .infra-status { color: var(--warning); }
.infra-card.inactive .infra-status { color: var(--text3); }

.infra-tele-grid,
.infra-sys-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.infra-sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.infra-tele-grid .info-item,
.infra-sys-grid .info-item {
  min-height: 64px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 11px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface2);
}
.infra-tele-grid .info-item .label,
.infra-sys-grid .info-item .label {
  font-size: 10.5px;
  color: var(--text3);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.infra-tele-grid .info-item .val,
.infra-sys-grid .info-item .val {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: var(--text);
  letter-spacing: -0.02em;
}

.infra-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: start;
}
.infra-pane {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px;
  min-width: 0;
}
.infra-pane--side {
  position: sticky;
  top: 12px;
  background:
    linear-gradient(180deg, var(--surface2) 0%, var(--surface) 28%);
}
.infra-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.infra-pane-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
}
.infra-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text3);
}
.infra-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border2);
}
.infra-sub-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.infra-sub-head h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
}
.infra-sys-warn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.infra-sys-warn[hidden] { display: none; }
.infra-sys-warn .alert-banner { margin: 0; font-size: 12px; }
#ceilingServiceTable .table-wrap { margin-top: 10px; }

@media (max-width: 1200px) {
  .infra-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .infra-tele-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .infra-split { grid-template-columns: 1fr; }
  .infra-pane--side { position: static; }
}
@media (max-width: 720px) {
  .infra-grid,
  .infra-tele-grid,
  .infra-sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .infra-grid,
  .infra-tele-grid,
  .infra-sys-grid { grid-template-columns: 1fr; }
}

/* ===== Tags ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-pale); border: 1px solid rgba(37,99,235,0.15);
  color: var(--primary); border-radius: 6px; padding: 3px 8px;
  font-size: 12px; font-weight: 600;
}
.tag-remove { cursor: pointer; font-size: 14px; line-height: 1; opacity: 0.6; transition: opacity var(--transition); }
.tag-remove:hover { opacity: 1; }

/* ===== Settings ===== */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; align-items: start;
}
.setting-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.setting-block-header { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.setting-block-header svg { width: 14px; height: 14px; color: var(--primary); }
.setting-block-title { font-size: 13px; font-weight: 700; color: var(--text); }
.setting-block-body { padding: 13px 15px; display: flex; flex-direction: column; gap: 11px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border2); }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text); }
.toggle-sub   { font-size: 11px; color: var(--text3); margin-top: 1px; }

.svc-gen-details { margin-top: 14px; border-top: 1px solid var(--border2); padding-top: 10px; }
.svc-gen-details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); list-style: none; user-select: none; }
.svc-gen-details > summary::-webkit-details-marker { display: none; }
.svc-gen-details > summary::before { content: "▸ "; display: inline-block; transition: transform .15s; }
.svc-gen-details[open] > summary::before { transform: rotate(90deg); }
.svc-gen-details-body { padding-top: 10px; }

/* ============================================================
   Modern servis oluşturma formu — service-waf "Genel Ayarlar"
   Numaralı bölümler (rail + içerik) + canlı istek-akış önizlemesi.
   Tüm stiller .svc-form altında kapsanır (global regresyon yok).
   ============================================================ */
.svc-form { display: flex; flex-direction: column; }
.svc-form .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.svc-form .req { color: var(--danger); font-weight: 700; }

/* Numaralı bölümler */
.svc-form-section {
  display: grid; grid-template-columns: 190px 1fr; gap: 26px;
  padding: 22px 18px; border-bottom: 1px solid var(--border2);
}
.svc-form-rail { display: flex; flex-direction: column; gap: 4px; }
.svc-form-rail .sec-num {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; color: var(--primary-fg); font-variant-numeric: tabular-nums;
}
.svc-form-rail .sec-num::before {
  content: ""; width: 16px; height: 2px; border-radius: 2px;
  background: var(--brand-grad);
}
.svc-form-rail .sec-title { font-size: 14px; font-weight: 700; color: var(--text); }
.svc-form-rail .sec-sub { font-size: 12px; color: var(--text3); line-height: 1.55; }
.svc-form-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Gelişmiş ayarlar — bölüm hizasına oturur */
.svc-form .svc-gen-details { margin: 0; border-top: none; padding: 20px 18px; border-bottom: 1px solid var(--border2); }
.svc-form .svc-gen-details > summary {
  display: inline-flex; align-items: center; gap: 7px; color: var(--text2); font-size: 13px;
}
.svc-form .svc-gen-details > summary::before { content: "▸"; }
.svc-form .svc-gen-details-body { padding-top: 16px; }

/* Alt aksiyon çubuğu */
.svc-form-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 16px 18px; background: var(--surface2); border-top: 1px solid var(--border);
}
.svc-form-footer .footer-hint { margin-right: auto; font-size: 12px; color: var(--text3); }

@media (max-width: 760px) {
  .svc-form-section { grid-template-columns: 1fr; gap: 14px; padding: 18px 14px; }
  .svc-form .form-grid-2 { grid-template-columns: 1fr; }
}

.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--primary); cursor: pointer; }
.range-val { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 22px; text-align: right; }

/* ===== Block Page Editor ===== */
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-cards--6 { grid-template-columns: repeat(3, 1fr); }
.theme-card {
  border: 2px solid var(--border); border-radius: 9px; overflow: hidden;
  cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface);
  padding: 0; font: inherit; color: inherit; text-align: left; width: 100%;
}
.theme-card:hover { border-color: rgba(37,99,235,0.3); box-shadow: 0 0 0 3px var(--primary-glow); }
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.theme-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-preview {
  height: 60px; display: flex; align-items: flex-end;
  justify-content: center; padding-bottom: 5px;
  position: relative; overflow: hidden;
}
.theme-preview.modern  { background: linear-gradient(180deg, #DC2626 0%, #DC2626 42%, #f1f5f9 42%); }
.theme-preview.minimal { background: #fff; }
.theme-preview.dark    { background: #0a0f1e; }
.theme-preview.corporate { background: linear-gradient(90deg, #2563EB 0 8px, #f4f6f8 8px); }
.theme-preview.soft { background: radial-gradient(circle at 20% 20%, #fecaca 0%, #f8fafc 55%); }
.theme-preview.terminal { background: #0b1220; }
.theme-preview.modern  .mini-card { background:#fff; border-radius:3px; width:55%; height:24px; box-shadow:0 2px 5px rgba(0,0,0,.15); }
.theme-preview.minimal .mini-card { display:flex; flex-direction:column; align-items:center; gap:3px; }
.theme-preview.minimal .mini-circle { width:16px; height:16px; background:#DC262618; border-radius:50%; }
.theme-preview.minimal .mini-txt   { width:32px; height:3px; background:#0f172a20; border-radius:2px; }
.theme-preview.dark    .mini-card  { background:#0f1729; border:1px solid rgba(255,255,255,.1); border-radius:3px; width:55%; height:24px; }
.theme-preview.corporate .mini-card { background:#fff; border:1px solid #e2e8f0; border-left:3px solid #2563EB; border-radius:2px; width:62%; height:26px; }
.theme-preview.soft .mini-card { background:rgba(255,255,255,.85); border:1px solid rgba(255,255,255,.8); border-radius:10px; width:58%; height:26px; box-shadow:0 4px 10px rgba(15,23,42,.08); }
.theme-preview.terminal .mini-card { background:#020617; border:1px solid #1e293b; border-radius:4px; width:70%; height:22px; }
.theme-card-label { padding: 5px 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--text2); }
.theme-card.active .theme-card-label { color: var(--primary); }

.color-swatches { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0; padding: 0; appearance: none;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: var(--text); transform: scale(1.1); box-shadow: 0 0 0 3px rgba(15,23,42,0.12); }
.color-swatch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.blockpage-preview-wrap {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2); overflow: hidden;
}
.blockpage-preview-wrap iframe { width: 100%; height: 380px; border: none; display: block; }

/* ===== Test Page ===== */
.test-result-box {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; line-height: 1.7; min-height: 80px;
  white-space: pre-wrap; word-break: break-all; color: var(--text2);
}

/* ===== Login — centered radar stage (no split) ===== */
.login-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: #060a12;
  color: var(--text);
  z-index: 1;
  padding: 24px;
}
.login-page::before { display: none; }
html[data-theme="light"] .login-page { background: #f3f6fb; }

.login-theme-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.login-theme-btn:hover {
  color: var(--text);
  background: var(--surface2);
  transform: translateY(-1px);
}
.login-theme-btn svg { width: 18px; height: 18px; }
html[data-theme="light"] .login-theme-icon--moon { display: none; }
html:not([data-theme="light"]) .login-theme-icon--sun { display: none; }

.login-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-stage-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 95vw);
  height: min(900px, 95vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(77,141,255,0.28) 0%,
    rgba(52,200,232,0.10) 28%,
    transparent 62%);
  filter: blur(8px);
}
html[data-theme="light"] .login-stage-glow {
  background: radial-gradient(circle,
    rgba(37,99,235,0.18) 0%,
    rgba(8,145,178,0.08) 30%,
    transparent 62%);
}
.login-stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120,150,210,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,210,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 10%, transparent 72%);
}
html[data-theme="light"] .login-stage-grid {
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
}

.login-rings {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(980px, 118vw);
  height: min(980px, 118vw);
  transform: translate(-50%, -50%);
}
.login-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(77,141,255,0.16);
  box-sizing: border-box;
}
.login-ring--1 {
  width: 28%; height: 28%;
  border-color: rgba(77,141,255,0.45);
  box-shadow: 0 0 24px rgba(77,141,255,0.18), inset 0 0 18px rgba(52,200,232,0.08);
}
.login-ring--2 {
  width: 42%; height: 42%;
  border-style: dashed;
  border-color: rgba(77,141,255,0.22);
  animation: login-spin 42s linear infinite;
}
.login-ring--3 {
  width: 56%; height: 56%;
  border-color: rgba(52,200,232,0.28);
  box-shadow: 0 0 0 1px rgba(52,200,232,0.06);
}
.login-ring--4 {
  width: 72%; height: 72%;
  border-style: dashed;
  border-color: rgba(120,150,210,0.16);
  animation: login-spin-rev 56s linear infinite;
}
.login-ring--5 {
  width: 88%; height: 88%;
  border-color: rgba(77,141,255,0.12);
}
.login-ring-sweep {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    rgba(77,141,255,0.22) 28deg,
    transparent 70deg);
  animation: login-spin 5.5s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent 46%, #000 47%);
  mask: radial-gradient(farthest-side, transparent 46%, #000 47%);
  opacity: 0.7;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
@keyframes login-spin-rev { to { transform: rotate(-360deg); } }

html[data-theme="light"] .login-ring { border-color: rgba(37,99,235,0.14); }
html[data-theme="light"] .login-ring--1 {
  border-color: rgba(37,99,235,0.4);
  box-shadow: 0 0 20px rgba(37,99,235,0.12);
}
html[data-theme="light"] .login-ring--3 { border-color: rgba(8,145,178,0.28); }
html[data-theme="light"] .login-ring-sweep {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(37,99,235,0.18) 28deg, transparent 70deg);
}

.login-nodes {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
}
.login-node {
  position: absolute;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #84B2FF;
  box-shadow: 0 0 8px rgba(77,141,255,0.7);
  animation: login-node-pulse 3.6s ease-in-out infinite;
}
.login-node--ring {
  width: 4px;
  height: 4px;
}
html[data-theme="light"] .login-node {
  background: #2563EB;
  box-shadow: 0 0 8px rgba(37,99,235,0.45);
}
@keyframes login-node-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

.login-center {
  position: relative;
  z-index: 1;
  width: min(460px, 92vw);
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: login-rise 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes login-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.login-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14% 16%;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 28px 60px rgba(0,0,0,0.45),
    0 0 0 1px rgba(77,141,255,0.06);
  overflow: hidden;
}
.login-card::before { display: none; }
html[data-theme="light"] .login-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15,23,42,0.08);
  box-shadow: 0 24px 48px rgba(15,23,42,0.10);
}

.login-card-head {
  text-align: center;
  margin-bottom: 14px;
  width: 100%;
}
.login-wordmark {
  display: block;
  width: auto;
  max-width: 148px;
  height: auto;
  margin: 0 auto 10px;
}
.login-card-head h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--text);
}
.login-lead {
  margin: 0;
  font-size: 12.5px;
  color: var(--text3);
}
.login-card .form-group { margin-bottom: 11px; text-align: left; width: 100%; }
.login-card .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.login-card .input {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.login-card .input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-pale);
  background: var(--surface);
}
.login-card .input::placeholder { color: var(--text3); }
html[data-theme="light"] .login-card .input {
  background: #f8fafc;
  border-color: rgba(15,23,42,0.09);
}
html[data-theme="light"] .login-card .input:focus { background: #fff; }

.login-submit {
  width: auto;
  min-width: 140px;
  max-width: 100%;
  margin: 8px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--brand-grad);
  border: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(77,141,255,0.28);
}
.login-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(77,141,255,0.4);
}
.login-submit:disabled { opacity: 0.72; cursor: wait; transform: none; }

.login-card #loginError[hidden] { display: none !important; }
.login-card #loginError:not([hidden]) {
  display: flex;
  margin-bottom: 10px;
  width: 100%;
  border-radius: 12px;
  font-size: 12px;
}

@media (max-width: 480px) {
  .login-center { width: min(400px, 94vw); max-width: 94vw; }
  .login-card { padding: 12% 14%; }
  .login-wordmark { max-width: 128px; }
  .login-card-head h1 { font-size: 1.15rem; }
  .login-rings { width: 140vw; height: 140vw; }
  .login-theme-btn { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-ring--2,
  .login-ring--4,
  .login-ring-sweep,
  .login-node,
  .login-center { animation: none !important; }
}

/* ===== Misc ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.divider { height: 1px; background: var(--border); margin: 10px 0; }
.help-text { font-size: 12.5px; color: var(--text3); line-height: 1.6; }
.link-settings { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 600; }
.link-settings:hover { text-decoration: underline; }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--text3); }
.text-sm { font-size: 12px; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.w-full { width: 100%; }
.justify-center { justify-content: center; }

/* ===== Lockdown bar (topbar lockdown) ===== */
.lockdown-banner {
  background: rgba(220,38,38,0.08); border-bottom: 1px solid rgba(220,38,38,0.15);
  color: var(--danger); padding: 7px 16px; font-size: 12.5px; font-weight: 600;
  display: none; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
}
.lockdown-banner.visible { display: flex; }

/* ===== DDoS alert banner ===== */
.ddos-banner {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; flex-shrink: 0;
  background: rgba(217,119,6,0.1); border-bottom: 1px solid rgba(217,119,6,0.2);
  color: var(--warning); font-size: 13px;
  animation: ddosPulse 2s ease-in-out infinite;
}
.ddos-banner.critical {
  background: rgba(220,38,38,0.12); border-bottom-color: rgba(220,38,38,0.25);
  color: var(--danger);
}
.ddos-banner.visible { display: flex; }
.ddos-banner-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ddos-banner-detail { font-size: 11.5px; opacity: 0.85; font-weight: 500; }

/* ===== Origin down banner ===== */
.origin-banner {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; flex-shrink: 0;
  background: rgba(220,38,38,0.1); border-bottom: 1px solid rgba(220,38,38,0.2);
  color: var(--danger); font-size: 13px;
}
.origin-banner.visible { display: flex; }
@keyframes ddosPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hi); background-clip: padding-box; }

/* Report stats */
.report-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; }
.report-stats .stat-card .value { font-size: 22px; }

/* GeoIP presets */
.preset-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* Sites list */
.sites-list { display: flex; flex-direction: column; gap: 10px; }
.site-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* TR7 platform */
.health-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--text3); }
.health-dot.ok { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.25); }
.health-dot.bad { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.25); }
.health-dot.unk { background: #94a3b8; }

.wizard-steps { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wizard-step { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text2); }
.wizard-step .step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

.wiz-domain-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-top: 8px; padding: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; }
.wiz-domain-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 2px; }
.wiz-domain-item input { accent-color: var(--primary); }

.help-text { font-size: 12px; color: var(--text3); line-height: 1.5; }
.site-item .site-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.site-item .site-url  { font-size: 12px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   ProWAF — Console Shell v4 (Topbar · Sidebar · Primitives)
   ============================================================ */

/* Make main a positioned column so topbar can be sticky */
.main { position: relative; }

/* Ensure page content sits above ambient grid */
.sidebar, .main, .topbar { position: relative; z-index: 1; }

/* ===== Brand helpers ===== */
.brand-grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ===== Sidebar refinements ===== */
aside.sidebar {
  transition: width var(--transition-slow);
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--bg) 92%, var(--surface)) 100%);
}
.logo {
  gap: 6px;
  position: relative;
  padding: 13px 8px 11px 11px;
}
.logo-full { max-width: 156px; }
.nav-label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.nav-item {
  position: relative;
  margin: 1px 6px;
  padding: 7px 10px;
  border-radius: 8px;
  gap: 9px;
}
.nav-item:hover {
  background: color-mix(in srgb, var(--surface3) 92%, transparent);
  color: var(--text);
}
.nav-item.active {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary-line);
  color: var(--primary);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 15px; border-radius: 0 2px 2px 0; background: var(--primary);
}
.nav-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.nav-icon {
  width: 20px; height: 20px;
  color: inherit;
}
.nav-icon svg { opacity: 0.72; }
.nav-item:hover .nav-icon svg,
.nav-item.active .nav-icon svg { opacity: 1; }
.nav-icon img { width: 15px; height: 15px; }

/* Nav badge (counts / status) */
.nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 5px; border-radius: 999px; font-family: var(--font-mono);
  background: var(--surface3); color: var(--text3); border: 1px solid var(--border);
}
.nav-badge.danger  { background: var(--danger-soft);  color: var(--danger-fg);  border-color: var(--danger-line); }
.nav-badge.success { background: var(--success-soft); color: var(--success-fg); border-color: var(--success-line); }
.nav-badge.warn    { background: var(--warning-soft); color: var(--warning-fg); border-color: var(--warning-line); }
.nav-badge.dot { padding: 0; width: 7px; height: 7px; }

/* Collapse toggle pinned in sidebar */
.sidebar-collapse {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: auto; flex-shrink: 0;
  border-radius: 7px; border: 1px solid transparent; background: transparent;
  color: var(--text3); cursor: pointer; transition: all var(--transition);
}
.sidebar-collapse:hover {
  color: var(--text); border-color: var(--border); background: var(--surface2);
}
.sidebar-collapse:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.sidebar-collapse svg { width: 13px; height: 13px; transition: transform var(--transition-slow); }

/* ===== Collapsed sidebar ===== */
body[data-sidebar="collapsed"] aside.sidebar { width: var(--sidebar-w-collapsed); }
body[data-sidebar="collapsed"] .logo-full,
body[data-sidebar="collapsed"] .nav-label,
body[data-sidebar="collapsed"] .nav-group-label,
body[data-sidebar="collapsed"] .nav-badge:not(.dot),
body[data-sidebar="collapsed"] .sidebar-bottom .mode-text,
body[data-sidebar="collapsed"] .logout-btn span,
body[data-sidebar="collapsed"] .lockdown-badge { display: none !important; }
body[data-sidebar="collapsed"] .logo-mark { display: block; }
html[data-theme="light"] body[data-sidebar="collapsed"] .logo-mark.logo-for-dark { display: none !important; }
html:not([data-theme="light"]) body[data-sidebar="collapsed"] .logo-mark.logo-for-light { display: none !important; }
body[data-sidebar="collapsed"] .logo { justify-content: center; padding: 12px 0 10px; }
body[data-sidebar="collapsed"] .logo-link { justify-content: center; }
body[data-sidebar="collapsed"] .sidebar-collapse {
  position: absolute; top: auto; bottom: -30px; left: 50%; right: auto;
  transform: translateX(-50%); margin: 0; z-index: 2;
  border-color: var(--border); background: var(--surface2);
}
body[data-sidebar="collapsed"] .sidebar-collapse svg { transform: rotate(180deg); }
body[data-sidebar="collapsed"] .sidebar-mode-switch { margin-top: 34px; }
body[data-sidebar="collapsed"] .nav-item { justify-content: center; margin: 2px 8px; padding: 8px 0; }
body[data-sidebar="collapsed"] .nav-item .nav-icon { width: 28px; height: 28px; }
body[data-sidebar="collapsed"] .nav-item.active::before { left: -8px; }
body[data-sidebar="collapsed"] .nav-group-label { height: 8px; padding: 6px 0 0; }
body[data-sidebar="collapsed"] .mode-badge { justify-content: center; }
body[data-sidebar="collapsed"] .logout-btn { justify-content: center; }

/* Tooltips for collapsed nav + any [data-tip] */
[data-tip] { position: relative; }
body[data-sidebar="collapsed"] .nav-item[data-tip]:hover::after,
[data-tip].tip-hover:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--surface-hi); color: var(--text); border: 1px solid var(--border-strong);
  padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  white-space: nowrap; box-shadow: var(--shadow-lg); z-index: var(--z-dropdown);
  pointer-events: none; animation: tipIn 0.14s var(--ease-out);
}
@keyframes tipIn { from { opacity: 0; transform: translateY(-50%) translateX(-4px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }

/* ===== Topbar ===== */
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: var(--z-topbar);
}
.topbar-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.topbar-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.topbar-host-stats {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.topbar-host-stats:hover {
  border-color: var(--border-strong);
  background: var(--surface3);
}
.ths-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  flex-shrink: 0;
}
.ths-item { display: inline-flex; align-items: baseline; gap: 5px; line-height: 1; }
.ths-k {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3);
}
.ths-v {
  font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums;
  color: var(--text); font-family: var(--font-mono, ui-monospace, monospace);
  min-width: 3.2ch;
}
.ths-v.is-warn { color: var(--warning-fg); }
.ths-v.is-crit { color: var(--danger-fg); }
@media (max-width: 720px) {
  .topbar-host-stats { gap: 8px; padding: 4px 10px; }
}

/* Hamburger (mobile) */
.menu-toggle { display: none; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.breadcrumb a, .breadcrumb span { color: var(--text3); text-decoration: none; white-space: nowrap; }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb .sep { color: var(--text3); opacity: 0.5; }
.breadcrumb .current { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* Topbar search */
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  width: clamp(180px, 26vw, 340px); height: 36px; padding: 0 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: text; transition: all var(--transition);
}
.topbar-search:hover { border-color: var(--border-strong); }
.topbar-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); background: var(--surface); }
.topbar-search svg { width: 15px; height: 15px; color: var(--text3); flex-shrink: 0; }
.topbar-search input {
  flex: 1; border: none; background: none; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text); min-width: 0;
}
.topbar-search input::placeholder { color: var(--text3); }
.topbar-search .kbd {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text3);
  background: var(--surface3); border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 6px; flex-shrink: 0;
}

/* Icon buttons */
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--text2);
  cursor: pointer; transition: all var(--transition); flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface3); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot-indicator {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--surface); border: 0;
}
.icon-btn .count-indicator {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* Theme toggle pip */
.theme-toggle svg { transition: transform var(--transition-slow), opacity var(--transition); }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun  { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

/* ===== Dropdown menus ===== */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: 6px; z-index: var(--z-dropdown); opacity: 0; transform: translateY(-6px) scale(0.98);
  pointer-events: none; transform-origin: top right;
  transition: opacity var(--transition), transform var(--transition);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-header { padding: 9px 11px 8px; display: flex; align-items: center; gap: 10px; }
.menu-sep { height: 1px; background: var(--border2); margin: 5px 4px; }
.menu-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text3); padding: 7px 11px 4px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 11px; border-radius: var(--radius); border: none; background: none;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: background var(--transition), color var(--transition); text-align: left;
  text-decoration: none;
}
.menu-item:hover { background: var(--surface3); color: var(--text); }
.menu-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.menu-item .item-kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text3); }
.menu-item.danger { color: var(--danger-fg); }
.menu-item.danger:hover { background: var(--danger-soft); }

/* ===== User chip ===== */
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px;
  border-radius: var(--radius); border: 1px solid transparent; background: transparent;
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.user-chip:hover { background: var(--surface3); border-color: var(--border); }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.avatar.lg { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.user-chip .u-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-chip .u-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.user-chip .u-role { font-size: 10.5px; color: var(--text3); }
.user-chip .chev { width: 15px; height: 15px; color: var(--text3); transition: transform var(--transition); }
.user-chip[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ===== Notification panel ===== */
.notif-panel { min-width: 340px; max-width: 360px; padding: 0; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head h4 { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--border2); cursor: pointer; transition: background var(--transition); }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--primary-soft) 70%, var(--surface3)); }
.notif-ico { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.notif-ico svg { width: 16px; height: 16px; }
.notif-ico.danger  { background: var(--danger-soft);  color: var(--danger-fg); }
.notif-ico.warn    { background: var(--warning-soft); color: var(--warning-fg); }
.notif-ico.info    { background: var(--primary-soft); color: var(--primary-fg); }
.notif-ico.success { background: var(--success-soft); color: var(--success-fg); }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-desc  { font-size: 12px; color: var(--text3); margin-top: 2px; line-height: 1.45; }
.notif-time  { font-size: 11px; color: var(--text3); font-family: var(--font-mono); margin-top: 4px; }
.notif-foot  { padding: 10px 14px; border-top: 1px solid var(--border); text-align: center; }

/* ===== Command palette ===== */
.cmdk-overlay {
  position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; padding-top: 14vh;
  z-index: var(--z-modal); animation: overlayIn 0.16s var(--ease-out);
}
.cmdk-overlay.open { display: flex; }
.cmdk {
  width: 100%; max-width: 560px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); overflow: hidden; animation: modalIn 0.22s var(--ease-out);
}
.cmdk-input-row { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk-input-row svg { width: 18px; height: 18px; color: var(--text3); }
.cmdk-input { flex: 1; border: none; background: none; outline: none; font-family: inherit; font-size: 15px; color: var(--text); }
.cmdk-input::placeholder { color: var(--text3); }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text3); padding: 8px 10px 4px; }
.cmdk-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius);
  cursor: pointer; color: var(--text2); text-decoration: none; transition: background var(--transition);
}
.cmdk-item .ci-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cmdk-item .ci-icon svg { width: 16px; height: 16px; }
.cmdk-item.active, .cmdk-item:hover { background: var(--primary-soft); color: var(--text); }
.cmdk-item.active .ci-icon { background: var(--primary); color: #fff; }
.cmdk-item .ci-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cmdk-item .ci-sub { font-size: 11.5px; color: var(--text3); }
.cmdk-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text3); }
.cmdk-foot .kbd { font-family: var(--font-mono); background: var(--surface3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

/* ===== Mobile drawer scrim ===== */
.scrim {
  position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(2px);
  z-index: 690; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* ===== Skeleton loaders ===== */
.skeleton { background: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-line { height: 11px; border-radius: 5px; }
.sk-line.sm { height: 9px; } .sk-line.lg { height: 16px; }
.sk-circle { border-radius: 50%; }
.sk-card { height: 96px; border-radius: var(--radius-lg); }

/* ===== Empty / Error / Success states ===== */
.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px; gap: 14px;
}
.state .state-icon {
  width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text3);
}
.state .state-icon svg { width: 28px; height: 28px; }
.state.danger  .state-icon { background: var(--danger-soft);  border-color: var(--danger-line);  color: var(--danger-fg); }
.state.success .state-icon { background: var(--success-soft); border-color: var(--success-line); color: var(--success-fg); }
.state.info    .state-icon { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-fg); }
.state h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); }
.state p  { font-size: 13px; color: var(--text3); max-width: 340px; line-height: 1.55; }
.state .state-actions { display: flex; gap: 8px; margin-top: 4px; }
.state--compact { padding: 26px 24px; gap: 10px; }

/* ===== KPI card ===== */
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kpi-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kpi-ico svg { width: 18px; height: 18px; }
.kpi-ico.primary { background: var(--primary-soft); color: var(--primary-fg); }
.kpi-ico.danger  { background: var(--danger-soft);  color: var(--danger-fg); }
.kpi-ico.success { background: var(--success-soft); color: var(--success-fg); }
.kpi-ico.warning { background: var(--warning-soft); color: var(--warning-fg); }
.kpi-ico.purple  { background: var(--purple-soft);  color: var(--purple-fg); }
.kpi-ico.cyan    { background: var(--cyan-soft);    color: var(--cyan-fg); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-value { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--text); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi-delta svg { width: 13px; height: 13px; }
.kpi-delta.up   { color: var(--success-fg); }
.kpi-delta.down { color: var(--danger-fg); }
.kpi-delta .muted { color: var(--text3); font-weight: 500; }
.kpi-spark { position: absolute; right: 0; bottom: 0; left: 0; height: 38px; opacity: 0.5; pointer-events: none; }

/* ===== Segmented control ===== */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); }
.segmented button {
  padding: 6px 13px; border: none; background: none; border-radius: 6px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text3);
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== Section title ===== */
.section-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.section-title .st-line { flex: 1; height: 1px; background: var(--border); }

/* ===== Card hover lift (opt-in) ===== */
.card.hoverable { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.card.hoverable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* ===== Risk meter ===== */
.risk-meter { display: flex; flex-direction: column; gap: 8px; }
.risk-gauge { height: 8px; border-radius: 999px; background: var(--surface3); overflow: hidden; }
.risk-gauge > span { display: block; height: 100%; border-radius: 999px; transition: width 0.6s var(--ease-out); background: linear-gradient(90deg, var(--success), var(--warning), var(--danger)); }
.risk-score { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.risk-score.low { color: var(--success-fg); } .risk-score.med { color: var(--warning-fg); } .risk-score.high { color: var(--danger-fg); }

/* ===== Code/mono refinement ===== */
.mono, .font-mono, code, kbd { font-family: var(--font-mono); font-feature-settings: 'zero' 1; }

/* ============================================================
   Responsive — Mobile · Tablet · Laptop · Desktop · Ultrawide
   ============================================================ */
@media (min-width: 1800px) {
  .page { padding: 26px 40px; max-width: 1720px; margin: 0 auto; width: 100%; }
  .topbar { padding: 0 40px; }
}
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  aside.sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 232px; z-index: 700;
    transform: translateX(-100%); transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }
  body[data-drawer="open"] aside.sidebar { transform: translateX(0); }
  body[data-sidebar="collapsed"] aside.sidebar { width: 232px; }
  body[data-sidebar="collapsed"] .nav-label,
  body[data-sidebar="collapsed"] .nav-group-label { display: revert; }
  body[data-sidebar="collapsed"] .logo-full { display: block !important; }
  body[data-sidebar="collapsed"] .logo-mark { display: none !important; }
  html[data-theme="light"] body[data-sidebar="collapsed"] .logo-for-dark { display: none !important; }
  html:not([data-theme="light"]) body[data-sidebar="collapsed"] .logo-for-light { display: none !important; }
  body[data-sidebar="collapsed"] .sidebar-collapse { display: none; }
  body[data-sidebar="collapsed"] .sidebar-mode-switch { margin: 0 8px 10px; }
  body[data-sidebar="collapsed"] .nav-item { justify-content: flex-start; margin: 1px 5px; padding: 6px 9px; }
  .menu-toggle { display: inline-flex; }
  .sidebar-collapse { display: none; }
  .breadcrumb { display: none; }
  .topbar-search { width: 36px; padding: 0; justify-content: center; }
  .topbar-search input, .topbar-search .kbd { display: none; }
  .topbar-search.expanded { width: 220px; padding: 0 12px; justify-content: flex-start; }
  .topbar-search.expanded input { display: block; }
}
@media (max-width: 640px) {
  .page { padding: 16px 14px; gap: 12px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .user-chip .u-meta { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100%; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===== V1 Sidebar accordion ===== */
.nav-section { margin: 2px 4px 6px; }
.nav-section + .nav-section {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border2);
}
.nav-section-toggle {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 6px 8px; border: none; background: transparent;
  border-radius: 7px; cursor: pointer; color: var(--text3);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: left; font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.nav-section-toggle:hover { background: var(--surface3); color: var(--text2); }
.nav-section-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.nav-section-icon {
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: inherit;
}
.nav-section-icon svg { width: 13px; height: 13px; opacity: 0.9; }
.nav-section-label { flex: 1; }
.nav-chevron { width: 12px; height: 12px; opacity: 0.4; transition: transform var(--transition); }
.nav-section.is-open .nav-chevron { transform: rotate(180deg); opacity: 0.65; }
.nav-section.is-open > .nav-section-toggle { color: var(--text2); }
.nav-section.is-open > .nav-section-toggle .nav-section-icon { color: var(--primary); }
.nav-section-items { display: none; padding: 1px 0 2px; }
.nav-section.is-open .nav-section-items { display: block; }
.nav-item-sub { padding-left: 32px !important; font-size: 12px; }
.nav-item-sub .nav-icon { display: none; }

body[data-sidebar="collapsed"] .nav-section + .nav-section {
  margin-top: 2px; padding-top: 0; border-top: none;
}
body[data-sidebar="collapsed"] .nav-section-toggle .nav-section-label,
body[data-sidebar="collapsed"] .nav-section-toggle .nav-chevron,
body[data-sidebar="collapsed"] .nav-section-items { display: none; }
body[data-sidebar="collapsed"] .nav-section-toggle { justify-content: center; padding: 8px 0; text-transform: none; }
body[data-sidebar="collapsed"] .nav-section-icon { margin: 0 auto; }

/* ===== Sayfa sekme çubuğu (hub ekranlar) ===== */
.page-subnav {
  display: flex; flex-wrap: nowrap; gap: 2px;
  padding: 10px 20px; margin: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.page-subnav::-webkit-scrollbar { height: 3px; }
.page-subnav::-webkit-scrollbar-track { background: transparent; }
.page-subnav::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-pill); }
.page-subnav-item {
  display: inline-flex; align-items: center;
  padding: 6px 13px; border-radius: var(--radius);
  font-size: 12.5px; font-weight: 500; color: var(--text2);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.page-subnav-item:hover { background: var(--surface3); color: var(--text); }
.page-subnav-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.page-subnav-item.active {
  background: var(--primary-pale); color: var(--primary);
  border-color: rgba(37,99,235,0.2); font-weight: 600;
}

.tab-pane-stack { animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0.6; } to { opacity: 1; } }

/* ===== Monitor service picker ===== */
.monitor-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.monitor-service-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface2);
  cursor: pointer; transition: border-color var(--transition), background var(--transition), transform var(--transition);
  font-family: inherit; color: var(--text);
}
.monitor-service-card:hover {
  border-color: var(--primary); background: var(--primary-pale);
  transform: translateY(-1px);
}
.monitor-service-card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.monitor-service-card-meta { font-size: 11px; color: var(--text3); }
.monitor-service-card-domains { font-size: 12px; color: var(--text2); }
.monitor-service-card-action { font-size: 11px; color: var(--primary); margin-top: 4px; font-weight: 600; }
.monitor-service-grid .monitor-empty-state { grid-column: 1 / -1; min-height: 280px; }

/* Monitor page header quick actions */
.monitor-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.monitor-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.monitor-action-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  min-width: 160px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.monitor-action-card:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
  transform: translateY(-1px);
}
.monitor-action-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.monitor-action-desc {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.35;
  max-width: 200px;
}

/* Info callout (learning page etc.) */
.info-callout {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--primary-line, rgba(100, 150, 255, .25));
  background: var(--primary-soft, rgba(100, 150, 255, .08));
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}
.info-callout strong { color: var(--text); display: block; margin-bottom: 4px; }

/* ===== Sidebar mode switch (Yönetim / İzleme) ===== */
.sidebar-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 8px 8px 8px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, var(--surface2));
}
.sidebar-mode-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text3);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  margin-bottom: 0;
  border-bottom: none;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}
.sidebar-mode-btn svg { width: 13px; height: 13px; opacity: 0.65; flex-shrink: 0; }
.sidebar-mode-btn:hover { color: var(--text2); background: color-mix(in srgb, var(--surface3) 80%, transparent); }
.sidebar-mode-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.sidebar-mode-btn.active {
  color: var(--primary);
  background: var(--surface);
  box-shadow:
    0 1px 2px color-mix(in srgb, #000 12%, transparent),
    inset 0 0 0 1px var(--primary-line);
}
.sidebar-mode-btn.active svg { opacity: 1; }
.sidebar-mode-label { line-height: 1; text-align: center; white-space: nowrap; }

/* Tek seferde yalnızca bir sidebar paneli görünür */
.sidebar-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.sidebar-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body[data-sidebar-mode="manage"] #sidebarMonitorPanel,
body[data-sidebar-mode="monitor"] #sidebarManagePanel {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}
#sidebarManagePanel .nav { flex: 1; overflow-y: auto; min-height: 0; }

body[data-sidebar="collapsed"] .sidebar-mode-label { display: none; }
body[data-sidebar="collapsed"] .sidebar-mode-btn { padding: 8px 4px; gap: 0; }
body[data-sidebar="collapsed"] .sidebar-mode-switch { margin: 34px 6px 8px; padding: 2px; gap: 2px; }
body[data-sidebar="collapsed"] #sidebarMonitorPanel .monitor-sidebar-head,
body[data-sidebar="collapsed"] #sidebarMonitorPanel .monitor-sidebar-toolbar { display: none; }

/* Monitor sidebar quick-nav links (İzleme Merkezi, Öğrenme Modu) */
.monitor-sidebar-quicknav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 8px 6px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.monitor-quicknav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px; text-decoration: none;
  font-size: 12px; font-weight: 500; color: var(--text2);
  transition: background .12s, color .12s;
}
.monitor-quicknav-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.monitor-quicknav-item:hover { background: var(--surface2); color: var(--text1); }
.monitor-quicknav-item.active { background: var(--accent-subtle, rgba(99,102,241,.12)); color: var(--accent); }
body[data-sidebar="collapsed"] .monitor-sidebar-quicknav { display: none; }

/* Monitor sidebar service list */
.monitor-sidebar-toolbar { padding: 0 10px 8px; flex-shrink: 0; }
.monitor-sidebar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface2);
}
.monitor-sidebar-search svg { width: 14px; height: 14px; color: var(--text3); flex-shrink: 0; }
.monitor-sidebar-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 12px; color: var(--text); font-family: inherit;
}
.monitor-sidebar-search input::placeholder { color: var(--text3); }

.monitor-sidebar-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 4px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.monitor-sidebar-col-traffic { text-align: right; white-space: nowrap; }

.monitor-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.monitor-sidebar-loading,
.monitor-sidebar-empty {
  padding: 24px 14px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

body[data-sidebar-mode="monitor"] aside.sidebar {
  width: 272px;
  min-width: 272px;
}

.monitor-sidebar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.monitor-sidebar-row:hover { background: var(--surface3); }
.monitor-sidebar-row.active {
  background: var(--primary);
  color: #fff;
  border-left-color: rgba(255,255,255,0.5);
}
.monitor-sidebar-row.active .monitor-sidebar-traffic,
.monitor-sidebar-row.active .monitor-sidebar-star { color: rgba(255,255,255,0.85); }
.monitor-sidebar-row.active .health-dot { box-shadow: 0 0 0 2px rgba(255,255,255,0.35); }

.monitor-sidebar-name {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.monitor-sidebar-traffic {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text3);
  white-space: nowrap;
}
.monitor-sidebar-star {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}
.monitor-sidebar-star:hover { color: var(--warn); background: rgba(245,158,11,0.1); }
.monitor-sidebar-star.is-fav { color: var(--warn); }
.monitor-sidebar-star svg { width: 14px; height: 14px; }
.monitor-sidebar-row.active .monitor-sidebar-star.is-fav { color: #fde68a; }

/* ===== Monitor — Canlı filtre çubuğu ===== */
.monitor-stream-header {
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.monitor-filters {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border2);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.monitor-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.monitor-logic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}
.monitor-logic-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}
.monitor-logic-label {
  min-width: 32px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.monitor-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 10px;
}
.monitor-filter-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.monitor-filter-item.is-active {
  border-color: var(--primary-line);
  box-shadow: 0 0 0 1px var(--primary-soft);
}
.monitor-filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
}
.monitor-filter-check input {
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.monitor-field-input {
  font-size: 12px;
  padding: 5px 8px;
  min-height: 30px;
}
.monitor-field-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


/* ============================================================
   ProWAF — Servis Detay Paneli & Gelişmiş Dashboard Stilleri
   Eklendi: service-dashboard, service-waf, service-reports sayfaları,
   sağ topoloji paneli, metrik kartlar, sparkline/donut SVG grafikler
   ============================================================ */

/* ===== Sağ Topoloji Paneli ===== */
.right-panel {
  width: 260px;
  min-width: 260px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  z-index: var(--z-sticky);
  transition: width var(--transition-slow), min-width var(--transition-slow), opacity var(--transition-slow);
}
.right-panel.collapsed { width: 0; min-width: 0; border-left: none; }
/* Analiz sayfası kendi topoloji kolonunu kullanır — global panel gizli */
body[data-page="learning-analysis"] .right-panel {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  border-left: none !important;
  overflow: hidden;
}
.right-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.right-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}
.right-panel-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.right-panel-body:has(.rp-event-detail),
.right-panel.event-detail-mode .right-panel-body {
  overflow: hidden;
  padding: 8px 10px 6px;
  gap: 0;
}
.right-panel:has(.rp-event-detail),
.right-panel.event-detail-mode {
  overflow: hidden;
  min-height: 0;
}
.right-panel-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 24px 16px; text-align: center;
}
.right-panel-empty svg { width: 32px; height: 32px; color: var(--text3); opacity: 0.45; }
.right-panel-empty p { font-size: 12px; color: var(--text3); line-height: 1.5; }

/* Topoloji servis kartı */
.topo-service-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-service-id {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
  padding: 3px 0;
}
.topo-row .label { color: var(--text3); font-size: 11px; min-width: 64px; }
.topo-row .val { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.topo-row .mono { font-family: var(--font-mono); font-size: 11px; }

/* WAF kalkan görseli */
.waf-shield-card {
  background: var(--primary-pale);
  border: 1px solid var(--primary-line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.waf-shield-icon {
  width: 40px; height: 40px;
  background: var(--primary-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.waf-shield-icon svg { width: 20px; height: 20px; color: var(--primary); }
.waf-shield-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.waf-mode-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.waf-mode-badge.block { background: var(--danger-pale); color: var(--danger); border: 1px solid var(--danger-line); }
.waf-mode-badge.monitor { background: var(--warning-pale); color: var(--warning); border: 1px solid var(--warning-line); }
.waf-mode-badge.learning { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-line); }
.waf-mode-badge.disabled { background: var(--surface3); color: var(--text3); border: 1px solid var(--border); }

.topo-backend-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.topo-backend-title { font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

/* Topo alt aksiyonlar */
.topo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
}
.topo-action-btn {
  flex: 1;
  min-width: 70px;
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  color: var(--text2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.topo-action-btn:hover { background: var(--surface3); color: var(--text); border-color: var(--border-strong); }
.topo-action-btn.active { background: var(--primary-pale); color: var(--primary); border-color: var(--primary-line); }

/* ===== Servis Üst-Sekme Navigasyonu ===== */
.service-top-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow-x: auto;
}
.service-top-nav-item {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.service-top-nav-item:hover { color: var(--text); }
.service-top-nav-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Servis seçim başlığı */
.service-select-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.service-select-prompt svg { width: 48px; height: 48px; color: var(--text3); opacity: 0.4; }
.service-select-prompt h3 { font-size: 16px; color: var(--text2); }
.service-select-prompt p { font-size: 13px; color: var(--text3); max-width: 320px; line-height: 1.6; }

/* ===== Metrik Kartlar (Servis Dashboard) ===== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.metric-card.blue::before  { background: var(--primary); }
.metric-card.green::before { background: var(--success); }
.metric-card.red::before   { background: var(--danger); }
.metric-card.yellow::before { background: var(--warning); }
.metric-card.purple::before { background: var(--purple); }

.metric-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  margin-bottom: 6px;
}
.metric-card-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.metric-card-sub {
  font-size: 11.5px;
  color: var(--text3);
  font-family: var(--font-mono);
}
.metric-card-icon {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  opacity: 0.15;
}
.metric-card-icon svg { width: 28px; height: 28px; }

/* ===== Sparkline / Bar Chart ===== */
.sparkline-wrap {
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  overflow: hidden;
}
.sparkline-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  transition: height 0.3s var(--ease-out);
}

/* ===== Service Chart Card ===== */
.svc-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.svc-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.svc-chart-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.svc-chart-body {
  padding: 12px 16px 10px;
}
.svc-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  overflow: hidden;
}
.svc-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 6px;
}
.svc-bar-seg {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s var(--ease-out);
}
.svc-bar-label {
  font-size: 9px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28px;
}

/* ===== Donut Chart ===== */
.donut-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.donut-svg-wrap {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
}
.donut-svg-wrap > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* HTML overlay (dashboard vb.) — geometrik orta */
.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  inset: auto;
  width: max-content;
  max-width: 70%;
  margin: 0;
  padding: 0;
}
.donut-center-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1;
  margin: 0;
  padding: 0;
}
.donut-center-sub {
  font-size: 10px;
  color: var(--text3);
  margin: 2px 0 0;
  padding: 0;
  line-height: 1;
}
/* Threat-intel: merkez etiket SVG içinde — kayma yok */
.donut-center-value-svg {
  fill: var(--text);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display, system-ui, sans-serif);
}
.donut-center-sub-svg {
  fill: var(--text3);
  font-size: 6.5px;
  font-weight: 500;
  font-family: var(--font-body, system-ui, sans-serif);
}
.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 120px;
}
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-legend-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text2);
}
.donut-legend-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
}

/* Dağılım tablosu (raporlar) */
.dist-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dist-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.dist-table td { padding: 7px 8px; border-bottom: 1px solid var(--border2); color: var(--text2); }
.dist-table tr:last-child td { border-bottom: none; }
.dist-table .dist-bar-cell { width: 40%; }
.dist-bar-bg { height: 5px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.dist-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s var(--ease-out); }
.dist-count { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text); }

/* ===== Log Detay Slide-in Paneli ===== */
.log-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--overlay-bg);
  backdrop-filter: blur(3px);
}
.log-detail-overlay.open { display: block; }
.log-detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 95vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  z-index: calc(var(--z-overlay) + 1);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow: hidden;
}
.log-detail-panel.open { transform: translateX(0); }
.log-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface2);
}
.log-detail-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.ld-header-sub {
  font-size: 12px;
  color: var(--text3);
  margin: 3px 0 0;
  line-height: 1.4;
}
.ld-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.log-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ld-hero {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ld-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ld-hero-top .badge {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}
.ld-hero-time {
  font-size: 11.5px;
  color: var(--text3);
  font-family: var(--font-mono);
}
.ld-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ld-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.ld-chip.mono { font-family: var(--font-mono); font-size: 11px; }
.ld-chip.ld-chip-threat {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger-fg);
}
.ld-chip.ld-chip-score-high {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger-fg);
}
.ld-chip.ld-chip-score-mid {
  background: var(--warning-pale, rgba(250,170,0,.12));
  border-color: var(--warning-line);
  color: var(--warning);
}
.ld-hero-path {
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border2);
}
.log-detail-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px;
}
.log-detail-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border2);
}
.log-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
}
.log-detail-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
}
.log-detail-field.full { grid-column: 1 / -1; }
.log-detail-field .lbl {
  font-size: 9.5px;
  color: var(--text3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.log-detail-field .val {
  font-size: 12.5px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
}
.log-detail-field .val.mono { font-family: var(--font-mono); font-size: 11.5px; }
.log-detail-actions { display: none; }
.log-detail-footer {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface2);
}
.log-detail-footer .log-detail-section-title {
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: none;
}
.ld-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ld-action-grid .btn {
  justify-content: center;
  width: 100%;
  font-size: 11.5px;
  padding: 8px 10px;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}
.ld-action-grid .btn-outline {
  background: var(--surface);
}
.ld-body-section { margin-top: 0; }
.ld-body-pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
  color: var(--text);
  margin-top: 4px;
}
.request-preview {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== WAF Yönetim Sayfası ===== */
.waf-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1400px) {
  .waf-mgmt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .waf-mgmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.waf-mgmt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Referans panel kartı: üst bant + hero durum + alt detay + footer */
.waf-panel-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.waf-panel-card-compact {
  min-height: 0;
}
.waf-panel-body-compact {
  padding: 10px 12px 8px;
  gap: 6px;
}
.waf-panel-detail-btn {
  align-self: center;
  margin-top: 2px;
}
.waf-panel-metrics-compact {
  gap: 6px;
}
.waf-metric-trigger {
  border: 1px dashed var(--border);
  background: var(--surface2);
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}
.waf-metric-trigger:not(:disabled):hover {
  border-color: var(--primary-line);
  background: var(--primary-pale);
}
.waf-metric-trigger:disabled {
  cursor: default;
  opacity: 0.65;
}
.waf-metric-trigger .n {
  letter-spacing: 0.12em;
}
.waf-panel-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.waf-panel-band-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.01em;
}
.waf-panel-body {
  flex: 1;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.waf-panel-hero-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 2px 0 0;
}
.waf-panel-hero {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
  align-self: center;
  width: 100%;
}
.waf-panel-hero.hero-on    { color: var(--success); }
.waf-panel-hero.hero-off   { color: var(--text3); }
.waf-panel-hero.hero-level-low    { color: var(--success); }
.waf-panel-hero.hero-level-medium { color: var(--warning); }
.waf-panel-hero.hero-level-strict { color: var(--danger); }
.waf-panel-hero.hero-mode-block    { color: var(--danger); }
.waf-panel-hero.hero-mode-monitor  { color: var(--warning); }
.waf-panel-hero.hero-mode-learning { color: var(--info); }
.waf-panel-hero.hero-analysis-completed { color: var(--success); }
.waf-panel-hero.hero-analysis-applied   { color: var(--primary); }
.waf-panel-hero.hero-analysis-running   { color: var(--warning); }
.waf-panel-hero.hero-analysis-failed    { color: var(--danger); }
.waf-panel-meta {
  font-size: 11.5px;
  color: var(--text3);
  margin: 0;
  line-height: 1.45;
}
.waf-panel-meta-center { text-align: center; }
.waf-panel-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--border2);
  font-size: 12px;
}
.waf-panel-kv-label { color: var(--text3); }
.waf-panel-kv-val   { color: var(--text); font-weight: 600; text-align: right; }
.waf-panel-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border2);
  background: var(--surface);
}
.waf-panel-footer-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.waf-panel-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition);
}
.waf-panel-foot-link svg { width: 12px; height: 12px; flex-shrink: 0; }
.waf-panel-foot-link:hover { opacity: 0.8; text-decoration: underline; }
.waf-panel-action {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}
/* Koruma düzeyi — yatay segment göstergesi */
.protection-gauge-panel {
  width: 100%;
  max-width: 148px;
  margin: 0 auto 8px;
}
.waf-protection-segments {
  display: flex;
  gap: 4px;
}
.waf-protection-segments .gauge-seg {
  height: 7px;
  flex: 1;
  border-radius: 4px;
  background: var(--surface3);
  transition: background 0.3s;
}
.waf-panel-mode-ctrl { margin-top: 2px; }
.waf-panel-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.waf-panel-checklist .check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 12.5px;
  color: var(--text2);
}
.waf-panel-checklist .check-item:last-child { border-bottom: none; }
.waf-check-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface3);
  position: relative;
}
.waf-check-mark.is-on {
  background: var(--success-soft);
  border: 1px solid var(--success-line);
}
.waf-check-mark.is-on::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--success);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.waf-check-mark.is-off::after {
  content: '×';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text3);
  line-height: 1;
}
.waf-panel-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.waf-panel-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 12.5px;
}
.waf-panel-feature:last-child { border-bottom: none; }
.waf-feat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface3);
  position: relative;
}
.waf-feat-icon[data-state="on"] {
  background: var(--success-soft);
  border: 1px solid var(--success-line);
}
.waf-feat-icon[data-state="on"]::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid var(--success);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.waf-feat-icon[data-state="off"]::after {
  content: '⊘';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text3);
}
.waf-feat-icon.is-neutral::after {
  content: '·';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text3);
}
.waf-feat-label { flex: 1; color: var(--text2); }
.waf-feat-val   { color: var(--text); font-weight: 600; font-size: 12px; }
.waf-panel-statbar {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--surface3);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.waf-panel-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}
.waf-panel-metric {
  text-align: center;
  padding: 6px 4px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border2);
}
.waf-panel-metric .n {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.waf-panel-metric .l {
  display: block;
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.waf-panel-controls { width: 100%; }
.waf-mgmt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--border);
}
.waf-mgmt-card-header h4 { font-size: 12.5px; font-weight: 600; }
.waf-mgmt-card-body { padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; }

/* Koruma seviyesi gauge */
.protection-gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.gauge-segments {
  display: flex;
  gap: 3px;
  flex: 1;
}
.gauge-seg {
  height: 8px;
  flex: 1;
  border-radius: 4px;
  background: var(--surface3);
  transition: background 0.3s;
}
.gauge-seg.active-low    { background: var(--success); }
.gauge-seg.active-medium { background: var(--warning); }
.gauge-seg.active-strict { background: var(--danger); }
.gauge-label { font-size: 12px; font-weight: 600; color: var(--text); }

/* Toggle satır */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.toggle-row .toggle-label { font-size: 12.5px; color: var(--text2); }
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface3);
  border-radius: 999px;
  transition: background 0.2s;
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px; width: 14px;
  left: 2px; bottom: 2px;
  background: var(--text3);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success-soft); border-color: var(--success-line); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--success); }

/* Denetim maddesi */
.check-list { display: flex; flex-direction: column; gap: 2px; }
/* `hidden` attribute, sınıf seçicilerinin display kurallarını geçersiz kılabilmeli
   (ör. Denetimler kartında Detay ile gizlenen checklist). */
.check-list[hidden], .waf-panel-checklist[hidden] { display: none !important; }
.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--text2);
  border-bottom: 1px solid var(--border2);
}
.check-item:last-child { border-bottom: none; }
.check-item .check-name { flex: 1; }
.check-item .pill { font-size: 10px; padding: 1px 7px; }

/* Mod seçici */
.mode-selector {
  display: flex;
  gap: 4px;
}
.mode-option {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text2);
  background: var(--surface2);
  transition: all var(--transition);
}
.mode-option:hover { border-color: var(--border-strong); color: var(--text); }
.mode-option.active-block    { background: var(--danger-pale); color: var(--danger); border-color: var(--danger-line); }
.mode-option.active-monitor  { background: var(--warning-pale); color: var(--warning); border-color: var(--warning-line); }
.mode-option.active-learning { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }

/* ===== Range Selector ===== */
.range-selector {
  display: flex;
  gap: 3px;
  align-items: center;
}
.range-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  background: var(--surface2);
  color: var(--text2);
  transition: all var(--transition);
}
.range-btn:hover { border-color: var(--border-strong); color: var(--text); }
.range-btn.active { background: var(--primary-pale); color: var(--primary); border-color: var(--primary-line); font-weight: 600; }

/* ===== Responsiveness ===== */
@media (max-width: 1200px) {
  .right-panel { width: 0; min-width: 0; border-left: none; }
  .right-panel.force-open { width: 260px; min-width: 260px; border-left: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .waf-mgmt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
  .log-detail-panel { width: 100vw; }
  .ld-action-grid { grid-template-columns: 1fr; }
}

/* ===== Servis Modu Badge (monitor sidebar güncelleme) ===== */
.svc-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.svc-mode-badge.block    { background: var(--danger-pale);   color: var(--danger);   border: 1px solid var(--danger-line); }
.svc-mode-badge.monitor  { background: var(--warning-pale);  color: var(--warning);  border: 1px solid var(--warning-line); }
.svc-mode-badge.learning { background: var(--info-soft);     color: var(--info);     border: 1px solid var(--info-line); }

/* monitor-sidebar-row mod badge — grid içinde hizalı */
.monitor-sidebar-row .svc-mode-badge { margin: 0; }

/* ===== Canlı Olay — Animasyonlu Yeni Satır ===== */
@keyframes rowFlash {
  from { background: var(--primary-pale); }
  to   { background: transparent; }
}
.live-row-new { animation: rowFlash 1.2s var(--ease-out) forwards; }

/* ===== Misc ===== */
.svc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.svc-tag.https { background: var(--success-pale); color: var(--success); border-color: var(--success-line); }
.svc-tag.http  { background: var(--warning-pale); color: var(--warning); border-color: var(--warning-line); }

.help-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text3);
}

/* ===== Service Hub Tab Bar ===== */
.svc-hub-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.svc-hub-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0;
}
.svc-hub-tab:hover { color: var(--text); }
.svc-hub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
a.svc-hub-tab { text-decoration: none; display: inline-block; }

/* ===== Chart containers ===== */
.svc-chart-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.svc-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.svc-chart-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.svc-chart-body {
  padding: 10px 10px 6px;
}
.chart-loading {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text3);
}

/* ===== Right panel event detail ===== */
.rp-event-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.rp-content.rp-event-detail {
  flex: 1;
  min-height: 0;
}
.rp-event-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 5px 8px;
  width: 100%;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.rp-event-back:hover {
  color: var(--text);
  background: var(--surface3);
  border-color: var(--border-strong);
}
.rp-event-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.rp-event-scroll::-webkit-scrollbar { width: 5px; }
.rp-event-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}
.rp-event-scroll:focus { outline: none; }
.rp-event-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px var(--primary-pale);
  border-radius: 8px;
}
.rp-ld-hero {
  padding: 10px;
  gap: 6px;
  flex-shrink: 0;
}
.rp-ld-hero .ld-hero-top .pill {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
}
.rp-ld-hero .ld-hero-path {
  font-size: 10.5px;
  padding: 5px 8px;
  line-height: 1.35;
}
.rp-ld-hero .ld-chip {
  font-size: 10.5px;
  padding: 2px 8px;
}
.rp-kv-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.rp-kv-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  padding: 0 2px;
}
.rp-kv-compact {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.rp-kv-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--border2);
}
.rp-kv-row:last-child { border-bottom: none; }
.rp-kv-row.multiline { flex-direction: column; gap: 3px; }
.rp-kv-lbl {
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 58px;
  flex-shrink: 0;
  padding-top: 1px;
}
.rp-kv-val {
  color: var(--text);
  flex: 1;
  text-align: right;
  word-break: break-word;
  line-height: 1.35;
}
.rp-kv-row.multiline .rp-kv-val { text-align: left; }
.rp-kv-val.mono { font-family: var(--font-mono); font-size: 11px; }
.rp-scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  flex-shrink: 0;
}
.rp-scroll-hint.visible { display: flex; }
.rp-scroll-hint::after {
  content: '↓';
  font-size: 11px;
  opacity: 0.7;
}
.rp-event-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.06);
}
.rp-event-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.rp-event-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 10.5px;
  padding: 7px 6px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.rp-event-actions #rpTeachLog {
  grid-column: 1 / -1;
}
.rp-teach-status {
  font-size: 10.5px;
  color: var(--success);
  padding: 5px 8px;
  margin-top: 5px;
  background: var(--success-soft);
  border: 1px solid var(--success-line);
  border-radius: 6px;
  text-align: center;
}

/* ===== Right panel header mode badge ===== */
.right-panel-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.rp-mode-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 600;
  background: var(--surface3);
  color: var(--text3);
}
.rp-mode-badge.event { background: var(--info-pale); color: var(--info); }

/* ===== IOC Havuzu iki kolonlu layout ===== */
tbody tr.selected td { background: var(--primary-pale) !important; }
tr.ioc-row--blocked td   { background: var(--danger-pale); }
tr.ioc-row--suppressed td { background: var(--warning-pale); }
tr.ioc-row--blocked.selected td,
tr.ioc-row--suppressed.selected td { background: var(--primary-pale) !important; }

/* IOC Havuzu: full-width tablo; detay shared openDetailDrawer (layout #detailDrawer) */
#iocBody tr.dd-selected td,
#iocBody tr.selected td { background: var(--primary-pale) !important; }
#iocBody tr.ioc-row--blocked.dd-selected td,
#iocBody tr.ioc-row--suppressed.dd-selected td,
#iocBody tr.ioc-row--blocked.selected td,
#iocBody tr.ioc-row--suppressed.selected td { background: var(--primary-pale) !important; }

/* ===== Learned action pill ===== */
.pill-purple { background: var(--purple-soft); color: var(--purple-fg); border: 1px solid var(--purple-line); }

/* ===== WAF Tab — kart iyileştirmeleri ===== */
.waf-card-interactive {
  cursor: default;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.waf-card-interactive:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.waf-card-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
  line-height: 1.4;
}

.waf-field-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 6px;
}

/* ===== WAF Tab — dropdown ===== */
.waf-select {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.waf-select:hover { border-color: var(--border-strong); }
.waf-select:focus {
  outline: none;
  border-color: var(--primary-line);
  box-shadow: 0 0 0 2px var(--primary-pale);
}

/* ===== WAF Tab — ghost link butonu ===== */
.waf-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 0;
  text-decoration: none;
  transition: opacity var(--transition);
}
.waf-link-btn:hover { opacity: 0.75; text-decoration: underline; }

/* ===== WAF Tab — Paranoia segment control ===== */
.paranoia-seg-ctrl {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-wrap: nowrap;
}
.para-btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  background: var(--surface2);
  color: var(--text3);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.para-btn:last-child { border-right: none; }
.para-btn:hover { background: var(--surface3); color: var(--text2); }
.para-btn.active {
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 700;
}

/* ===== WAF Tab — CRS global note ===== */
.waf-crs-note {
  font-size: 11px;
  color: var(--text3);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  line-height: 1.5;
  margin-top: 8px;
}

/* ===== WAF Tab — mod açıklama kutusu ===== */
.mode-desc-box {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  min-height: 36px;
  transition: background var(--transition), border-color var(--transition);
}
.mode-desc-item { display: none; }
.mode-desc-item.visible { display: block; }
.mode-desc-box.desc-block { background: var(--danger-pale); border-color: var(--danger-line); color: var(--danger); }
.mode-desc-box.desc-monitor { background: var(--warning-pale); border-color: var(--warning-line); color: var(--warning); }
.mode-desc-box.desc-learning { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }

/* ===== WAF Kart düzenleme butonu ===== */
.waf-card-edit-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text3); cursor: pointer; flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.waf-card-edit-btn:hover { border-color: var(--primary-line); color: var(--primary); background: var(--primary-pale); }
.waf-card-edit-btn svg { width: 13px; height: 13px; }

/* ===== WAF Kart özet satırları ===== */
.waf-summary-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0; border-bottom: 1px solid var(--border2); gap: 8px;
}
.waf-summary-row:last-child { border-bottom: none; }
.waf-summary-label { color: var(--text3); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.waf-summary-val   { color: var(--text); font-size: 12.5px; font-weight: 500; text-align: right; }

/* ===== Modal kapat butonu ===== */
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text3);
  font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface3); }

/* ===== WAF Tab — Kaydet dirty state ===== */
.btn-dirty {
  background: var(--warning) !important;
  border-color: var(--warning) !important;
  color: #000 !important;
  box-shadow: 0 0 0 3px var(--warning-pale);
  animation: dirtyPulse 1.8s ease infinite;
}
@keyframes dirtyPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--warning-pale); }
  50%       { box-shadow: 0 0 0 5px var(--warning-pale); }
}

/* ===== Sisteme Öğret butonu ===== */
.btn-teach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--info);
  background: var(--info-soft);
  border: 1px solid var(--info-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
}
.btn-teach:hover {
  background: var(--info-line);
  color: var(--text);
}
.btn-teach.taught {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-line);
  cursor: default;
  pointer-events: none;
}
.btn-teach.teaching {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

/* ===== Loglar tab — Monitör/Learned filtre badge ===== */
.svc-log-filter[data-filter="monitored"].active {
  background: var(--warning-pale) !important;
  color: var(--warning) !important;
  border-color: var(--warning-line) !important;
}
.svc-log-filter[data-filter="learned"].active {
  background: var(--purple-soft) !important;
  color: var(--purple-fg) !important;
  border-color: var(--purple-line) !important;
}

/* ===== MITRE ATT&CK mappings page ===== */
.mm-page { display: flex; flex-direction: column; gap: 16px; }

.mm-hero {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.mm-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 120% at 0% 0%, rgba(124,58,237,0.14) 0%, transparent 55%),
              radial-gradient(ellipse 60% 80% at 100% 100%, rgba(220,38,38,0.08) 0%, transparent 50%);
}
.mm-hero-inner {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 18px 20px;
}
.mm-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mm-hero-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #7C3AED 0%, #DC2626 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(124,58,237,0.35);
}
.mm-hero-icon svg { width: 24px; height: 24px; }
.mm-hero-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mm-title { font-family: var(--font-display); font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.mm-subtitle { margin: 4px 0 0; font-size: 12.5px; color: var(--text3); font-weight: 500; }
.mm-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mm-status-pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px;
  background: var(--surface3); color: var(--text3); border: 1px solid var(--border);
}
.mm-status-pill.on { background: var(--success-soft); color: var(--success-fg); border-color: var(--success-line); }
.mm-status-pill.off { background: var(--danger-soft); color: var(--danger-fg); border-color: var(--danger-line); }

.mm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mm-stat {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px !important;
}
.mm-stat-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--text3); border: 1px solid var(--border);
}
.mm-stat-icon svg { width: 18px; height: 18px; }
.stat-card.allowed .mm-stat-icon { color: var(--success-fg); background: var(--success-soft); border-color: var(--success-line); }
.stat-card.monitored .mm-stat-icon { color: var(--purple-fg); background: var(--purple-soft); border-color: var(--purple-line); }

.mm-layout { display: flex; gap: 14px; align-items: flex-start; }
.mm-main-col { flex: 1; min-width: 0; }
.mm-shell { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.mm-shell-body { padding: 18px; }

.mm-inner { display: grid; grid-template-columns: 248px 1fr; gap: 18px; align-items: start; }
.mm-sidebar { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.mm-sidebar-block {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface2);
}
.mm-sidebar-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text3); margin: 0 0 10px;
}
.mm-sidebar-empty { font-size: 12px; color: var(--text3); margin: 0; }

.mm-bar-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px;
  width: 100%; text-align: left; padding: 6px 4px; margin: 0 -4px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; transition: background 0.15s;
}
.mm-bar-row:hover, .mm-bar-row.active { background: var(--surface3); }
.mm-bar-label {
  grid-column: 1; font-size: 11px; font-weight: 600; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mm-bar-count { grid-column: 2; grid-row: 1 / 3; font-size: 11px; font-weight: 700; color: var(--text3); align-self: center; }
.mm-bar-track {
  grid-column: 1; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden;
}
.mm-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.mm-bar-fill.recon { background: #6cACE4; }
.mm-bar-fill.resource { background: #726CB9; }
.mm-bar-fill.initial { background: #DF8F44; }
.mm-bar-fill.execution { background: #8FBE3C; }
.mm-bar-fill.persistence { background: #D4B600; }
.mm-bar-fill.privesc { background: #E67E22; }
.mm-bar-fill.evasion { background: #1ABC9C; }
.mm-bar-fill.credential { background: #C0392B; }
.mm-bar-fill.discovery { background: #3498DB; }
.mm-bar-fill.lateral { background: #9B59B6; }
.mm-bar-fill.collection { background: #2ECC71; }
.mm-bar-fill.c2 { background: #E74C3C; }
.mm-bar-fill.exfil { background: #16A085; }
.mm-bar-fill.impact { background: #E84393; }

.mm-tactic-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mm-tactic-chip {
  font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text3); cursor: pointer;
  transition: all 0.15s; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mm-tactic-chip:hover { border-color: var(--primary); color: var(--primary); }
.mm-tactic-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.mm-callout {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--info-line);
  background: var(--info-soft); font-size: 12px; line-height: 1.5; color: var(--text2);
}
.mm-callout strong { display: block; font-size: 12px; margin-bottom: 4px; color: var(--text); }
.mm-callout p { margin: 0; }
.mm-callout code { font-size: 11px; }

.mm-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.mm-search-wrap {
  flex: 1; min-width: 180px; position: relative; display: flex; align-items: center;
}
.mm-search-wrap svg {
  position: absolute; left: 10px; width: 16px; height: 16px; color: var(--text3); pointer-events: none;
}
.mm-search { padding-left: 34px !important; width: 100%; }
.mm-filter-select { width: auto; min-width: 130px; font-size: 12.5px; }
.mm-result-count { font-size: 12px; color: var(--text3); white-space: nowrap; margin-left: auto; }

.mm-table-wrap {
  border: 1px solid var(--border); border-radius: 10px; overflow: auto; max-height: min(62vh, 640px);
}
.mm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mm-table thead th {
  position: sticky; top: 0; z-index: 1;
  padding: 10px 12px; text-align: left; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3);
  background: var(--surface2); border-bottom: 1px solid var(--border);
}
.mm-table tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--border2); vertical-align: top;
}
.mm-table tbody tr:last-child td { border-bottom: none; }
.mm-table tbody tr.clickable { cursor: pointer; transition: background 0.12s; }
.mm-table tbody tr.clickable:hover td { background: var(--surface2); }
.mm-table tbody tr.selected td { background: var(--primary-pale) !important; }

.mm-tech-cell { min-width: 200px; }
.mm-tech-id {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary);
  text-decoration: none; margin-bottom: 2px;
}
.mm-tech-id:hover { text-decoration: underline; }
.mm-tech-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.mm-desc-cell {
  max-width: 320px; font-size: 12px; color: var(--text3); line-height: 1.45;
}
.mm-actions-cell { width: 88px; text-align: right; white-space: nowrap; }
.mm-state { text-align: center; padding: 28px 16px !important; color: var(--text3); }

.mm-tactic-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.mm-tactic-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface3); color: var(--text2);
  max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mm-tactic-badge.recon { background: rgba(108,172,228,0.15); border-color: rgba(108,172,228,0.4); color: #3b82c4; }
.mm-tactic-badge.resource { background: rgba(114,108,185,0.15); border-color: rgba(114,108,185,0.4); color: #5b56a8; }
.mm-tactic-badge.initial { background: rgba(223,143,68,0.15); border-color: rgba(223,143,68,0.45); color: #b86a1f; }
.mm-tactic-badge.execution { background: rgba(143,190,60,0.15); border-color: rgba(143,190,60,0.45); color: #5f8a1e; }
.mm-tactic-badge.persistence { background: rgba(212,182,0,0.15); border-color: rgba(212,182,0,0.45); color: #9a8200; }
.mm-tactic-badge.privesc { background: rgba(230,126,34,0.15); border-color: rgba(230,126,34,0.45); color: #c45f12; }
.mm-tactic-badge.evasion { background: rgba(26,188,156,0.15); border-color: rgba(26,188,156,0.45); color: #0d8f74; }
.mm-tactic-badge.credential { background: rgba(192,57,43,0.12); border-color: rgba(192,57,43,0.4); color: #a93226; }
.mm-tactic-badge.discovery { background: rgba(52,152,219,0.15); border-color: rgba(52,152,219,0.4); color: #2471a3; }
.mm-tactic-badge.lateral { background: rgba(155,89,182,0.15); border-color: rgba(155,89,182,0.4); color: #7d3c98; }
.mm-tactic-badge.collection { background: rgba(46,204,113,0.15); border-color: rgba(46,204,113,0.4); color: #1e8449; }
.mm-tactic-badge.c2 { background: rgba(231,76,60,0.12); border-color: rgba(231,76,60,0.4); color: #c0392b; }
.mm-tactic-badge.exfil { background: rgba(22,160,133,0.15); border-color: rgba(22,160,133,0.4); color: #117a65; }
.mm-tactic-badge.impact { background: rgba(232,67,147,0.12); border-color: rgba(232,67,147,0.4); color: #c2185b; }

.mm-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 12px; padding-top: 4px;
}
.mm-page-info { font-size: 12px; }
.mm-pagination { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mm-page-ellipsis { font-size: 12px; color: var(--text3); padding: 0 4px; }

.mm-detail-panel {
  width: 300px; min-width: 280px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  position: sticky; top: 16px;
  max-height: calc(100vh - 130px); overflow-y: auto;
}
.mm-panel-header {
  display: flex; align-items: center;
  padding: 11px 14px 9px; border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.mm-panel-title {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3);
}
.mm-panel-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  padding: 32px 20px; text-align: center; color: var(--text3);
}
.mm-panel-empty svg { width: 28px; height: 28px; opacity: 0.45; color: var(--purple-fg); }
.mm-panel-empty strong { font-size: 13px; color: var(--text2); }
.mm-panel-empty p { font-size: 12px; line-height: 1.5; margin: 0; }
.mm-panel-hero { padding: 14px; border-bottom: 1px solid var(--border2); }
.mm-panel-hero-id { font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.mm-panel-hero-name { font-size: 14px; font-weight: 650; color: var(--text); line-height: 1.35; }
.mm-panel-section { padding: 12px 14px; border-bottom: 1px solid var(--border2); }
.mm-panel-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text3); margin-bottom: 8px;
}
.mm-panel-desc { font-size: 12.5px; line-height: 1.55; color: var(--text2); margin: 0; white-space: pre-wrap; }
.mm-kv {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; padding: 5px 0; font-size: 12px; border-bottom: 1px solid var(--border2);
}
.mm-kv:last-child { border-bottom: none; }
.mm-kv-label { color: var(--text3); font-size: 11px; flex-shrink: 0; }
.mm-kv-value { color: var(--text); text-align: right; min-width: 0; word-break: break-word; }
.mm-panel-actions { padding: 12px 14px; display: flex; gap: 6px; flex-wrap: wrap; }

.mm-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; color: var(--text3); }
.mm-loading p { margin: 0; font-size: 12px; }
.mm-spinner {
  width: 22px; height: 22px; border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: mmSpin 0.7s linear infinite;
}
@keyframes mmSpin { to { transform: rotate(360deg); } }

@media (max-width: 1200px) {
  .mm-layout { flex-direction: column; }
  .mm-detail-panel { width: 100%; min-width: unset; position: static; max-height: none; }
}
@media (max-width: 960px) {
  .mm-stats { grid-template-columns: repeat(2, 1fr); }
  .mm-inner { grid-template-columns: 1fr; }
  .mm-sidebar { position: static; }
}
@media (max-width: 560px) {
  .mm-stats { grid-template-columns: 1fr; }
  .mm-hero-inner { flex-direction: column; align-items: flex-start; }
}

/* ===== MITRE canlı uyarıları ===== */
.mitre-live-alerts {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.mitre-live-alert {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.25s, transform 0.25s;
}
.mitre-live-alert.show { opacity: 1; transform: none; }
.mitre-live-alert.fade { opacity: 0; transform: translateX(12px); }
.mitre-live-alert.is-blocked { border-color: var(--success-line); background: linear-gradient(135deg, var(--success-soft), var(--surface)); }
.mitre-live-alert.is-monitored { border-color: var(--warning-line); background: linear-gradient(135deg, var(--warning-soft), var(--surface)); }
.mitre-live-alert-icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; color: var(--success-fg); }
.mitre-live-alert.is-monitored .mitre-live-alert-icon { color: var(--warning-fg); }
.mitre-live-alert-icon svg { width: 22px; height: 22px; }
.mitre-live-alert-title { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); margin-bottom: 4px; }
.mitre-live-alert.is-blocked .mitre-live-alert-title { color: var(--success-fg); }
.mitre-live-alert.is-monitored .mitre-live-alert-title { color: var(--warning-fg); }
.mitre-live-alert-tech { font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.mitre-live-alert-tech .mono { color: var(--primary); margin-right: 6px; }
.mitre-live-alert-msg { font-size: 12px; line-height: 1.45; color: var(--text2); }
.mitre-live-alert-close {
  border: none; background: transparent; color: var(--text3); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 0 0 8px; margin: -2px -4px 0 0;
}
.mitre-live-badge {
  display: inline-block; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: var(--purple-soft); color: var(--purple-fg); border: 1px solid var(--purple-line);
  font-family: var(--font-mono, ui-monospace, monospace);
}
tr.mitre-row-blocked td { background: var(--danger-soft) !important; }
.mitre-defense-cell { max-width: 280px; font-size: 12px; color: var(--text2); }

/* ===== MITRE Attack Reports ===== */
.mr-page .mr-inner-full { grid-template-columns: 248px 1fr; }
.mr-ip-cell { min-width: 140px; }
.mr-ip { font-size: 13px; font-weight: 700; color: var(--text); display: block; }
.mr-country {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--surface3); color: var(--text3); margin-top: 2px;
}
.mr-step-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: var(--purple-soft); color: var(--purple-fg);
  border: 1px solid var(--purple-line);
}
.mr-time-cell { white-space: nowrap; font-size: 12px; }
.mr-time-main { display: block; color: var(--text); }
.mr-time-sub { display: block; font-size: 10px; color: var(--text3); margin-top: 2px; }
.mr-actions-cell { width: 72px; text-align: right; }
.mr-status {
  display: inline-block; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.mr-status-lg { font-size: 11px; padding: 5px 12px; }
.mr-status-blocked { background: var(--danger-soft); color: var(--danger-fg); border: 1px solid var(--danger-line); }
.mr-status-active { background: var(--warning-soft); color: var(--warning-fg); border: 1px solid var(--warning-line); }

/* Detail modal */
.mr-modal {
  max-width: min(1040px, 96vw); max-height: 92vh; width: 100%;
  border-radius: 16px; border: 1px solid var(--border-strong);
}
.mr-modal-header { padding: 20px 22px 16px !important; }
.mr-modal-icon { background: var(--danger-soft) !important; color: var(--danger-fg) !important; border-color: var(--danger-line) !important; }
.mr-modal-head-text { min-width: 0; }
.mr-modal-head-text .modal-title { font-size: 18px; margin: 0; }
.mr-modal-body {
  overflow-y: auto; padding: 0 22px 20px; flex: 1; min-height: 0;
}
.mr-modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border); gap: 8px; justify-content: flex-end;
}
.mr-modal-top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px;
}
.mr-modal-hero {
  padding: 16px; border-radius: 12px; border: 1px solid var(--border2);
  background: linear-gradient(135deg, var(--surface2), var(--surface));
}
.mr-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mr-hero-ip { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.mr-hero-loc { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.mr-hero-summary { font-size: 13px; line-height: 1.55; color: var(--text2); margin: 0; }

.mr-modal-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.mr-stat-box {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface2);
}
.mr-stat-box.accent-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.mr-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin-bottom: 4px; }
.mr-stat-val { font-size: 13px; font-weight: 650; color: var(--text); word-break: break-word; }
.mr-stat-box.accent-danger .mr-stat-val { color: var(--danger-fg); }

.mr-modal-ua {
  margin-bottom: 16px; padding: 10px 12px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border2);
}
.mr-modal-ua code { display: block; font-size: 11px; word-break: break-all; margin-top: 4px; color: var(--text2); }

.mr-modal-section { margin-bottom: 20px; }
.mr-section-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text3); margin: 0 0 10px;
}

.mr-chain-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  padding: 14px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border2);
}
.mr-chain-node {
  display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); min-width: 0;
}
.mr-chain-node.is-stop { border-color: var(--danger-line); background: var(--danger-soft); }
.mr-chain-node.is-pass { border-color: var(--warning-line); background: var(--warning-soft); }
.mr-chain-node-tactic { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); }
.mr-chain-node-tech { font-size: 12px; font-weight: 700; color: var(--primary); }
.mr-chain-arrow {
  display: inline-block; width: 16px; height: 2px; background: var(--border); margin: 0 4px; position: relative;
}
.mr-chain-arrow::after {
  content: ''; position: absolute; right: 0; top: -3px;
  border: 4px solid transparent; border-left-color: var(--border);
}

.mr-steps-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--border2); border-radius: 10px; }
.mr-steps-table { font-size: 12px; }
.mr-steps-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface2); }
.mr-step-tech-name { font-size: 11px; color: var(--text2); margin-top: 2px; }
.mr-vector-code {
  display: block; font-size: 10.5px; padding: 4px 6px; border-radius: 4px;
  background: var(--bg2); word-break: break-all; max-width: 280px; line-height: 1.4;
}
.mr-step-row-blocked td { background: var(--danger-soft) !important; }
.mr-step-row-monitored td { background: var(--warning-soft) !important; }
.mr-meta-pill {
  font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
}
.mr-meta-pill.danger { background: var(--danger-soft); color: var(--danger-fg); border: 1px solid var(--danger-line); }
.mr-meta-pill.warn { background: var(--warning-soft); color: var(--warning-fg); border: 1px solid var(--warning-line); }

.mr-defense-list { display: flex; flex-direction: column; gap: 8px; }
.mr-defense-item {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface2);
}
.mr-defense-item.is-blocked { border-color: var(--danger-line); background: var(--danger-soft); }
.mr-defense-step { font-size: 10px; font-weight: 800; color: var(--text3); text-transform: uppercase; margin-right: 8px; }
.mr-defense-item p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); }

.mr-step-list { display: flex; flex-direction: column; gap: 8px; }
.mr-step-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface2);
}
.mr-step-item.is-blocked { border-color: var(--danger-line); background: var(--danger-soft); }
.mr-step-item.is-monitored { border-color: var(--warning-line); background: var(--warning-soft); }
.mr-step-ord {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; font-family: var(--font-mono);
  background: var(--surface3); color: var(--text2);
}
.mr-step-main { min-width: 0; flex: 1; }
.mr-step-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mr-step-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin-top: 6px; font-size: 11px; color: var(--text3);
}
.mr-step-time { white-space: nowrap; }

.stat-card.blocked .mm-stat-icon { color: var(--danger-fg); background: var(--danger-soft); border-color: var(--danger-line); }

@media (max-width: 900px) {
  .mr-page .mr-inner-full { grid-template-columns: 1fr; }
}

/* ===== Threat Intel — Genel Bakış ===== */
.ti-page { gap: 20px !important; }
.ti-page #tiContent {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ti-flow-card .card-body { padding: 16px 18px 18px; }
.ti-flow-card .pipeline-flow { gap: 8px; }
.ti-flow-card .pipe-step { padding: 8px 14px; border-radius: 8px; transition: border-color var(--transition), background var(--transition); }
.ti-flow-card a.pipe-step:hover { border-color: var(--primary-line); background: var(--primary-soft); }

.ti-lifecycle-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface3);
  margin-top: 14px;
}
.ti-lc-seg {
  display: block;
  height: 100%;
  min-width: 3px;
  transition: opacity var(--transition);
}
.ti-lc-seg:hover { opacity: 0.82; }

.ti-chart-grid { gap: 20px; }
.ti-page .section-title { margin: 4px 0 0; }
.ti-donut-wrap { align-items: center; min-height: 140px; }
.ti-donut-wrap .donut-legend { gap: 7px; }
a.ti-legend-link {
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 3px 5px;
  margin: -3px -5px;
  transition: background var(--transition);
}
a.ti-legend-link:hover { background: var(--surface2); }

.ti-quick-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ti-quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.ti-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-line);
}
.ti-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
}
.ti-quick-icon svg { width: 20px; height: 20px; }
.ti-quick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ti-quick-title { font-size: 13px; font-weight: 650; color: var(--text); line-height: 1.2; }
.ti-quick-desc { font-size: 11px; color: var(--text3); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-quick-stat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.ti-quick-arrow { color: var(--text3); flex-shrink: 0; opacity: 0.5; transition: opacity var(--transition), transform var(--transition); }
.ti-quick-arrow svg { width: 16px; height: 16px; display: block; }
.ti-quick-item:hover .ti-quick-arrow { opacity: 1; transform: translateX(2px); }

.ti-quick-blue .ti-quick-icon { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.ti-quick-green .ti-quick-icon { background: var(--success-soft); border-color: rgba(22,163,74,0.25); color: var(--success); }
.ti-quick-red .ti-quick-icon { background: var(--danger-soft); border-color: rgba(220,38,38,0.2); color: var(--danger); }
.ti-quick-purple .ti-quick-icon { background: rgba(155,123,255,0.12); border-color: rgba(155,123,255,0.25); color: #9B7BFF; }
.ti-quick-yellow .ti-quick-icon { background: var(--warning-soft); border-color: rgba(234,179,8,0.25); color: var(--warning); }
.ti-quick-cyan .ti-quick-icon { background: rgba(52,200,232,0.12); border-color: rgba(52,200,232,0.25); color: #34C8E8; }
.ti-quick-info .ti-quick-icon { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }

@media (max-width: 1024px) {
  .ti-quick-nav { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 768px) {
  .ti-donut-wrap { flex-direction: column; align-items: flex-start; }
  .ti-flow-card .pipeline-flow { flex-direction: column; align-items: stretch; }
  .ti-flow-card .pipe-arrow { display: none; }
}


/* Denetimler modalı — servis-bazlı modül override segment kontrolü */
.den-seg-btn {
  border: none;
  background: var(--surface);
  color: var(--text2);
  font-size: 11.5px;
  padding: 5px 11px;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background .12s, color .12s;
  font-family: var(--font-sans, inherit);
}
.den-seg-btn:last-child { border-right: none; }
.den-seg-btn:hover { background: var(--surface2, var(--hover, rgba(125,125,125,.08))); }
.den-seg-btn.active-den {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* SERVICE-ENFORCEMENT2 / D-127: TI runtime effective-state badge'leri */
.ti-badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap}
.ti-badge-off{background:var(--bg-muted,#e5e7eb);color:var(--text-muted,#6b7280);border:1px solid var(--border,#d1d5db)}
.ti-badge-mon{background:#f59e0b1a;color:#b45309;border:1px solid #f59e0b55}
.ti-badge-blk{background:#dc26261a;color:#b91c1c;border:1px solid #dc262655}
.ti-runtime-card .ti-kv{display:flex;justify-content:space-between;gap:10px;padding:3px 0;border-bottom:1px dashed var(--border,#e5e7eb);font-size:13px}
.ti-runtime-card .ti-kv:last-child{border-bottom:none}
.ti-blast-warn{margin-top:.5rem;padding:.5rem .75rem;border-radius:8px;background:#dc26261a;border:1px solid #dc262655;color:#b91c1c;font-size:12px}

/* SECURITY-PROFILE1B-POLISH: compact action pill controls — Security Profile list + detail header */
.profile-action-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-action-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; font-family: inherit; line-height: 1.4;
  border: 1px solid var(--border); background: transparent; color: var(--text2);
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.profile-action-pill svg { width: 12px; height: 12px; flex-shrink: 0; }
.profile-action-pill:hover { background: var(--surface3); color: var(--text); border-color: var(--border-strong); }
.profile-action-pill:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.profile-action-pill:disabled,
.profile-action-pill[aria-busy="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.profile-action-pill--view { background: var(--primary-pale); border-color: rgba(77,141,255,0.25); color: var(--primary); }
.profile-action-pill--view:hover { background: var(--primary-pale); border-color: var(--primary); filter: brightness(1.04); }
.profile-action-pill--edit { background: var(--surface2); border-color: var(--border); color: var(--text2); }
.profile-action-pill--edit:hover { background: var(--surface3); color: var(--text); border-color: var(--border-strong); }
.profile-action-pill--delete { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-fg); }
.profile-action-pill--delete:hover { background: var(--danger-soft); border-color: var(--danger-fg); filter: brightness(1.08); }
.profile-action-pill--lg { padding: 6px 14px; font-size: 12.5px; }
.profile-action-pill--lg svg { width: 13px; height: 13px; }

/* SECURITY-PROFILE1B-POLISH: detail security module card grid — balanced heights, no forced px height */
.profile-module-card {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  height: 100%;
}
.profile-module-card .profile-module-card-head { display: flex; flex-direction: column; gap: 6px; }
.profile-module-card .profile-module-card-help { margin-top: auto; padding-top: 6px; }

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI1A — Paylaşılan ürün component'leri + Genel Bakış polish
   (blocklist.html inline <style> buraya taşındı; kebab-case, token tabanlı,
   sonraki güvenlik sekmeleri tarafından reuse edilebilir.)
   ═══════════════════════════════════════════════════════════════════════ */

/* Paylaşılan durum rozeti: mm-status-pill için 'warn' varyantı. */
.mm-status-pill.warn { background: var(--warning-soft); color: var(--warning-fg); border-color: var(--warning-line); }

/* Yeniden kullanılabilir yükleme/hata durumları. */
.skeleton-inline { display: inline-block; height: 1em; min-width: 2.4em; border-radius: 5px; vertical-align: middle; }
.panel-state { font-size: 12px; color: var(--text3); padding: 8px 0; }
.panel-state.error { color: var(--danger-fg); }
.panel-retry { background: none; border: none; padding: 0 0 0 4px; font: inherit; font-size: 12px; font-weight: 600; color: var(--primary-fg); cursor: pointer; }
.panel-retry:hover { text-decoration: underline; }
@keyframes ac-spin360 { to { transform: rotate(360deg); } }
.spin-icon { transition: transform .5s ease; }
.is-loading .spin-icon { animation: ac-spin360 .8s linear infinite; }

/* ── Ürün hero (reusable) ── */
.product-hero { position: relative; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); margin-bottom: 16px; }
.product-hero-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 130% at 0% 0%, var(--primary-soft) 0%, transparent 55%), radial-gradient(ellipse 55% 90% at 100% 100%, var(--info-soft) 0%, transparent 55%); }
.product-hero-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 15px 20px; }
.product-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.product-hero-icon { width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--primary) 0%, #2E6BE0 100%); color: #fff; box-shadow: 0 6px 18px var(--primary-glow); }
.product-hero-icon svg { width: 24px; height: 24px; }
.product-hero-content { min-width: 0; }
.product-hero-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-hero-eyebrow { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--primary-fg); }
.product-hero-title { font-family: var(--font-display); font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin: 2px 0 0; color: var(--text); }
.product-hero-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); max-width: 56ch; }
.product-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-hero-actions .btn { height: 32px; }

/* ── Access-control metric tiles: global stat-card + mm-stat reuse üstüne link davranışı ── */
.ac-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
a.ac-metric, .ac-metric { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 14px; }
a.ac-metric { cursor: pointer; }
a.ac-metric:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ac-metric-body { min-width: 0; flex: 1; }
.ac-metric .label { display: block; }
.ac-metric .value { display: flex; align-items: baseline; gap: 8px; }
.ac-metric-meta { font-size: 11.5px; color: var(--text3); margin-top: 4px; line-height: 1.35; }
.ac-metric .mm-stat-icon { transition: transform 120ms; }
/* Global stat-card ikon accent'leri (allowed/monitored zaten global; total/info eklendi). */
.stat-card.total .mm-stat-icon { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-glow); }
.stat-card.info .mm-stat-icon { color: var(--info-fg); background: var(--info-soft); border-color: var(--info-line); }

/* ── Operations grid + panel (reusable) ── */
.operations-grid { display: grid; grid-template-columns: calc(65% - 8px) calc(35% - 8px); gap: 16px; align-items: start; margin-bottom: 16px; }
.operations-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.operations-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.operations-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 16px 0; }
.operations-panel-title { font-size: 14px; font-weight: 650; color: var(--text); margin: 0; letter-spacing: -0.01em; }
.operations-panel-note { font-size: 11px; color: var(--text3); line-height: 1.5; margin: 6px 16px 0; }
.operations-panel-body { padding: 11px 16px 14px; }
.operations-panel-foot { border-top: 1px solid var(--border2); padding: 9px 16px; }
.operations-panel-foot .operations-panel-note { margin: 0; }
.operations-panel-link { font-size: 12px; font-weight: 600; color: var(--primary-fg); text-decoration: none; }
.operations-panel-link:hover { text-decoration: underline; }

/* ── Operation list (satır bazlı yüzey durumu, reusable) ── */
.operation-list { display: flex; flex-direction: column; }
.operation-list-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border2); text-decoration: none; color: inherit; transition: background 120ms; }
.operation-list-item:first-child { border-top: none; }
.operation-list-item:hover { background: var(--surface2); }
.operation-list-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.operation-list-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.operation-list-icon svg { width: 16px; height: 16px; }
.operation-list-icon.total { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-glow); }
.operation-list-icon.info { color: var(--info-fg); background: var(--info-soft); border-color: var(--info-line); }
.operation-list-icon.allowed { color: var(--success-fg); background: var(--success-soft); border-color: var(--success-line); }
.operation-list-icon.monitored { color: var(--purple-fg); background: var(--purple-soft); border-color: var(--purple-line); }
.operation-list-content { flex: 1; min-width: 0; }
.operation-list-title { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.operation-list-desc { display: block; font-size: 11.5px; color: var(--text2); margin-top: 3px; line-height: 1.4; }
.operation-list-value { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; line-height: 1.15; }
.operation-list-value strong { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.operation-list-value.text strong { font-size: 13px; }
.operation-list-value span { font-size: 10.5px; color: var(--text3); margin-top: 2px; }
.operation-list-chevron { color: var(--text3); flex-shrink: 0; display: flex; }
.operation-list-chevron svg { width: 16px; height: 16px; }
.operation-list-item:hover .operation-list-chevron { color: var(--primary-fg); }

/* ── Notice list (severity uyarı paneli, reusable) ── */
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item { display: flex; gap: 10px; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface2); }
/* `display:flex` class kuralı, [hidden] özniteliğinin tarayıcı varsayılanı olan
   display:none'ını specificity ile ezer; JS `el.hidden = true` yazdığında panel
   görünmeye devam eder. Nokta atışı kural bunu geri alır (aynı desen: .vs-dryrun-result[hidden]). */
.notice-item[hidden] { display: none; }
.notice-item.warning { border-color: var(--warning-line); background: var(--warning-soft); }
.notice-item.danger { border-color: var(--danger-line); background: var(--danger-soft); }
.notice-item.success { border-color: var(--success-line); background: var(--success-soft); }
.notice-item-icon { flex-shrink: 0; margin-top: 1px; color: var(--text3); }
.notice-item.warning .notice-item-icon { color: var(--warning-fg); }
.notice-item.danger .notice-item-icon { color: var(--danger-fg); }
.notice-item.success .notice-item-icon { color: var(--success-fg); }
.notice-item-icon svg { width: 16px; height: 16px; display: block; }
.notice-item-content { min-width: 0; }
.notice-item-title { font-size: 12.5px; font-weight: 650; color: var(--text); }
.notice-item-desc { font-size: 11.5px; color: var(--text2); margin-top: 3px; line-height: 1.45; }
.notice-item-action { font-size: 11.5px; font-weight: 600; color: var(--primary-fg); text-decoration: none; margin-top: 6px; display: inline-block; }
.notice-item-action:hover { text-decoration: underline; }

/* ── Compact summary list (etiket/değer özet, reusable) ── */
.compact-summary { display: flex; flex-direction: column; }
.compact-summary-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border2); }
.compact-summary-item:first-child { border-top: none; }
.compact-summary-main { flex: 1; min-width: 0; }
.compact-summary-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.compact-summary-meta { font-size: 11px; color: var(--text2); margin-top: 2px; line-height: 1.4; }
.compact-summary-value { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.compact-summary-value strong { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.compact-summary-value strong.zero { color: var(--text3); }

/* ── Related surface cards (ilişkili modül, reusable) ── */
.related-surface-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-surface-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: 16px; text-decoration: none; color: inherit; transition: border-color 150ms, transform 120ms; }
.related-surface-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.related-surface-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.related-surface-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text2); margin-bottom: 10px; }
.related-surface-icon svg { width: 18px; height: 18px; }
.related-surface-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.related-surface-desc { font-size: 11.5px; color: var(--text2); line-height: 1.55; margin-top: 6px; flex: 1; }
.related-surface-link { font-size: 12px; font-weight: 600; color: var(--primary-fg); margin-top: auto; padding-top: 12px; }

/* ── Genel Bakış'a özel: precedence davranış akışı (namespace'li) ── */
.ac-overview-flow { display: flex; flex-direction: column; }
.ac-overview-flow code { font-family: var(--font-mono); font-size: 11px; color: var(--primary-fg); }
.ac-overview-flow-step { position: relative; display: flex; gap: 12px; padding-bottom: 11px; }
.ac-overview-flow-step:last-child { padding-bottom: 0; }
.ac-overview-flow-rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.ac-overview-flow-marker { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: var(--surface3); color: var(--text2); z-index: 1; }
.ac-overview-flow-step.allow .ac-overview-flow-marker { color: var(--success-fg); background: var(--success-soft); border-color: var(--success-line); }
.ac-overview-flow-step.block .ac-overview-flow-marker { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-glow); }
.ac-overview-flow-step.auto .ac-overview-flow-marker { color: var(--info-fg); background: var(--info-soft); border-color: var(--info-line); }
.ac-overview-flow-step.geo .ac-overview-flow-marker { color: var(--purple-fg); background: var(--purple-soft); border-color: var(--purple-line); }
.ac-overview-flow-connector { flex: 1; width: 2px; background: var(--border); margin: 2px 0; min-height: 6px; }
.ac-overview-flow-step:last-child .ac-overview-flow-connector { display: none; }
.ac-overview-flow-content { padding-top: 3px; }
.ac-overview-flow-title { font-size: 12.5px; font-weight: 650; color: var(--text); }
.ac-overview-flow-desc { font-size: 11.5px; color: var(--text2); margin-top: 2px; line-height: 1.5; }

/* ── Erişim Kontrolü sayfa-içi yardımcı sınıflar (diğer sekmeler; eski inline'dan taşındı) ── */
.ac-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 1.25rem; }
.ac-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: block; transition: border-color 150ms, transform 120ms; }
a.ac-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.ac-card .ac-val { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.ac-card .ac-lbl { font-size: 12px; color: var(--text3); margin-top: 4px; }
.ac-card .ac-sub { font-size: 11.5px; color: var(--text3); margin-top: 6px; }
.ac-info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.25rem; }
.ac-info-card { background: var(--surface3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px; line-height: 1.55; color: var(--text2); }
.ac-info-card strong { color: var(--text); display: block; margin-bottom: 3px; font-size: 12.5px; }
.bl-section { display: none; }
.bl-section.active { display: block; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text2); letter-spacing: .01em; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 180px; }
.bl-input { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13.5px; font-family: inherit; padding: 9px 12px; transition: border-color 150ms, box-shadow 150ms; outline: none; width: 100%; box-sizing: border-box; }
.bl-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.bl-input::placeholder { color: var(--text3); }
.bl-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.bl-filter-bar .field { min-width: 0; }
.bl-filter-bar .field.grow { flex: 1; min-width: 180px; }
.bl-filter-bar select.bl-input, .bl-filter-bar input.bl-input { padding: 7px 10px; font-size: 13px; }
.bl-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 0; flex-wrap: wrap; }
.bl-pager .bl-pager-info { font-size: 12px; color: var(--text3); }
.bl-pager .bl-pager-ctrls { display: flex; gap: 6px; align-items: center; }
.conflict-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border2); font-size: 12.5px; line-height: 1.5; }
.conflict-item:first-child { border-top: none; }
.country-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--surface3); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.country-tag button { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; line-height: 1; padding: 0 2px; }
.country-tag button:hover { color: var(--danger); }
.info-note { background: var(--surface3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px; color: var(--text2); line-height: 1.6; }
.info-note code { font-family: var(--font-mono); color: var(--primary-fg); }
#unbanModal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.option-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color 150ms, background 150ms; user-select: none; }
.option-card:hover:not(.disabled) { border-color: var(--primary); background: var(--surface3); }
.option-card.selected { border-color: var(--primary); background: var(--primary-glow, rgba(99,102,241,.08)); }
.option-card.disabled { opacity: .42; cursor: not-allowed; }
.option-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.option-desc { font-size: 12px; color: var(--text3); margin-top: 3px; line-height: 1.5; }

/* ── Erişim Kontrolü responsive (eski inline media query'ler taşındı) ── */
@media (max-width: 1024px) {
  .ac-cards { grid-template-columns: repeat(2, 1fr); }
  .ac-info-cards { grid-template-columns: 1fr; }
  .ac-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .operations-grid { grid-template-columns: 1fr; }
  .related-surface-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .ac-cards { grid-template-columns: 1fr; }
  .product-hero-inner { flex-direction: column; align-items: flex-start; }
  .product-hero-actions { width: 100%; }
  .product-hero-actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
  .ac-metric-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .is-loading .spin-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI2 — Engel Listesi operasyon yüzeyi (.ac-block-*)
   Create modal, davranış özeti bandı, filtre toolbar, büyük-veri tablosu,
   skeleton/error/empty state ve pagination. Token tabanlı; UI1A component'leri
   (product-hero, operations-panel, panel-state, notice-item, skeleton) reuse eder.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Davranış özeti bandı (kompakt, 3 öğe) ── */
.ac-behavior-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-xs); }
.ac-behavior-item { display: flex; gap: 10px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.ac-behavior-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.ac-behavior-icon svg { width: 15px; height: 15px; }
.ac-behavior-item.scope .ac-behavior-icon { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-glow); }
.ac-behavior-item.effective .ac-behavior-icon { color: var(--info-fg); background: var(--info-soft); border-color: var(--info-line); }
.ac-behavior-item.priority .ac-behavior-icon { color: var(--success-fg); background: var(--success-soft); border-color: var(--success-line); }
.ac-behavior-body { min-width: 0; }
.ac-behavior-title { font-size: 12px; font-weight: 650; color: var(--text); }
.ac-behavior-desc { font-size: 11px; color: var(--text2); margin-top: 2px; line-height: 1.4; }

/* ── Engel Kayıtları operasyon paneli (toolbar + tablo + pager tek panelde) ── */
.ac-block-panel { padding: 0; }
.ac-block-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border2); flex-wrap: wrap; }
.ac-block-panel-head .ac-block-head-help { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.ac-block-head-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-block-count { font-size: 12px; color: var(--text3); font-variant-numeric: tabular-nums; }
.ac-block-count strong { color: var(--text); font-weight: 650; }
.ac-filter-clear { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--primary-fg); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.ac-filter-clear:hover { text-decoration: underline; }
.ac-filter-clear[hidden] { display: none; }
.ac-filter-clear svg { width: 13px; height: 13px; }
.ac-filter-count { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-fg); border: 1px solid var(--primary-glow); }

/* Toolbar grid: arama geniş, filtreler dar */
.ac-block-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) repeat(4, minmax(120px, 150px)); gap: 10px; padding: 12px 16px; align-items: end; border-bottom: 1px solid var(--border2); }
.ac-block-tfield { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ac-block-tfield label { font-size: 10.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; }

/* Tablo görsel polish */
.table-wrap.ac-block-wrap { overflow-x: auto; }
.ac-block-table { width: 100%; }
.ac-block-table tbody tr { transition: background 120ms; }
.ac-block-table tbody tr:hover { background: var(--surface2); }
.ac-block-cell-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ac-block-cell-value code { font-size: 12px; color: var(--text); word-break: break-all; }
.ac-block-reason { color: var(--text2); font-size: 12.5px; }
.ac-block-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* Skeleton satır (yükleme) */
.ac-skel-cell .skeleton { display: block; height: 12px; border-radius: 5px; }
.ac-skel-w-sm { width: 46px; } .ac-skel-w-md { width: 90px; } .ac-skel-w-lg { width: 150px; }

/* Tablo içi geniş state (error/empty) — ortalı */
/* Tablo içi geniş state — duruma göre kompakt min-height (tek yüksek değer bütün state'lerde kullanılmaz) */
.ac-table-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 9px; padding: 28px 20px; }
.ac-table-state.error { min-height: 260px; }
.ac-table-state.empty, .ac-table-state.filtered { min-height: 232px; }
.ac-table-state-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.ac-table-state-icon svg { width: 20px; height: 20px; }
.ac-table-state.error .ac-table-state-icon { color: var(--danger-fg); background: var(--danger-soft); border-color: var(--danger-line); }
.ac-table-state-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.ac-table-state-desc { font-size: 12px; color: var(--text2); max-width: 46ch; line-height: 1.5; }
.ac-table-state-actions { margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 768px) {
  .ac-table-state.error { min-height: 220px; }
  .ac-table-state.empty, .ac-table-state.filtered { min-height: 200px; }
}

/* Pagination */
.ac-block-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.ac-block-pager-info { font-size: 12px; color: var(--text3); font-variant-numeric: tabular-nums; }
.ac-block-pager-ctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-block-pager-page { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.ac-block-pager select.bl-input { width: auto; padding: 6px 8px; font-size: 12px; }

/* Görsel gizli, ekran okuyucuya açık yardımcı sınıf (global) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ── Create modal (sp-modal reuse üstünde) ── */
.ac-create-modal { max-width: 660px; }
.ac-create-form { display: flex; flex-direction: column; gap: 14px; }
.ac-create-helper { font-size: 11.5px; color: var(--text3); line-height: 1.45; }
.ac-create-perm-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ac-create-perm-row .ac-block-tfield { flex: 1; min-width: 160px; }
/* Kalıcı engel: tek yönlü switch (karşıt "Süreli" etiketi yok) */
.ac-create-perm-toggle { display: flex; flex-direction: column; gap: 6px; }
.ac-create-perm-head { font-size: 10.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; }
.ac-create-perm-toggle .switch-wrap { display: flex; align-items: center; gap: 9px; height: 38px; }
.ac-create-perm-state { font-size: 13px; color: var(--text2); }
.ac-create-effective { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; }
.ac-create-eff-item strong { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin-bottom: 1px; }
.ac-create-eff-item span { font-size: 12px; color: var(--text); }
/* Conflict preview: tek container, layout-shift'i sınırlamak için min-height */
.ac-create-conflict { display: flex; flex-direction: column; gap: 8px; min-height: 52px; }
.ac-create-conflict .notice-item-desc { line-height: 1.45; }
.ac-create-more { font-size: 11px; color: var(--text3); padding: 2px 2px 0; }
.ac-create-advisory { font-size: 11px; color: var(--text3); line-height: 1.45; margin-top: 6px; }
.ac-create-modal input.bl-input:disabled, .ac-create-modal .is-muted { opacity: 0.45; }
/* Modal header/footer yumuşatma + kapat butonu hit-area */
.modal-footer--soft { border-top-color: var(--border2); }
.ac-create-modal .modal-footer { padding: 14px 20px; }
.ac-create-modal .sp-modal-sub { color: var(--text2); }
.close-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ac-create-modal .close-btn { width: 36px; height: 36px; align-items: center; justify-content: center; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ac-block-toolbar { grid-template-columns: 1fr 1fr; }
  .ac-block-toolbar .ac-block-tfield.search { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .ac-behavior-summary { grid-template-columns: 1fr; }
  .ac-block-toolbar { grid-template-columns: 1fr; }
  .ac-create-effective { grid-template-columns: 1fr; }
  .ac-create-modal .modal-footer { flex-direction: column-reverse; }
  .ac-create-modal .modal-footer .btn { width: 100%; }
  .ac-block-pager { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI3 — Otomatik Engeller (AutoBan) lifecycle/operasyon yüzeyi
   (.ac-autoban-*). Metric kartlar (stat-card+mm-stat+ac-metric), config özeti
   (compact-summary), lifecycle (ac-overview-flow), diagnostic, tablo/pager (ac-block-*)
   ve state (ac-table-state) component'lerini reuse eder. Token tabanlı, tümü style.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* Metric kart warning accent ikon (total/info/allowed/monitored zaten tanımlı) */
.stat-card.warning .mm-stat-icon { color: var(--warning-fg); background: var(--warning-soft); border-color: var(--warning-line); }

/* Yapılandırma ayrıntıları: compact-summary reuse üstünde değer hizası (disclosure içinde) */
.ac-autoban-config .compact-summary-value { font-variant-numeric: tabular-nums; }
.ac-autoban-config .compact-summary-value span { font-size: 12.5px; color: var(--text); font-family: inherit; }
.ac-autoban-config .compact-summary-value strong { font-family: inherit; font-size: 12.5px; }

/* Evidence trigger chip'leri + IP hücresi */
.ac-autoban-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ac-autoban-ip { display: inline-flex; align-items: center; gap: 7px; }
.ac-autoban-ip code { font-size: 12px; }

/* Remediation aksiyon grupları (drawer) */
.ac-remed-group { margin-top: 4px; }
.ac-remed-group + .ac-remed-group { margin-top: 14px; }
.ac-remed-group-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin: 0 0 4px; }
.ac-remed-group-desc { font-size: 11px; color: var(--text3); line-height: 1.45; margin: 0 0 8px; }
.ac-remed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-remed-actions .btn { flex: 1 1 auto; min-width: 110px; justify-content: center; }
.ac-remed-group.high .ac-remed-group-title { color: var(--warning-fg); }
.ac-remed-group.danger .ac-remed-group-title { color: var(--danger-fg); }
.ac-remed-note { font-size: 11px; color: var(--text3); line-height: 1.45; margin: 6px 0 0; }

/* Evidence event satırları — bounded, taşmaz */
.ac-evidence-event { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border2); font-size: 12px; line-height: 1.45; }
.ac-evidence-event:first-child { border-top: none; }
.ac-evidence-event .ac-evidence-body { min-width: 0; }
.ac-evidence-event .ac-evidence-meta { color: var(--text3); font-size: 11px; margin-top: 2px; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI3A — AutoBan table-first layout: kompakt operasyon durumu
   bandı + collapsible disclosure (config + lifecycle help). style.css içinde.
   ═══════════════════════════════════════════════════════════════════════ */

/* Kompakt operasyon durumu bandı (hairline gap ile wrap-güvenli) */
.ac-autoban-status-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); margin: 0 0 16px; }
.ac-autoban-status-strip dt, .ac-autoban-status-strip dd { margin: 0; }
.ac-autoban-status-item { display: flex; gap: 10px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.ac-autoban-status-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.ac-autoban-status-icon svg { width: 15px; height: 15px; }
.ac-autoban-status-main { min-width: 0; }
.ac-autoban-status-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); }
.ac-autoban-status-value { font-size: 14px; font-weight: 650; color: var(--text); line-height: 1.2; margin-top: 3px; display: flex; flex-direction: column; gap: 2px; }
.ac-autoban-status-value strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.ac-autoban-status-meta { font-size: 11px; font-weight: 400; color: var(--text3); line-height: 1.35; }

/* Native disclosure (config ayrıntıları + lifecycle yardımı) */
.ac-autoban-disclosure, .ac-autoban-help { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); margin: 0 0 16px; overflow: hidden; }
.ac-autoban-disclosure > summary, .ac-autoban-help > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.ac-autoban-disclosure > summary::-webkit-details-marker, .ac-autoban-help > summary::-webkit-details-marker { display: none; }
.ac-autoban-disclosure > summary:focus-visible, .ac-autoban-help > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ac-autoban-disclosure[open] > summary, .ac-autoban-help[open] > summary { border-bottom: 1px solid var(--border2); }
.ac-disc-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.ac-disc-icon svg { width: 15px; height: 15px; }
.ac-disc-main { flex: 1; min-width: 0; }
.ac-disc-title { font-size: 13px; font-weight: 650; color: var(--text); }
.ac-disc-hint { font-size: 11.5px; color: var(--text3); font-weight: 400; margin-top: 1px; line-height: 1.4; }
.ac-disc-cta { font-size: 12px; font-weight: 600; color: var(--primary-fg); flex-shrink: 0; }
.ac-disc-chevron { color: var(--text3); flex-shrink: 0; display: flex; transition: transform 0.2s var(--ease); }
.ac-disc-chevron svg { width: 16px; height: 16px; }
details[open] > summary .ac-disc-chevron { transform: rotate(90deg); }
.ac-disc-body { padding: 14px 16px; }
.ac-disc-body .compact-summary { margin: 0; }
.ac-disc-body dt, .ac-disc-body dd { margin: 0; }

@media (max-width: 1024px) {
  .ac-autoban-status-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .ac-autoban-status-strip { grid-template-columns: 1fr 1fr; }
  .ac-autoban-disclosure > summary, .ac-autoban-help > summary { flex-wrap: wrap; }
  .ac-disc-cta { order: 3; }
}
@media (max-width: 480px) {
  .ac-autoban-status-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-disc-chevron { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI4 / UI4A — İzin Listesi (Allowlist) table-first bilgi mimarisi.
   UI4A: dev safety banner → tek satır compact safety strip; metadata bandı strip'e
   entegre; metric kartlar hero'nun hemen altında; Gelişmiş JSON tam-genişlik disclosure
   → sağdan uzman drawer (detail-drawer reuse); İstemci IP Tanılama → yardımcı araç kartı
   + kompakt drawer. Ortak component reuse: product-hero, ac-metric, operations-panel,
   ac-block-*, modal-overlay/ac-create-*, detail-drawer/dd-*, notice-item, compact-summary.
   Sadece namespaced .ac-allowlist-*; inline <style> yok, token tabanlı.
   ═══════════════════════════════════════════════════════════════════════ */

/* Hero sonrası kompakt boşluk; metric kartlar hemen altta. */
.ac-allowlist-metrics { margin-top: 4px; }

/* ── Kompakt tek satır Tam WAF Muafiyeti güvenlik bandı (details = disclosure) ── */
.ac-allowlist-safety-strip {
  border: 1px solid var(--warning-line); border-left: 3px solid var(--warning-fg);
  border-radius: var(--radius-lg); background: var(--warning-soft);
  box-shadow: var(--shadow-xs); margin: 0 0 16px; overflow: hidden;
}
/* UI4B: summary = grid (icon / main / meta / cta). ≥1367 tek satır; ≤1366 CTA + meta
   ikinci satıra kontrollü wrap; strip yüksekliği ~64–88px bandında kalır. */
.ac-allowlist-safety-strip > summary {
  list-style: none; cursor: pointer;
  display: grid; align-items: center; gap: 10px 18px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "icon main meta cta";
  padding: 12px 16px; min-height: 48px;
}
.ac-allowlist-safety-strip > summary::-webkit-details-marker { display: none; }
.ac-allowlist-safety-strip > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ac-allowlist-safety-icon {
  grid-area: icon; width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--warning-line); color: var(--warning-fg);
}
.ac-allowlist-safety-icon svg { width: 17px; height: 17px; }
.ac-allowlist-safety-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-allowlist-safety-title { font-size: 13px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.ac-allowlist-safety-desc { font-size: 12px; line-height: 1.4; color: var(--text2); }
.ac-allowlist-safety-meta { grid-area: meta; display: flex; gap: 20px; margin: 0; }
.ac-allowlist-safety-meta > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; white-space: nowrap; }
.ac-allowlist-safety-meta dt { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-weight: 600; }
.ac-allowlist-safety-meta dd { margin: 0; font-size: 12px; font-weight: 600; color: var(--text); }
/* CTA gerçek disclosure action gibi: ghost pill + chevron. */
.ac-allowlist-safety-cta {
  grid-area: cta; display: inline-flex; align-items: center; gap: 6px; justify-self: end;
  font-size: 12px; font-weight: 600; color: var(--warning-fg); white-space: nowrap;
  padding: 5px 10px; border: 1px solid var(--warning-line); border-radius: var(--radius); background: var(--surface);
}
.ac-allowlist-safety-strip > summary:hover .ac-allowlist-safety-cta { border-color: var(--warning-fg); }
.ac-allowlist-safety-chevron { display: flex; transition: transform 0.2s var(--ease); }
.ac-allowlist-safety-chevron svg { width: 15px; height: 15px; }
.ac-allowlist-safety-strip[open] .ac-allowlist-safety-chevron { transform: rotate(90deg); }
.ac-allowlist-safety-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 12px 16px 14px; border-top: 1px solid var(--warning-line);
}
.ac-allowlist-safety-detail-col:first-child { padding-left: 46px; }
.ac-allowlist-safety-detail-head { margin: 0 0 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
.ac-allowlist-safety-detail ul { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.5; color: var(--text2); }
.ac-allowlist-safety-detail li { margin-bottom: 4px; }

/* ── Tablo panel head kompakt (UI4A polish) ── */
.ac-allowlist-table-head { align-items: center; }
.ac-allowlist-table .ac-allowlist-path { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ── Kompakt Yardımcı Araçlar (secondary görsel ağırlık) ── */
.ac-allowlist-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.ac-allowlist-tool-card {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 13px 15px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  transition: border-color .15s, background .15s;
}
.ac-allowlist-tool-card:hover { border-color: var(--border-strong); background: var(--surface2); }
.ac-allowlist-tool-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ac-allowlist-tool-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface3); border: 1px solid var(--border); color: var(--text2);
}
.ac-allowlist-tool-icon svg { width: 17px; height: 17px; }
.ac-allowlist-tool-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-allowlist-tool-title { font-size: 13px; font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; }
.ac-allowlist-tool-meta { font-size: 11.5px; color: var(--text3); line-height: 1.4; }
.ac-allowlist-tool-cta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; align-self: center; font-size: 12px; font-weight: 600; color: var(--primary-fg); white-space: nowrap; }
.ac-allowlist-tool-cta svg { width: 14px; height: 14px; }
.ac-allowlist-tool-title .badge { flex-shrink: 0; }

/* ── Tablo satır aksiyonları: Düzenle (outline) + Sil (danger-ghost) ── */
.ac-allowlist-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
.ac-allowlist-danger-ghost {
  color: var(--danger); border-color: transparent; background: transparent;
  min-height: 26px;
}
.ac-allowlist-danger-ghost:hover { background: var(--danger-soft); color: var(--danger-fg); border-color: var(--danger-line); }
.ac-allowlist-danger-ghost:focus-visible { outline: 2px solid var(--danger); outline-offset: 1px; }

/* ── Modal form bölüm etiketleri + kural özeti + confirmation (UI4 korunur) ── */
.ac-allowlist-section-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3); margin: 4px 0 -2px;
}
.ac-allowlist-section-label:first-child { margin-top: 0; }
.ac-allowlist-rule-summary {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
}
.ac-allowlist-rule-summary-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-weight: 600; }
.ac-allowlist-rule-summary-text { font-size: 12.5px; line-height: 1.5; color: var(--text); }
.ac-allowlist-confirm {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: var(--radius);
  font-size: 12px; line-height: 1.5; color: var(--danger-fg);
}
.ac-allowlist-confirm-icon { flex-shrink: 0; display: flex; color: var(--danger-fg); }
.ac-allowlist-confirm-icon svg { width: 16px; height: 16px; }

/* Danger modal ikon (silme) */
.sp-modal-icon.danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-fg); }
.ac-allowlist-delete-modal { max-width: 480px; }

/* ── Sağdan uzman drawer'ları (detail-drawer reuse; genişlik override) ── */
.ac-allowlist-json-drawer { width: 640px; max-width: 94vw; }
/* UI4B: diagnostic içeriği az → daha dar. */
.ac-allowlist-diag-drawer { width: min(410px, 94vw); }
.dd-section-head { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); font-weight: 700; margin: 0 0 8px; }
.ac-allowlist-json-help ul { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.55; color: var(--text2); }
.ac-allowlist-json-help li { margin-bottom: 4px; }
.ac-allowlist-json-editor-wrap { display: flex; flex-direction: column; }
.ac-allowlist-json-drawer textarea#whitelistEditor {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5;
  min-height: 260px; resize: vertical; width: 100%;
}
/* UI4B: footer action hiyerarşisi — Reload secondary (sol), Save warning-primary (sağ,
   doğal genişlik; footer'ı kaplamaz). Destructive değil. */
.ac-allowlist-json-footer { justify-content: space-between; align-items: center; }
.ac-allowlist-json-footer .btn { flex: 0 0 auto; }
.ac-allowlist-diag-drawer .dd-body { gap: 14px; }

/* ── Responsive ── */
@media (max-width: 1366px) {
  /* CTA + metadata ikinci satıra kontrollü wrap; ana satır icon+başlık+açıklama. */
  .ac-allowlist-safety-strip > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "icon main main"
      "icon meta cta";
    row-gap: 8px;
  }
  .ac-allowlist-safety-cta { justify-self: end; }
}
@media (max-width: 1024px) {
  .ac-allowlist-safety-detail { grid-template-columns: 1fr; }
  .ac-allowlist-safety-detail-col:first-child { padding-left: 0; }
}
@media (max-width: 768px) {
  .ac-allowlist-tools { grid-template-columns: 1fr; }
  .ac-allowlist-safety-strip > summary {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon main"
      "meta meta"
      "cta cta";
  }
  .ac-allowlist-safety-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .ac-allowlist-safety-cta { justify-self: stretch; justify-content: center; }
}
@media (max-width: 520px) {
  .ac-allowlist-json-drawer, .ac-allowlist-diag-drawer { width: 100vw; max-width: 100vw; }
  .ac-allowlist-json-footer { flex-direction: column-reverse; }
  .ac-allowlist-json-footer .btn { width: 100%; flex: 1 0 auto; }
}
@media (max-width: 480px) {
  .ac-allowlist-tool-cta span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-allowlist-safety-chevron { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI5 — GeoIP operasyon yüzeyi (table-first). Ortak reuse:
   product-hero, ac-metric (stat-card+mm-stat), operations-panel/ac-block-*,
   compact-summary, notice-item, detail-drawer/dd-*, ac-allowlist-tool-card,
   panel-state, skeleton. Sadece namespaced .ac-geoip-*; inline <style> yok.
   ═══════════════════════════════════════════════════════════════════════ */
.ac-geoip-metrics { margin-top: 4px; }

/* Kompakt GeoIP sağlık / safety strip (severity: danger/warning/info/success) */
.ac-geoip-health-strip {
  display: grid; align-items: center; gap: 10px 18px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "icon main meta actions";
  padding: 12px 16px; margin: 0 0 16px; min-height: 48px;
  border: 1px solid var(--border); border-left: 3px solid var(--text3);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs);
}
.ac-geoip-health-strip.danger { border-color: var(--danger-line); border-left-color: var(--danger-fg); background: var(--danger-soft); }
.ac-geoip-health-strip.warning { border-color: var(--warning-line); border-left-color: var(--warning-fg); background: var(--warning-soft); }
.ac-geoip-health-strip.info { border-color: var(--info-line); border-left-color: var(--info-fg); background: var(--info-soft); }
.ac-geoip-health-strip.success { border-color: var(--success-line); border-left-color: var(--success-fg); background: var(--success-soft); }
.ac-geoip-health-icon { grid-area: icon; width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text2); }
.ac-geoip-health-strip.danger .ac-geoip-health-icon { background: var(--danger-line); color: var(--danger-fg); border-color: transparent; }
.ac-geoip-health-strip.warning .ac-geoip-health-icon { background: var(--warning-line); color: var(--warning-fg); border-color: transparent; }
.ac-geoip-health-strip.success .ac-geoip-health-icon { background: var(--success-line); color: var(--success-fg); border-color: transparent; }
.ac-geoip-health-icon svg { width: 17px; height: 17px; }
.ac-geoip-health-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-geoip-health-title { font-size: 13px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.ac-geoip-health-desc { font-size: 12px; line-height: 1.4; color: var(--text2); }
.ac-geoip-health-meta { grid-area: meta; display: flex; gap: 18px; margin: 0; }
.ac-geoip-health-meta > div { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.ac-geoip-health-meta dt { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-weight: 600; }
.ac-geoip-health-meta dd { margin: 0; font-size: 12px; font-weight: 600; color: var(--text); }
.ac-geoip-health-actions { grid-area: actions; display: flex; gap: 8px; align-items: center; justify-self: end; }

/* ── UI5B: ortak card shell (operations-panel üstünde header/body/footer + eşit yükseklik) ── */
.ac-card-shell { display: flex; flex-direction: column; height: 100%; }
.ac-card-shell__header { flex-shrink: 0; }
.ac-card-shell__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ac-card-shell__footer { flex-shrink: 0; margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border2); }

/* Ana operasyon grid: Ülke Politikası (geniş) + Dry-Run (dar); eşit yükseklik (stretch) */
.ac-geoip-main-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.ac-geoip-country-panel, .ac-geoip-dryrun { min-width: 0; }

/* Dört gerçek mini-stat (policy + impact ortak .ac-geoip-stat sistemi) */
.ac-geoip-policy-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0;
  background: var(--border2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.ac-geoip-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.ac-geoip-stat-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-weight: 600; margin: 0; }
.ac-geoip-stat-value { margin: 0; font-size: 13px; font-weight: 650; color: var(--text); line-height: 1.3; }
.ac-geoip-country-select { display: flex; gap: 8px; }
.ac-geoip-country-select select { flex: 1; min-width: 0; }
.ac-geoip-country-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.ac-geoip-save-impact { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; line-height: 1.55; color: var(--text2); }

/* Bölge erişimi — kart seçenekleri (GeoIP ülke politikası) */
.ac-geoip-region-panel {
  margin: 14px 0 16px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  background: linear-gradient(165deg, color-mix(in srgb, var(--primary) 6%, var(--surface2)) 0%, var(--surface) 55%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
}
.ac-geoip-region-panel--turkey {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  background: linear-gradient(165deg, color-mix(in srgb, var(--success) 8%, var(--surface2)) 0%, var(--surface) 60%);
}
.ac-geoip-region-panel--block {
  border-color: color-mix(in srgb, var(--warning) 38%, var(--border));
  background: linear-gradient(165deg, color-mix(in srgb, var(--warning) 7%, var(--surface2)) 0%, var(--surface) 60%);
}
.ac-geoip-region-panel--custom {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  background: linear-gradient(165deg, color-mix(in srgb, var(--primary) 6%, var(--surface2)) 0%, var(--surface) 55%);
}
.ac-geoip-region-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ac-geoip-region-head-text { min-width: 0; flex: 1; }
.ac-geoip-region-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ac-geoip-region-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
}
.ac-geoip-region-status {
  flex-shrink: 0;
  max-width: 42%;
  text-align: right;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text3);
}
.ac-geoip-region-status--on {
  color: var(--success-fg, var(--success));
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
}
.ac-geoip-region-status--block {
  color: var(--warning-fg, var(--warning));
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}
.ac-geoip-region-status--draft {
  color: var(--warning-fg, var(--warning));
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
}
.ac-geoip-region-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ac-geoip-region-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong, var(--border));
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .12s;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent);
}
.ac-geoip-region-opt:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--surface2);
  transform: translateY(-1px);
}
.ac-geoip-region-opt.is-active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent), 0 4px 14px -6px color-mix(in srgb, var(--primary) 35%, transparent);
}
.ac-geoip-region-opt-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface2));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
}
.ac-geoip-region-opt-icon svg { width: 18px; height: 18px; }
.ac-geoip-region-opt-icon--warn {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface2));
  color: var(--warning-fg, var(--warning));
  border-color: color-mix(in srgb, var(--warning) 28%, var(--border));
}
.ac-geoip-region-opt-icon--neutral {
  background: var(--surface3);
  color: var(--text2);
  border-color: var(--border2);
}
.ac-geoip-region-opt-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-geoip-region-opt-title { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.ac-geoip-region-opt-sub { font-size: 10.5px; line-height: 1.35; color: var(--text3); }
.ac-geoip-region-footnote {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text3);
}
.ac-geo-confirm-modal { max-width: 440px; }
.ac-geo-confirm-msg {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text2);
}

@media (max-width: 900px) {
  .ac-geoip-region-options { grid-template-columns: 1fr; }
  .ac-geoip-region-status { max-width: none; text-align: left; }
  .ac-geoip-region-head { flex-direction: column; }
}

/* Hızlı Setler footer (gerçek button cluster) */
.ac-geoip-quick-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ac-geoip-quick-actions-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; }
.ac-geoip-quick-actions-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* Dry-Run body/footer (card shell ritmi) */
.ac-geoip-dryrun-body { gap: 12px; }
.ac-geoip-dryrun-fields { display: flex; flex-direction: column; gap: 10px; }
.ac-geoip-dryrun-footer { display: flex; gap: 8px; align-items: center; }
#geoDryResult:empty { display: none; }

/* Servis Etkisi mini-stat hücreleri (policy ile aynı segmented dil) */
.ac-geoip-impact-body { padding: 0; gap: 0; }
.ac-geoip-impact-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin: 16px 16px 4px; background: var(--border2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.ac-geoip-impact-stat { display: flex; gap: 10px; padding: 11px 13px; background: var(--surface); min-width: 0; }
.ac-geoip-impact-stat-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text3); }
.ac-geoip-impact-stat-icon svg { width: 16px; height: 16px; }
.ac-geoip-impact-stat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ac-geoip-impact-stat-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-weight: 600; }
.ac-geoip-impact-stat-value { font-size: 13px; font-weight: 650; color: var(--text); }
.ac-geoip-impact-stat-meta { font-size: 11px; color: var(--text3); }
.ac-geoip-impact-body .table-wrap { margin: 0 0 4px; }

/* Servis tablosu: Kaynak/Profil hücresi + row action (sağ padding) */
.ac-geoip-source-cell { min-width: 0; }
.ac-geoip-source-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text); }
.ac-geoip-source-sub { font-size: 10.5px; color: var(--text3); margin-top: 1px; }
.ac-geoip-impact-table th:last-child, .ac-geoip-impact-table td.ac-geoip-row-actions-cell { padding-right: 20px; }
.ac-geoip-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ac-geoip-row-actions .btn { min-height: 30px; padding: 4px 11px; white-space: nowrap; }

/* Yardımcı Araçlar: gerçek dikey tool-card (menü satırı değil) */
.ac-geoip-tools-section { margin-top: 16px; }
.ac-geoip-tools-head-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.ac-geoip-tools-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin: 0; }
.ac-geoip-tools-help { font-size: 12px; color: var(--text3); margin: 0; }
.ac-geoip-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-geoip-tool-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; min-height: 96px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  transition: border-color .15s, background .15s;
}
.ac-geoip-tool-card:hover { border-color: var(--border-strong); background: var(--surface2); }
.ac-geoip-tool-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ac-geoip-tool-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-geoip-tool-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface3); border: 1px solid var(--border); color: var(--text2); }
.ac-geoip-tool-icon svg { width: 17px; height: 17px; }
.ac-geoip-tool-title { font-size: 13px; font-weight: 650; color: var(--text); }
.ac-geoip-tool-desc { font-size: 11.5px; color: var(--text3); line-height: 1.4; }
.ac-geoip-tool-cta { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; font-size: 12px; font-weight: 600; color: var(--primary-fg); }
.ac-geoip-tool-cta svg { width: 14px; height: 14px; }

/* Details drawer bölümleri */
.ac-geoip-details-drawer { width: 620px; max-width: 94vw; }
.ac-geoip-diag-drawer { width: min(410px, 94vw); }
.ac-geoip-details-section { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border2); }
.ac-geoip-details-section:last-of-type { border-bottom: 0; }
.ac-geoip-details-section .dd-section-head { margin: 0 0 8px; }
.ac-geoip-details-section .detail-grid { gap: 6px 12px; }
/* UI4B standardı: footer natural-width (reload ghost sol, update warning sağ; full-width değil) */
.ac-geoip-drawer-footer { justify-content: space-between; align-items: center; }
.ac-geoip-drawer-footer .btn { flex: 0 0 auto; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  /* Tek kolon: eşit-height zorunluluğu kalkar */
  .ac-geoip-main-grid { grid-template-columns: 1fr; }
  .ac-card-shell { height: auto; }
}
@media (max-width: 1024px) {
  .ac-geoip-health-strip { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon main actions" "icon meta meta"; row-gap: 8px; }
  .ac-geoip-impact-stats { grid-template-columns: 1fr; }
  .ac-geoip-policy-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .ac-geoip-tool-grid { grid-template-columns: 1fr; }
  .ac-geoip-health-strip { grid-template-columns: auto 1fr; grid-template-areas: "icon main" "meta meta" "actions actions"; }
  .ac-geoip-health-meta { gap: 14px; }
  .ac-geoip-health-actions { justify-self: stretch; }
  .ac-geoip-quick-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .ac-geoip-details-drawer, .ac-geoip-diag-drawer { width: 100vw; max-width: 100vw; }
  .ac-geoip-country-select { flex-direction: column; }
  .ac-geoip-drawer-footer { flex-direction: column-reverse; }
  .ac-geoip-drawer-footer .btn { width: 100%; flex: 1 0 auto; }
  .ac-geoip-dryrun-footer { flex-wrap: wrap; }
  .ac-geoip-dryrun-footer .btn { flex: 1 1 auto; }
  .ac-geoip-policy-stats { grid-template-columns: 1fr 1fr; }
  .ac-geoip-quick-actions-btns { width: 100%; }
  .ac-geoip-quick-actions-btns .btn { flex: 1 1 auto; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESS-CONTROL-UI6-FIX — Legacy unban modal ortak component'e taşındı;
   JS-render tablo hücresi + aksiyon inline style'ları utility class'lara çevrildi.
   Yeni modal shell yazılmadı: .modal-overlay/.modal/.sp-modal-header/.modal-body
   /.modal-footer reuse edilir. Tümü token tabanlı, style.css içinde.
   ═══════════════════════════════════════════════════════════════════════ */

/* Unban modal (ortak modal ailesi + danger konteksti). */
.ac-unban-modal { max-width: 520px; }
.ac-unban-modal [hidden] { display: none; }
.ac-unban-options { display: flex; flex-direction: column; gap: 8px; }
.ac-unban-option { width: 100%; text-align: left; font: inherit; background: transparent; display: flex; flex-direction: column; gap: 3px; }
.ac-unban-option .option-title { font-weight: 600; font-size: 13px; color: var(--text); }
.ac-unban-option .option-desc { font-size: 12px; color: var(--text3); line-height: 1.45; }
.ac-unban-option:disabled { opacity: .42; cursor: not-allowed; }
.ac-unban-suppress:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }
.ac-req-mark { color: var(--danger); }
.ac-field-optional { color: var(--text3); font-weight: 400; }
.btn.is-loading { opacity: .75; pointer-events: none; }

/* JS-render tablo hücresi + aksiyon utility'leri (UI6-002 kapanışı: inline font/color yok). */
.ac-cell-sm { font-size: .82rem; }
.ac-cell-muted { font-size: .82rem; color: var(--text3); }
.ac-cell-danger { color: var(--danger-fg); font-size: .82rem; }
.ac-cell-warn { font-size: .82rem; color: var(--warning-fg); }
.ac-action-danger { color: var(--danger-fg); }
.ac-text-muted { color: var(--text3); }
.ac-text-danger { color: var(--danger-fg); }
.ac-text-warning { color: var(--warning-fg); }
.ac-hint-sm { font-size: 11.5px; color: var(--text3); }

/* Statik görsel inline style yerine class'lar. */
.ac-metric-static { cursor: default; }
.ac-metric-clickable { cursor: pointer; text-align: left; }
.ac-flush { margin: 0; }
.ac-note-gap { margin: 10px 0 0; }
.ac-sub-gap { margin: 6px 0 0; }
.ac-code-chip { font-family: var(--font-mono); font-size: 11px; color: var(--primary-fg); }
.ac-block-toolbar--search { grid-template-columns: minmax(280px, 1fr) minmax(160px, 220px); }
.ac-fs-11 { font-size: 11px; }
.ac-fs-12-muted { font-size: 12px; color: var(--text3); }
.ac-mb-10 { margin-bottom: 10px; }
.ac-mb10-flush { margin: 0 0 10px; }
.ac-skel-60 { width: 60%; }
.ac-strong-13 { font-size: 13px; font-weight: 700; }
.ac-diag-lead { font-size: 12px; margin-bottom: 10px; }

/* Statik health warning + diagnostic drawer alt bileşenleri (eski inline style'lar). */
.ac-ab-diag-warn { margin: -6px 0 16px; }
.ac-geo-warnings { flex-direction: column; gap: 6px; }
.ac-inline-warn { background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius); padding: 8px 10px; font-size: 12px; color: var(--warning-fg); }
.ac-diag-card { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface3); border: 1px solid var(--border); border-radius: var(--radius); }
.ac-diag-desc { font-size: 12px; color: var(--text2); flex: 1; }
.ac-diag-warn-list { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--warning-fg); }

/* ============================================================================
   PROTECTION-SETTINGS-UI1 — Global Protection Hub (.ps-*)
   Koruma Ayarları landing hub + Acil Koruma product card + akış + summary.
   Token tabanlı; light/dark tema otomatik. Yeni inline style yerine bu sistem.
   ============================================================================ */
.ps-page { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: none; }
.ps-scroll-lock { overflow: hidden !important; }
/* Koruma Ayarları page-header status pill kümesi — inline layout style yerine (UI-DRIFT1). */
#psHeroStatus.ps-header-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Genel card footer (protection hub + reuse edilebilir). */
.card-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }

/* Cross-page hizalama yardımcıları (blockpage/rate-limit) — eski inline style yerine. */
.ps-align-start { align-items: start; }
.bp-col { display: flex; flex-direction: column; gap: 12px; }
.bp-card-stack { display: flex; flex-direction: column; gap: 10px; }
.bp-preview-card { position: sticky; top: 0; }
.bp-preview-hint { margin-top: 8px; text-align: center; }
.bp-color-input { padding: 2px 4px; height: 38px; cursor: pointer; }
.bp-field-tight { margin-bottom: 8px; }
.mini-txt-sm { width: 24px; }
@media (max-width: 1024px) {
  .bp-preview-card { position: static; }
}

/* --- Product hero --- */
.ps-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm);
}
.ps-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(37,99,235,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgba(79,70,229,0.08) 0%, transparent 50%);
}
.ps-hero.is-active .ps-hero-glow {
  background:
    radial-gradient(ellipse 60% 85% at 100% 0%, rgba(255,77,94,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgba(255,77,94,0.08) 0%, transparent 50%);
}
.ps-hero-inner {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding: 20px 22px;
}
.ps-hero-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ps-hero-icon {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #3B82F6 0%, #2563EB 55%, #1D4ED8 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,0.34);
}
.ps-hero.is-active .ps-hero-icon {
  background: linear-gradient(145deg, #F87171 0%, #EF4444 55%, #DC2626 100%);
  box-shadow: 0 6px 18px rgba(220,38,38,0.34);
}
.ps-hero-icon svg { width: 25px; height: 25px; }
.ps-eyebrow {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--primary-fg);
}
.ps-hero-title { font-family: var(--font-display); font-size: 23px; font-weight: 650; letter-spacing: -0.025em; margin: 3px 0 0; }
.ps-hero-desc { margin: 5px 0 0; font-size: 13px; color: var(--text3); font-weight: 500; max-width: 560px; }
.ps-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; }
.ps-hero-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ps-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* --- Hub layout (UI1A: Acil Koruma full-width + eşit summary satırı) ---
   Yapay row-span / sabit min-height YOK; kartlar doğal içerik yüksekliğinde.
   Eşit yükseklik yalnız aynı satırdaki iki summary kartına uygulanır. */
.ps-hub-layout { display: flex; flex-direction: column; gap: 16px; }
.ps-hub-summaries { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.ps-summary-card { display: flex; flex-direction: column; }
.ps-summary-card .card-body { flex: 1 1 auto; }
.ps-summary-card .card-footer { margin-top: auto; }

/* --- Acil Koruma operasyon kartı --- */
.ps-lockdown-card { border-top: 3px solid var(--border); transition: border-color .18s ease; }
.ps-lockdown-card.is-active   { border-top-color: var(--danger); }
.ps-lockdown-card.is-inactive { border-top-color: var(--success-line); }
.ps-lockdown-card.is-unknown  { border-top-color: var(--warning); }
.ps-lockdown-card.is-loading  { border-top-color: var(--border); }
.ps-card-desc { font-size: 13px; color: var(--text2); line-height: 1.55; }

.ps-ministat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 0; }
.ps-ministat { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface2); min-width: 0; }
.ps-ministat dt { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); }
.ps-ministat dd { margin: 3px 0 0; font-size: 13px; font-weight: 650; color: var(--text); word-break: break-word; }

/* --- Summary kartları --- */
.ps-summary-list { display: flex; flex-direction: column; }
.ps-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border2); font-size: 13px; }
.ps-summary-row:last-child { border-bottom: none; }
.ps-summary-row .k { color: var(--text3); flex-shrink: 0; }
.ps-summary-row .v { color: var(--text); font-weight: 650; text-align: right; word-break: break-word; }

/* --- Koruma akışı --- */
.ps-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.ps-flow-step { flex: 1 1 130px; min-width: 120px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface2); }
.ps-flow-step .ps-flow-k { font-size: 12px; font-weight: 650; color: var(--text); }
.ps-flow-step .ps-flow-v { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.ps-flow-step.is-gate { border-color: var(--danger-line); background: var(--danger-soft); }
.ps-flow-step.is-gate .ps-flow-k { color: var(--danger-fg); }
.ps-flow-arrow { align-self: center; color: var(--text3); flex-shrink: 0; display: flex; }
.ps-flow-arrow svg { width: 16px; height: 16px; }

/* --- Modal blast-radius listesi --- */
.ps-modal-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ps-modal-list li { display: flex; gap: 9px; font-size: 13px; color: var(--text2); line-height: 1.45; }
.ps-modal-list li .ps-modal-list-ico { flex-shrink: 0; margin-top: 1px; color: var(--text3); }
.ps-modal-list li .ps-modal-list-ico svg { width: 15px; height: 15px; display: block; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .ps-ministat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .ps-hero-inner { flex-direction: column; align-items: stretch; }
  .ps-hero-side { align-items: stretch; }
  .ps-hero-status, .ps-hero-actions { justify-content: flex-start; }
}
@media (max-width: 767px) {
  .ps-hub-summaries { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .ps-ministat-grid { grid-template-columns: 1fr 1fr; }
  .ps-hero-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-lockdown-card { transition: none; }
}

/* ============================================================================
   PROTECTION-SETTINGS-UI1A — Rate Limit politika modalı (sectioned form).
   Token tabanlı; shared .modal shell reuse; yeni overlay yok.
   ============================================================================ */
.rl-policy-modal .modal-body { gap: 0; }
.rl-form-section { padding: 16px 0; border-top: 1px solid var(--border2); }
.rl-form-section:first-of-type { padding-top: 4px; border-top: none; }
.rl-form-section-head { margin-bottom: 12px; }
.rl-form-section-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); }
.rl-form-section-help { font-size: 12px; color: var(--text3); margin-top: 3px; line-height: 1.5; }
.rl-form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.rl-form-grid--scope { grid-template-columns: 1fr 1fr; }
.rl-form-grid--limits { grid-template-columns: repeat(3, 1fr); }
.rl-field-unit { font-weight: 500; color: var(--text3); }

/* Politika etkin switch satırı */
.rl-policy-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); }
.rl-policy-switch-row .rl-switch-label { font-size: 13px; font-weight: 600; color: var(--text); }
.rl-policy-switch-row .rl-switch-help { font-size: 11.5px; color: var(--text3); margin-top: 2px; line-height: 1.45; }

/* Aksiyon radio-card grubu */
.rl-action-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: none; margin: 0; padding: 0; }
.rl-action-options--2col { grid-template-columns: repeat(2, 1fr); }
.rl-action-option { position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 12px 12px 34px; cursor: pointer; background: var(--surface2); transition: border-color .15s ease, background .15s ease; }
.rl-action-option input { position: absolute; left: 12px; top: 13px; margin: 0; cursor: pointer; }
.rl-action-option .rl-action-title { font-size: 13px; font-weight: 650; color: var(--text); }
.rl-action-option .rl-action-desc { font-size: 11.5px; color: var(--text3); margin-top: 3px; line-height: 1.4; }
.rl-action-option:hover { border-color: var(--border-strong, var(--text3)); }
.rl-action-option:has(input:checked) { border-color: var(--primary-line); background: var(--primary-soft); }
.rl-action-option:has(input:checked).rl-action-block { border-color: var(--warning-line); background: var(--warning-soft); }
.rl-action-option:has(input:checked).rl-action-block .rl-action-title { color: var(--warning-fg); }
.rl-action-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Canlı politika özeti */
.rl-policy-summary { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); padding: 12px 14px; }
.rl-policy-summary-title { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text3); margin-bottom: 6px; }
.rl-policy-summary-text { font-size: 12.5px; color: var(--text2); line-height: 1.55; }

/* Validation error state */
.input.is-invalid { border-color: var(--danger-line); }
.rl-field-error { font-size: 11.5px; color: var(--danger-fg); margin-top: 4px; display: none; }
.rl-field-error.show { display: block; }

/* Footer sol status alanı */
.modal-footer .rl-footer-status { margin-right: auto; font-size: 12px; color: var(--text3); }

@media (max-width: 640px) {
  .rl-form-grid--scope { grid-template-columns: 1fr; }
  .rl-form-grid--limits { grid-template-columns: 1fr; }
  .rl-action-options { grid-template-columns: 1fr; }
  .modal-footer .btn { flex: 1 1 auto; }
}

/* ============================================================
   RATE-LIMIT-UI2 — Effective-state & runtime observability
   Configured (yapılandırılmış) ile Efektif (gerçekten uygulanan)
   durumu görsel olarak ayırır. Badge'ler DAİMA metin taşır
   (yalnız renkle anlatım yok — a11y).
   ============================================================ */

/* Summary kartları için mevcut .stats-grid / .stat-card kullanılır. */

/* Bilgi kartları: configured-vs-effective, precedence, instance-local */
.rl-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 0; }
.rl-global-fallback-help { margin-top: 0; }
.rl-global-fallback-row { flex-wrap: wrap; align-items: flex-end; }
.rl-global-fallback-row .form-group { min-width: 110px; max-width: 160px; flex: 1 1 110px; }
.rl-global-fallback-actions { max-width: none; flex: 0 0 auto; min-width: 0; }
.rl-info-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 12px 14px; }
.rl-info-card h4 { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text2); margin: 0 0 8px; }
.rl-info-card p { font-size: 12.5px; color: var(--text2); line-height: 1.6; margin: 0 0 6px; }
.rl-info-card p:last-child { margin-bottom: 0; }
.rl-info-note { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--warning-line); background: var(--warning-soft); color: var(--warning-fg); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.rl-info-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* Pipeline precedence chip zinciri */
.rl-precedence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 4px; }
.rl-prec-step { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface3); color: var(--text2); border: 1px solid var(--border); white-space: nowrap; }
.rl-prec-step.rl-prec-here { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); }
.rl-prec-sep { color: var(--text3); font-size: 11px; }

/* Efektif durum badge'leri (primary — daha yüksek görsel öncelik) */
.rl-eff { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.rl-eff::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.rl-eff-block    { background: var(--danger-soft);  color: var(--danger-fg);  border-color: var(--danger-line); }
.rl-eff-monitor  { background: var(--purple-soft);  color: var(--purple-fg);  border-color: var(--purple-line); }
.rl-eff-unassigned { background: var(--surface3);   color: var(--text2);      border-color: var(--border); }
.rl-eff-module-off { background: var(--warning-soft); color: var(--warning-fg); border-color: var(--warning-line); }
.rl-eff-disabled { background: var(--surface3);     color: var(--text3);      border-color: var(--border); }
.rl-eff-invalid  { background: var(--warning-soft); color: var(--warning-fg); border-color: var(--warning-line); }
.rl-eff-mixed    { background: var(--info-soft);    color: var(--info-fg);    border-color: var(--info-line); }
.rl-eff-unknown  { background: var(--surface3);     color: var(--text3);      border-color: var(--border); border-style: dashed; }

/* Configured (secondary) etkin/pasif rozeti — küçük, nötr */
.rl-cfg-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--text3); }
.rl-cfg-on  { color: var(--success-fg); }
.rl-cfg-off { color: var(--text3); }

/* Kapsam hücresi */
.rl-scope { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.rl-scope code { font-size: 11px; }
.rl-scope-meta { color: var(--text3); font-size: 10.5px; }

/* Atanan servis hücresi */
.rl-assign { display: flex; flex-direction: column; gap: 2px; }
.rl-assign-count { font-weight: 650; font-size: 12.5px; color: var(--text); }
.rl-assign-src { font-size: 10.5px; color: var(--text3); }
.rl-assign-none { font-size: 11.5px; color: var(--text3); }

/* Runtime aktivite hücresi (compact metrikler) */
.rl-runtime { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11px; font-variant-numeric: tabular-nums; }
.rl-runtime .rl-rt-item { color: var(--text2); }
.rl-runtime .rl-rt-item strong { color: var(--text); font-weight: 650; }
.rl-runtime-idle { font-size: 11px; color: var(--text3); }
.rl-runtime-unknown { font-size: 11px; color: var(--text3); font-style: italic; }

/* Detail modal (read-only) bölümleri */
.rl-detail-section { padding: 14px 0; border-top: 1px solid var(--border2); }
.rl-detail-section:first-of-type { padding-top: 2px; border-top: none; }
.rl-detail-section h4 { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text3); margin: 0 0 10px; }
.rl-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.rl-detail-item { display: flex; flex-direction: column; gap: 2px; }
.rl-detail-item .rl-dt-label { font-size: 10.5px; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.rl-detail-item .rl-dt-value { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.rl-detail-reason { font-size: 12.5px; color: var(--text2); line-height: 1.55; margin-top: 8px; }
.rl-detail-assign-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rl-detail-assign-table th, .rl-detail-assign-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border2); }
.rl-detail-assign-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); font-weight: 600; }
.rl-detail-empty { font-size: 12px; color: var(--text3); }

/* Precedence açıklaması ile chip zinciri arası boşluk (inline style yerine) */
.rl-precedence + p { margin-top: 8px; }
/* Detail: efektif reason'dan sonra gelen sayaç grid'i */
.rl-detail-reason + .rl-detail-grid { margin-top: 10px; }

/* Stale (dangling) referans kartı */
.rl-stale-head { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--warning-fg); }
.rl-stale-help { margin-bottom: 8px; }
.rl-stale-row { margin-bottom: 4px; }
.rl-stale-row:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .rl-info-grid { grid-template-columns: 1fr; }
}

/* ===== Virtual IPs page ===== */
.vip-page-header .subtitle { max-width: 42ch; }
.vip-create-btn {
  padding: 9px 16px;
  font-size: 13.5px;
  border-radius: 10px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--primary) 28%, transparent),
              0 6px 16px color-mix(in srgb, var(--primary) 18%, transparent);
}
.vip-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--primary) 30%, transparent),
              0 10px 22px color-mix(in srgb, var(--primary) 22%, transparent);
}
.vip-create-btn svg { width: 15px; height: 15px; }

.vip-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px 20px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 55%),
    var(--surface);
}
.vip-guide-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1 1 280px;
  min-width: 0;
}
.vip-guide-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-line);
}
.vip-guide-icon svg { width: 20px; height: 20px; }
.vip-guide-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.vip-guide-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
}
.vip-guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  flex: 0 1 auto;
}
.vip-guide-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
}
.vip-guide-steps strong {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.vip-list-card { margin-bottom: 4px; }
.vip-empty {
  text-align: center;
  padding: 36px 18px;
  color: var(--text3);
}
.vip-empty-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
}
.vip-empty-text {
  margin: 0 auto 16px;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.5;
}
.vip-empty .btn { margin: 0 auto; }

.vip-modal { max-width: 540px; }
.vip-modal-body { gap: 14px; }
.vip-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.vip-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
.vip-req { color: var(--danger); }
.vip-opt { color: var(--text3); font-weight: 500; font-size: 11.5px; }
.vip-field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text3);
}
.vip-form-grid { gap: 12px; }
.vip-modal-tip {
  margin-top: 2px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--primary-line);
  background: var(--primary-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text2);
}
.vip-modal-tip strong { color: var(--text); font-weight: 600; }
.vip-modal-footer .btn-primary {
  min-width: 148px;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 9px;
}

@media (max-width: 640px) {
  .vip-guide-steps { width: 100%; }
  .vip-guide-steps li { flex: 1 1 auto; justify-content: center; }
}

/* Sanal IP — detay çekmecesi (detail-drawer.vip-drawer) */
.detail-drawer.vip-drawer { width: 440px; }
.detail-drawer.vip-drawer .dd-head {
  position: relative;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom-color: var(--border2);
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, var(--surface2)) 0%, var(--surface) 55%);
}
.detail-drawer.vip-drawer .dd-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--text3);
}
.detail-drawer.vip-drawer.vip-drawer--active .dd-head::before { background: var(--success); box-shadow: 0 0 12px color-mix(in srgb, var(--success) 45%, transparent); }
.detail-drawer.vip-drawer.vip-drawer--passive .dd-head::before { background: var(--warning); }
.detail-drawer.vip-drawer.vip-drawer--disabled .dd-head::before { background: var(--danger); }
.detail-drawer.vip-drawer .dd-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.detail-drawer.vip-drawer .dd-body { gap: 16px; padding-top: 16px; }
.detail-drawer.vip-drawer .dd-section h4 {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-left: 2px;
}
.detail-drawer.vip-drawer .dd-foot {
  padding: 14px 18px 18px;
  background: var(--surface2);
  border-top-color: var(--border2);
  gap: 8px;
}
.detail-drawer.vip-drawer .dd-foot .btn { min-height: 40px; border-radius: 10px; font-weight: 650; }

.vip-dd-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.vip-dd-metric {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.vip-dd-metric--wide { grid-column: 1 / -1; }
.vip-dd-metric--active { border-color: color-mix(in srgb, var(--success) 35%, var(--border2)); background: color-mix(in srgb, var(--success) 6%, var(--surface2)); }
.vip-dd-metric--passive { border-color: color-mix(in srgb, var(--warning) 35%, var(--border2)); background: color-mix(in srgb, var(--warning) 6%, var(--surface2)); }
.vip-dd-metric--disabled { border-color: color-mix(in srgb, var(--danger) 30%, var(--border2)); background: color-mix(in srgb, var(--danger) 5%, var(--surface2)); }
.vip-dd-metric-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); }
.vip-dd-metric-v { font-size: 15px; font-weight: 650; color: var(--text); line-height: 1.25; }

.vip-dd-card {
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: var(--surface);
  padding: 4px 14px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}
.vip-dd-card--services { padding: 10px 12px; }
.vip-dd-dl { margin: 0; }
.vip-dd-dl-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 13px;
}
.vip-dd-dl-row:last-child { border-bottom: 0; }
.vip-dd-dl-row dt { margin: 0; color: var(--text3); font-weight: 500; flex-shrink: 0; }
.vip-dd-dl-row dd { margin: 0; text-align: right; color: var(--text); word-break: break-word; }

.vip-dd-svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vip-dd-svc-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border2);
}
.vip-dd-svc-list li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 25%, transparent);
  flex-shrink: 0;
}
.vip-dd-svc-name { font-weight: 600; font-size: 13px; color: var(--text); }
.vip-dd-empty { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text3); }
.vip-dd-muted { color: var(--text3); font-style: italic; }

.vip-dd-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--primary) 4%, var(--surface2));
}
.vip-dd-flow-node {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vip-dd-flow-node--vip { border-color: color-mix(in srgb, var(--cyan) 35%, var(--border2)); }
.vip-dd-flow-node--waf { border-color: color-mix(in srgb, var(--primary) 30%, var(--border2)); }
.vip-dd-flow-k { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); }
.vip-dd-flow-v { font-size: 12.5px; font-weight: 600; color: var(--text); }
.vip-dd-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--text3);
  font-size: 18px;
  font-weight: 300;
  padding-top: 14px;
}

/* Shared page chrome (VIP pattern — tüm servis liste sayfalarında) */
.page-create-btn {
  padding: 9px 16px;
  font-size: 13.5px;
  border-radius: 10px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--primary) 28%, transparent),
              0 6px 16px color-mix(in srgb, var(--primary) 18%, transparent);
}
.page-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--primary) 30%, transparent),
              0 10px 22px color-mix(in srgb, var(--primary) 22%, transparent);
}
.page-create-btn svg { width: 15px; height: 15px; }
.page-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px 20px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 55%),
    var(--surface);
}
.page-guide-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1 1 280px;
  min-width: 0;
}
.page-guide-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-line);
}
.page-guide-icon svg { width: 20px; height: 20px; }
.page-guide-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.page-guide-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
}
.page-guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  flex: 0 1 auto;
}
.page-guide-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
}
.page-guide-steps strong {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
}
.page-modal-tip {
  margin-top: 2px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--primary-line);
  background: var(--primary-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text2);
}
.page-modal-tip strong { color: var(--text); font-weight: 600; }
.page-field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text3);
}
@media (max-width: 640px) {
  .page-guide-steps { width: 100%; }
  .page-guide-steps li { flex: 1 1 auto; justify-content: center; }
}

/* ===== Kullanıcılar / Roller (settings-users) ===== */
.su-page { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: none; }
.su-session {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text2);
}
.su-session-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text3); margin-right: 2px;
}
.su-session strong { color: var(--text); font-weight: 650; }
.su-session-sep { color: var(--text3); }
.su-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.su-protected {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
}
.su-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.su-role-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}
.su-role-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.su-role-head h3 {
  margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text);
}
.su-role-card p {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2);
}
.su-perm-table td:not(:first-child),
.su-perm-table th:not(:first-child) { text-align: center; }
.su-yes {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650;
  background: var(--success-soft); color: var(--success-fg); border: 1px solid var(--success-line);
}
.su-no {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650;
  background: var(--surface3); color: var(--text3); border: 1px solid var(--border);
}
.su-audit-wrap { max-height: 520px; overflow: auto; }
@media (max-width: 900px) {
  .su-role-grid { grid-template-columns: 1fr; }
}

/* ===== Genel Ayarlar (/settings) — tek panel, hizalı satırlar ===== */
.gs-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 880px;
}
.gs-hero { min-width: 0; }
.gs-eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.gs-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.gs-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text3);
  max-width: 52ch;
}
.gs-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.gs-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 20px 28px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border2);
  align-items: start;
}
.gs-row--last { border-bottom: none; }
.gs-row-meta h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.gs-row-meta p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text3);
}
.gs-row-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.gs-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.gs-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.gs-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.gs-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 6px;
  padding: 1px 7px;
}
.gs-field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}
.gs-switchline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--surface2);
}
.gs-switchline--compact {
  align-self: stretch;
  height: 100%;
  min-height: 58px;
}
.gs-switch-label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
}
.gs-switch-hint {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text3);
}
.gs-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}
@media (max-width: 720px) {
  .gs-page { max-width: none; }
  .gs-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .gs-fields,
  .gs-fields--2 { grid-template-columns: 1fr; }
  .gs-switchline--compact { min-height: 38px; }
}

/* legacy settings-* kept harmless if referenced elsewhere */
.settings-page { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.settings-grid,
.settings-grid--core { display: grid; gap: 10px; }



/* RATE-LIMIT-MULTIRULE MR5 — çok kurallı politika editörü.
   Mevcut rl-* tasarım dili korunur; yeni kütüphane/framework yoktur. */
.rl-rules-list { display: flex; flex-direction: column; gap: 12px; }
.rl-rule-card { border: 1px solid var(--border2); border-radius: 8px; padding: 12px; background: var(--bg2); }
.rl-rule-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.rl-rule-index { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); }
.rl-rule-head-actions { margin-left: auto; display: flex; gap: 6px; }
.rl-rule-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rl-rule-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text2); }
.rl-rule-field > span { font-weight: 600; }
.rl-rule-field--switch { justify-content: flex-start; }
.rl-rules-actions { margin-top: 12px; }
.rl-detail-rules-table code { white-space: nowrap; }
@media (max-width: 900px) {
  .rl-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .rl-rule-grid { grid-template-columns: 1fr; }
}
.rl-rule-help { margin: 6px 0 0; padding-left: 18px; }
.rl-rule-help li { margin-top: 2px; }

/* RATE-LIMIT-B3 — servis ekranı configured/effective Rate Limit görünümü (salt-okunur).
   Mevcut rl-* tasarım dili korunur; yeni kütüphane/framework yoktur. */
.rl-svc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rl-svc-title { margin: 0 0 .2rem; font-size: 14px; }
.rl-svc-sub { margin: 0; max-width: 62ch; }
.rl-svc-badge-box { display: flex; gap: 6px; align-items: center; }
.rl-svc-kv { margin-top: .6rem; }
.rl-svc-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--border2); font-size: 13px; flex-wrap: wrap; }
.rl-svc-row:last-child { border-bottom: none; }
.rl-svc-row > span:first-child { color: var(--text2); }
.rl-svc-row > span:last-child { text-align: right; }
.rl-svc-reason { margin-top: .6rem; font-size: 12px; color: var(--text2); }
.rl-svc-rules { margin-top: .4rem; font-size: 12px; }
@media (max-width: 560px) {
  .rl-svc-row > span:last-child { text-align: left; }
}

/* Sertifika modalı — PFX ile güncelleme uyarısı (mevcut tip bileşeninin uyarı varyantı). */
.page-modal-tip--warn { border-color: var(--warning-line); background: var(--warning-soft); }

/* Sertifika modalı — mod anahtarı: solda "Elle ekleme", sağda "PFX dosyası".
   DOM sırası .sp-switch bitişik seçicisini bozmamak için korunur; yerleşim order ile. */
.cert-mode-switch { gap: 10px; }
.cert-mode-switch .sp-switch-ui { order: 2; flex: 0 0 auto; }
.cert-mode-side { font-size: 13px; font-weight: 500; color: var(--text3); transition: color .15s ease; }
.cert-mode-side--left { order: 1; }
.cert-mode-side--right { order: 3; }
.cert-mode-side.is-active { color: var(--text); font-weight: 600; }

/* Sertifika modalı — PFX dosya seçimi (yalnızca yeni PFX sekmesi için). */
.cert-file-input { padding: 8px 10px; line-height: 1.4; cursor: pointer; }
.cert-file-input::file-selector-button {
  margin-right: 10px; padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface2); color: var(--text2);
  font-size: 12px; font-family: inherit; cursor: pointer;
}
.cert-file-input::file-selector-button:hover { background: var(--surface); color: var(--text); }
