/* ╔══════════════════════════════════════════════════════════════╗
   ║  ACUBULL DASHBOARD  ·  Design System v2.0            ║
   ║  Bloomberg-grade professional dark financial terminal        ║
   ║  Brand colors: #00C853 (bullish) · #FF4D4F (bearish)        ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ─────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
───────────────────────────────────────────────────────────────── */
:root {
  /* Brand — 2 colors max */
  --brand:        #00C853;
  --brand-dim:    rgba(0, 200, 83, 0.10);
  --brand-glow:   rgba(0, 200, 83, 0.20);
  --brand-dark:   #00A043;
  --bearish:      #FF4D4F;
  --bearish-dim:  rgba(255, 77, 79, 0.10);
  --bearish-glow: rgba(255, 77, 79, 0.20);
  --target:       #FCA311;
  --target-dim:   rgba(252, 163, 17, 0.10);
  --target-glow:  rgba(252, 163, 17, 0.20);

  /* Backgrounds — 4-level depth */
  --bg-0: #070A0F;   /* Body canvas */
  --bg-1: #0D1117;   /* Sidebar, cards, modals */
  --bg-2: #141920;   /* Inputs, elevated rows */
  --bg-3: #1B2230;   /* Hover states */

  /* Borders */
  --line:        #1C2333;
  --line-bright: #2A3748;

  /* Text */
  --tx-1: #E6EDF3;   /* Primary */
  --tx-2: #8B949E;   /* Secondary */
  --tx-3: #3D4956;   /* Muted / placeholders */

  /* Typography */
  --f-ui:   'Space Grotesk', sans-serif;
  --f-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing — 8-pt grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;

  /* Radius */
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   10px;
  --r-xl:   16px;
  --r-pill: 999px;

  /* Motion */
  --ease-1: 80ms ease;
  --ease-2: 160ms ease;
  --ease-3: 240ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout dimensions */
  --sidebar-w:   228px;
  --rsidebar-w:  280px;
  --topbar-h:    44px;
  --ticker-h:    48px;   /* Row 1: ticker-bar = sidebar-brand = right-sidebar-header */
  --tabnav-h:    56px;   /* Row 2: top-tab-nav = user-profile */

  /* Z-index scale */
  --z-sidebar:  100;
  --z-topbar:   200;
  --z-backdrop: 300;
  --z-modal:    400;


  /* Aliases for legacy JS-referenced CSS vars */
  --bullish:       var(--brand);
  --bullish-dim:   var(--brand-dim);
  --bullish-glow:  var(--brand-glow);
  --text-primary:  var(--tx-1);
  --text-secondary:var(--tx-2);
  --text-muted:    var(--tx-3);
  --bg-primary:    var(--bg-0);
  --bg-surface:    var(--bg-1);
  --bg-elevated:   var(--bg-2);
  --border:        var(--line);
  --border-bright: var(--line-bright);
  --neutral-blue:  #3B82F6;
  --neutral-yellow:#F59E0B;
  --neutral-purple:#8B5CF6;
  --neutral-cyan:  #06B6D4;
  --font-ui:       var(--f-ui);
  --font-mono:     var(--f-mono);
  --space-xs:  var(--s-1);
  --space-sm:  var(--s-2);
  --space-md:  var(--s-4);
  --space-lg:  var(--s-5);
  --space-xl:  var(--s-6);
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --shadow-glow-green: 0 4px 16px var(--brand-glow);
  --shadow-glow-red:   0 4px 16px var(--bearish-glow);
  --tr-fast: var(--ease-1);
  --tr-base: var(--ease-2);
  --tr-slow: var(--ease-3);
}

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

html { height: 100%; font-size: 13px; scroll-behavior: smooth; }

body {
  font-family: var(--f-ui);
  background: var(--bg-0);
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--tx-1);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 600; }
a { color: var(--brand); text-decoration: none; transition: opacity var(--ease-1); }
a:hover { opacity: 0.78; }
button { cursor: pointer; font-family: var(--f-ui); border: none; outline: none; background: none; }
button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
input, select, textarea { font-family: var(--f-ui); color: var(--tx-1); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
canvas { display: block; }
[hidden], .hidden { display: none !important; }

body:not(.admin-mode) .admin-only { display: none !important; }

/* Utilities */
.mono     { font-family: var(--f-mono); }
.bullish  { color: var(--brand); }
.bearish  { color: var(--bearish); }
.muted    { color: var(--tx-2); }
.text-right  { text-align: right; }
.text-center { text-align: center; }

/* ─────────────────────────────────────────────────────────────────
   3. SCROLLBAR
───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: var(--r-pill); transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); box-shadow: 0 0 6px var(--brand-glow); }

/* ─────────────────────────────────────────────────────────────────
   4. TERMINAL SHELL LAYOUT
───────────────────────────────────────────────────────────────── */
.terminal-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-0);
}

/* ─────────────────────────────────────────────────────────────────
   5. SIDEBAR (shared)
───────────────────────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--ease-3);
  z-index: var(--z-sidebar);
}

.sidebar--left {
  width: var(--sidebar-w);
  border-right: 1px solid var(--line);
}

.sidebar--right {
  width: var(--rsidebar-w);
  border-left: 1px solid var(--line);
  order: 3;
  position: relative;
  min-width: 220px;
  max-width: 480px;
}

/* ── Resize drag handle ── */
.sidebar-resize-handle {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 10;
  transition: background var(--ease-2);
}
.sidebar-resize-handle:hover,
.sidebar-resize-handle--dragging {
  background: linear-gradient(180deg, var(--brand-glow), var(--target-glow), var(--brand-glow));
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────────────
   6. LEFT SIDEBAR
───────────────────────────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  height: var(--ticker-h);   /* ← lines up with ticker-bar */
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  color: var(--tx-2);
  font-size: 1rem;
  padding: var(--s-1);
  border-radius: var(--r-sm);
  transition: color var(--ease-1), background var(--ease-1);
  line-height: 1;
}
.sidebar-close-btn:hover { color: var(--tx-1); background: var(--bg-3); }

/* User profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  height: var(--tabnav-h);   /* ← lines up with top-tab-nav */
}

.user-avatar {
  width: 32px; height: 32px;
  background: var(--brand-dim);
  border: 1px solid var(--brand-glow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem;
  color: var(--brand);
  flex-shrink: 0;
  font-family: var(--f-mono);
  letter-spacing: 0;
}

.user-info {
  display: flex; flex-direction: column;
  line-height: 1.3; flex: 1; min-width: 0;
}

.user-name {
  font-weight: 600; font-size: 0.82rem; color: var(--tx-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.user-id {
  font-size: 0.68rem; color: var(--tx-3);
  font-family: var(--f-mono); letter-spacing: 0.02em;
}

/* Navigation */
.sidebar-nav { flex: 1; padding: 8px 0 16px; overflow-y: auto; }

.section-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--tx-3);
  text-transform: uppercase;
  padding: 0 16px;
  margin: 20px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sidebar-nav ul {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  color: var(--tx-2);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  position: relative;
  transition: all 0.18s ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: linear-gradient(90deg, rgba(0,200,83,0.06) 0%, transparent 70%);
}

.nav-item:hover {
  background: var(--bg-3);
  color: var(--tx-1);
}

.nav-item.active {
  background: rgba(0, 200, 83, 0.08);
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand), 0 0 20px rgba(0,200,83,0.05);
}
.nav-item.active::before { opacity: 1; }

.nav-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--tx-3);
  transition: all 0.18s ease;
}
.nav-item:hover .nav-icon {
  background: var(--bg-3);
  border-color: var(--line-bright);
  color: var(--tx-1);
}
.nav-item.active .nav-icon {
  background: rgba(0,200,83,0.12);
  border-color: rgba(0,200,83,0.25);
  color: var(--brand);
  box-shadow: 0 0 10px rgba(0,200,83,0.15);
}

.nav-label { flex: 1; }
.nav-arrow  { display: none; }

/* Plan badge - Professional UI Upgrade */
.plan-badge {
  margin: var(--s-3);
  padding: var(--s-4);
  background: linear-gradient(180deg, rgba(30, 35, 45, 0.4) 0%, rgba(15, 18, 25, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-lg);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.plan-badge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 83, 0.4), transparent);
}

.plan-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}

.plan-info { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; }

.plan-icon { 
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; 
  color: var(--brand); 
  background: rgba(0,200,83,0.1); 
  border-radius: var(--r-sm); 
  box-shadow: inset 0 0 0 1px rgba(0,200,83,0.2);
}

.plan-name { font-weight: 700; font-size: 0.75rem; color: var(--tx-1); text-transform: uppercase; letter-spacing: 0.06em; }

.plan-meta-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--s-2); }
.plan-expiry { font-size: 0.65rem; color: var(--tx-3); margin: 0; }
.plan-days { font-size: 0.72rem; color: var(--brand); font-weight: 600; margin: 0; }

.plan-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.plan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #00ff6a);
  border-radius: var(--r-pill);
  box-shadow: 0 0 8px rgba(0, 200, 83, 0.6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logout */
.logout-btn {
  display: flex; align-items: center; gap: var(--s-2); justify-content: space-between;
  background: transparent;
  color: var(--tx-2);
  font-size: 0.78rem;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  width: 100%;
  transition: color var(--ease-1), background var(--ease-1);
  flex-shrink: 0;
  margin-top: auto;
}
.logout-btn:hover { color: var(--bearish); background: var(--bearish-dim); }

/* ─────────────────────────────────────────────────────────────────
   7. MAIN WORKSPACE
───────────────────────────────────────────────────────────────── */
.main-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-0);
  order: 2;
  min-width: 0;
}

/* ─────────────────────────────────────────────────────────────────
   8. MOBILE TOPBAR
───────────────────────────────────────────────────────────────── */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-4);
  z-index: var(--z-topbar);
}

.mobile-brand {
  display: flex; align-items: center; gap: var(--s-2); justify-content: space-between;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em;
}

.brand-name-sm { color: var(--brand); }

.icon-btn {
  background: transparent;
  color: var(--tx-2);
  font-size: 1rem;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--ease-1), background var(--ease-1);
}
.icon-btn:hover { color: var(--tx-1); background: var(--bg-3); }

/* ─────────────────────────────────────────────────────────────────
   9. TICKER BAR
───────────────────────────────────────────────────────────────── */
.ticker-bar {
  display: flex;
  align-items: center;
  height: var(--ticker-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.ticker-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 var(--s-3);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--f-mono);
  border-right: 1px solid var(--line);
  height: 100%;
  display: flex; align-items: center;
}

.ticker-label.bullish { color: var(--brand); }
.ticker-label.bearish { color: var(--bearish); }

.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex; align-items: center;
  border-right: 1px solid var(--line);
}

.ticker-track {
  display: flex;
  gap: var(--s-2);
  animation: ticker-scroll 28s linear infinite;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  padding: 0 var(--s-4);
  flex-shrink: 0;
}

.ticker-track--losers { animation-direction: reverse; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item { display: inline-flex; align-items: center; gap: var(--s-1); }
.ticker-sym { color: var(--tx-2); font-weight: 600; }
.ticker-pct { font-weight: 500; }
.ticker-pct.bullish { color: var(--brand); }
.ticker-pct.bearish { color: var(--bearish); }

/* ─────────────────────────────────────────────────────────────────
   10. TOP CONTROL NAV (Trading Parameter Strip)
───────────────────────────────────────────────────────────────── */
.top-tab-nav {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  height: var(--tabnav-h);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.tab-nav-scroll {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 var(--s-5);
  gap: var(--s-3);
  scrollbar-width: none;
}
.tab-nav-scroll::-webkit-scrollbar { display: none; }

/* Left title/badge */
.top-nav-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: var(--s-3);
  border-right: 1px solid var(--line);
  height: 24px;
  flex-shrink: 0;
}
.top-nav-heading-icon {
  color: var(--brand);
  display: flex;
  align-items: center;
}
.top-nav-heading-text {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-2);
  font-family: var(--f-mono);
}

/* Unified parameter item capsules */
.top-control-item {
  display: inline-flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line-bright);
  border-radius: var(--r-md);
  height: 32px;
  padding: 0 4px 0 10px;
  gap: 6px;
  flex-shrink: 0;
  transition: border-color var(--ease-1), box-shadow var(--ease-1), background var(--ease-1);
}
.top-control-item:hover {
  border-color: var(--tx-3);
  background: var(--bg-3);
}
.top-control-item:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-dim);
  background: var(--bg-2);
}

.top-control-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  white-space: nowrap;
  user-select: none;
}

.top-control-currency {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
  font-family: var(--f-mono);
  user-select: none;
  margin-right: -2px;
}

.top-control-select,
.top-control-input {
  background: transparent;
  border: none;
  color: var(--tx-1);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 6px;
  height: 100%;
  outline: none;
  border-radius: 0;
}

.top-control-select {
  font-family: var(--f-ui);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%238B949E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.top-control-select option {
  background: var(--bg-1);
  color: var(--tx-1);
}

.top-control-input {
  font-family: var(--f-mono);
}
.top-control-input--capital {
  width: 82px;
}
.top-control-input--trades {
  width: 38px;
  text-align: center;
  padding: 0 2px;
}
.top-control-input::-webkit-outer-spin-button,
.top-control-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.top-control-input[type=number] {
  -moz-appearance: textfield;
}

/* Allocation summary display */
.top-nav-summary {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-3);
  background: var(--brand-dim);
  border: 1px solid var(--brand-glow);
  border-radius: var(--r-md);
  height: 32px;
  flex-shrink: 0;
}
.top-summary-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx-2);
  white-space: nowrap;
}
.top-summary-val {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Dashboard Period Filter Buttons */
.dash-filter-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-filter-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-bright);
  background: var(--bg-2);
  color: var(--tx-3);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--f-sans);
  cursor: pointer;
  transition: all var(--ease-1);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.dash-filter-btn:hover {
  background: var(--bg-3);
  color: var(--tx-1);
  border-color: var(--tx-3);
}
.dash-filter-btn.active {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
}

/* Download button */
.dash-dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-bright);
  background: var(--bg-2);
  color: var(--tx-3);
  cursor: pointer;
  transition: all var(--ease-1);
  flex-shrink: 0;
}
.dash-dl-btn:hover {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
}
.dash-dl-btn:active {
  transform: scale(0.92);
}


/* ─────────────────────────────────────────────────────────────────
   11. MODULE VIEWPORT & PAGES
───────────────────────────────────────────────────────────────── */
.module-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  flex-direction: column;
  gap: var(--s-5);
  animation: pg-enter 0.22s ease both;
}
.page.active-page { display: flex; }

@keyframes pg-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
}

.page-title { font-size: 1.15rem; font-weight: 700; color: var(--tx-1);  }
.page-subtitle { font-size: 0.75rem; color: var(--tx-2); margin-top: 2px; }
.page-header-actions { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; flex-wrap: wrap; }

/* ─────────────────────────────────────────────────────────────────
   12. BUTTONS
───────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--brand); color: #000;
  font-weight: 700; font-size: 0.8rem;
  padding: 8px var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--brand);
  transition: all 0.18s ease;
  white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.btn-primary:hover { box-shadow: 0 0 18px var(--brand-glow), 0 2px 8px rgba(0,0,0,0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.btn-full { width: 100%; justify-content: center; }
.btn-primary.btn-sm { font-size: 0.7rem; padding: 5px var(--s-3); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: rgba(255,255,255,0.03); color: var(--tx-1);
  font-weight: 600; font-size: 0.78rem;
  padding: 8px var(--s-4);
  border: 1px solid var(--line-bright); border-radius: var(--r-md);
  transition: all 0.18s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--tx-3); box-shadow: 0 0 12px rgba(255,255,255,0.04); }
.btn-secondary.btn-sm { font-size: 0.7rem; padding: 5px var(--s-3); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: transparent; color: var(--tx-2);
  font-size: 0.75rem; font-weight: 500;
  padding: 5px var(--s-3); border-radius: var(--r-sm);
  transition: all 0.18s ease;
}
.btn-ghost:hover { color: var(--tx-1); background: var(--bg-3); }

.btn-danger {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: transparent; color: var(--bearish);
  font-size: 0.72rem; font-weight: 700;
  padding: 5px var(--s-3);
  border: 1px solid rgba(255,77,79,0.2); border-radius: var(--r-sm);
  transition: all 0.18s ease;
}
.btn-danger:hover { background: var(--bearish-dim); border-color: rgba(255,77,79,0.4); box-shadow: 0 0 10px rgba(255,77,79,0.1); }

.btn-edit {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: var(--bg-3); border: 1px solid var(--line-bright); border-radius: var(--r-sm);
  color: var(--tx-2); font-size: 0.7rem; font-weight: 600;
  transition: all 0.18s ease;
}
.btn-edit:hover { color: var(--tx-1); border-color: var(--tx-3); background: var(--bg-2); }

.btn-del {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: transparent; border: 1px solid rgba(255,77,79,0.18); border-radius: var(--r-sm);
  color: var(--bearish); font-size: 0.7rem; font-weight: 600;
  transition: all 0.18s ease;
}
.btn-del:hover { background: var(--bearish-dim); box-shadow: 0 0 8px rgba(255,77,79,0.12); }

/* ─────────────────────────────────────────────────────────────────
   13. BADGES & CHIPS
───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: var(--r-pill);
  text-transform: uppercase; line-height: 1.5; white-space: nowrap;
}

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: var(--r-pill);
  text-transform: uppercase; line-height: 1.4; white-space: nowrap;
  backdrop-filter: blur(4px);
}

.badge--admin   { background: rgba(139,92,246,0.12); color: #C4B5FD; border: 1px solid rgba(139,92,246,0.3); box-shadow: 0 0 10px rgba(139,92,246,0.08); }
.badge--active  { background: rgba(0,200,83,0.1); color: var(--brand); border: 1px solid rgba(0,200,83,0.25); box-shadow: 0 0 10px rgba(0,200,83,0.08); }
.badge--warning { background: rgba(245,158,11,0.1); color: #FCD34D; border: 1px solid rgba(245,158,11,0.28); box-shadow: 0 0 10px rgba(245,158,11,0.08); }
.badge--danger  { background: rgba(255,77,79,0.1); color: var(--bearish); border: 1px solid rgba(255,77,79,0.28); box-shadow: 0 0 10px rgba(255,77,79,0.08); }
.badge--muted   { background: rgba(255,255,255,0.04); color: var(--tx-2); border: 1px solid var(--line); }
.badge--info    { background: rgba(59,130,246,0.1); color: #93C5FD; border: 1px solid rgba(59,130,246,0.28); box-shadow: 0 0 10px rgba(59,130,246,0.08); }

/* CRM status chips */
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid transparent;
}
.status-chip::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.status-chip--fresh   { background: rgba(0,200,83,0.1); color: var(--brand); border-color: rgba(0,200,83,0.22); }
.status-chip--fresh::before { background: var(--brand); box-shadow: 0 0 5px var(--brand); }
.status-chip--paid    { background: rgba(59,130,246,0.1); color: #93C5FD; border-color: rgba(59,130,246,0.22); }
.status-chip--paid::before { background: #93C5FD; box-shadow: 0 0 5px #93C5FD; }
.status-chip--done    { background: rgba(255,255,255,0.04); color: var(--tx-2); border-color: var(--line); }
.status-chip--done::before { background: var(--tx-3); }
.status-chip--expired { background: rgba(255,77,79,0.1); color: var(--bearish); border-color: rgba(255,77,79,0.22); }
.status-chip--expired::before { background: var(--bearish); box-shadow: 0 0 5px var(--bearish); }
.status-chip--stop    { background: rgba(245,158,11,0.1); color: #FCD34D; border-color: rgba(245,158,11,0.22); }
.status-chip--stop::before { background: #FCD34D; box-shadow: 0 0 5px #FCD34D; }

/* Live indicator */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,200,83,0.08); color: var(--brand);
  border: 1px solid rgba(0,200,83,0.22); border-radius: var(--r-pill);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; padding: 4px 10px;
  box-shadow: 0 0 12px rgba(0,200,83,0.06);
}

.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand);
  animation: pulse-beat 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-beat {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--brand); }
  50%       { opacity: 0.5; transform: scale(0.75); box-shadow: 0 0 3px var(--brand); }
}

/* ─────────────────────────────────────────────────────────────────
   14. CARDS
───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}
.card:hover {
  border-color: var(--line-bright);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.03);
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.card-title { font-size: 0.88rem; font-weight: 700; color: var(--tx-1); }

.view-all-row {
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line);
  text-align: center;
}
.view-all-link { font-size: 0.72rem; color: var(--tx-2); transition: color var(--ease-1); }
.view-all-link:hover { color: var(--brand); opacity: 1; }

/* ─────────────────────────────────────────────────────────────────
   15. TABLES
───────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrapper--scroll { max-height: 520px; overflow-y: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table thead th {
  text-align: left;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tx-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.data-table thead th.text-right { text-align: right; }

.data-table tbody td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--tx-1);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td {
  background: rgba(0,200,83,0.03);
}
.data-table tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 rgba(0,200,83,0.4);
}

.data-table--dense thead th { padding: var(--s-2) var(--s-3); }
.data-table--dense tbody td { padding: var(--s-2) var(--s-3); font-size: 0.76rem; }

.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--tx-1); }

.table-pagination {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1);
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line);
  font-size: 0.72rem; color: var(--tx-2);
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  color: var(--tx-2); font-size: 0.72rem;
  transition: all 0.18s ease;
}
.page-btn:hover { color: var(--tx-1); background: var(--bg-3); border-color: var(--line-bright); }
.page-btn.active { background: rgba(0,200,83,0.1); border-color: rgba(0,200,83,0.3); color: var(--brand); font-weight: 700; box-shadow: 0 0 10px rgba(0,200,83,0.08); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────────────────
   16. FORMS
───────────────────────────────────────────────────────────────── */
.form-group {
  display: flex; flex-direction: column; gap: var(--s-1);
  margin-bottom: var(--s-4);
}
.form-group:last-of-type { margin-bottom: 0; }

.form-group label, .form-label {
  font-size: 0.65rem; font-weight: 700;
  color: var(--tx-3); text-transform: uppercase; letter-spacing: 0.1em;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-input {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-bright);
  border-radius: var(--r-md);
  color: var(--tx-1);
  font-size: 0.85rem;
  padding: var(--s-2) var(--s-3);
  transition: all 0.18s ease;
  width: 100%;
  backdrop-filter: blur(4px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(0,200,83,0.04);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1), 0 0 16px rgba(0,200,83,0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-input::placeholder { color: var(--tx-3); }

.form-group select, .form-input[type="select"] {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%238B949E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.form-group textarea { resize: vertical; min-height: 72px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-actions { display: flex; gap: var(--s-3); align-items: center; margin-top: var(--s-5); }

/* ─────────────────────────────────────────────────────────────────
   17. FILTERS BAR
───────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  flex-wrap: wrap;
  overflow: visible;
}

.filter-input {
  flex: 1; min-width: 200px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-bright); border-radius: var(--r-md);
  color: var(--tx-1); font-size: 0.78rem;
  padding: 6px var(--s-3);
  transition: all 0.18s ease; backdrop-filter: blur(4px);
}
.filter-input:focus { outline: none; border-color: var(--brand); background: rgba(0,200,83,0.04); box-shadow: 0 0 0 3px rgba(0,200,83,0.08); }
.filter-input::placeholder { color: var(--tx-3); }

.filter-select {
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-bright); border-radius: var(--r-md);
  color: var(--tx-1); font-size: 0.76rem;
  padding: 6px 26px 6px var(--s-3);
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%238B949E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.18s ease;
}
.filter-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,200,83,0.08); }
.filter-select--xs { font-size: 0.7rem; padding: 4px 22px 4px var(--s-2); }

.filter-stats {
  font-size: 0.7rem; color: var(--tx-2); white-space: nowrap; margin-left: auto;
}


/* ─────────────────────────────────────────────────────────────────
   19. MODALS
───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 10, 15, 0.9);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-modal);
  padding: var(--s-4);
}

.modal-close-btn {
  position: absolute; top: var(--s-4); right: var(--s-4);
  background: transparent; color: var(--tx-2); font-size: 1.1rem;
  border: none; cursor: pointer; padding: var(--s-1);
  border-radius: var(--r-sm); line-height: 1;
  transition: color var(--ease-1), background var(--ease-1);
}
.modal-close-btn:hover { color: var(--tx-1); background: var(--bg-3); }

/* ─────────────────────────────────────────────────────────────────
/* ─────────────────────────────────────────────────────────────────
   20. LOGIN — Futuristic Full-Screen Terminal Auth
───────────────────────────────────────────────────────────────── */

/* Full-screen modal override for login */
#login-modal.modal-overlay {
  background: #070A0F;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  position: fixed; inset: 0;
}

/* Animated dot grid background */
.lc-bg-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0,200,83,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: lc-grid-drift 20s linear infinite;
}
@keyframes lc-grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 32px 32px; }
}

/* Ambient glow blobs */
.lc-bg-glow {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(80px);
}
.lc-bg-glow--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,200,83,0.08) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: lc-glow-drift 8s ease-in-out infinite alternate;
}
.lc-bg-glow--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 70%);
  bottom: -80px; right: 30%;
  animation: lc-glow-drift 12s ease-in-out infinite alternate-reverse;
}
@keyframes lc-glow-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.1); }
}

/* Wrapper: side-by-side layout */
.login-wrap {
  position: relative; z-index: 1;
  display: flex; width: 100%; height: 100%;
}

/* ── LEFT PANEL ── */
.lc-panel {
  flex: 1;
  background: linear-gradient(135deg, rgba(10,14,20,0.8) 0%, rgba(7,10,15,0.9) 100%);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 48px;
  position: relative; overflow: hidden;
}
.lc-panel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,200,83,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.lc-panel-inner {
  display: flex; flex-direction: column; gap: 40px;
  max-width: 460px; width: 100%;
}
.lc-panel-logo { display: flex; align-items: center; }

.lc-panel-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--brand); font-family: var(--f-mono);
  margin-bottom: 16px;
}
.lc-tag-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 8px var(--brand);
  animation: pulse-beat 2s ease-in-out infinite;
  flex-shrink: 0;
}
.lc-panel-title {
  font-size: 2.8rem; font-weight: 800; color: var(--tx-1);
  line-height: 1.1; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, rgba(0,200,83,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lc-panel-desc {
  font-size: 0.92rem; color: var(--tx-2); line-height: 1.7; max-width: 360px;
}

.lc-panel-stats {
  display: flex; align-items: center; gap: 24px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.lc-stat { display: flex; flex-direction: column; gap: 3px; }
.lc-stat-val {
  font-size: 1.1rem; font-weight: 800; color: var(--brand);
  font-family: var(--f-mono);
}
.lc-stat-lbl { font-size: 0.62rem; font-weight: 600; color: var(--tx-3); letter-spacing: 0.06em; text-transform: uppercase; }
.lc-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.07); flex-shrink: 0; }

/* ── RIGHT: AUTH CARD ── */
.login-card {
  width: 480px; flex-shrink: 0;
  background: rgba(10,14,20,0.95);
  border-left: 1px solid rgba(255,255,255,0.07);
  padding: 48px 44px;
  display: flex; flex-direction: column; gap: 28px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(20px);
  justify-content: center;
}

/* Green scanning line at top */
.lc-accent-line {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 40%, rgba(0,200,83,0.3) 100%);
  box-shadow: 0 0 16px var(--brand);
}

/* Secure badge */
.lc-secure-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,200,83,0.08);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em;
  color: var(--brand); font-family: var(--f-mono);
  width: fit-content;
}

/* Step header */
.lc-step-header { display: flex; flex-direction: column; gap: 8px; }
.lc-step-num {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--tx-3); font-family: var(--f-mono);
}

.lc-title {
  font-size: 1.6rem; font-weight: 700; color: var(--tx-1);
  line-height: 1.2;
}

.lc-subtitle {
  font-size: 0.82rem; color: var(--tx-2); line-height: 1.5;
}

/* Field group */
.lc-field-group { display: flex; flex-direction: column; gap: 8px; }
.lc-field-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--tx-3); text-transform: uppercase;
}

/* Phone field */
.lc-field-wrap {
  display: flex; align-items: stretch;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.04);
}
.lc-field-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1), 0 0 24px rgba(0,200,83,0.08);
  background: rgba(0,200,83,0.04);
}
.lc-phone-prefix {
  display: flex; align-items: center; padding: 0 16px;
  background: rgba(0,200,83,0.08); color: var(--brand);
  font-size: 0.9rem; font-family: var(--f-mono); font-weight: 700;
  border-right: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
  letter-spacing: 0.04em;
}
.lc-phone-input {
  flex: 1; background: transparent; border: none;
  color: var(--tx-1); font-size: 1.1rem; font-family: var(--f-mono);
  font-weight: 600; padding: 14px 16px;
  letter-spacing: 0.12em; outline: none;
}
.lc-phone-input::placeholder { color: var(--tx-3); letter-spacing: 0.04em; font-weight: 400; font-size: 0.88rem; }

/* Auth button */
.lc-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--brand); color: #000;
  font-weight: 800; font-size: 0.92rem;
  padding: 15px 20px; border-radius: 12px;
  width: 100%;
  position: relative; overflow: hidden;
  transition: all 0.2s ease;
  border: 1px solid var(--brand);
}
.lc-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 55%);
  pointer-events: none;
}
.lc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0,200,83,0.4), 0 6px 24px rgba(0,0,0,0.5);
}
.lc-btn:active { transform: translateY(0); box-shadow: none; }
.lc-btn:disabled { opacity: 0.25; cursor: not-allowed; transform: none; box-shadow: none; }

/* PIN boxes */
.lc-pin-row { display: flex; gap: 12px; justify-content: center; }
.lc-pin-box {
  width: 68px; height: 76px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  text-align: center; font-size: 1.8rem; font-family: var(--f-mono);
  font-weight: 700; color: var(--brand); outline: none;
  caret-color: var(--brand);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.lc-pin-box:focus {
  border-color: var(--brand);
  background: rgba(0,200,83,0.08);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.15), 0 0 24px rgba(0,200,83,0.12);
  transform: scale(1.04);
}

.lc-error { font-size: 0.76rem; color: var(--bearish); text-align: center; min-height: 1.2rem; font-weight: 600; }

.lc-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--tx-3);
  font-size: 0.8rem; padding: 4px 0;
  transition: color 0.18s ease;
}
.lc-back-btn:hover { color: var(--tx-1); }

.lc-footer-note { font-size: 0.7rem; color: var(--tx-3); text-align: center; line-height: 1.6; }

.lc-step { display: none; flex-direction: column; gap: 20px; }
.lc-step.active-step { display: flex; }

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .login-wrap { flex-direction: column; }
  .lc-panel { display: none; }
  .login-card { width: 100%; flex: 1; padding: 36px 24px; border-left: none; justify-content: center; }
  .lc-pin-box { width: 58px; height: 64px; font-size: 1.5rem; }
}


@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.lc-brand { display: flex; align-items: center; justify-content: center; }

.lc-step { display: none; flex-direction: column; gap: var(--s-4); }
.lc-step.active-step { display: flex; }

.lc-title {
  font-size: 1.35rem; font-weight: 700; color: var(--tx-1);
  text-align: center; line-height: 1.2;
}

.lc-subtitle {
  font-size: 0.8rem; color: var(--tx-2); text-align: center;
  margin-top: -8px; line-height: 1.5;
}

/* Phone field */
.lc-field-wrap {
  display: flex; align-items: stretch;
  border: 1px solid var(--line-bright); border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.03);
}
.lc-field-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1), 0 0 20px rgba(0,200,83,0.07);
  background: rgba(0,200,83,0.03);
}

.lc-phone-prefix {
  display: flex; align-items: center; padding: 0 var(--s-3);
  background: rgba(255,255,255,0.04); color: var(--brand);
  font-size: 0.88rem; font-family: var(--f-mono); font-weight: 700;
  border-right: 1px solid var(--line-bright); flex-shrink: 0;
  letter-spacing: 0.04em;
}

.lc-phone-input {
  flex: 1; background: transparent; border: none;
  color: var(--tx-1); font-size: 1.05rem; font-family: var(--f-mono);
  font-weight: 600; padding: var(--s-3);
  letter-spacing: 0.1em; outline: none;
}
.lc-phone-input::placeholder { color: var(--tx-3); letter-spacing: 0.04em; font-weight: 400; font-size: 0.84rem; }

/* Primary auth button */
.lc-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  background: var(--brand); color: #000;
  font-weight: 800; font-size: 0.9rem;
  padding: 13px var(--s-4); border-radius: 10px;
  width: 100%;
  position: relative; overflow: hidden;
  transition: all 0.2s ease;
  border: 1px solid var(--brand);
}
.lc-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.lc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0,200,83,0.35), 0 4px 20px rgba(0,0,0,0.4);
}
.lc-btn:active { transform: translateY(0); box-shadow: none; }
.lc-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

/* PIN boxes */
.lc-pin-row {
  display: flex; gap: var(--s-3); justify-content: center;
}

.lc-pin-box {
  width: 60px; height: 68px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  text-align: center; font-size: 1.6rem; font-family: var(--f-mono);
  font-weight: 700; color: var(--brand); outline: none;
  caret-color: var(--brand);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.lc-pin-box:focus {
  border-color: var(--brand);
  background: rgba(0,200,83,0.07);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.12), 0 0 20px rgba(0,200,83,0.1);
}

.lc-error { font-size: 0.74rem; color: var(--bearish); text-align: center; min-height: 1rem; font-weight: 600; letter-spacing: 0.02em; }

.lc-back-btn {
  display: inline-flex; align-items: center; gap: var(--s-1);
  background: transparent; color: var(--tx-3);
  font-size: 0.78rem; padding: var(--s-1) 0;
  transition: color 0.18s ease;
}
.lc-back-btn:hover { color: var(--tx-1); }

.lc-footer-note { font-size: 0.68rem; color: var(--tx-3); text-align: center; line-height: 1.5; }

/* ─────────────────────────────────────────────────────────────────
   21. DASHBOARD
───────────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}

.metric-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: all 0.22s ease;
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  pointer-events: none;
}
.metric-card:hover {
  border-color: var(--line-bright);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03);
  transform: translateY(-2px);
}
.metric-card--featured {
  border-color: rgba(0,200,83,0.18);
  background: linear-gradient(145deg, var(--bg-1), rgba(0,200,83,0.03));
  box-shadow: 0 0 30px rgba(0,200,83,0.04);
}
.metric-card--featured::before {
  background: linear-gradient(90deg, transparent, rgba(0,200,83,0.15), transparent);
}

.metric-card-header {
  display: flex; align-items: center; justify-content: space-between;
}

.metric-icon-wrap {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
  border: 1px solid transparent;
}
.metric-icon-wrap--green  { background: rgba(0,200,83,0.1); border-color: rgba(0,200,83,0.2); box-shadow: 0 0 12px rgba(0,200,83,0.08); }
.metric-icon-wrap--blue   { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); box-shadow: 0 0 12px rgba(59,130,246,0.08); }
.metric-icon-wrap--yellow { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); box-shadow: 0 0 12px rgba(245,158,11,0.08); }
.metric-icon-wrap--red    { background: rgba(255,77,79,0.1); border-color: rgba(255,77,79,0.2); box-shadow: 0 0 12px rgba(255,77,79,0.08); }

.metric-label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tx-3);
}

.metric-value {
  font-size: 2rem; font-weight: 800;
  color: var(--tx-1); font-family: var(--f-mono);
  line-height: 1;
}
.metric-value--lg { font-size: 2.4rem; }

.metric-delta { font-size: 0.72rem; color: var(--tx-2); font-family: var(--f-mono); }

/* Chart */
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line);
}
.chart-title { font-size: 0.86rem; font-weight: 600; color: var(--tx-1); }
.info-icon   { color: var(--tx-3); font-size: 0.82rem; cursor: help; }

.chart-controls { display: flex; gap: var(--s-1); }

.chart-btn {
  background: transparent; border: 1px solid transparent;
  color: var(--tx-2); font-size: 0.7rem; font-weight: 600;
  padding: 4px var(--s-2); border-radius: var(--r-sm);
  transition: color var(--ease-1), background var(--ease-1), border-color var(--ease-1);
}
.chart-btn:hover { color: var(--tx-1); background: var(--bg-3); }
.chart-btn.active { color: var(--brand); background: var(--brand-dim); border-color: var(--brand-glow); }

.chart-wrapper { padding: var(--s-4) var(--s-5); height: 240px; position: relative; }

.chart-tooltip {
  position: absolute; display: none;
  background: var(--bg-2); border: 1px solid var(--line-bright);
  border-radius: var(--r-md); padding: var(--s-2) var(--s-3);
  font-size: 0.72rem; pointer-events: none; z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.dashboard-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

/* Donut */
.donut-wrapper { padding: var(--s-5); display: flex; gap: var(--s-3); align-items: center; justify-content: center; }
.donut-canvas-wrap { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }

.legend-item {
  display: flex; align-items: center; gap: var(--s-2); justify-content: space-between;
  font-size: 0.76rem; color: var(--tx-2);
}

.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ld-green  { background: var(--brand); }
.ld-red    { background: var(--bearish); }
.ld-yellow { background: #F59E0B; }

.pnl-stats-row {
  display: flex; gap: 0;
  padding: 0 var(--s-5) var(--s-4);
  border-top: 1px solid var(--line);
}

.pnl-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: var(--s-3);
  border-right: 1px solid var(--line);
}
.pnl-stat:last-child { border-right: none; }

.pnl-stat-val {
  font-size: 1.05rem; font-weight: 700;
  font-family: var(--f-mono); color: var(--tx-1); line-height: 1.2;
}
.pnl-stat-lbl {
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tx-3); margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   22. SIGNALS  ·  Premium Editable Live Feed
───────────────────────────────────────────────────────────────── */

.sig-page { padding: 20px 24px; }

/* ── Toolbar ── */
.sig-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.sig-toolbar-left { display: flex; align-items: center; gap: 16px; }
.sig-toolbar-title {
  font-size: 1.2rem; font-weight: 700; color: var(--tx-1);
  
}
.sig-toolbar-live {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-dim); border: 1px solid rgba(0,200,83,0.18);
  padding: 5px 14px; border-radius: var(--r-pill);
  font-size: 0.74rem; font-weight: 600; color: var(--brand);
  font-family: var(--f-mono);
}
.sig-toolbar-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 8px var(--brand);
  animation: sig-pulse 2s ease-in-out infinite;
}
@keyframes sig-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* ── Filter pills ── */
.sig-filters { display: flex; gap: 6px; }
.sig-filter-btn {
  font-size: 0.75rem; font-weight: 600; padding: 6px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); color: var(--tx-3); cursor: pointer;
  transition: all 0.18s ease; backdrop-filter: blur(4px);
}
.sig-filter-btn:hover { border-color: var(--line-bright); color: var(--tx-1); background: var(--bg-3); }
.sig-filter-btn.active {
  border-color: rgba(0,200,83,0.35);
  background: rgba(0,200,83,0.1);
  color: var(--brand);
  box-shadow: 0 0 12px rgba(0,200,83,0.08), inset 0 1px 0 rgba(0,200,83,0.1);
}

/* ── Feed Container ── */
.sig-feed-container {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.sig-feed-header {
  display: flex; align-items: center; padding: 10px 24px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tx-3);
}

.sig-feed-list { display: flex; flex-direction: column; gap: 6px; }

/* ── Row / Card ── */
.sig-row {
  display: flex; align-items: center; padding: 14px 24px;
  background: linear-gradient(135deg, rgba(20,25,32,0.9) 0%, rgba(13,17,23,0.95) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.sig-row:hover {
  border-color: var(--line-bright);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.sig-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 0 2px 2px 0;
}
.sig-row--bullish {
  border-color: rgba(0,200,83,0.12);
}
.sig-row--bullish:hover {
  border-color: rgba(0,200,83,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(0,200,83,0.05);
}
.sig-row--bullish::before { background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.sig-row--bearish {
  border-color: rgba(255,77,79,0.12);
}
.sig-row--bearish:hover {
  border-color: rgba(255,77,79,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(255,77,79,0.05);
}
.sig-row--bearish::before { background: var(--bearish); box-shadow: 0 0 12px var(--bearish); }

/* ── Columns (Grid-like alignment) ── */
.sf-col-asset { flex: 0 0 22%; display: flex; flex-direction: column; gap: 6px; }
.sf-col-entry { flex: 0 0 15%; }
.sf-col-exit { flex: 0 0 15%; }
.sf-col-qty { flex: 0 0 10%; font-family: var(--f-mono); color: var(--tx-2); font-size: 0.85rem;}
.sf-col-pnl { flex: 0 0 20%; display: flex; align-items: center; }

.sf-col-status { flex: 0 0 12%; }
.sf-col-actions { flex: 0 0 6%; display: flex; justify-content: flex-end; }

/* ── Content Elements ── */
.sf-time, .sf-date { font-size: 0.7rem; color: var(--tx-3); font-family: var(--f-mono); }

/* ── Invisible inputs — look like text, edit on click ── */
.sig-input {
  background: transparent; border: 1px dashed transparent;
  color: var(--tx-1); font-family: var(--f-mono); font-size: 0.95rem;
  padding: 4px 8px; border-radius: 6px; width: 100px;
  transition: all 0.18s ease; outline: none; font-weight: 500;
  margin-left: -8px;
}
.sig-input::placeholder { color: var(--tx-3); font-style: italic; font-weight: 400; }
.sig-input:hover { border-color: var(--line-bright); background: rgba(255,255,255,0.04); border-style: dashed; }
.sig-input:focus {
  border-color: var(--brand); background: rgba(0,200,83,0.06); border-style: solid;
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1), 0 0 12px rgba(0,200,83,0.08);
}
.sig-input.sig-input-asset { font-size: 1.1rem; font-weight: 700; width: 140px; font-family: var(--f-ui); }

/* Select */
.sig-select {
  appearance: none; border: 1px solid transparent;
  color: var(--tx-1); font-family: var(--f-ui); font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; cursor: pointer;
  outline: none; transition: all 0.15s ease;
  line-height: 1; vertical-align: middle;
}
.sig-select:hover { border-color: var(--line-bright); background: rgba(255,255,255,0.03); }
.sig-select:focus { border-color: var(--brand); background: var(--bg-0); border-style: solid; }
.sig-select option { background: var(--bg-2); color: var(--tx-1); }

/* ── Type pill (readonly) ── */
.sig-type-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 8px; border-radius: 4px; width: fit-content;
  line-height: 1; vertical-align: middle;
}
.sig-type-pill--bullish { background: var(--brand-dim); color: var(--brand); }
.sig-type-pill--bearish { background: var(--bearish-dim); color: var(--bearish); }

/* ── P&L (amount only — percent badge removed) ── */
.sig-pnl { font-family: var(--f-mono); font-weight: 700; font-size: 1rem; }
.sig-pnl--pos  { color: var(--brand);   text-shadow: 0 0 12px var(--brand-glow); }
.sig-pnl--neg  { color: var(--bearish); text-shadow: 0 0 12px var(--bearish-glow); }
.sig-pnl--zero { color: var(--tx-3); }

/* ── Status pill ── */
.sig-status {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}
.sig-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.sig-status--open { background: rgba(59,130,246,0.1); color: #3B82F6; }
.sig-status--open::before { background: #3B82F6; box-shadow: 0 0 6px #3B82F6; }
.sig-status--profit { background: var(--brand-dim); color: var(--brand); }
.sig-status--profit::before { background: var(--brand); box-shadow: 0 0 6px var(--brand); }
.sig-status--loss { background: var(--bearish-dim); color: var(--bearish); }
.sig-status--loss::before { background: var(--bearish); box-shadow: 0 0 6px var(--bearish); }
.sig-status--na { background: rgba(156,163,175,0.12); color: #9CA3AF; }
.sig-status--na::before { background: #9CA3AF; box-shadow: 0 0 6px #9CA3AF; }

/* ── Delete button ── */
.sig-del-btn {
  background: none; border: none; color: var(--tx-3); cursor: pointer;
  padding: 6px; border-radius: 6px; transition: all 0.15s;
  opacity: 0;
}
.sig-row:hover .sig-del-btn { opacity: 1; }
.sig-del-btn:hover { color: var(--bearish); background: var(--bearish-dim); }

/* ── Empty state ── */
.sig-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; gap: 12px;
}
.sig-empty-icon {
  width: 50px; height: 50px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.sig-empty-title { font-size: 0.95rem; font-weight: 600; color: var(--tx-2); }
.sig-empty-desc { font-size: 0.8rem; color: var(--tx-3); text-align: center; max-width: 300px; line-height: 1.5; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .sig-page { padding: 12px 14px; }
  .sig-toolbar { flex-direction: column; align-items: stretch; }
  .sig-toolbar-left { justify-content: space-between; }
  .sig-filters { overflow-x: auto; padding-bottom: 2px; }
}

/* ─────────────────────────────────────────────────────────────────
   23. RIGHT SIDEBAR — Futuristic TV Alerts Panel
───────────────────────────────────────────────────────────────── */
.right-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  height: var(--ticker-h);
  background: linear-gradient(90deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.right-panel-title-row { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; }

.right-panel-title {
  font-family: var(--f-mono);
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--brand) 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.right-panel-controls { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; }

/* ── Signal stream scroll container ── */
.signal-stream {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-2) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.signal-stream::-webkit-scrollbar { width: 3px; }
.signal-stream::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: var(--r-pill); }

/* ── Individual alert card ── */
.tva-card {
  position: relative;
  margin: var(--s-3) var(--s-3);
  padding: var(--s-3) var(--s-4);
  /* Futuristic cut corners */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  background: linear-gradient(135deg, rgba(20, 25, 32, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: default;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* subtle dot grid texture */
.tva-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 10px 10px;
  pointer-events: none;
  z-index: 0;
}

/* glowing top-left accent line */
.tva-card::after {
  content: '';
  position: absolute; left: 0; top: 0; 
  width: 25px; height: 3px;
  background: var(--tva-accent, var(--brand));
  box-shadow: 0 0 12px var(--tva-accent, var(--brand));
  z-index: 1;
}

/* ensure content stays above background effects */
.tva-card > div { position: relative; z-index: 2; }

.tva-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(27, 34, 48, 0.95) 0%, rgba(20, 25, 32, 0.95) 100%);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.tva-card--bull { --tva-accent: var(--brand); border-left: 2px solid var(--brand-glow); }
.tva-card--bull:hover { box-shadow: inset 30px 0 50px -30px var(--brand-glow), 0 10px 20px rgba(0,0,0,0.5); border-left-color: var(--brand); }

.tva-card--bear { --tva-accent: var(--bearish); border-left: 2px solid var(--bearish-glow); }
.tva-card--bear:hover { box-shadow: inset 30px 0 50px -30px var(--bearish-glow), 0 10px 20px rgba(0,0,0,0.5); border-left-color: var(--bearish); }

.tva-card--info { --tva-accent: var(--target); border-left: 2px solid var(--target-glow); }
.tva-card--info:hover { box-shadow: inset 30px 0 50px -30px var(--target-glow), 0 10px 20px rgba(0,0,0,0.5); border-left-color: var(--target); }

/* ── Card header row ── */
.tva-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-2);
}

/* ── Action badge ── */
.tva-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid transparent;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}
.tva-badge--bull {
  background: rgba(0,200,83,0.15);
  border-color: rgba(0,200,83,0.5);
  color: #80FFB2;
  box-shadow: 0 0 10px var(--brand-glow);
}
.tva-badge--bear {
  background: rgba(255,77,79,0.15);
  border-color: rgba(255,77,79,0.5);
  color: #FFB3B3;
  box-shadow: 0 0 10px var(--bearish-glow);
}
.tva-badge--info {
  background: rgba(252,163,17,0.15);
  border-color: rgba(252,163,17,0.5);
  color: #FFE0A3;
  box-shadow: 0 0 10px var(--target-glow);
}

/* ── Timestamp ── */
.tva-time {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--tx-2);
  letter-spacing: 0.05em;
}

/* ── Alert message text ── */
.tva-msg {
  font-family: var(--f-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.6;
  word-break: break-word;
  padding-left: var(--s-2);
  border-left: 2px solid rgba(255,255,255,0.08);
  margin-top: var(--s-2);
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

/* ── Animated new alert flash ── */
@keyframes tva-flash {
  0%   { background: var(--bg-3); box-shadow: 0 0 20px var(--tva-accent, var(--brand)), 0 0 40px rgba(0,200,83,0.15); }
  100% { background: var(--bg-2); box-shadow: none; }
}
.tva-card--new { animation: tva-flash 1.4s ease-out forwards; }

/* ── Empty state ── */
.tva-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-4);
  text-align: center;
}
.tva-empty-icon { opacity: 0.2; }
.tva-empty-label {
  font-family: var(--f-mono);
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tx-3);
}

/* ── Pulse dot in header ── */
.pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand);
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--brand); }
  50%       { opacity: 0.5; box-shadow: 0 0 10px var(--brand), 0 0 20px var(--brand-glow); }
}

/* System log */
.system-log-panel { border-top: 1px solid var(--line); flex-shrink: 0; }
.system-log-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line);
}
.system-log-title { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-3); }
.system-log {
  max-height: 110px; overflow-y: auto; padding: var(--s-2) var(--s-4);
  font-family: var(--f-mono); font-size: 0.62rem; color: var(--tx-3);
}
.log-line { padding: 2px 0; border-bottom: 1px solid var(--line); }
.log-line:last-child { border-bottom: none; }
.log-time { color: var(--tx-3); margin-right: var(--s-1); }
.log-msg  { color: var(--tx-2); }
.log-ok   { color: var(--brand); }
.log-err  { color: var(--bearish); }

/* legacy stream classes kept for backward compat */
.stream-item { padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line); font-size: 0.7rem; }
.stream-symbol { font-weight: 700; font-family: var(--f-mono); font-size: 0.76rem; }
.stream-dir { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: var(--r-pill); margin-left: var(--s-1); display: inline-block; }
.stream-dir--bull { background: var(--brand-dim); color: var(--brand); }
.stream-dir--bear { background: var(--bearish-dim); color: var(--bearish); }
.stream-time { font-size: 0.62rem; color: var(--tx-3); font-family: var(--f-mono); float: right; }
.stream-meta { color: var(--tx-2); margin-top: 2px; font-size: 0.65rem; }

/* ─────────────────────────────────────────────────────────────────
   24. WATCHLIST
───────────────────────────────────────────────────────────────── */
.watchlist-page { display: flex; flex-direction: column; gap: var(--s-4); }

.watchlist-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}

.watchlist-title-group { display: flex; flex-direction: column; gap: var(--s-1); }

.watchlist-title {
  font-size: 1.15rem; font-weight: 700; color: var(--tx-1); 
}

.watchlist-actions { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; }

.watchlist-status-bar {
  display: flex; align-items: center; gap: var(--s-2); justify-content: space-between;
  font-size: 0.7rem; color: var(--tx-2); font-family: var(--f-mono);
}
.wl-status-sep { color: var(--tx-3); }

/* Sync animation */
.wl-sync-btn--loading .wl-sync-icon { display: inline-block; animation: spin-icon 0.8s linear infinite; }
@keyframes spin-icon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.wl-sync-icon { display: inline-block; }

/* Card container */
.wl-card { padding: 0; background: transparent; border: none; box-shadow: none; }

.wl-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}

/* Stock card */
.wl-stock-card {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: linear-gradient(135deg, rgba(20,25,32,0.9) 0%, rgba(13,17,23,0.95) 100%);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  min-height: 88px;
  transition: all 0.22s ease;
  position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.wl-stock-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  pointer-events: none;
}
.wl-stock-card:hover {
  border-color: rgba(0,200,83,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(0,200,83,0.06);
}

.wl-card-left { display: flex; flex-direction: column; justify-content: center; min-width: 80px; gap: 4px; }

.wl-card-symbol {
  font-size: 1rem; font-weight: 800; color: var(--tx-1);
  font-family: var(--f-mono); letter-spacing: 0.02em;
}

.wl-card-date { font-size: 0.62rem; color: var(--tx-3); font-family: var(--f-mono); }

.wl-card-mid {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 3px;
  padding: 0 var(--s-4); border-left: 1px solid var(--line); border-right: 1px solid transparent; /* Keeps it visually balanced */
}

.wl-mid-lbl {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tx-3);
}
.wl-mid-val { font-size: 0.96rem; font-weight: 700; color: var(--tx-1); font-family: var(--f-mono); line-height: 1.2; }


.wl-card-qty-hero {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  padding-left: var(--s-4); border-left: 1px solid var(--line); min-width: 76px;
}
.wl-card-qty-hero.muted { opacity: 0.35; }

.wl-qty-val {
  font-size: 2rem; font-weight: 800; color: var(--brand);
  font-family: var(--f-mono); line-height: 1; 
}
.wl-qty-lbl {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tx-3); margin-top: 3px;
}

/* Skeleton */
.wl-card-skeleton {
  height: 88px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--bg-1) 0%, var(--bg-2) 40%, var(--bg-1) 80%);
  background-size: 300% 100%;
  animation: wl-shimmer 1.8s ease-in-out infinite;
}
@keyframes wl-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.wl-card-skeleton:nth-child(2) { animation-delay: 0.1s; opacity: 0.88; }
.wl-card-skeleton:nth-child(3) { animation-delay: 0.2s; opacity: 0.75; }
.wl-card-skeleton:nth-child(4) { animation-delay: 0.3s; opacity: 0.62; }
.wl-card-skeleton:nth-child(5) { animation-delay: 0.4s; opacity: 0.5; }
.wl-card-skeleton:nth-child(6) { animation-delay: 0.5s; opacity: 0.38; }
.wl-card-skeleton:nth-child(7) { animation-delay: 0.6s; opacity: 0.26; }
.wl-card-skeleton:nth-child(8) { animation-delay: 0.7s; opacity: 0.16; }

/* Empty */
.wl-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--s-3);
  padding: var(--s-7) var(--s-5); text-align: center;
}
.wl-empty-icon  { font-size: 2.2rem; opacity: 0.25; }
.wl-empty-title { font-size: 0.88rem; font-weight: 600; color: var(--tx-2); }
.wl-empty-sub   { font-size: 0.76rem; color: var(--tx-3); max-width: 280px; }

/* ─────────────────────────────────────────────────────────────────
   26. LEARNING HUB
───────────────────────────────────────────────────────────────── */
.course-cats { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.cat-tab {
  display: inline-flex; align-items: center;
  padding: 6px var(--s-4);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--tx-3); font-size: 0.78rem; font-weight: 600;
  transition: all 0.18s ease; backdrop-filter: blur(4px); cursor: pointer;
}
.cat-tab:hover { color: var(--tx-1); background: var(--bg-3); border-color: var(--line-bright); }
.cat-tab.active {
  background: rgba(0,200,83,0.1); border-color: rgba(0,200,83,0.3);
  color: var(--brand); font-weight: 700;
  box-shadow: 0 0 14px rgba(0,200,83,0.08), inset 0 1px 0 rgba(0,200,83,0.12);
}

.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }

.course-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; transition: all 0.22s ease; position: relative;
}
.course-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}
.course-card:hover { border-color: var(--line-bright); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }

.course-thumb {
  width: 100%; height: 150px; object-fit: cover; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.course-body { padding: var(--s-4); }
.course-title { font-size: 0.86rem; font-weight: 600; color: var(--tx-1); margin-bottom: var(--s-2); }
.course-meta { font-size: 0.7rem; color: var(--tx-2); display: flex; gap: var(--s-2); flex-wrap: wrap; }

.course-tag {
  display: inline-block; padding: 2px 8px; background: var(--bg-3);
  border-radius: var(--r-pill); font-size: 0.6rem; font-weight: 600;
  color: var(--tx-2); text-transform: uppercase; letter-spacing: 0.05em;
}
.course-tag--beginner  { background: var(--brand-dim); color: var(--brand); }
.course-tag--technical { background: rgba(59,130,246,0.10); color: #93C5FD; }
.course-tag--algo      { background: rgba(139,92,246,0.10); color: #A78BFA; }
.course-tag--options   { background: rgba(245,158,11,0.10); color: #FCD34D; }

/* ─────────────────────────────────────────────────────────────────
   27. CRM / TEAM / PAYMENTS
───────────────────────────────────────────────────────────────── */
.table-card { }

.payment-form-card { }

.payments-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--s-5);
  align-items: start;
}

.crm-actions { display: flex; gap: var(--s-1); justify-content: flex-end; }

/* ─────────────────────────────────────────────────────────────────
   28. WORKSPACE FOOTER
───────────────────────────────────────────────────────────────── */
.workspace-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-2) var(--s-5);
  border-top: 1px solid var(--line);
  font-size: 0.64rem; color: var(--tx-3);
  flex-shrink: 0; font-family: var(--f-mono);
}

.version-badge {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 2px 8px;
  font-size: 0.6rem; color: var(--tx-3);
}

/* ─────────────────────────────────────────────────────────────────
   29. CHAT FAB
───────────────────────────────────────────────────────────────── */
.chat-fab {
  position: fixed; bottom: var(--s-5); right: var(--s-5);
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: #000; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--brand-glow);
  z-index: var(--z-sidebar);
  transition: transform var(--ease-2), box-shadow var(--ease-2);
}
.chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px var(--brand-glow); }

/* ─────────────────────────────────────────────────────────────────
   30. MOBILE BACKDROP
───────────────────────────────────────────────────────────────── */
.mobile-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(7, 10, 15, 0.72);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
}

/* ─────────────────────────────────────────────────────────────────
   31. RESPONSIVE
───────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-bottom-row { grid-template-columns: 1fr; }
  .payments-layout      { grid-template-columns: 1fr; }
  .metrics-grid         { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 240px; --rsidebar-w: 256px; }

  .mobile-topbar     { display: flex; }
  .sidebar-close-btn { display: flex; }

  .mobile-backdrop { display: block; opacity: 0; pointer-events: none; transition: opacity var(--ease-3); }
  .mobile-backdrop.active { opacity: 1; pointer-events: all; }

  .sidebar--left {
    position: fixed; top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
  }
  .sidebar--left.open  { transform: translateX(0); }

  .sidebar--right {
    position: fixed; top: 0; bottom: 0; right: 0;
    transform: translateX(100%);
  }
  .sidebar--right.open { transform: translateX(0); }

  .main-workspace  { padding-top: var(--topbar-h); }
  .module-viewport { padding: var(--s-4); }
  .wl-grid-container { grid-template-columns: 1fr; }
  .form-grid       { grid-template-columns: 1fr; }

  .metrics-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .module-viewport { padding: var(--s-3); }
  .wl-stock-card   { flex-wrap: wrap; min-height: auto; }
  .chart-wrapper   { height: 180px; }
}

.dashboard-chart-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
@media (max-width: 1024px) {
  .dashboard-chart-row {
    grid-template-columns: 1fr;
  }
}

/* Coming Soon Overlay for Clients */
body:not(.admin-mode) .client-coming-soon .content-to-blur {
  filter: blur(12px) grayscale(30%);
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
  transition: all 0.3s ease;
}
body:not(.admin-mode) .client-coming-soon {
  position: relative;
  overflow: hidden;
}
.coming-soon-overlay {
  display: none;
}
body:not(.admin-mode) .coming-soon-overlay {
  display: flex;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: rgba(7, 10, 15, 0.4);
  backdrop-filter: blur(4px);
  text-align: center;
  border-radius: inherit;
}
.overlay-lock-icon {
  width: 64px; height: 64px;
  background: var(--brand-dim);
  color: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
  box-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
}
.coming-soon-overlay h2 {
  font-size: 2.2rem;
  color: var(--tx-1);
  margin-bottom: var(--s-2);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.coming-soon-overlay p {
  color: var(--tx-2);
  font-size: 1.1rem;
}

/* ─────────────────────────────────────────────────────────────────
   27. FOMO TOAST (ADMIN ONLY)
───────────────────────────────────────────────────────────────── */
.fomo-toast {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(13,17,23,0.98) 0%, rgba(20,26,35,0.98) 100%);
  border: 1px solid var(--line-bright);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(0,200,83,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 99999;
  backdrop-filter: blur(20px);
  animation: slideUpFomo 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: all;
  min-width: 340px;
  max-width: 420px;
  cursor: default;
}
.fomo-toast:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 24px 70px rgba(0,0,0,0.9), 0 0 50px rgba(0,200,83,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}
.fomo-toast.fade-out {
  animation: fadeOutFomo 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}
.fomo-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fomo-content { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.fomo-name { font-size: 0.95rem; color: var(--tx-1); font-weight: 600; }
.fomo-name .fomo-city { font-weight: 400; color: var(--tx-2); font-size: 0.85rem; }
.fomo-plan { font-size: 0.82rem; color: var(--tx-2); }
.fomo-price-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.fomo-price { font-size: 1rem; font-weight: 800; font-family: var(--f-mono); }
.fomo-time { font-size: 0.72rem; color: var(--tx-3); font-family: var(--f-mono); }
.fomo-close {
  background: none; border: none; color: var(--tx-3); font-size: 0.85rem;
  cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1;
  transition: color 0.15s, background 0.15s; flex-shrink: 0;
}
.fomo-close:hover { color: var(--tx-1); background: var(--bg-3); }

@keyframes slideUpFomo {
  from { bottom: -120px; opacity: 0; transform: translateX(-50%) scale(0.92); }
  to   { bottom: 40px;   opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes fadeOutFomo {
  from { bottom: 40px;   opacity: 1; transform: translateX(-50%) scale(1); }
  to   { bottom: -120px; opacity: 0; transform: translateX(-50%) scale(0.92); }
}
