/* NetLanVentory — Slate Shield v5
   Professional dark theme for security operations
   Slate backgrounds × Cyan accent × High readability
   ───────────────────────────────────────────────────────────── */

/* Fonts loaded via <link> in index.html (Inter + JetBrains Mono) */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — warm slate layers with visible depth */
  --bg:            #0f1117;
  --surface:       #161922;
  --surface2:      #1c1f2e;
  --surface3:      #252938;

  /* Borders — neutral, clean separation */
  --border:        rgba(255,255,255,.08);
  --border-muted:  rgba(255,255,255,.04);
  --border-active: rgba(255,255,255,.14);

  /* Text — warm white, high contrast hierarchy */
  --text:          #eceef4;
  --text-muted:    #6b7280;
  --text-subtle:   #9ca3af;

  /* Accent — Cyan (professional, readable, security-associated) */
  --accent:        #22d3ee;
  --accent-hover:  #67e8f9;
  --accent-dim:    rgba(34,211,238,.08);
  --accent-glow:   rgba(34,211,238,.15);

  /* Semantic — clear, distinct, accessible */
  --success:       #34d399;
  --success-dim:   rgba(52,211,153,.10);
  --warning:       #fbbf24;
  --warning-dim:   rgba(251,191,36,.10);
  --danger:        #f87171;
  --danger-dim:    rgba(248,113,113,.10);
  --info:          #60a5fa;
  --info-dim:      rgba(96,165,250,.10);
  --critical:      #c084fc;
  --critical-dim:  rgba(192,132,252,.10);

  /* Radii — slightly rounded, modern */
  --radius:    8px;
  --radius-sm: 5px;
  --radius-lg: 12px;

  /* Sidebar */
  --sidebar-w: 240px;

  /* Fonts — Inter = clean readability, JetBrains Mono = technical data */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Shadows — subtle depth, no colored glow */
  --shadow-sm:   0 1px 2px rgba(0,0,0,.3);
  --shadow:      0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
  --shadow-glow: 0 0 20px rgba(34,211,238,.08), 0 4px 16px rgba(0,0,0,.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-color: var(--surface3) var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.12); }

/* Selection color */
::selection { background: rgba(34,211,238,.25); color: #fff; }

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: .5; }
  70%  { transform: scale(1.2);  opacity: 0; }
  100% { transform: scale(1.2);  opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes login-drift {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  25%     { transform: translate(10px, -6px) rotate(1deg); }
  50%     { transform: translate(-6px, 8px) rotate(-0.5deg); }
  75%     { transform: translate(4px, 4px) rotate(0.8deg); }
}
@keyframes borderPulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--accent); }
}
@keyframes dataStream {
  0% { opacity: .3; }
  50% { opacity: 1; }
  100% { opacity: .3; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
/* Top accent line */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: .4;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.2px;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section {
  padding: 14px 8px 4px;
}
.sidebar-section-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  padding: 7px 10px;
  text-align: left;
  transition: all .12s ease;
  width: 100%;
  position: relative;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; transition: opacity .12s; }
.nav-item:hover {
  background: rgba(255,255,255,.03);
  color: var(--text-subtle);
}
.nav-item:hover svg { opacity: .85; }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item.active svg { opacity: 1; }
.nav-count {
  margin-left: auto;
  background: var(--surface3);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.nav-item.active .nav-count { background: rgba(34,211,238,.15); color: var(--accent); }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.user-meta { min-width: 0; }
.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  font-size: 9.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 1px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.btn-logout {
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  transition: all .12s;
}
.btn-logout:hover { background: var(--danger-dim); color: var(--danger); }
.btn-logout svg { width: 14px; height: 14px; display: block; }

/* ── Main area ─────────────────────────────────────────────────────────────── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Stats header ──────────────────────────────────────────────────────────── */
.stats-header {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid var(--border);
  transition: background .15s;
  position: relative;
  overflow: hidden;
}
.stat-card:last-child { border-right: none; }
/* In grid layouts (exec-kpis), use border instead of border-right */
[style*="grid-template-columns"] > .stat-card {
  border-right: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.stat-card:hover { background: var(--surface2); }
.stat-card:hover::after { opacity: .5; }
.stat-card .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ── Panels ────────────────────────────────────────────────────────────────── */
.panel {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.panel.active {
  display: flex;
  animation: fadeIn .2s ease;
}

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
  white-space: nowrap;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.search-input { min-width: 220px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font);
  padding: 6px 14px;
  transition: all .12s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  position: relative;
}
.btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #06b6d4 100%);
  color: #0f1117;
  font-weight: 600;
  border-color: transparent;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: 0 4px 16px rgba(34,211,238,.25);
}

.btn-sm {
  background: var(--surface2);
  border: 1px solid var(--border-active);
  color: var(--text-subtle);
  padding: 5px 11px;
  font-size: 12px;
}
.btn-sm:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.btn-danger {
  background: var(--danger-dim);
  border: 1px solid rgba(248,81,73,.2);
  color: var(--danger);
  padding: 5px 11px;
  font-size: 12px;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248,81,73,.18);
  border-color: rgba(248,81,73,.4);
}

/* ── Inputs ────────────────────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea,
.form-select {
  background: var(--surface2);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  padding: 7px 11px;
  transition: border-color .12s, box-shadow .12s;
  width: 100%;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
  font-family: var(--font-mono);
  font-size: 12px;
}
.form-select option { background: var(--surface2); }

/* ── Field groups ──────────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: .4px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.field-hint code {
  background: var(--surface3);
  border-radius: 2px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
}

/* ── Toggle rows ───────────────────────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}
.toggle-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}
.toggle-row input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
.toggle-label-text { font-size: 13px; color: var(--text); font-weight: 500; }
.toggle-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Checkbox group ────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
  transition: all .12s;
  user-select: none;
}
.checkbox-group label:hover { border-color: var(--accent); background: var(--accent-dim); }
.checkbox-group input[type="checkbox"] { accent-color: var(--accent); }

/* ── Status bar ────────────────────────────────────────────────────────────── */
.status-bar {
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  margin-bottom: 14px;
  padding: 9px 14px;
  font-family: var(--font-mono);
}
.status-bar.running { border-left: 2px solid var(--warning); }
.status-bar.success { border-left: 2px solid var(--success); }
.status-bar.error   { border-left: 2px solid var(--danger);  }
.hidden { display: none !important; }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  padding: 9px 14px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  position: sticky;
  top: 0;
  z-index: 2;
}
thead th[data-sort-key] { cursor: pointer; }
thead th[data-sort-key]:hover { color: var(--accent); }
tbody tr {
  border-bottom: 1px solid var(--border-muted);
  transition: background .08s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(34,211,238,.03); }
tbody td { padding: 10px 14px; vertical-align: middle; }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── Clickable rows ────────────────────────────────────────────────────────── */
tbody tr.clickable { cursor: pointer; }
.clickable { cursor: pointer; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 2px 8px;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-error   { background: var(--danger-dim);  color: var(--danger);  }
.badge-info    { background: var(--info-dim);     color: var(--info);    }
.badge-muted   { background: rgba(255,255,255,.04); color: var(--text-muted); }

/* ── Login view ────────────────────────────────────────────────────────────── */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(34,211,238,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 75% 65%, rgba(167,139,250,.05) 0%, transparent 55%),
    var(--bg);
}
.login-view::before,
.login-view::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: .5;
}
.login-view::before {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,211,238,.08) 0%, transparent 70%);
  top: -100px; right: -80px;
  animation: login-drift 18s ease-in-out infinite;
}
.login-view::after {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,.06) 0%, transparent 70%);
  bottom: -60px; left: -60px;
  animation: login-drift 22s ease-in-out infinite reverse;
}

.login-card {
  background: rgba(22, 25, 34, 0.9);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  position: relative;
  z-index: 1;
  animation: slideUp .4s ease;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(34,211,238,.12) 0%, rgba(167,139,250,.08) 100%);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.login-logo svg { width: 30px; height: 30px; }

.login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -.5px;
}
.login-sub {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin-bottom: 32px;
}
#login-form { display: flex; flex-direction: column; gap: 12px; }
.login-error {
  background: var(--danger-dim);
  border: 1px solid rgba(248,81,73,.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 12.5px;
  padding: 9px 12px;
  font-family: var(--font-mono);
}

/* ── Modals ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 720px;
  width: 100%;
  animation: slideUp .18s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 14px; font-weight: 600; letter-spacing: -.1px; }
.modal-close {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 3px 7px;
  transition: all .12s;
  line-height: 1;
}
.modal-close:hover { background: var(--surface3); color: var(--text); border-color: var(--border); }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.modal-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.modal-fields { display: flex; flex-direction: column; gap: 12px; }

/* ── Detail grid ───────────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.detail-key {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-family: var(--font-mono);
}
.detail-val {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 0;
  word-break: break-all;
}

/* ── Modal tabs ────────────────────────────────────────────────────────────── */
.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
  padding: 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.modal-tabs::-webkit-scrollbar { display: none; }
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 10px 14px;
  position: relative;
  transition: color .12s, border-color .12s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.modal-tab:hover { color: var(--text-subtle); }
.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.modal-tab-badge {
  background: var(--danger);
  border-radius: 3px;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  line-height: 1.3;
}
.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; animation: fadeIn .12s ease; }

/* ── Modules grid ──────────────────────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all .12s;
  position: relative;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 80%);
  opacity: 0;
  transition: opacity .2s;
}
.module-card:hover { border-color: var(--border-active); }
.module-card:hover::before { opacity: .5; }
.module-card .mod-name { font-weight: 600; font-size: 13px; margin-bottom: 5px; font-family: var(--font-mono); }
.module-card .mod-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.module-card .mod-desc { color: var(--text-muted); font-size: 12px; line-height: 1.6; }

/* ── Admin layout ──────────────────────────────────────────────────────────── */
.admin-layout { display: flex; gap: 20px; flex: 1; min-height: 0; }

.admin-subnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 170px;
  flex-shrink: 0;
}
.subnav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font);
  padding: 7px 10px;
  text-align: left;
  transition: all .12s;
  width: 100%;
}
.subnav-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .6; }
.subnav-item:hover { background: rgba(255,255,255,.03); color: var(--text-subtle); }
.subnav-item:hover svg { opacity: .85; }
.subnav-item.active { background: var(--accent-dim); color: var(--accent); }
.subnav-item.active svg { opacity: 1; }

.admin-content { flex: 1; overflow-y: auto; min-width: 0; }
.sub-panel { display: none; }
.sub-panel.active { display: block; animation: fadeIn .15s ease; }

.sub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 10px;
}
.sub-panel-header h2 { font-size: 14px; font-weight: 600; letter-spacing: -.1px; }

/* ── Settings cards ────────────────────────────────────────────────────────── */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .15s;
}
/* Limit width only in admin settings context, not in dashboard grids */
#panel-admin .settings-card { max-width: 680px; }
.settings-card:hover { border-color: var(--border-active); }
.settings-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.settings-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
.settings-note code {
  background: var(--surface3);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  color: var(--accent);
}
.settings-actions { display: flex; gap: 6px; margin-top: 16px; align-items: center; }

/* ── ZAP launcher ──────────────────────────────────────────────────────────── */
.zap-launcher {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.zap-launcher .btn { flex-shrink: 0; }

/* ── Risk pills ────────────────────────────────────────────────────────────── */
.risk-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.risk-pill {
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  text-align: center;
  min-width: 64px;
  border: 1px solid;
  transition: all .12s;
  position: relative;
}
.risk-pill:hover { transform: translateY(-1px); }
.risk-pill-label {
  font-size: 9px;
  font-weight: 700;
  display: block;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-family: var(--font-mono);
}
.risk-pill-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  display: block;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.risk-high {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(248,81,73,.18);
}
.risk-medium {
  background: var(--warning-dim);
  color: var(--warning);
  border-color: rgba(210,153,34,.18);
}
.risk-low {
  background: var(--info-dim);
  color: var(--info);
  border-color: rgba(34,211,238,.15);
}
.risk-info {
  background: rgba(255,255,255,.02);
  color: var(--text-muted);
  border-color: var(--border);
}
.risk-pill.critical {
  background: var(--critical-dim);
  color: var(--critical);
  border-color: rgba(188,140,255,.18);
}

/* ── ZAP history ───────────────────────────────────────────────────────────── */
.zap-history-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  transition: border-color .12s;
}
.zap-history-item:hover { border-color: var(--border-active); }
.zap-history-url { flex: 1; color: var(--text); font-family: var(--font-mono); font-size: 11px; }
.zap-history-date { color: var(--text-muted); white-space: nowrap; font-size: 11px; font-family: var(--font-mono); }

/* ── Toast notifications ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12.5px;
  max-width: 320px;
  opacity: 0;
  padding: 10px 14px;
  transform: translateX(16px);
  transition: opacity .2s, transform .2s;
}
.toast.visible { opacity: 1; transform: translateX(0); }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger);  }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--accent);  }

/* ── CVE link ──────────────────────────────────────────────────────────────── */
.cve-link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: color .1s;
}
.cve-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Technology pills ──────────────────────────────────────────────────────── */
.tech-pills { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; }
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: default;
  transition: border-color .1s;
  font-family: var(--font-mono);
}
.tech-pill:hover { border-color: var(--border-active); }
.tech-version { opacity: .5; font-size: 10px; }
.tech-server { background: rgba(34,211,238,.06); border-color: rgba(34,211,238,.2); color: #22d3ee; }
.tech-js     { background: rgba(210,153,34,.06); border-color: rgba(210,153,34,.2); color: #d29922; }
.tech-lang   { background: rgba(63,185,80,.06);  border-color: rgba(63,185,80,.2);  color: #3fb950; }
.tech-fw     { background: rgba(188,140,255,.06); border-color: rgba(188,140,255,.2); color: #bc8cff; }
.tech-lib    { background: rgba(255,255,255,.03); border-color: var(--border); color: var(--text-muted); }

/* ── Overview stats ────────────────────────────────────────────────────────── */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.overview-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
  position: relative;
}
.overview-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.overview-stat:hover { border-color: var(--border-active); }
.overview-stat:hover::before { opacity: .4; }
.overview-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.overview-stat-date { font-size: 13px; font-weight: 600; font-family: var(--font-mono); }
.overview-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ── Chart wrapper ─────────────────────────────────────────────────────────── */
.chart-wrap {
  height: 200px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 4px;
  position: relative;
}

/* ── Flaw items ────────────────────────────────────────────────────────────── */
.flaw-item {
  border: 1px solid var(--border);
  border-left-width: 2px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  overflow: hidden;
  transition: box-shadow .1s;
}
.flaw-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.flaw-item.risk-high   { border-left-color: var(--danger); }
.flaw-item.risk-medium { border-left-color: var(--warning); }
.flaw-item.risk-low    { border-left-color: var(--info); }
.flaw-item.risk-info,
.flaw-item.risk-informational { border-left-color: var(--text-muted); }

.flaw-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  background: var(--surface2);
  user-select: none;
  transition: background .1s;
}
.flaw-header:hover { background: var(--surface3); }

.flaw-arrow {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform .15s;
}
.flaw-item.open .flaw-arrow { transform: rotate(90deg); }

.flaw-risk-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.risk-high   .flaw-risk-badge { background: var(--danger-dim);  color: var(--danger); }
.risk-medium .flaw-risk-badge { background: var(--warning-dim); color: var(--warning); }
.risk-low    .flaw-risk-badge { background: var(--info-dim);    color: var(--info); }
.risk-info   .flaw-risk-badge,
.risk-informational .flaw-risk-badge { background: rgba(255,255,255,.03); color: var(--text-muted); }

.flaw-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flaw-body {
  display: none;
  padding: 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.7;
  animation: fadeIn .12s ease;
}
.flaw-item.open .flaw-body { display: block; }

.flaw-solution {
  background: var(--success-dim);
  border-left: 2px solid var(--success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 9px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
}
.flaw-evidence { margin-top: 10px; overflow-x: auto; }
.flaw-evidence code {
  display: block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── DNS / Tag list ────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }

.dns-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px 2px 10px;
  font-size: 11.5px;
  color: var(--text);
  font-family: var(--font-mono);
  transition: border-color .1s;
}
.dns-tag:hover { border-color: var(--border-active); }
.dns-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  opacity: .5;
  transition: opacity .1s, color .1s;
}
.dns-tag-remove:hover { opacity: 1; color: var(--danger); }

/* ── Security sub-navigation ───────────────────────────────────────────────── */
.sec-subnav {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.sec-subnav::-webkit-scrollbar { display: none; }

.sec-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.sec-subnav-btn:hover { color: var(--text-subtle); }
.sec-subnav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.sec-subnav-badge {
  background: var(--danger);
  color: #fff;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 14px;
  text-align: center;
  line-height: 1.3;
}

/* ── Severity score bar ─────────────────────────────────────────────────────── */
.sev-score-bar {
  display: flex;
  gap: 4px;
  padding: 12px 0 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 14px;
}
.sev-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  font-family: var(--font-mono);
}
.sev-filter-btn:hover { border-color: var(--border-active); color: var(--text-subtle); }
.sev-filter-btn.active             { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.sev-filter-btn.sev-critical.active { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }
.sev-filter-btn.sev-high.active     { background: rgba(210,153,34,.10); border-color: #d29922; color: #d29922; }
.sev-filter-btn.sev-medium.active   { background: rgba(210,153,34,.10); border-color: var(--warning); color: var(--warning); }
.sev-filter-btn.sev-low.active      { background: var(--info-dim); border-color: #22d3ee; color: #22d3ee; }
.sev-filter-count {
  background: var(--surface3);
  border-radius: 3px;
  padding: 0px 5px;
  font-size: 10px;
  min-width: 16px;
  text-align: center;
}

/* ── CVE priority groups ────────────────────────────────────────────────────── */
.cve-severity-group { margin-bottom: 8px; }

.cve-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background .12s;
  color: var(--text);
}
.cve-group-header:hover { background: var(--surface3); }
.cve-group-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cve-group-title { font-weight: 700; font-size: 12px; font-family: var(--font-mono); }
.cve-group-count { font-size: 11px; color: var(--text-muted); margin-left: 4px; flex: 1; font-family: var(--font-mono); }

/* ── CVE row ────────────────────────────────────────────────────────────────── */
.cve-row {
  border: 1px solid var(--border-muted);
  border-top: none;
  padding: 10px 12px;
  background: var(--surface);
  transition: background .08s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cve-row:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.cve-row:hover { background: var(--surface2); }

.cve-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.cve-row-id {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 150px;
  flex-shrink: 0;
}
.cve-fix-badge {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(63,185,80,.2);
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 1px 5px;
  white-space: nowrap;
}
.cve-row-pkg {
  flex: 1;
  font-size: 12px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 130px;
}
.cve-row-version { font-family: var(--font-mono); color: var(--text-muted); font-size: 11px; }
.cve-row-fix { font-family: var(--font-mono); color: var(--success); font-size: 11px; }
.cve-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cve-cvss-chip {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--cvss-color, var(--border));
  color: var(--cvss-color, var(--text-muted));
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.cve-ack-badge {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.exploit-validation-section {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.exploit-validation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 5px;
  font-family: var(--font-mono);
}
.exploit-validation-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 4px;
}
.exploit-results-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exploit-result-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border-top: 1px solid var(--border-muted);
  font-size: 12px;
}
.exploit-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.exploit-confirmed {
  background: rgba(248, 81, 73, 0.12);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.25);
}
.exploit-not-confirmed {
  background: rgba(255,255,255,.03);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.cve-row-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 2px;
}
.cve-row-plan {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,.1);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-size: 12px;
}
.cve-plan-icon { flex-shrink: 0; font-size: 12px; }
.cve-plan-text { flex: 1; color: var(--text-subtle); line-height: 1.5; }
.cve-plan-empty { flex: 1; color: var(--text-muted); font-style: italic; }
.cve-action-edit {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 13px; padding: 0 3px; flex-shrink: 0;
  opacity: .6; transition: opacity .1s;
}
.cve-action-edit:hover { opacity: 1; }
.cve-row-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.cve-quick-btn {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.cve-quick-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.cve-quick-btn.muted:hover { border-color: var(--text-muted); color: var(--text-muted); background: var(--surface3); }

/* ── CVE filter bar ────────────────────────────────────────────────────────── */
.cve-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 12px;
  flex-wrap: wrap;
}
.cve-filter-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-right: 4px;
  font-family: var(--font-mono);
}
.cve-filter-btn {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  font-family: var(--font-mono);
}
.cve-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.cve-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }
.cve-filter-btn.critical.active { background: var(--danger); border-color: var(--danger); color: #fff; }
.cve-filter-btn.high.active     { background: #d29922; border-color: #d29922; color: #000; }
.cve-filter-btn.medium.active   { background: var(--warning); border-color: var(--warning); color: #000; }
.cve-filter-btn.low.active      { background: #22d3ee; border-color: #22d3ee; color: #000; }
.cve-filter-count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Trivy image groups ──────────────────────────────────────────────────────── */
.trivy-image-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
}
.trivy-image-header {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 12px;
  background: var(--surface2);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
  color: var(--text);
}
.trivy-image-header:hover { background: var(--surface3); }
.trivy-image-name {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trivy-image-chips { display: flex; gap: 3px; flex-shrink: 0; }
.trivy-chevron { margin-left: 4px; flex-shrink: 0; transition: transform .15s; }
.trivy-image-header[aria-expanded="false"] .trivy-chevron { transform: rotate(-90deg); }
.trivy-image-body { border-top: 1px solid var(--border-muted); }

/* ── Security tab panel ────────────────────────────────────────────────────── */
.sec-tab-panel { padding: 0 !important; }
.sec-panel { display: none; padding: 14px 20px; }
.sec-panel.active { display: block; }

.sec-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-muted);
}
.sec-panel-title {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 2px;
  font-family: var(--font-mono);
}
.sec-panel-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.sec-conn-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.scan-type-badge.trivy {
  background: rgba(34,211,238,.08);
  color: #22d3ee;
  border: 1px solid rgba(34,211,238,.2);
}

/* ── Scan sections ─────────────────────────────────────────────────────────── */
.scan-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.scan-section:hover { border-color: var(--border-active); }
.scan-section + .scan-section { margin-top: 12px; }

.scan-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.scan-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.scan-type-badge.dast {
  background: var(--info-dim);
  color: var(--info);
  border: 1px solid rgba(34,211,238,.2);
}
.scan-type-badge.ssh {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(63,185,80,.2);
}
.scan-type-badge.nuclei {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(210,153,34,.2);
}

/* ── Scan action bar ────────────────────────────────────────────────────────── */
.scan-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-muted);
}
.scan-status-text {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
}
.scan-status-text.running { color: var(--warning); }
.scan-status-text.success { color: var(--success); }
.scan-status-text.error   { color: var(--danger);  }

.spin-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}

/* ── Scan history list ─────────────────────────────────────────────────────── */
.scan-history-list { padding: 0 14px 10px; }

.scan-history-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 12px;
  transition: background .08s;
}
.scan-history-item:last-child { border-bottom: none; }
.scan-history-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-subtle);
  flex-wrap: wrap;
}
.scan-history-detail {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.scan-stat-chip {
  background: var(--surface3);
  border: 1px solid var(--border-muted);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-mono);
}
.scan-stat-chip.cve,
.scan-stat-chip.warning { color: var(--warning); background: var(--warning-dim); border-color: rgba(210,153,34,.12); }
.scan-stat-chip.ok,
.scan-stat-chip.success { color: var(--success); background: var(--success-dim); border-color: rgba(63,185,80,.12); }
.scan-stat-chip.danger  { color: var(--danger);  background: var(--danger-dim); border-color: rgba(248,81,73,.15); }

.scan-history-date {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-left: 4px;
  font-family: var(--font-mono);
}
.scan-history-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.scan-history-empty {
  color: var(--text-muted);
  font-size: 12px;
  padding: 10px 14px;
  font-family: var(--font-mono);
}
.scan-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}
.scan-hint code {
  background: var(--surface3);
  padding: 1px 5px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.ssh-history-item,
.nuclei-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 12px;
}
.ssh-history-item:last-child,
.nuclei-history-item:last-child { border-bottom: none; }

.nuclei-targets-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

.ssh-no-creds {
  color: var(--text-muted);
  font-size: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
}

/* ── SSH profile banner ────────────────────────────────────────────────────── */
.ssh-profile-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,.15);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.5;
}

/* ── CVE remediation snippet ───────────────────────────────────────────────── */
.plan-snippet {
  display: block;
  font-size: 11.5px;
  color: var(--text);
  background: var(--success-dim);
  border-left: 2px solid var(--success);
  border-radius: 2px;
  padding: 3px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
  font-family: var(--font-mono);
}
.plan-snippet.clickable:hover {
  background: rgba(63,185,80,.15);
  cursor: pointer;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.empty-state svg { opacity: .2; }
.empty-state p { font-weight: 600; color: var(--text-subtle); margin: 0; font-size: 13px; }
.empty-state span { font-size: 12px; color: var(--text-muted); max-width: 280px; line-height: 1.5; }
.empty-state-title { font-weight: 600; color: var(--text-subtle); }

/* ── Section label ─────────────────────────────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
}

/* ── Dashboard stat cards ──────────────────────────────────────────────────── */
.dash-stat-card {
  --card-accent: var(--accent);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all .12s;
  position: relative;
  overflow: hidden;
}
.dash-stat-card:hover { border-color: var(--card-accent); }
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-accent);
}
.dash-stat-icon {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  opacity: .7;
}
.dash-stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.dash-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 2px;
  font-family: var(--font-mono);
}
.dash-stat-num { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -1px; font-family: var(--font-mono); }
.dash-stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; font-family: var(--font-mono); }

/* ── Scan age badge ─────────────────────────────────────────────────────────── */
.scan-age-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.scan-age-fresh  { background: var(--success-dim);  color: var(--success); }
.scan-age-ok     { background: var(--warning-dim);  color: var(--warning); }
.scan-age-stale  { background: var(--danger-dim);   color: var(--danger);  }
.scan-age-never  { background: var(--surface3);      color: var(--text-muted); }

/* ── Context menu ────────────────────────────────────────────────────────────── */
#ctx-menu {
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px 0;
  min-width: 170px;
  display: none;
}
#ctx-menu.visible { display: block; animation: fadeIn .08s ease; }
.ctx-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: background .08s;
}
.ctx-item:hover { background: var(--accent-dim); color: var(--accent); }
.ctx-item svg { opacity: .55; flex-shrink: 0; width: 14px; height: 14px; }
.ctx-separator { border: none; border-top: 1px solid var(--border); margin: 3px 0; }

/* ── Command palette ─────────────────────────────────────────────────────── */
#cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
#cmd-palette-overlay.hidden { display: none; }
#cmd-palette {
  width: 540px;
  max-width: 95vw;
  background: var(--surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp .1s ease-out;
}
#cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: var(--font-mono);
}
#cmd-input::placeholder { color: var(--text-muted); }
#cmd-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 0;
}
.cmd-category {
  padding: 6px 16px 2px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-family: var(--font-mono);
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background .08s;
}
.cmd-item:hover, .cmd-item.active { background: var(--accent-dim); color: var(--accent); }
.cmd-item svg { opacity: .45; flex-shrink: 0; }
.cmd-item-sub { font-size: 10.5px; color: var(--text-muted); margin-left: auto; font-family: var(--font-mono); }
.cmd-empty { padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 12.5px; }
#cmd-footer {
  display: flex;
  gap: 14px;
  padding: 7px 16px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.cmd-key {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.cmd-key kbd {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

/* ── Subnet group row ──────────────────────────────────────────────────────── */
tr.subnet-header td {
  background: var(--surface3);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* ── Kanban board ──────────────────────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
  align-items: start;
}
.kanban-col {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 100px;
}
.kanban-col.drag-over { border-color: var(--accent); background: var(--accent-dim); }
.kanban-col-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
}
.kanban-count {
  background: var(--surface3);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  color: var(--text-muted);
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  margin-bottom: 4px;
  cursor: grab;
  transition: all .1s;
  font-size: 12px;
}
.kanban-card:hover { border-color: var(--accent); }
.kanban-card.dragging { opacity: .4; cursor: grabbing; }
.kanban-card-id { font-weight: 600; color: var(--accent); font-size: 11px; font-family: var(--font-mono); }
.kanban-card-asset { color: var(--text-muted); font-size: 11px; margin-top: 1px; }
.kanban-empty { color: var(--text-muted); font-size: 11.5px; text-align: center; padding: 14px 0; font-family: var(--font-mono); }

/* ── Side panel ──────────────────────────────────────────────────────────────── */
#side-panel {
  position: fixed;
  top: 0; right: 0;
  width: 340px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.5);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .2s ease;
}
#side-panel.open { transform: translateX(0); }
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.side-panel-title { font-weight: 600; font-size: 13px; font-family: var(--font-mono); }
.side-panel-close {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: var(--radius-sm);
  transition: all .12s;
}
.side-panel-close:hover { color: var(--text); background: var(--surface2); border-color: var(--border); }
.side-panel-body { padding: 14px 18px; overflow-y: auto; flex: 1; }
.side-panel-asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-muted);
  cursor: pointer;
  transition: color .1s;
}
.side-panel-asset-item:hover { color: var(--accent); }
.side-panel-asset-name { font-weight: 500; font-size: 12.5px; }
.side-panel-asset-ip { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ── Dashboard action cards ─────────────────────────────────────────────────── */
.action-required-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
  color: var(--text);
}
.action-required-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.action-card-danger  { background: var(--danger-dim);  border-color: rgba(248,81,73,.2); }
.action-card-warning { background: var(--warning-dim); border-color: rgba(210,153,34,.2); }
.action-card-ok      { background: var(--success-dim); border-color: rgba(63,185,80,.2); }
.action-card-icon { font-size: 20px; flex-shrink: 0; }
.action-card-count { font-size: 24px; font-weight: 700; line-height: 1; font-family: var(--font-mono); }
.action-card-label { font-size: 11.5px; color: var(--text-muted); }

/* ── Bulk ack modal ─────────────────────────────────────────────────────────── */
.exp-select-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  margin-bottom: 4px;
}

/* ── Modal breadcrumb ─────────────────────────────────────────────────────── */
.modal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.modal-breadcrumb button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 11.5px;
  padding: 0;
  font-family: var(--font-mono);
}
.modal-breadcrumb button:hover { text-decoration: underline; }

/* ── Print styles ──────────────────────────────────────────────────────────── */
@media print {
  body::after { display: none; }
  .sidebar, .stats-header, .page-header, .page-actions,
  #ctx-menu, #cmd-palette-overlay, #side-panel,
  .btn, button { display: none !important; }
  body { background: white; color: black; font-size: 11px; }
  .panel { padding: 0; }
  table { border-collapse: collapse; width: 100%; }
  th, td { border: 1px solid #ccc; padding: 4px 6px; font-size: 10px; }
  .badge { border: 1px solid currentColor; border-radius: 2px; padding: 1px 4px; }
}

/* ── Trend charts area ─────────────────────────────────────────────────────── */
#dashboard-trends { margin-top: 14px; }
#quota-chart-wrap { margin-top: 14px; }

/* ── Criticality badges ─────────────────────────────────────────────────────── */
.criticality-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  font-family: var(--font-mono);
}
.crit-critical { background: rgba(248,81,73,.15); color: #f85149; border: 1px solid rgba(248,81,73,.25); }
.crit-high     { background: rgba(210,153,34,.15); color: #d29922; border: 1px solid rgba(210,153,34,.25); }
.crit-medium   { background: rgba(210,153,34,.12); color: #d29922; border: 1px solid rgba(210,153,34,.2); }
.crit-low      { background: rgba(63,185,80,.12);  color: #3fb950; border: 1px solid rgba(63,185,80,.2); }

/* ── Risk score badges ──────────────────────────────────────────────────────── */
.risk-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.risk-critical { background: rgba(248,81,73,.15); color: #f85149; }
.risk-elevated { background: rgba(210,153,34,.15); color: #d29922; }
.risk-medium-r { background: rgba(210,153,34,.12); color: #d29922; }
.risk-low-r    { background: rgba(63,185,80,.12);  color: #3fb950; }

/* ── EPSS badges ────────────────────────────────────────────────────────────── */
.epss-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.epss-high   { background: rgba(248,81,73,.15); color: #f85149; }
.epss-medium { background: rgba(210,153,34,.15); color: #d29922; }
.epss-low    { background: rgba(255,255,255,.04); color: var(--text-muted); }

/* ── Exploit maturity badges ───────────────────────────────────────────────── */
.maturity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
  font-family: var(--font-mono);
}
.maturity-badge.weaponized {
  background: rgba(248,81,73,.15);
  color: #f85149;
  border: 1px solid rgba(248,81,73,.3);
}
.maturity-badge.exploit {
  background: rgba(210,153,34,.15);
  color: #d29922;
  border: 1px solid rgba(210,153,34,.25);
}
.maturity-badge.poc {
  background: rgba(210,153,34,.10);
  color: #9e7a18;
  border: 1px solid rgba(210,153,34,.2);
}

/* ── SSL status badges ──────────────────────────────────────────────────────── */
.ssl-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ssl-valid    { background: rgba(63,185,80,.12);  color: #3fb950; }
.ssl-expiring { background: rgba(210,153,34,.12); color: #d29922; }
.ssl-expired  { background: rgba(248,81,73,.12);  color: #f85149; }
.ssl-error    { background: rgba(255,255,255,.04); color: var(--text-muted); }

/* ── Topology container ─────────────────────────────────────────────────────── */
.topology-container {
  width: 100%;
  height: calc(100vh - 240px);
  min-height: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.topology-container svg { width: 100%; height: 100%; }
.topology-container svg text { font-size: 10px; fill: var(--text-muted); font-family: var(--font-mono); }
.topology-container svg .node circle { stroke-width: 1.5; cursor: pointer; transition: filter .15s; }
.topology-container svg .node circle:hover { filter: brightness(1.3) drop-shadow(0 0 4px currentColor); }
.topology-container svg .link { stroke: var(--border-active); stroke-opacity: 0.4; }
.topology-container svg .link-service { stroke-dasharray: 3 2; }
.topology-container svg .subnet-hull { fill: rgba(34,211,238,.02); stroke: rgba(34,211,238,.1); stroke-dasharray: 4 2; }

.topology-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 10px;
  flex-wrap: wrap;
}
.topo-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.topo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.topo-tooltip {
  position: fixed;
  background: rgba(10,13,20,0.97);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  max-width: 240px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  line-height: 1.5;
  font-family: var(--font-mono);
}
.topo-tooltip strong { color: var(--accent); display: block; margin-bottom: 2px; }

/* ── SLA breach row ─────────────────────────────────────────────────────────── */
.sla-breach-row {
  background: rgba(248,81,73,.03);
}
.sla-breach-row td { color: var(--danger); }

/* ── Notification event tags ────────────────────────────────────────────────── */
.notif-event-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34,211,238,.15);
  margin: 1px 2px;
  font-family: var(--font-mono);
}
.notif-events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px 0;
}
.notif-events-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  cursor: pointer;
}

/* ── Reports panel ──────────────────────────────────────────────────────────── */
#panel-reports .dash-stat-card { cursor: default; }
.reports-sla-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.reports-sla-table th {
  text-align: left;
  color: var(--text-muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.reports-sla-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border-muted);
}
.top-risk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-muted);
  cursor: pointer;
  transition: background .08s;
}
.top-risk-item:last-child { border-bottom: none; }
.top-risk-item:hover { background: var(--surface2); border-radius: var(--radius-sm); padding: 7px 5px; }
.top-risk-score {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-mono);
}
.top-risk-info { flex: 1; min-width: 0; }
.top-risk-name { font-size: 12.5px; font-weight: 500; }
.top-risk-ip   { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ── Baseline diff ──────────────────────────────────────────────────────────── */
.baseline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.baseline-item-date { flex: 1; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.diff-added   { color: var(--success); }
.diff-removed { color: var(--danger); }

/* ── SSL report ───────────────────────────────────────────────────────────── */
.ssl-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ssl-report-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
}
.ssl-report-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-muted);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.ssl-issue { color: var(--danger); font-size: 11px; font-family: var(--font-mono); }

/* ── Global Search Dropdown ───────────────────────────────────────────────── */
.global-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
}
.search-result-item:hover { background: var(--surface2); }

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.timeline-event:last-child { border-bottom: none !important; }

/* ── Compliance gauges ────────────────────────────────────────────────────── */
.compliance-gauge {
  width: 72px;
  height: 72px;
  position: relative;
  margin: 0 auto 6px;
}

/* ── Badge variants (solid fill) ──────────────────────────────────────────── */
.badge-critical { background: #f85149; color: #fff; }
.badge-high { background: #d29922; color: #000; }
.badge-medium { background: #d29922; color: #000; }
.badge-low { background: #3fb950; color: #000; }

/* ── Focus visible for keyboard navigation ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.modal-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  .overview-stats { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .admin-layout { flex-direction: column; }
  .admin-subnav { width: 100%; flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
  .panel { padding: 14px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .search-input { min-width: 0; width: 100%; }
  .overview-stats { grid-template-columns: 1fr 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .stats-header { flex-wrap: wrap; }
  .stat-card { min-width: 50%; }
  #side-panel { width: 100vw; }
  #todo-stats { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .overview-stats { grid-template-columns: 1fr; }
  .stats-header { flex-direction: column; }
  .stat-card { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-card:last-child { border-bottom: none; }
}

/* ── "À traiter" (todo) view — v0.16 SSVC convergence ─────────────────────── */
.todo-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: -8px;
}
.todo-unevaluated-note {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 8px 2px 0;
}
.todo-unevaluated-note strong { color: var(--text-subtle); font-family: var(--font-mono); }
.todo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.todo-list .cve-row { border-radius: var(--radius-sm); gap: 6px; }
.todo-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.todo-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.4);
  border: 1px solid var(--tier-color, var(--border));
  color: var(--tier-color, var(--text-muted));
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
  cursor: default;
}
.todo-sla-badge {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--tier-color, var(--border));
  color: var(--tier-color, var(--text-muted));
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.todo-action-line {
  font-size: 12.5px;
  color: var(--text-subtle);
  padding: 4px 10px;
  margin-left: 2px;
  border-left: 2px solid var(--tier-color, var(--border));
  line-height: 1.5;
}
.todo-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 2px 2px;
}
.todo-reason-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.todo-empty-state { padding: 56px 20px; }

/* ── Todo row actions (verdict → action, v0.16 step 3) ───────────────────── */
.todo-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.todo-action-btn {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.todo-action-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.todo-action-btn:disabled { opacity: .4; cursor: not-allowed; }
.todo-action-feedback {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.todo-action-feedback.success { color: var(--success); }
.todo-action-feedback.error { color: var(--danger); }
.todo-action-feedback a,
.todo-action-feedback .link-btn {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}

/* ── Dashboard Act-decisions summary (v0.16 step 3) ───────────────────────── */
.exec-act-summary {
  font-size: 12.5px;
  color: var(--text-subtle);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: -4px 0 14px;
}
.exec-act-summary strong { color: var(--text); }
