/* ═══════════════════════════════════════════════════════════════
   FORENSIC ASSURANCE — SIH26149 · NTRO
   UI v3.1 — Dark Cyberpunk Glassmorphism — FULLY RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

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

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
  --bg-void:       #020810;
  --bg-deep:       #04091a;
  --bg-base:       #060e22;
  --bg-raised:     #091428;
  --bg-float:      #0d1c38;
  --bg-glass:      rgba(13,28,56,0.55);
  --bg-card:       rgba(9,20,40,0.7);

  --border-dim:    rgba(0,180,255,0.08);
  --border-mid:    rgba(0,180,255,0.15);
  --border-bright: rgba(0,180,255,0.35);
  --border-glass:  rgba(255,255,255,0.06);

  --cyan:          #00e5ff;
  --cyan-glow:     rgba(0,229,255,0.15);
  --blue:          #2979ff;
  --blue-glow:     rgba(41,121,255,0.15);
  --purple:        #aa00ff;
  --purple-glow:   rgba(170,0,255,0.15);
  --gold:          #ffc400;
  --gold-glow:     rgba(255,196,0,0.15);
  --green:         #00e676;
  --green-glow:    rgba(0,230,118,0.15);
  --red:           #ff1744;
  --red-glow:      rgba(255,23,68,0.15);
  --orange:        #ff6d00;

  --text-primary:  #e8f4ff;
  --text-secondary:#a8c8e8;
  --text-muted:    #5a7a9a;
  --text-dim:      #2a4a6a;

  --topbar-h:      56px;
  --nav-w:         232px;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-glass:  0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}

:root[data-theme="light"] {
  --bg-void:       #edf4ff;
  --bg-deep:       #dfeaff;
  --bg-base:       #f7fbff;
  --bg-raised:     #edf5ff;
  --bg-float:      #e1ebff;
  --bg-glass:      rgba(255,255,255,0.7);
  --bg-card:       rgba(255,255,255,0.82);

  --border-dim:    rgba(14,70,125,0.12);
  --border-mid:    rgba(14,70,125,0.2);
  --border-bright: rgba(0,100,180,0.35);
  --border-glass:  rgba(17,42,74,0.08);

  --cyan:          #0ea5ff;
  --cyan-glow:     rgba(14,165,255,0.12);
  --blue:          #1d4ed8;
  --blue-glow:     rgba(29,78,216,0.12);
  --purple:        #7c3aed;
  --purple-glow:   rgba(124,58,237,0.12);
  --gold:          #b7791f;
  --gold-glow:     rgba(183,121,31,0.1);
  --green:         #178a53;
  --green-glow:    rgba(23,138,83,0.1);
  --red:           #e11d48;
  --red-glow:      rgba(225,29,72,0.12);
  --orange:        #ea580c;

  --text-primary:  #0d1b2a;
  --text-secondary:#233d5c;
  --text-muted:    #516889;
  --text-dim:      #8aa1bc;

  --shadow-glass:  0 12px 36px rgba(10, 30, 55, 0.12), inset 0 1px 0 rgba(255,255,255,0.8);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(124,58,237,0.14), transparent 28%),
    var(--bg-void);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ── PARTICLE CANVAS ─────────────────────────────────────────── */
#particleCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* ── SCANLINE ─────────────────────────────────────────────────── */
.scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.025) 2px, rgba(0,0,0,0.025) 4px);
}

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h); z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem 0 1rem; gap: 0.75rem;
  background: rgba(4,9,26,0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-dim);
  transition: background 0.3s, border-color 0.3s;
  box-shadow: 0 10px 30px rgba(2,8,16,0.12);
}
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .sidenav {
  background: rgba(255,255,255,0.75);
  box-shadow: 0 12px 36px rgba(17, 36, 69, 0.08);
}

.topbar-left { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; min-width: 0; }
.topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border-mid);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.3rem 0.6rem 0.3rem 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.theme-toggle:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.theme-toggle-track {
  width: 2.4rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgba(11, 33, 63, 0.5);
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.12rem;
}
.theme-toggle-thumb {
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 12px rgba(0,229,255,0.4);
  transform: translateX(0.05rem);
  transition: transform 0.2s ease;
}
.theme-toggle.light-mode .theme-toggle-track {
  background: rgba(128, 162, 255, 0.28);
}
.theme-toggle.light-mode .theme-toggle-thumb {
  transform: translateX(1.05rem);
  background: linear-gradient(135deg, #ffd166, #f59e0b);
}
.theme-toggle-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.team-aitka {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: rgba(0,229,255,0.05);
  color: var(--cyan);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Orbitron', monospace;
}

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--radius-sm);
  transition: background 0.2s; flex-shrink: 0;
}
.hamburger:hover { background: rgba(0,229,255,0.08); }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-secondary); border-radius: 2px;
  transition: all 0.3s var(--ease-spring); transform-origin: center;
}
.nav-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--cyan); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--cyan); }

/* Brand */
.brand { display: flex; align-items: center; gap: 0.5rem; overflow: hidden; }
.brand-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.3); border-radius: 8px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-title {
  font-family: 'Orbitron', monospace; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--cyan); white-space: nowrap;
}
.brand-sub { font-size: 0.58rem; color: var(--text-muted); letter-spacing: 0.06em; white-space: nowrap; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 0.35rem; overflow: hidden; }
.bc-item { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.bc-item.active { color: var(--cyan); cursor: pointer; }
.bc-sep { color: var(--text-dim); font-size: 0.68rem; }

/* API Status */
.api-status {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.68rem; font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted); flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.ok { background: var(--green); animation: dotPulse 2.5s ease-in-out infinite; }
.status-dot.err { background: var(--red); box-shadow: 0 0 8px var(--red); }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}
.status-label { color: var(--text-muted); }
.status-label.ok { color: var(--green); }
.status-label.err { color: var(--red); }
.status-ping { color: var(--text-dim); }

/* Case badge */
.case-badge {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.25);
  border-radius: 100px; font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace; color: var(--cyan);
  white-space: nowrap; overflow: hidden; max-width: 160px;
  text-overflow: ellipsis;
}

/* ── SIDE NAV ─────────────────────────────────────────────────── */
.sidenav {
  position: fixed; top: var(--topbar-h); left: 0;
  width: var(--nav-w); height: calc(100dvh - var(--topbar-h));
  z-index: 150;
  display: flex; flex-direction: column; gap: 0;
  padding: 1rem 0.65rem 1.25rem;
  background: rgba(4,9,26,0.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-dim);
  overflow-y: auto; overflow-x: hidden;
  transition: transform 0.32s var(--ease-out-expo);
  scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent;
  /* Desktop: always visible */
}

.nav-section-label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--text-dim); margin: 0.25rem 0.5rem 0.35rem; padding-top: 0.15rem;
}

.nav-item {
  display: flex; align-items: center; gap: 0.55rem;
  width: 100%; padding: 0.55rem 0.7rem;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); text-align: left; position: relative; overflow: hidden;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  margin-bottom: 1px;
}
.nav-item:hover { color: var(--text-secondary); background: rgba(0,229,255,0.05); }
.nav-item.active {
  color: var(--cyan); background: rgba(0,229,255,0.08);
  border-color: rgba(0,229,255,0.18);
}
.nav-glow {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at left center, rgba(0,229,255,0.18), transparent 70%);
  transition: opacity 0.3s; pointer-events: none;
}
.nav-item.active .nav-glow { opacity: 1; }
.nav-icon { flex-shrink: 0; }
.nav-item.active .nav-icon { color: var(--cyan); }
.nav-action { color: var(--blue); }
.nav-action:hover { color: var(--cyan); background: rgba(41,121,255,0.07); }

.nav-footer {
  margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--border-dim);
}
.sys-status { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.6rem; }
.sys-row { display: flex; justify-content: space-between; align-items: center; }
.sys-label { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.05em; }
.sys-val { font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; color: var(--cyan); }
.nav-version {
  font-family: 'Orbitron', monospace; font-size: 0.58rem;
  color: var(--text-dim); letter-spacing: 0.12em; text-align: center;
}

/* Nav overlay (mobile) */
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 140;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.nav-open .nav-overlay { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── MAIN CONTENT ─────────────────────────────────────────────── */
.main-content {
  margin-left: var(--nav-w);
  margin-top: var(--topbar-h);
  min-height: calc(100dvh - var(--topbar-h));
  padding: 1.75rem 1.75rem 3rem;
  position: relative; z-index: 10;
}

/* ── TAB SECTIONS ─────────────────────────────────────────────── */
.tab-section { display: none; }
.tab-section.active {
  display: block;
  animation: tabIn 0.35s var(--ease-out-expo) both;
}
@keyframes tabIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 55vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem 0 2.5rem; margin-bottom: 2.5rem; overflow: hidden;
}

.hero-badge,
.hero-title,
.hero-sub,
.stat-card,
.feature-card,
.panel,
.result-box,
.step-card,
.info-panel,
.audit-card,
.case-card,
.evidence-card,
.tab-panel,
.card-shell,
.data-table,
.legal-box,
.empty-state,
.notice-card {
  box-shadow: 0 12px 28px rgba(8, 18, 35, 0.08);
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.28rem 0.85rem;
  background: rgba(0,229,255,0.07); border: 1px solid rgba(0,229,255,0.2);
  border-radius: 100px; font-size: 0.7rem; font-weight: 500;
  color: var(--cyan); letter-spacing: 0.05em; margin-bottom: 1.25rem;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  animation: dotPulse 2s ease-in-out infinite; flex-shrink: 0;
}
.hero-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 1rem;
  display: flex; flex-direction: column;
}
.title-line { display: block; color: var(--text-primary); }
.title-line.accent {
  color: transparent;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 55%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.hero-sub {
  font-size: 1rem; color: var(--text-secondary); font-weight: 400;
  max-width: 540px; margin-bottom: 1.75rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem; margin-top: 2.5rem; position: relative; z-index: 1;
}
.stat-card {
  background: var(--bg-glass); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 1.1rem 1rem;
  backdrop-filter: blur(12px); cursor: default;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px); border-color: rgba(0,229,255,0.3);
  box-shadow: 0 12px 40px rgba(0,229,255,0.08);
}
.stat-num {
  font-family: 'Orbitron', monospace; font-size: 1.4rem; font-weight: 700;
  color: var(--cyan); line-height: 1.2; margin-bottom: 0.2rem;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.15rem; }
.stat-tag { font-size: 0.62rem; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }

/* ── FEATURE GRID ─────────────────────────────────────────────── */
.content-section { margin-bottom: 2.5rem; }
.section-header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.section-title {
  font-family: 'Orbitron', monospace; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text-muted); white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: linear-gradient(to right, var(--border-mid), transparent); }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem;
}
.feature-card {
  background: var(--bg-glass); border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg); padding: 1.35rem;
  backdrop-filter: blur(12px); cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.4), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover {
  transform: translateY(-5px); border-color: var(--border-bright);
  box-shadow: 0 14px 40px rgba(0,0,0,0.4), 0 0 30px var(--cyan-glow);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.35rem;
}
.feature-icon.cyan { background: rgba(0,229,255,0.1); color: var(--cyan); }
.feature-icon.blue { background: rgba(41,121,255,0.12); color: var(--blue); }
.feature-icon.purple { background: rgba(170,0,255,0.12); color: var(--purple); }
.feature-icon.gold { background: rgba(255,196,0,0.1); color: var(--gold); }
.feature-icon.green { background: rgba(0,230,118,0.1); color: var(--green); }
.feature-icon.red { background: rgba(255,23,68,0.1); color: var(--red); }
.feature-card h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.feature-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.feature-arrow {
  font-size: 1rem; color: var(--cyan); opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease-spring);
  align-self: flex-end;
}
.feature-card:hover .feature-arrow { opacity: 1; transform: translateX(0); }

/* ── THREAT TABLE ─────────────────────────────────────────────── */
.threat-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-dim); }
.threat-table { width: 100%; border-collapse: collapse; font-size: 0.81rem; }
.threat-table th {
  padding: 0.65rem 1rem; background: rgba(0,229,255,0.04);
  border-bottom: 1px solid var(--border-mid); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-muted); text-align: left; white-space: nowrap;
}
.threat-table td {
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-dim);
  color: var(--text-secondary); line-height: 1.5;
}
.threat-table tr:last-child td { border-bottom: none; }
.threat-table tr:hover td { background: rgba(0,229,255,0.025); }
.badge-ok {
  display: inline-flex; padding: 0.18rem 0.5rem;
  background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.25);
  border-radius: 100px; font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--green); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.badge-warn {
  display: inline-flex; padding: 0.18rem 0.5rem;
  background: rgba(255,196,0,0.1); border: 1px solid rgba(255,196,0,0.25);
  border-radius: 100px; font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--gold); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.badge-danger {
  display: inline-flex; padding: 0.18rem 0.5rem;
  background: rgba(255,23,68,0.1); border: 1px solid rgba(255,23,68,0.25);
  border-radius: 100px; font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--red); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* ── PAGE HEADERS ─────────────────────────────────────────────── */
.page-header { margin-bottom: 1.75rem; }
.page-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem;
}
.page-title-accent { font-size: 0.65em; color: var(--cyan); margin-right: 0.6rem; opacity: 0.6; }
.page-desc { font-size: 0.85rem; color: var(--text-muted); max-width: 560px; line-height: 1.6; }

/* ── PANELS ──────────────────────────────────────────────────── */
.panel { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem; }
.glass {
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass); transition: border-color 0.3s;
}
.glass:hover { border-color: var(--border-dim); }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-dim);
  background: rgba(0,0,0,0.15); gap: 0.65rem; flex-wrap: wrap;
}
.panel-header h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); letter-spacing: 0.02em; flex: 1; min-width: 0; }
.panel-actions { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.panel-body { padding: 1.1rem; }
.panel-stats { font-size: 0.72rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.panel-badge {
  padding: 0.16rem 0.5rem; border-radius: 100px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace; white-space: nowrap; flex-shrink: 0;
}
.panel-badge.danger { background: rgba(255,23,68,0.1); color: var(--red); border: 1px solid rgba(255,23,68,0.25); }
.panel-badge.warning { background: rgba(255,196,0,0.1); color: var(--gold); border: 1px solid rgba(255,196,0,0.25); }

/* Layout helpers */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.25rem; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 1.25rem; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 0.85rem; }
.form-label {
  display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.35rem; text-transform: uppercase;
}
.form-input {
  width: 100%; padding: 0.58rem 0.85rem;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.83rem;
  color: var(--text-primary); outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
  appearance: none; -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
  background: rgba(0,229,255,0.04);
}
.form-input:hover:not(:focus) { border-color: var(--border-bright); }
.form-textarea { resize: vertical; min-height: 72px; }
select.form-input { cursor: pointer; 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='%235a7a9a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.checkbox-item {
  display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
  font-size: 0.81rem; color: var(--text-secondary);
  padding: 0.3rem 0.45rem; border-radius: var(--radius-sm); transition: background 0.2s;
  user-select: none;
}
.checkbox-item:hover { background: rgba(0,229,255,0.05); }
.checkbox-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; border: 1.5px solid var(--border-bright);
  border-radius: 3px; flex-shrink: 0; cursor: pointer;
  position: relative; transition: all 0.2s;
}
.checkbox-item input[type="checkbox"]:checked {
  background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,229,255,0.4);
}
.checkbox-item input[type="checkbox"]:checked::after {
  content: ''; position: absolute; top: 1px; left: 4px;
  width: 4px; height: 7px; border: 2px solid #000; border-top: none; border-left: none;
  transform: rotate(45deg);
}

.input-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: stretch; margin-bottom: 0.85rem; }

/* Tab toggle */
.tab-toggle {
  display: flex; background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-mid); border-radius: var(--radius); overflow: hidden;
}
.toggle-btn {
  flex: 1; padding: 0.48rem;
  background: none; border: none;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.77rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all 0.22s;
}
.toggle-btn.active { background: rgba(0,229,255,0.12); color: var(--cyan); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.62rem 1.3rem;
  background: linear-gradient(135deg, rgba(0,229,255,0.18) 0%, rgba(41,121,255,0.18) 100%);
  border: 1px solid rgba(0,229,255,0.4); border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.84rem; font-weight: 600;
  color: var(--cyan); cursor: pointer; letter-spacing: 0.02em;
  transition: all 0.28s var(--ease-spring); white-space: nowrap;
  -webkit-appearance: none; appearance: none;
}
.btn-primary:hover {
  border-color: var(--cyan); color: #fff;
  box-shadow: 0 0 28px rgba(0,229,255,0.2), 0 4px 14px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.58rem 1.1rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.81rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  transition: all 0.22s var(--ease-spring); -webkit-appearance: none;
}
.btn-secondary:hover {
  background: rgba(0,229,255,0.07); border-color: rgba(0,229,255,0.3);
  color: var(--cyan); transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: none; border: 1px solid var(--border-mid); border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  transition: all 0.22s; -webkit-appearance: none;
}
.btn-ghost:hover { border-color: var(--border-bright); color: var(--text-secondary); }
.btn-ghost.small { padding: 0.32rem 0.7rem; font-size: 0.73rem; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.62rem 1.3rem;
  background: rgba(255,23,68,0.1); border: 1px solid rgba(255,23,68,0.3);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.84rem; font-weight: 600;
  color: var(--red); cursor: pointer; white-space: nowrap;
  transition: all 0.28s var(--ease-spring); -webkit-appearance: none;
}
.btn-danger:hover {
  background: rgba(255,23,68,0.18); border-color: var(--red);
  box-shadow: 0 0 22px rgba(255,23,68,0.2); transform: translateY(-2px);
}

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: none;
  border: 1px solid var(--border-mid); border-radius: 6px;
  cursor: pointer; color: var(--text-muted); transition: all 0.2s;
  flex-shrink: 0; -webkit-appearance: none;
}
.btn-icon:hover { color: var(--cyan); border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.06); }

.full-width { width: 100%; }
.inline-link { background: none; border: none; color: var(--cyan); cursor: pointer; text-decoration: underline; font: inherit; padding: 0; }

/* ── UPLOAD ZONE ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-mid); border-radius: var(--radius-lg);
  padding: 2rem 1.25rem; text-align: center; cursor: pointer;
  transition: all 0.3s var(--ease-spring); background: rgba(0,0,0,0.15);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--cyan); background: rgba(0,229,255,0.03);
  box-shadow: 0 0 30px rgba(0,229,255,0.07) inset;
}
.upload-icon { color: var(--text-dim); margin-bottom: 0.65rem; transition: color 0.3s, transform 0.3s var(--ease-spring); }
.upload-zone:hover .upload-icon { color: var(--cyan); transform: translateY(-3px); }
.upload-text { font-size: 0.87rem; color: var(--text-secondary); font-weight: 500; }
.upload-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.2rem; }
.progress-bar { height: 3px; background: rgba(0,229,255,0.12); border-radius: 100px; margin: 0.65rem 0 0.25rem; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 100px; width: 0%; transition: width 0.35s;
  box-shadow: 0 0 10px rgba(0,229,255,0.6);
}

/* ── STEPS ───────────────────────────────────────────────────── */
.steps-container { display: flex; flex-direction: column; gap: 0.85rem; }
.step-card {
  display: flex; gap: 1.1rem;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 1.25rem;
  backdrop-filter: blur(16px); transition: border-color 0.3s;
  align-items: flex-start;
}
.step-card:hover { border-color: var(--border-mid); }
.step-number {
  font-family: 'Orbitron', monospace; font-size: 1.2rem; font-weight: 700;
  color: rgba(0,229,255,0.2); flex-shrink: 0; width: 44px; line-height: 1.3;
  padding-top: 0.1rem;
}
.step-body { flex: 1; min-width: 0; }
.step-body h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.step-body p { font-size: 0.79rem; color: var(--text-muted); margin-bottom: 0.85rem; line-height: 1.55; }

/* ── RESULT BOXES ─────────────────────────────────────────────── */
.result-box {
  background: rgba(0,0,0,0.35); border: 1px solid var(--border-dim);
  border-radius: var(--radius); padding: 0.85rem 1rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.76rem;
  color: var(--text-secondary); white-space: pre-wrap; word-break: break-all;
  line-height: 1.75; animation: resultFadeIn 0.3s var(--ease-out-expo);
  max-height: 260px; overflow-y: auto; margin-top: 0.75rem;
}
@keyframes resultFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.result-box.ok { border-color: rgba(0,230,118,0.3); color: var(--green); background: rgba(0,230,118,0.04); }
.result-box.err { border-color: rgba(255,23,68,0.3); color: var(--red); background: rgba(255,23,68,0.04); }
.result-box.warn { border-color: rgba(255,196,0,0.3); color: var(--gold); background: rgba(255,196,0,0.04); }

/* ── DATA TABLE ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.78rem; font-family: 'JetBrains Mono', monospace;
}
.data-table th {
  padding: 0.55rem 0.85rem; background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-mid); text-align: left;
  font-size: 0.63rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--text-muted); white-space: nowrap;
}
.data-table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border-dim); color: var(--text-secondary); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0,229,255,0.03); }

/* ── ACTIVE CASE BANNER ──────────────────────────────────────── */
.active-case-banner {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.65rem 0.9rem;
  background: rgba(255,196,0,0.06); border: 1px solid rgba(255,196,0,0.2);
  border-radius: var(--radius); font-size: 0.81rem; color: var(--gold); margin-bottom: 1.25rem;
}
.active-case-banner.ok { background: rgba(0,230,118,0.06); border-color: rgba(0,230,118,0.2); color: var(--green); }
.active-case-banner a { color: inherit; text-decoration: underline; cursor: pointer; }

/* ── CASE LIST ───────────────────────────────────────────────── */
.case-list { display: flex; flex-direction: column; gap: 0.4rem; min-height: 80px; }
.case-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-dim); border-radius: var(--radius);
  cursor: pointer; transition: all 0.22s; gap: 0.65rem; flex-wrap: wrap;
}
.case-item:hover { border-color: var(--border-bright); background: rgba(0,229,255,0.04); }
.case-item.active-case { border-color: rgba(0,229,255,0.35); background: rgba(0,229,255,0.06); }
.case-item-id { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--cyan); flex-shrink: 0; }
.case-item-name { font-size: 0.81rem; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-item-meta { font-size: 0.7rem; color: var(--text-dim); flex-shrink: 0; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.65rem; padding: 2.25rem 1rem; color: var(--text-dim); text-align: center;
}
.empty-state svg { opacity: 0.35; }
.empty-state p { font-size: 0.81rem; max-width: 240px; line-height: 1.6; }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline-wrap { max-height: 480px; overflow-y: auto; }
.timeline-item {
  display: flex; gap: 0.85rem; padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-dim);
  animation: itemIn 0.3s var(--ease-out-expo) both;
}
.timeline-item:last-child { border-bottom: none; }
@keyframes itemIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; margin-top: 0.32rem; box-shadow: 0 0 8px var(--cyan); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-action { font-size: 0.81rem; font-weight: 500; color: var(--text-primary); }
.timeline-meta { font-size: 0.7rem; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-top: 0.18rem; word-break: break-all; }

.chain-status {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.9rem; border-radius: var(--radius);
  font-size: 0.81rem; font-weight: 500; margin-bottom: 0.85rem;
}
.chain-status.ok { background: rgba(0,230,118,0.08); border: 1px solid rgba(0,230,118,0.2); color: var(--green); }
.chain-status.err { background: rgba(255,23,68,0.08); border: 1px solid rgba(255,23,68,0.2); color: var(--red); }

/* ── WARNING BOX ─────────────────────────────────────────────── */
.warning-box {
  display: flex; gap: 0.55rem; padding: 0.7rem 0.9rem;
  background: rgba(255,109,0,0.07); border: 1px solid rgba(255,109,0,0.2);
  border-radius: var(--radius); font-size: 0.79rem; color: var(--orange);
  line-height: 1.6; margin-bottom: 0.85rem; align-items: flex-start;
}
.warning-box svg { flex-shrink: 0; margin-top: 0.12rem; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.45rem; max-width: 340px; width: calc(100vw - 2.5rem);
}
.toast {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  background: rgba(6,14,34,0.97); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toastIn 0.3s var(--ease-spring);
  transition: opacity 0.25s, transform 0.25s;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(0.92); } to { opacity: 1; transform: translateX(0) scale(1); } }
.toast.toast-out { opacity: 0; transform: translateX(50px) scale(0.92); }
.toast.success { border-color: rgba(0,230,118,0.3); }
.toast.error   { border-color: rgba(255,23,68,0.3); }
.toast.warning { border-color: rgba(255,196,0,0.3); }
.toast.info    { border-color: rgba(0,229,255,0.3); }
.toast-body { flex: 1; }
.toast-title { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); }
.toast-msg { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.18rem; line-height: 1.5; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-dim); font-size: 0.95rem; padding: 0; line-height: 1; flex-shrink: 0; transition: color 0.2s; }
.toast-close:hover { color: var(--text-primary); }

/* ── MISC ─────────────────────────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; }
.accent-text { color: var(--cyan); }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.82em; padding: 0.15em 0.4em; background: rgba(0,229,255,0.08); border-radius: 4px; color: var(--cyan); }

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-mid); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Evidence cards */
.evidence-card { background: rgba(0,0,0,0.2); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 0.8rem 0.9rem; margin-bottom: 0.4rem; cursor: pointer; transition: all 0.2s; }
.evidence-card:hover { border-color: var(--border-bright); background: rgba(0,229,255,0.03); }
.evidence-card-header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.evidence-card-header .btn-icon { color: var(--text-muted); opacity: 0.7; padding: 2px; }
.evidence-card-header .btn-icon:hover { color: var(--cyan); opacity: 1; }
.evidence-card-id { font-family: 'JetBrains Mono', monospace; font-size: 0.73rem; color: var(--cyan); word-break: break-all; }
.evidence-card-meta { font-size: 0.76rem; color: var(--text-muted); }

/* Verify result */
.verify-result-card { padding: 1.35rem; border-radius: var(--radius-lg); border: 1px solid; animation: resultFadeIn 0.35s var(--ease-spring); }
.verify-result-card.valid { background: rgba(0,230,118,0.06); border-color: rgba(0,230,118,0.25); }
.verify-result-card.invalid { background: rgba(255,23,68,0.06); border-color: rgba(255,23,68,0.25); }
.verify-verdict { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; margin-bottom: 0.65rem; }
.verify-result-card.valid .verify-verdict { color: var(--green); }
.verify-result-card.invalid .verify-verdict { color: var(--red); }
.verify-detail { font-family: 'JetBrains Mono', monospace; font-size: 0.73rem; color: var(--text-muted); white-space: pre-wrap; word-break: break-all; line-height: 1.8; }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.85rem; }
.detail-field { display: flex; flex-direction: column; gap: 0.2rem; }
.detail-key { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; }
.detail-val { font-size: 0.81rem; color: var(--text-primary); word-break: break-all; }
.detail-val.mono-val { font-family: 'JetBrains Mono', monospace; font-size: 0.73rem; color: var(--cyan); }

/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  /* Collapse nav off-screen on tablet/mobile */
  .sidenav { transform: translateX(calc(-1 * var(--nav-w))); }
  .nav-open .sidenav { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.7); }
  .main-content { margin-left: 0; padding: 1.25rem; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .topbar-center { display: none; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .main-content { padding: 0.85rem; }
  .hero { padding: 1.75rem 0 1.25rem; min-height: auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .brand-title { display: none; }
  .panel-header { padding: 0.7rem 0.85rem; }
  .panel-body { padding: 0.85rem; }
  .step-card { flex-direction: column; gap: 0.5rem; }
  .step-number { font-size: 0.9rem; width: auto; }
  .hero-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .topbar { padding: 0 0.75rem; }
  .toast-container { right: 0.75rem; left: 0.75rem; max-width: none; width: auto; }
  .three-col { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   UI v4.0 NEW COMPONENTS — ENTROPY · HEX · TELEMETRY · RADAR
   ═══════════════════════════════════════════════════════════════ */

/* ── TICKER BAR ─────────────────────────────────────────────── */
.ticker-bar {
  position: fixed;
  top: var(--topbar-h);
  left: var(--nav-w);
  right: 0;
  height: 28px;
  background: linear-gradient(90deg, rgba(0,229,255,0.04), rgba(41,121,255,0.06), rgba(0,229,255,0.04));
  border-bottom: 1px solid var(--border-dim);
  overflow: hidden;
  z-index: 90;
  display: flex;
  align-items: center;
  transition: left 0.3s;
}
.nav-closed .ticker-bar { left: 0; }
.ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-dim);
}
.ticker-item .ti-label { color: var(--cyan); opacity: 0.7; }
.ticker-item .ti-val { color: var(--text-secondary); font-weight: 500; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Push main content down to accommodate ticker */
.main-content { margin-top: calc(var(--topbar-h) + 28px); }

/* ── ENTROPY HEATMAP ────────────────────────────────────────── */
.entropy-section {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
}
.entropy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: rgba(0,229,255,0.04);
  border-bottom: 1px solid var(--border-dim);
}
.entropy-header h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
}
.entropy-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
}
.ent-key {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
}
.ent-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ent-dot.empty      { background: #0a1428; border: 1px solid #1a3050; }
.ent-dot.sparse     { background: #0d2a52; }
.ent-dot.structured { background: #1565c0; }
.ent-dot.compressed { background: #f57f17; }
.ent-dot.encrypted  { background: #b71c1c; }

.entropy-canvas-wrap {
  position: relative;
  padding: 0.75rem;
  cursor: crosshair;
}
#entropyCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
}
.entropy-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(4,9,26,0.95);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,229,255,0.2);
  z-index: 9999;
  display: none;
  min-width: 160px;
}
.entropy-tooltip .ett-row { display: flex; justify-content: space-between; gap: 1rem; }
.entropy-tooltip .ett-label { color: var(--text-muted); }
.entropy-tooltip .ett-val { color: var(--cyan); font-weight: 600; }

.entropy-stats-row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-dim);
  flex-wrap: wrap;
}
.ent-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ent-stat-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.ent-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-secondary); }

/* ── HEX INSPECTOR PANEL ────────────────────────────────────── */
.hex-inspector-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,8,16,0.7);
  z-index: 400;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
}
.hex-inspector-overlay.open { display: flex; }
.hex-inspector {
  width: min(680px, 100vw);
  height: min(520px, 90vh);
  background: var(--bg-deep);
  border-top-left-radius: var(--radius-lg);
  border-left: 1px solid var(--border-bright);
  border-top: 1px solid var(--border-bright);
  display: flex;
  flex-direction: column;
  box-shadow: -8px -8px 40px rgba(0,229,255,0.12);
  animation: hexSlideIn 0.35s var(--ease-out-expo);
}
@keyframes hexSlideIn {
  from { transform: translate(100%, 100%); opacity: 0; }
  to   { transform: translate(0,0); opacity: 1; }
}
.hex-insp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-mid);
  background: rgba(0,229,255,0.04);
  flex-shrink: 0;
}
.hex-insp-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.hex-insp-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.hex-insp-close {
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.hex-insp-close:hover { color: var(--red); border-color: var(--red); }
.hex-insp-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.6;
}
.hex-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.1rem 0;
  border-radius: 3px;
}
.hex-row:hover { background: rgba(0,229,255,0.04); }
.hex-offset { color: var(--text-dim); width: 4.5rem; flex-shrink: 0; }
.hex-bytes {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.hb { color: var(--text-secondary); }
.hb.hb-null { color: var(--text-dim); }
.hb.hb-print { color: var(--cyan); }
.hb.hb-high { color: var(--purple); }
.hex-ascii { color: var(--text-muted); letter-spacing: 0.05em; width: 10rem; flex-shrink: 0; }

/* ── RADAR / SPIDER CHART ───────────────────────────────────── */
.radar-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
#radarCanvas {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
}
.radar-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.radar-leg-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.radar-leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.radar-leg-label { color: var(--text-secondary); flex: 1; }
.radar-leg-val { font-family: 'JetBrains Mono', monospace; color: var(--cyan); font-size: 0.68rem; }

/* ── SMART TELEMETRY GAUGES ─────────────────────────────────── */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.gauge-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(0,229,255,0.08);
}
.gauge-svg { width: 100px; height: 70px; }
.gauge-arc-bg  { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 8; stroke-linecap: round; }
.gauge-arc-fg  { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease-out-expo), stroke 0.5s; }
.gauge-label { font-family: 'Orbitron', monospace; font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; text-align: center; }
.gauge-val { font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.gauge-unit { font-size: 0.6rem; color: var(--text-muted); }

.telemetry-tab-section .panel { margin-bottom: 1.25rem; }
.telem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.8rem;
}
.telem-row:last-child { border-bottom: none; }
.telem-key { color: var(--text-muted); }
.telem-val { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); }
.telem-ok  { color: var(--green); }
.telem-warn { color: var(--gold); }
.telem-crit { color: var(--red); }

/* ── STEGO RISK GAUGE ───────────────────────────────────────── */
.stego-result-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
}
.stego-verdict-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.stego-verdict-badge {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  flex-shrink: 0;
}
.stego-verdict-badge.clean      { background: rgba(0,230,118,0.12); color: var(--green); border: 1px solid rgba(0,230,118,0.3); }
.stego-verdict-badge.suspicious { background: rgba(255,196,0,0.12); color: var(--gold); border: 1px solid rgba(255,196,0,0.3); }
.stego-verdict-badge.detected   { background: rgba(255,23,68,0.12); color: var(--red); border: 1px solid rgba(255,23,68,0.3); }
.stego-prob-bar-wrap {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.stego-prob-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s var(--ease-out-expo), background 0.5s;
}
.stego-prob-pct { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-secondary); flex-shrink: 0; }
.stego-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
  font-size: 0.72rem;
}
.stego-detail-item { display: flex; flex-direction: column; gap: 0.1rem; }
.stego-detail-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.stego-detail-val { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); }

/* ── AFFIDAVIT BUTTON ───────────────────────────────────────── */
.affidavit-panel {
  background: linear-gradient(135deg, rgba(170,0,255,0.06), rgba(41,121,255,0.06));
  border: 1px solid rgba(170,0,255,0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.affidavit-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: rgba(170,0,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
}
.affidavit-text { flex: 1; }
.affidavit-text h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.affidavit-text p  { font-size: 0.75rem; color: var(--text-muted); }
.btn-affidavit {
  background: linear-gradient(135deg, rgba(170,0,255,0.2), rgba(41,121,255,0.2));
  border: 1px solid rgba(170,0,255,0.35);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-affidavit:hover { box-shadow: 0 0 18px rgba(170,0,255,0.3); border-color: var(--purple); }

/* ── ANIMATED STEP CONNECTOR ────────────────────────────────── */
.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  position: relative;
}
.step-connector::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan) 0%, transparent 100%);
  transform: translateX(-50%);
}
.step-connector-arrow {
  width: 20px; height: 20px;
  background: var(--bg-base);
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 0.7rem;
  z-index: 1;
  animation: connPulse 2s ease-in-out infinite;
}
@keyframes connPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0); }
  50%       { box-shadow: 0 0 0 4px rgba(0,229,255,0.15); }
}

/* ── TELEMETRY TAB ──────────────────────────────────────────── */
.subsys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.subsys-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.3s;
}
.subsys-card.ok   { border-left: 3px solid var(--green); }
.subsys-card.warn { border-left: 3px solid var(--gold); }
.subsys-card.off  { border-left: 3px solid var(--text-dim); }
.subsys-icon { font-size: 1.1rem; flex-shrink: 0; }
.subsys-info { flex: 1; min-width: 0; }
.subsys-name { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }
.subsys-detail { font-size: 0.65rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subsys-pill {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  flex-shrink: 0;
}
.subsys-pill.ok   { background: rgba(0,230,118,0.12); color: var(--green); }
.subsys-pill.warn { background: rgba(255,196,0,0.12); color: var(--gold); }
.subsys-pill.off  { background: rgba(90,122,154,0.12); color: var(--text-dim); }

/* ── GLOW-PULSE ON RUNNING OPS ──────────────────────────────── */
.operation-running .step-card {
  animation: opGlow 1.5s ease-in-out infinite;
}
@keyframes opGlow {
  0%, 100% { box-shadow: none; }
  50%       { box-shadow: 0 0 0 1px rgba(0,229,255,0.3), 0 0 20px rgba(0,229,255,0.08); }
}

/* ── ENTROPY LOADING SHIMMER ────────────────────────────────── */
.entropy-shimmer {
  width: 100%;
  height: 120px;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(0,229,255,0.04) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmerSlide 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmerSlide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
