/* ══════════════════════════════════════════════
   PRAVAAH — Enterprise UI
   5 Themes · Inter + JetBrains Mono
══════════════════════════════════════════════ */

/* ── THEMES ───────────────────────────────── */
:root, [data-theme="default"] {
  --sb:        #0f172a;
  --sb-bd:     #1e293b;
  --sb-tx:     #94a3b8;
  --sb-txh:    #f8fafc;
  --sb-ac:     #3b82f6;
  --sb-ac-bg:  rgba(59,130,246,.1);
  --bg:        #f1f5f9;
  --bg2:       #ffffff;
  --bg3:       #f8fafc;
  --bd:        #e2e8f0;
  --bd2:       #cbd5e1;
  --tx:        #0f172a;
  --tx2:       #475569;
  --tx3:       #94a3b8;
  --blue:      #2563eb;
  --blue-d:    rgba(37,99,235,.1);
  --green:     #16a34a;
  --green-d:   rgba(22,163,74,.1);
  --amber:     #d97706;
  --amber-d:   rgba(217,119,6,.1);
  --red:       #dc2626;
  --red-d:     rgba(220,38,38,.1);
  --purple:    #7c3aed;
  --purple-d:  rgba(124,58,237,.1);
  --topbar:    #ffffff;
  --topbar-bd: #e2e8f0;
  --card:      #ffffff;
  --card-bd:   #e2e8f0;
  --inp:       #f8fafc;
  --code-bg:   #f1f5f9;
}

[data-theme="dark"] {
  --sb:        #020617;
  --sb-bd:     #0f172a;
  --sb-tx:     #64748b;
  --sb-txh:    #e2e8f0;
  --sb-ac:     #60a5fa;
  --sb-ac-bg:  rgba(96,165,250,.1);
  --bg:        #020617;
  --bg2:       #0f172a;
  --bg3:       #1e293b;
  --bd:        #1e293b;
  --bd2:       #334155;
  --tx:        #e2e8f0;
  --tx2:       #94a3b8;
  --tx3:       #475569;
  --blue:      #60a5fa;
  --blue-d:    rgba(96,165,250,.12);
  --green:     #4ade80;
  --green-d:   rgba(74,222,128,.12);
  --amber:     #fbbf24;
  --amber-d:   rgba(251,191,36,.12);
  --red:       #f87171;
  --red-d:     rgba(248,113,113,.12);
  --purple:    #c084fc;
  --purple-d:  rgba(192,132,252,.12);
  --topbar:    #0f172a;
  --topbar-bd: #1e293b;
  --card:      #0f172a;
  --card-bd:   #1e293b;
  --inp:       #020617;
  --code-bg:   #1e293b;
}

[data-theme="steel"] {
  --sb:        #1e3a5f;
  --sb-bd:     #2d5a8e;
  --sb-tx:     #93c5fd;
  --sb-txh:    #eff6ff;
  --sb-ac:     #38bdf8;
  --sb-ac-bg:  rgba(56,189,248,.12);
  --bg:        #f0f4f8;
  --bg2:       #ffffff;
  --bg3:       #dce8f3;
  --bd:        #bfdbfe;
  --bd2:       #93c5fd;
  --tx:        #0c1929;
  --tx2:       #1e3a5f;
  --tx3:       #5b8cb8;
  --blue:      #0284c7;
  --blue-d:    rgba(2,132,199,.1);
  --green:     #059669;
  --green-d:   rgba(5,150,105,.1);
  --amber:     #d97706;
  --amber-d:   rgba(217,119,6,.1);
  --red:       #dc2626;
  --red-d:     rgba(220,38,38,.1);
  --purple:    #7c3aed;
  --purple-d:  rgba(124,58,237,.1);
  --topbar:    #ffffff;
  --topbar-bd: #bfdbfe;
  --card:      #ffffff;
  --card-bd:   #bfdbfe;
  --inp:       #f0f4f8;
  --code-bg:   #dce8f3;
}

[data-theme="obsidian"] {
  --sb:        #13002b;
  --sb-bd:     #1f004a;
  --sb-tx:     #c084fc;
  --sb-txh:    #faf5ff;
  --sb-ac:     #a855f7;
  --sb-ac-bg:  rgba(168,85,247,.12);
  --bg:        #0d001f;
  --bg2:       #160036;
  --bg3:       #1f004a;
  --bd:        #2e0066;
  --bd2:       #4c0099;
  --tx:        #f3e8ff;
  --tx2:       #d8b4fe;
  --tx3:       #7c3aed;
  --blue:      #818cf8;
  --blue-d:    rgba(129,140,248,.12);
  --green:     #34d399;
  --green-d:   rgba(52,211,153,.12);
  --amber:     #fbbf24;
  --amber-d:   rgba(251,191,36,.12);
  --red:       #f87171;
  --red-d:     rgba(248,113,113,.12);
  --purple:    #c084fc;
  --purple-d:  rgba(192,132,252,.15);
  --topbar:    #160036;
  --topbar-bd: #2e0066;
  --card:      #160036;
  --card-bd:   #2e0066;
  --inp:       #0d001f;
  --code-bg:   #1f004a;
}

[data-theme="light"] {
  --sb:        #1e293b;
  --sb-bd:     #334155;
  --sb-tx:     #94a3b8;
  --sb-txh:    #f8fafc;
  --sb-ac:     #6366f1;
  --sb-ac-bg:  rgba(99,102,241,.12);
  --bg:        #f9fafb;
  --bg2:       #ffffff;
  --bg3:       #f3f4f6;
  --bd:        #e5e7eb;
  --bd2:       #d1d5db;
  --tx:        #111827;
  --tx2:       #374151;
  --tx3:       #9ca3af;
  --blue:      #4f46e5;
  --blue-d:    rgba(79,70,229,.1);
  --green:     #16a34a;
  --green-d:   rgba(22,163,74,.1);
  --amber:     #d97706;
  --amber-d:   rgba(217,119,6,.1);
  --red:       #dc2626;
  --red-d:     rgba(220,38,38,.1);
  --purple:    #7c3aed;
  --purple-d:  rgba(124,58,237,.1);
  --topbar:    #ffffff;
  --topbar-bd: #e5e7eb;
  --card:      #ffffff;
  --card-bd:   #e5e7eb;
  --inp:       #f9fafb;
  --code-bg:   #f3f4f6;
}

/* ── RESET ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%; font-family: 'Inter', system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.5;
  background: var(--bg); color: var(--tx);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* ── LOGIN ────────────────────────────────── */
/* ══ LOGIN — NEW DESIGN ═══════════════════════════════════════════════════════ */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

.lx-wrap {
  min-height: 100vh;
  display: flex;
  font-family: 'DM Sans', sans-serif;
}

/* ── LEFT PANEL ─────────────────────────────────── */
.lx-left {
  flex: 1.1;
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #0c1a3a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px;
}

/* Animated beams */
.lx-bg { position: absolute; inset: 0; pointer-events: none; }
.lx-beam {
  position: absolute;
  width: 1px;
  top: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(139,92,246,.6), transparent);
  animation: beamFloat 6s ease-in-out infinite;
}
.lx-beam1 { left: 25%; animation-delay: 0s; }
.lx-beam2 { left: 55%; animation-delay: 2s; opacity: .6; }
.lx-beam3 { left: 78%; animation-delay: 4s; opacity: .4; }

@keyframes beamFloat {
  0%, 100% { transform: scaleY(1); opacity: .3; }
  50% { transform: scaleY(1.3); opacity: .7; }
}

.lx-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: .4;
}

/* Signal bars */
.lx-bars {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 48px;
  opacity: .22;
}
.lx-bars span {
  flex: 1;
  background: linear-gradient(to top, #6366f1, #0ea5e9);
  border-radius: 2px 2px 0 0;
  animation: barPulse 2.5s ease-in-out infinite;
}
.lx-bars span:nth-child(1) { height: 30%; animation-delay: .0s; }
.lx-bars span:nth-child(2) { height: 55%; animation-delay: .1s; }
.lx-bars span:nth-child(3) { height: 80%; animation-delay: .2s; }
.lx-bars span:nth-child(4) { height: 45%; animation-delay: .3s; }
.lx-bars span:nth-child(5) { height: 70%; animation-delay: .4s; }
.lx-bars span:nth-child(6) { height: 35%; animation-delay: .5s; }
.lx-bars span:nth-child(7) { height: 90%; animation-delay: .6s; }
.lx-bars span:nth-child(8) { height: 60%; animation-delay: .7s; }
@keyframes barPulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.25); }
}

.lx-left-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Brand */
.lx-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: auto;
}
.lx-logo-wrap { display: flex; align-items: center; }
.lx-logo-fallback { display: inline-flex; align-items: center; }
.lx-product-name {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -.01em;
}
.lx-product-sub {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Headline */
.lx-headline { margin-bottom: 40px; }
.lx-hl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 20px;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { border-color: rgba(239,68,68,.3); }
  50% { border-color: rgba(239,68,68,.7); }
}
.lx-hl-title {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #ffffff;
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lx-hl-title span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lx-hl-title span:nth-child(1) { padding-left: 0px; }
.lx-hl-title span:nth-child(2) { padding-left: 24px; color: rgba(255,255,255,.75); }
.lx-hl-title span:nth-child(3) { padding-left: 48px; color: rgba(255,255,255,.55); }
.lx-hl-body {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  max-width: 380px;
  margin: 0;
}

/* Pills */
.lx-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.lx-pill {
  padding: 6px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lx-pill svg { opacity: .8; }
.lx-pill-accent {
  background: rgba(139,92,246,.25);
  border-color: rgba(139,92,246,.45);
  color: #c4b5fd;
}
.lx-pill-green {
  background: rgba(16,185,129,.15);
  border-color: rgba(16,185,129,.3);
  color: #6ee7b7;
}

/* Stats */
.lx-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.15);
}
.lx-stat-v {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}
.lx-stat-l {
  font-size: 10px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}
.lx-stat-div {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,.18);
}

/* ── RIGHT PANEL ────────────────────────────────── */
.lx-right {
  width: 480px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.lx-form-wrap { width: 100%; max-width: 360px; }

.lx-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.lx-form-header { margin-bottom: 32px; }
.lx-form-title {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -.02em;
}
.lx-form-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.lx-form { display: flex; flex-direction: column; gap: 20px; }

.lx-field { display: flex; flex-direction: column; gap: 6px; }
.lx-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  letter-spacing: .01em;
}
.lx-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lx-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}
.lx-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: #0f172a;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.lx-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.lx-input::placeholder { color: #cbd5e1; }
.lx-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
}
.lx-eye-btn:hover { color: #475569; }

.lx-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  color: #dc2626;
  font-size: 13px;
}

.lx-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  letter-spacing: .01em;
}
.lx-submit:hover { opacity: .9; transform: translateY(-1px); }
.lx-submit:active { transform: translateY(0); }

.lx-spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lx-form-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 12px;
  color: #94a3b8;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .lx-wrap { flex-direction: column; }
  .lx-left { display: none; }
  .lx-right { width: 100%; padding: 40px 24px; }
  .lx-mobile-brand { display: flex; }
}


/* ── APP SHELL ────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ──────────────────────────────── */
.sb {
  width: 220px; flex-shrink: 0;
  background: var(--sb); border-right: 1px solid var(--sb-bd);
  display: flex; flex-direction: column;
}

.sb-top { flex: 1; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
.sb-top::-webkit-scrollbar { display: none; }

.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; border-bottom: 1px solid var(--sb-bd); }
.sb-mark { width: 30px; height: 30px; background: var(--sb-ac); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-bname { font-size: 14px; font-weight: 700; color: var(--sb-txh); }
.sb-bsub { font-size: 10px; color: var(--sb-tx); font-family: 'JetBrains Mono', monospace; opacity: .7; }

.live-banner {
  margin: 10px 12px 2px;
  background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.25);
  border-radius: 6px; padding: 5px 10px;
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600;
  color: #4ade80; font-family: 'JetBrains Mono', monospace;
}
.lb-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: lp 1.3s ease-in-out infinite; flex-shrink: 0; }
@keyframes lp { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.5)}50%{box-shadow:0 0 0 5px rgba(34,197,94,0)} }

.sb-nav { padding: 8px 0; }
.sbn {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px; color: var(--sb-tx);
  font-size: 13px; transition: color .15s, background .15s;
  position: relative;
}
.sbn:hover { color: var(--sb-txh); background: rgba(255,255,255,.04); }
.sbn.active { color: var(--sb-ac); background: var(--sb-ac-bg); }
.sbn.active::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; background: var(--sb-ac); border-radius: 0 2px 2px 0; }
.si { width: 15px; height: 15px; flex-shrink: 0; opacity: .65; transition: opacity .15s; }
.sbn.active .si, .sbn:hover .si { opacity: 1; }
.sbn-count { margin-left: auto; background: var(--blue-d); color: var(--blue); font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; }
.sbn-live  { margin-left: auto; background: var(--green-d); color: var(--green); font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; }

.sb-foot { border-top: 1px solid var(--sb-bd); padding: 12px 14px; }
.theme-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tr-lbl { font-size: 10px; color: var(--sb-tx); opacity: .55; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.tr-sw { display: flex; gap: 6px; }
.tsw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; overflow: hidden; background: none; transition: transform .15s; }
.tsw span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.tsw:hover { transform: scale(1.15); }
.tsw.active { border-color: var(--sb-txh); }

.sb-user { display: flex; align-items: center; gap: 8px; }
.sb-av { width: 28px; height: 28px; background: rgba(255,255,255,.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--sb-ac); flex-shrink: 0; }
.sb-ui span { display: block; font-size: 12px; color: var(--sb-txh); font-weight: 600; }
.sb-ui span:last-child { font-size: 10px; color: var(--sb-tx); font-weight: 400; }
.sb-logout { margin-left: auto; background: none; border: none; color: var(--sb-tx); cursor: pointer; padding: 4px; border-radius: 4px; opacity: .6; transition: opacity .15s, color .15s; }
.sb-logout:hover { opacity: 1; color: var(--red); }

/* ── MAIN ─────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── TOPBAR ───────────────────────────────── */
.topbar {
  height: 52px; background: var(--topbar); border-bottom: 1px solid var(--topbar-bd);
  display: flex; align-items: center; padding: 0 24px; gap: 16px; flex-shrink: 0;
}
.tb-left { display: flex; align-items: baseline; gap: 10px; flex: 0 0 200px; }
.tb-title { font-size: 16px; font-weight: 700; color: var(--tx); letter-spacing: -.01em; }
.tb-sub   { font-size: 11px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }

.tb-stats { flex: 1; display: flex; align-items: center; justify-content: center; }
.tbs { display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.tbs-v { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 500; color: var(--tx); line-height: 1; }
.tbs-v.green { color: var(--green); }
.tbs-l { font-size: 9px; color: var(--tx3); text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.tbs-sep { width: 1px; height: 24px; background: var(--bd); }

.tb-actions { min-width: 200px; display: flex; justify-content: flex-end; gap: 8px; }

/* ── CONTENT ──────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 24px; scrollbar-width: thin; scrollbar-color: var(--bd2) transparent; }
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 4px; }

/* ── PAGES ────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }
.page-bar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.pg-sub { font-size: 12px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }

/* ── DASHBOARD ────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border: 1px solid var(--card-bd);
  border-radius: 10px; padding: 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.stat-card:hover { border-color: var(--bd2); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.sc-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-icon.blue   { background: var(--blue-d);   color: var(--blue); }
.sc-icon.green  { background: var(--green-d);  color: var(--green); }
.sc-icon.amber  { background: var(--amber-d);  color: var(--amber); }
.sc-icon.purple { background: var(--purple-d); color: var(--purple); }
.sc-val { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 600; color: var(--tx); line-height: 1; }
.sc-val.green { color: var(--green); }
.sc-lbl { font-size: 11px; color: var(--tx3); margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* ── PANELS ───────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--card-bd); border-radius: 10px; overflow: hidden; }
.panel-hd { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--bd); font-size: 13px; font-weight: 600; color: var(--tx2); }
.panel-link { background: none; border: none; color: var(--blue); font-size: 12px; font-family: inherit; cursor: pointer; }
.panel-link:hover { text-decoration: underline; }

.pipeline-panel { margin-top: 0; }
.pipeline { display: flex; align-items: center; padding: 20px; gap: 0; overflow-x: auto; }
.pipe-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 120px; padding: 12px; }
.ps-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--blue-d); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.ps-icon.amber  { background: var(--amber-d);  color: var(--amber); }
.ps-icon.purple { background: var(--purple-d); color: var(--purple); }
.ps-icon.green  { background: var(--green-d);  color: var(--green); }
.ps-label { font-size: 12px; font-weight: 600; color: var(--tx2); }
.ps-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.ps-tags span { background: var(--bg3); border: 1px solid var(--bd); border-radius: 4px; padding: 1px 7px; font-size: 10px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }
.ps-tag-key { background: var(--amber-d) !important; border-color: var(--amber) !important; color: var(--amber) !important; font-weight: 600 !important; }
.pipe-arrow { font-size: 20px; color: var(--tx3); padding: 0 8px; flex-shrink: 0; }

/* ── TABLES ───────────────────────────────── */
.table-wrap { background: var(--card); border: 1px solid var(--card-bd); border-radius: 10px; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 11px 16px; font-size: 11px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; background: var(--bg3); border-bottom: 1px solid var(--bd); font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--bd); color: var(--tx2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(0,0,0,.02); }
.tbl-empty { text-align: center; padding: 40px; color: var(--tx3); font-style: italic; }

/* channel name cell */
.ch-cell-name { font-weight: 600; color: var(--tx); font-size: 13px; }
.ch-cell-desc { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.ch-cell-url  { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--tx3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ── BADGES ───────────────────────────────── */
.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.badge.active, .badge.streaming { background: var(--green-d); color: var(--green); }
.badge.starting { background: var(--blue-d);   color: var(--blue); }
.badge.inactive { background: var(--bg3);      color: var(--tx3); }
.badge.failed   { background: var(--red-d);    color: var(--red); }

.drm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  white-space: nowrap;
}
.drm-badge.none    { background: var(--bg3);      color: var(--tx3); }
.drm-badge.aes128  { background: var(--green-d);  color: var(--green); }
.drm-badge.ezdrm   { background: var(--purple-d); color: var(--purple); }

.badge-proto {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .06em;
}
.badge-proto.rtmp { background: var(--red-d);    color: var(--red); }
.badge-proto.srt  { background: var(--purple-d); color: var(--purple); }
.badge-proto.udp  { background: var(--blue-d);   color: var(--blue); }
.badge-proto.hls  { background: var(--green-d);  color: var(--green); }
.badge-proto.file { background: var(--amber-d);  color: var(--amber); }
.badge-proto.yt   { background: var(--red-d);    color: var(--red); }
.badge-proto.other{ background: var(--bg3);      color: var(--tx3); }

/* ── ACTION BUTTONS ───────────────────────── */
.action-row { display: flex; align-items: center; gap: 4px; }
.abt {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px; border: 1px solid var(--bd2);
  background: var(--bg3); color: var(--tx2);
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.abt:hover              { background: var(--bg2); color: var(--tx); }
.abt.start:hover        { background: var(--green-d); border-color: var(--green); color: var(--green); }
.abt.stop:hover         { background: var(--red-d);   border-color: var(--red);   color: var(--red); }
.abt.preview:hover      { background: var(--blue-d);  border-color: var(--blue);  color: var(--blue); }
.abt.edit:hover         { background: var(--amber-d); border-color: var(--amber); color: var(--amber); }
.abt.del:hover          { background: var(--red-d);   border-color: var(--red);   color: var(--red); }
.abt.logs:hover         { background: var(--purple-d); border-color: var(--purple); color: var(--purple); }

/* ── DASHBOARD LISTS ──────────────────────── */
.dash-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--bd); font-size: 13px; }
.dash-row:last-child { border-bottom: none; }
.empty-row { padding: 24px 18px; font-size: 12px; color: var(--tx3); font-style: italic; }

/* ── DRM PAGE ─────────────────────────────── */
.drm-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.drm-card { background: var(--card); border: 1px solid var(--card-bd); border-radius: 10px; overflow: hidden; }
.dc-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--bd); }
.dc-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dc-icon.green  { background: var(--green-d);  color: var(--green); }
.dc-icon.purple { background: var(--purple-d); color: var(--purple); }
.dc-title { font-size: 13px; font-weight: 600; color: var(--tx); }
.dc-sub   { font-size: 11px; color: var(--tx3); }
.dc-status { margin-left: auto; font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace; color: var(--tx3); white-space: nowrap; padding: 3px 9px; border-radius: 20px; background: var(--bg3); }
.dc-status.green  { background: var(--green-d);  color: var(--green); }
.dc-status.purple { background: var(--purple-d); color: var(--purple); }
.dc-body { padding: 16px 18px; }
.dc-body p { font-size: 12px; color: var(--tx2); line-height: 1.65; margin-bottom: 14px; }
.dc-body code { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: var(--bg3); padding: 1px 5px; border-radius: 3px; color: var(--blue); }
.dc-feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dc-feature { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--tx2); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot.green  { background: var(--green); }
.dot.purple { background: var(--purple); }

.ezdrm-form { padding: 18px; }
.ef-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.ef-group { display: flex; flex-direction: column; gap: 5px; }
.ef-group label { font-size: 11px; font-weight: 500; color: var(--tx2); }
.ef-group input { background: var(--inp); border: 1px solid var(--bd2); border-radius: 7px; padding: 8px 11px; color: var(--tx); font-family: inherit; font-size: 13px; outline: none; transition: border-color .15s; }
.ef-group input:focus { border-color: var(--blue); }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--bd2); border-radius: 22px; transition: .2s; }
.toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s; }
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Keys list */
#keysList table { width: 100%; border-collapse: collapse; }
#keysList th { text-align: left; padding: 9px 18px; font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--bd); background: var(--bg3); font-family: 'JetBrains Mono', monospace; }
#keysList td { padding: 10px 18px; border-bottom: 1px solid var(--bd); font-size: 12px; color: var(--tx2); font-family: 'JetBrains Mono', monospace; }

/* ── SETTINGS ─────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-kv { padding: 4px 0; }
.skv { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--bd); font-size: 12px; color: var(--tx2); gap: 16px; }
.skv:last-child { border-bottom: none; }
.skv span:first-child { color: var(--tx2); white-space: nowrap; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--tx3); text-align: right; }
.tx3 { color: var(--tx3) !important; }

.code-block {
  background: var(--code-bg); border: none; padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--blue); line-height: 1.8; overflow-x: auto;
  white-space: pre; margin: 0;
}

/* ── BUTTONS ──────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue); color: #fff; border: none;
  border-radius: 7px; padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity .15s; white-space: nowrap;
}
.btn-primary:hover { opacity: .88; }
.btn-primary.sm { padding: 6px 12px; font-size: 12px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; color: var(--tx2);
  border: 1px solid var(--bd2); border-radius: 7px; padding: 8px 14px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--bd); color: var(--tx); }
.btn-ghost.sm { padding: 5px 10px; font-size: 12px; }

.btn-danger { background: var(--red); color: #fff; border: none; border-radius: 7px; padding: 8px 16px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.btn-danger:hover { opacity: .85; }

.btn-copy { background: var(--bg3); border: 1px solid var(--bd2); border-radius: 6px; padding: 5px 10px; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--tx2); cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-copy:hover { color: var(--blue); border-color: var(--blue); }

/* ── MODALS ───────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--card-bd); border-radius: 12px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); scrollbar-width: thin; }
.modal.modal-lg { max-width: 680px; }
.modal.modal-sm { max-width: 400px; }
.modal-hd { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--bd); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--tx); }
.modal-sub   { font-size: 11px; color: var(--tx3); margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.mclose { background: none; border: none; color: var(--tx3); font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: 5px; line-height: 1; transition: color .15s; }
.mclose:hover { color: var(--tx); }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 13px; }
.modal-ft { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--bd); position: sticky; bottom: 0; background: var(--card); }
.mf { display: flex; flex-direction: column; gap: 5px; }
.mf label { font-size: 11px; font-weight: 500; color: var(--tx2); }
.mf input, .mf select { background: var(--inp); border: 1px solid var(--bd2); border-radius: 7px; padding: 9px 12px; color: var(--tx); font-family: inherit; font-size: 13px; outline: none; transition: border-color .15s; }
.mf input:focus, .mf select:focus { border-color: var(--blue); }
.mf-hint { font-size: 11px; color: var(--tx3); margin-top: 3px; }
.mf .req { color: var(--red); }
.mf .opt { color: var(--tx3); font-size: 10px; }

/* ── WIZARD ───────────────────────────────── */
.wizard-steps { display: flex; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--bd); }
.ws { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--tx3); font-weight: 500; }
.ws.on   { color: var(--blue); }
.ws.done { color: var(--green); }
.wsn { width: 22px; height: 22px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--bd2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--tx3); font-family: 'JetBrains Mono', monospace; transition: all .2s; }
.ws.on .wsn   { background: var(--blue);  border-color: var(--blue);  color: #fff; }
.ws.done .wsn { background: var(--green); border-color: var(--green); color: #fff; }
.wsl { flex: 1; height: 1px; background: var(--bd); margin: 0 8px; transition: background .3s; }
.wsl.done { background: var(--green); }

/* ── PROTOCOL GRID ────────────────────────── */
.proto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.proto-tile { background: var(--bg3); border: 1.5px solid var(--bd); border-radius: 9px; padding: 14px 10px; cursor: pointer; text-align: center; transition: all .15s; }
.proto-tile:hover { border-color: var(--bd2); background: var(--bg2); }
.proto-tile.sel   { border-color: var(--blue); background: var(--blue-d); }
.pt-badge { display: inline-block; font-size: 9px; font-weight: 700; font-family: 'JetBrains Mono', monospace; padding: 2px 7px; border-radius: 4px; letter-spacing: .06em; margin-bottom: 7px; }
.pt-badge.rtmp { background: var(--red-d);    color: var(--red); }
.pt-badge.srt  { background: var(--purple-d); color: var(--purple); }
.pt-badge.udp  { background: var(--blue-d);   color: var(--blue); }
.pt-badge.hls  { background: var(--green-d);  color: var(--green); }
.pt-badge.file { background: var(--amber-d);  color: var(--amber); }
.pt-badge.yt   { background: var(--red-d);    color: var(--red); }
.pt-name { font-size: 12px; font-weight: 600; color: var(--tx); margin-bottom: 3px; }
.pt-desc { font-size: 10px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }

/* URL preview */
.url-preview-bar { display: flex; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--bd); border-radius: 7px; padding: 9px 12px; }
.upb-lbl { font-size: 9px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .1em; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.upb-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--blue); word-break: break-all; }

.nc-fields { display: flex; flex-direction: column; gap: 10px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tip-block { background: var(--amber-d); border-left: 3px solid var(--amber); border-radius: 0 7px 7px 0; padding: 9px 13px; font-size: 11px; color: var(--tx2); font-family: 'JetBrains Mono', monospace; line-height: 1.65; display: none; }
.tip-block.show { display: block; }

/* DRM options */
.step3-hint { font-size: 12px; color: var(--tx2); margin-bottom: 14px; }
.drm-option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.drm-opt { background: var(--bg3); border: 1.5px solid var(--bd); border-radius: 9px; padding: 16px; cursor: pointer; position: relative; opacity: .6; transition: all .15s; }
.drm-opt:hover { opacity: .85; }
.drm-opt.sel   { border-color: var(--blue); background: var(--blue-d); opacity: 1; }
.do-chk { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.drm-opt.sel .do-chk { opacity: 1; }
.do-title { font-size: 13px; font-weight: 600; color: var(--tx); margin-bottom: 6px; }
.do-desc  { font-size: 11px; color: var(--tx2); line-height: 1.55; }
.nc-summary { background: var(--bg3); border: 1px solid var(--bd); border-radius: 8px; padding: 13px 14px; font-size: 12px; color: var(--tx2); font-family: 'JetBrains Mono', monospace; line-height: 1.8; }

/* ── PLAYER ───────────────────────────────── */
.ph-left { display: flex; align-items: center; gap: 12px; }
.fmt-tabs { display: flex; gap: 4px; }
.fmt-tab { background: var(--bg3); border: 1px solid var(--bd2); border-radius: 5px; padding: 4px 12px; font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace; color: var(--tx2); cursor: pointer; transition: all .15s; }
.fmt-tab:hover { color: var(--tx); border-color: var(--bd); }
.fmt-tab.active { background: var(--green-d); border-color: var(--green); color: var(--green); }
.player-area { background: #000; position: relative; }
.player-area video { width: 100%; max-height: 400px; display: block; }
.p-spinner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.85); gap: 10px; color: rgba(255,255,255,.5); font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.p-error { padding: 16px 20px; background: var(--red-d); color: var(--red); font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.player-urls { padding: 12px 18px; display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--bd); }
.pu { display: flex; align-items: center; gap: 8px; }
.pu-badge { font-size: 9px; font-weight: 700; font-family: 'JetBrains Mono', monospace; padding: 2px 7px; border-radius: 4px; letter-spacing: .06em; flex-shrink: 0; }
.pu-badge.hls  { background: var(--green-d); color: var(--green); }
.pu-badge.dash { background: var(--purple-d); color: var(--purple); }
.pu-inp { flex: 1; background: var(--bg3); border: 1px solid var(--bd2); border-radius: 6px; padding: 6px 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--tx2); outline: none; }

/* ── LOGS ─────────────────────────────────── */
.logs-bar { padding: 8px 22px; border-bottom: 1px solid var(--bd); font-size: 11px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }

/* ── CONFIRM ──────────────────────────────── */
.cf-text { font-size: 14px; color: var(--tx); line-height: 1.6; }

/* ── SPINNER ──────────────────────────────── */
.spin-ring { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.15); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spin-sm { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--bd2); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOASTS ───────────────────────────────── */
.toast-zone { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--card-bd); border-radius: 9px; padding: 11px 15px; font-size: 13px; color: var(--tx); box-shadow: 0 4px 20px rgba(0,0,0,.12); min-width: 200px; max-width: 320px; pointer-events: all; animation: tin .18s ease; }
.toast::before { content: ''; width: 3px; height: 22px; border-radius: 2px; flex-shrink: 0; }
.toast.ok::before    { background: var(--green); }
.toast.error::before { background: var(--red); }
.toast.info::before  { background: var(--blue); }
.toast.warn::before  { background: var(--amber); }
@keyframes tin { from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none} }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
  .sb { width: 54px; }
  .sb-bname,.sb-bsub,.sbn span,.sb-ui,.theme-row,.live-banner { display: none; }
  .sbn { justify-content: center; padding: 10px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .dash-grid,.drm-cards,.settings-grid { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { width: 100%; }
}

/* ── SYSTEM RESOURCES ─────────────────────── */
.sys-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; }
.sys-card { padding: 16px 20px; border-right: 1px solid var(--bd); }
.sys-card:last-child { border-right: none; }
.sys-label { font-size: 11px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; font-family: "JetBrains Mono",monospace; margin-bottom: 8px; }
.sys-val { font-family: "JetBrains Mono",monospace; font-size: 28px; font-weight: 600; color: var(--tx); line-height: 1; margin-bottom: 10px; }
.sys-val.green { color: var(--green); }
.sys-bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.sys-bar-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .5s ease; }
.sys-bar-fill.green { background: var(--green); }
.sys-sub { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono",monospace; margin-bottom: 3px; }

/* ── RUNTIME STATS TABLE ──────────────────── */
.stats-table-wrap { overflow: hidden; }
.stats-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-tbl thead th { 
    text-align: left; padding: 10px 18px; 
    font-size: 10px; font-weight: 600; color: var(--tx3); 
    text-transform: uppercase; letter-spacing: .08em; 
    background: var(--bg3); border-bottom: 1px solid var(--bd);
    font-family: "JetBrains Mono", monospace;
}
.stats-tbl tbody tr { border-bottom: 1px solid var(--bd); transition: background .15s; }
.stats-tbl tbody tr:last-child { border-bottom: none; }
.stats-tbl tbody tr:hover { background: rgba(0,0,0,.02); }
.st-label  { padding: 13px 18px; font-weight: 600; color: var(--tx); white-space: nowrap; width: 130px; }
.st-val    { padding: 13px 18px; font-family: "JetBrains Mono", monospace; font-size: 18px; font-weight: 600; color: var(--tx); width: 100px; }
.st-val.green { color: var(--green); }
.st-detail { padding: 13px 18px; font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono", monospace; }
.st-bar-cell { padding: 13px 18px; width: 180px; }
.st-bar { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.st-bar-fill { height: 100%; width: 0%; border-radius: 4px; transition: width .6s ease, background .3s; }
.st-bar-fill       { background: var(--blue); }
.st-bar-fill.green  { background: var(--green); }
.st-bar-fill.amber  { background: var(--amber); }
.st-bar-fill.purple { background: var(--purple); }

/* ── BRIGHT STAT CARDS ────────────────────── */
.stat-card.bright-blue   { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: #2563eb; cursor: pointer; }
.stat-card.bright-green  { background: linear-gradient(135deg, #16a34a, #22c55e); border-color: #16a34a; cursor: pointer; }
.stat-card.bright-amber  { background: linear-gradient(135deg, #d97706, #f59e0b); border-color: #d97706; cursor: pointer; }
.stat-card.bright-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); border-color: #7c3aed; }
.stat-card.bright-blue:hover, .stat-card.bright-green:hover,
.stat-card.bright-amber:hover, .stat-card.bright-purple:hover { opacity: .92; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.sc-icon-bright { width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-val-bright  { font-family: "JetBrains Mono", monospace; font-size: 24px; font-weight: 700; color: #fff; line-height: 1; }
.sc-lbl-bright  { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 3px; font-weight: 500; }

/* ── DIAGNOSTICS ──────────────────────────── */
.diag-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.diag-list { padding: 8px 0; min-height: 60px; }
.diag-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 18px; border-bottom: 1px solid var(--bd);
    font-size: 12px;
}
.diag-row:last-child { border-bottom: none; }
.diag-filename { font-family: "JetBrains Mono", monospace; color: var(--tx2); }
.diag-date { font-size: 10px; color: var(--tx3); font-family: "JetBrains Mono", monospace; }
.diag-empty { padding: 20px 18px; font-size: 12px; color: var(--tx3); font-style: italic; }
@media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; } }

/* ── DIAGNOSTICS DATE FILTER ──────────────── */
.diag-date-input {
    background: var(--inp); border: 1px solid var(--bd2);
    border-radius: 7px; padding: 6px 10px;
    color: var(--tx); font-family: inherit; font-size: 12px;
    outline: none; transition: border-color .15s;
}
.diag-date-input:focus { border-color: var(--blue); }

/* ── BACKUP & RESTORE ─────────────────────── */
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.bk-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px; border-right: 1px solid var(--bd);
}
.bk-card:last-child { border-right: none; }
.bk-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bk-icon.blue   { background: rgba(59,130,246,.12); color: var(--blue); }
.bk-icon.green  { background: rgba(34,197,94,.12);  color: var(--green); }
.bk-title  { font-weight: 600; color: var(--tx); margin-bottom: 4px; }
.bk-desc   { font-size: 12px; color: var(--tx3); margin-bottom: 6px; line-height: 1.5; }
.bk-meta   { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono", monospace; }
.bk-card > div:nth-child(2) { flex: 1; }

/* ── SELECT INPUT ─────────────────────────── */
.ef-select {
    background: var(--inp); border: 1px solid var(--bd2);
    border-radius: 7px; padding: 8px 12px;
    color: var(--tx); font-family: inherit; font-size: 13px;
    outline: none; transition: border-color .15s; width: 100%;
    cursor: pointer;
}
.ef-select:focus { border-color: var(--blue); }

/* ── BENCHMARK PAGE ───────────────────────── */
.bmark-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.bmark-card {
    background: var(--bg3);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 16px 20px;
}
.bmark-card.green { border-color: var(--green); background: rgba(34,197,94,.05); }
.bmark-label { font-size: 11px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; font-family: "JetBrains Mono",monospace; margin-bottom: 8px; }
.bmark-val { font-family: "JetBrains Mono",monospace; font-size: 22px; font-weight: 600; color: var(--tx); margin-bottom: 6px; }
.bmark-val.big { font-size: 36px; color: var(--green); }
.bmark-sub { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono",monospace; }
.bmark-bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin-top: 8px; border: 1px solid var(--bd); }
.bmark-bar-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .5s ease; }
.bmark-bar-fill.green { background: var(--green); }

/* Capacity Planner Results */
.cp-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.cp-result-card {
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--bd);
}
.cp-result-card.blue   { background: rgba(59,130,246,.06);  border-color: rgba(59,130,246,.2); }
.cp-result-card.green  { background: rgba(34,197,94,.06);   border-color: rgba(34,197,94,.2); }
.cp-result-card.amber  { background: rgba(245,158,11,.06);  border-color: rgba(245,158,11,.2); }
.cp-result-card.purple { background: rgba(168,85,247,.06);  border-color: rgba(168,85,247,.2); }
.cp-result-label { font-size: 11px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; font-family: "JetBrains Mono",monospace; margin-bottom: 10px; }
.cp-result-val { font-family: "JetBrains Mono",monospace; font-size: 32px; font-weight: 700; color: var(--tx); line-height: 1; margin-bottom: 8px; }
.cp-result-sub { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono",monospace; line-height: 1.5; }
.cp-result-card.blue   .cp-result-val { color: var(--blue); }
.cp-result-card.green  .cp-result-val { color: var(--green); }
.cp-result-card.amber  .cp-result-val { color: var(--amber); }
.cp-result-card.purple .cp-result-val { color: #a855f7; }

/* ── BENCHMARK ────────────────────────────── */
.bk-hw-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border-top: 1px solid var(--bd);
}
.bk-hw-card {
    padding: 20px 20px;
    border-right: 1px solid var(--bd);
    text-align: center;
}
.bk-hw-card:last-child { border-right: none; }
.bk-hw-label { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono", monospace; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; }
.bk-hw-val { font-family: "JetBrains Mono", monospace; font-size: 22px; font-weight: 600; color: var(--tx); }
.bk-hw-val.green { color: var(--green); }

.bk-capacity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.bk-cap-card {
    padding: 28px 24px;
    border-right: 1px solid var(--bd);
    border-top: 1px solid var(--bd);
}
.bk-cap-card:nth-child(3n) { border-right: none; }
.bk-cap-label { font-size: 12px; color: var(--tx3); font-weight: 600; margin-bottom: 4px; }
.bk-cap-val { font-family: "JetBrains Mono", monospace; font-size: 32px; font-weight: 700; color: var(--tx); line-height: 1; margin-bottom: 6px; }
.bk-cap-val.green { color: var(--green); }
.bk-cap-val.amber { color: var(--amber); }
.bk-cap-val.red   { color: var(--red); }
.bk-cap-sub { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono", monospace; }
.bk-progress { height: 4px; background: var(--bg3); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.bk-progress-fill { height: 100%; border-radius: 2px; transition: width .8s ease; }

/* ── TLS MODE CARDS ───────────────────────── */
.tls-mode-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 20px; border: 1.5px solid var(--bd2);
    border-radius: 10px; cursor: pointer;
    transition: all .2s; min-width: 120px;
    text-align: center;
}
.tls-mode-card:hover { border-color: var(--blue); }
.tls-mode-card.active { border-color: var(--blue); background: rgba(59,130,246,.06); }
.tls-mode-icon { font-size: 24px; margin-bottom: 8px; }
.tls-mode-title { font-weight: 600; font-size: 13px; color: var(--tx); margin-bottom: 3px; }
.tls-mode-desc { font-size: 11px; color: var(--tx3); font-family: "JetBrains Mono", monospace; }

/* ── SETTINGS TABS ────────────────────────── */
.stab-bar {
    display: flex; gap: 4px;
    border-bottom: 2px solid var(--bd);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.stab {
    background: none; border: none; cursor: pointer;
    padding: 10px 18px; font-size: 13px; font-weight: 500;
    color: var(--tx3); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: color .15s, border-color .15s;
    font-family: inherit; border-radius: 6px 6px 0 0;
}
.stab:hover { color: var(--tx); }
.stab.active { color: var(--blue); border-bottom-color: var(--blue); }
.stab-content { display: none; }
.stab-content.active { display: block; }
