/* ═══════════════════════════════════════════════════════
   NSCIAI — Intraday Dashboard  |  styles.css
   Modern, user-friendly redesign
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ── Background layers — warm midnight blue ── */
  --bg:       #080b14;
  --surface:  #0e1220;
  --surface2: #141927;
  --surface3: #1a2133;

  /* ── Borders ── */
  --border:   #1f2b40;
  --border2:  #273348;

  /* ── Text ── */
  --text:     #edf2fc;
  --text2:    #a8b8d0;
  --muted:    #5c6f8a;

  /* ── Brand — vivid violet-indigo ── */
  --accent:   #7c6df7;
  --accent2:  #a99cf9;
  --accent-glow: rgba(124,109,247,0.35);

  /* ── Semantic ── */
  --green:    #00d68f;
  --green2:   #4ae9ba;
  --red:      #ff5252;
  --red2:     #ff8a80;
  --yellow:   #ffb300;
  --yellow2:  #ffd54f;
  --ce:       #ff8a80;
  --pe:       #4ae9ba;

  /* ── Shape ── */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* ── Shadow ── */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.45);
  --shadow:    0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.65);
  --glow-green: 0 0 12px rgba(0,214,143,0.3);
  --glow-red:   0 0 12px rgba(255,82,82,0.3);
}

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

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #0e1220 0%, #121829 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 52px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.logo {
  font-size: 20px; font-weight: 900; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #a99cf9 0%, #7c6df7 50%, #5c52d9 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(124,109,247,0.5));
}

.tagline {
  font-size: 10px; color: var(--accent2); font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(124,109,247,0.1);
  border: 1px solid rgba(124,109,247,0.25);
  letter-spacing: 0.3px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 16px rgba(0,214,143,0.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(0.8)} }

.clock {
  font-size: 13px; color: var(--text2); font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface2); padding: 4px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

.market-status {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  padding: 4px 11px; border-radius: 20px;
  background: rgba(0,214,143,0.1);
  color: var(--green);
  border: 1px solid rgba(0,214,143,0.3);
}

.refresh-btn {
  background: linear-gradient(135deg, rgba(124,109,247,0.15), rgba(124,109,247,0.08));
  border: 1px solid rgba(124,109,247,0.3);
  color: var(--accent2);
  padding: 6px 16px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.refresh-btn:hover {
  background: linear-gradient(135deg, rgba(124,109,247,0.3), rgba(124,109,247,0.15));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(124,109,247,0.3);
}

.last-updated { font-size: 10px; color: var(--muted); font-weight: 500; }

/* ── KITE STATUS BADGE ── */
.kite-badge { font-size: 10px; font-weight: 700; padding: 4px 11px; border-radius: 20px; }
.kite-badge.connected    { color: var(--green); background: rgba(0,214,143,0.1); border: 1px solid rgba(0,214,143,0.3); }
.kite-badge.disconnected { color: var(--red);   background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.3); }

/* ════════════════════════════════════════════════════
   CONNECT BANNER
════════════════════════════════════════════════════ */
.connect-banner {
  background: linear-gradient(90deg, rgba(124,109,247,0.06) 0%, rgba(124,109,247,0.02) 100%);
  border-bottom: 1px solid rgba(124,109,247,0.2);
  padding: 10px 24px;
  flex-shrink: 0;
}
.connect-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.connect-left  { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 180px; }
.connect-right { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.connect-title { font-size: 13px; font-weight: 800; color: var(--accent2); }
.connect-sub   { font-size: 10px; color: var(--muted); }
.connect-tip   { font-size: 9px; color: var(--muted); line-height: 1.6; }
.connect-tip b { color: var(--text2); }

.connect-fields { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.connect-input {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 7px 13px; border-radius: var(--radius-sm);
  font-size: 11px; font-family: 'Courier New', monospace; width: 165px;
  transition: all 0.2s;
}
.connect-input:focus {
  outline: none; border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,109,247,0.15);
}

.connect-btn {
  background: linear-gradient(135deg, #7c6df7, #9f93fb);
  border: none; color: #fff; padding: 7px 18px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all 0.2s; box-shadow: 0 2px 10px rgba(124,109,247,0.4);
}
.connect-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,109,247,0.5); }

.connect-msg { font-size: 10px; font-weight: 600; min-height: 15px; }
.connect-msg.ok   { color: var(--green); }
.connect-msg.err  { color: var(--red); }
.connect-msg.info { color: var(--accent2); }

.ping-btn {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 9px; padding: 4px 10px;
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.ping-btn:hover { color: var(--text); border-color: var(--accent); }

/* ════════════════════════════════════════════════════
   MAIN TAB NAVIGATION
════════════════════════════════════════════════════ */
.main-tabs-nav {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  flex-shrink: 0;
  overflow-x: auto;
}
.main-tabs-nav::-webkit-scrollbar { display: none; }

.main-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12px; font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.main-tab-btn:hover {
  color: var(--text2);
  background: var(--surface2);
  border-color: var(--border);
}
.main-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #7c6df7, #9f93fb);
  border-color: rgba(124,109,247,0.5);
  box-shadow: 0 2px 10px rgba(124,109,247,0.35);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════
   TABS CONTENT WRAPPER
════════════════════════════════════════════════════ */
.tabs-content {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.tab-panel {
  display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden;
}
.tab-panel.active { display: flex; }

/* ════════════════════════════════════════════════════
   DASHBOARD PAGE
════════════════════════════════════════════════════ */
.page {
  flex: 1; min-height: 0; padding: 14px 18px;
  display: flex; flex-direction: column; overflow: hidden; gap: 10px;
}

.row { display: grid; gap: 12px; }
.row-top  { grid-template-columns: 220px repeat(3, 1fr); flex-shrink: 0; align-items: start; }
.row-cepe { grid-template-columns: repeat(3, 1fr); flex: 1; min-height: 0; }

.section-heading {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  padding: 4px 0 7px;
  border-bottom: 1px solid var(--border);
  color: var(--muted); text-transform: uppercase;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════════ */
.card {
  background: linear-gradient(145deg, var(--surface) 0%, #101522 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  min-height: 0; overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,109,247,0.3), transparent);
}
.card:hover {
  border-color: rgba(124,109,247,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.card-title {
  font-size: 9px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ── VIX CARD ───────────────────────────────────────── */
.vix-card {
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}

.vix-top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.vix-num { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vix-value { font-size: 32px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.vix-change { font-size: 12px; font-weight: 600; }
.green { color: var(--green); }
.red   { color: var(--red); }
#vixGauge { flex-shrink: 0; display: block; }

.vix-meta-row { display: flex; flex-wrap: wrap; gap: 5px; }
.meta-pill {
  display: inline-block; font-size: 9px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 20px;
}
.meta-pill b { color: var(--text2); }

.vix-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; width: fit-content; letter-spacing: 0.5px;
}
.vix-badge.low    { background:rgba(16,185,129,0.12); color:var(--green);  border:1px solid rgba(16,185,129,0.3); }
.vix-badge.medium { background:rgba(245,158,11,0.12); color:var(--yellow); border:1px solid rgba(245,158,11,0.3); }
.vix-badge.high   { background:rgba(239,68,68,0.12);  color:var(--red);    border:1px solid rgba(239,68,68,0.3); }

.vix-interpret {
  font-size: 10px; font-weight: 500; padding: 8px 10px; border-radius: var(--radius-sm);
  line-height: 1.5; background: var(--surface2); color: var(--text2);
  white-space: normal;          /* allow wrapping — no more clipping */
  border: 1px solid var(--border);
}

/* ── S/R CARD ───────────────────────────────────────── */
.sr-card { overflow-y: auto; }
.sr-container { display: flex; flex-direction: column; gap: 3px; }

.sr-row {
  display: grid; grid-template-columns: 22px 1fr auto;
  align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: var(--radius-sm);
}
.sr-row.res { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15); }
.sr-row.sup { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15); }
.sr-row.res.strong { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.1); }
.sr-row.sup.strong { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.1); }

.sr-rank { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-align: center; }
.res .sr-rank { color: var(--red); }
.sup .sr-rank { color: var(--green); }

.sr-right { display: flex; flex-direction: column; gap: 1px; }
.sr-strike { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.res .sr-strike { color: var(--red2); }
.sup .sr-strike { color: var(--green2); }
.sr-oi-label { font-size: 9px; color: var(--muted); }

.sr-bar-wrap { width: 48px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sr-bar-val  { font-size: 9px; font-weight: 700; color: var(--muted); }
.sr-bar-track { width: 100%; height: 3px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.sr-bar-fill  { height: 100%; border-radius: 2px; }
.res .sr-bar-fill { background: var(--red); }
.sup .sr-bar-fill { background: var(--green); }

.sr-spot-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; margin: 3px 0;
  background: var(--surface2); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.sr-spot-inner { display: flex; align-items: center; gap: 8px; }
.sr-spot-lbl { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sr-spot-val { font-size: 13px; font-weight: 800; color: var(--accent2); font-variant-numeric: tabular-nums; }
.pcr-pill {
  font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  background: var(--surface3); border: 1px solid var(--border);
}

/* ── CEPE CARD ──────────────────────────────────────── */
.cepe-card { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.chart-wrap { position: relative; width: 100%; flex-shrink: 0; height: 110px; }
.chart-wrap canvas { position: absolute; inset: 0; }

/* ── CEPE TABLE ─────────────────────────────────────── */
.cepe-table { width: 100%; border-collapse: collapse; font-size: 11px; flex-shrink: 0; }
.cepe-table th {
  padding: 5px 6px; text-align: center;
  color: var(--muted); font-size: 9px; font-weight: 700;
  text-transform: uppercase; border-bottom: 1px solid var(--border); letter-spacing: 0.4px;
}
.cepe-table td {
  padding: 5px 6px; text-align: center;
  border-bottom: 1px solid rgba(38,48,68,0.5);
  font-variant-numeric: tabular-nums;
}
.cepe-table tbody tr:last-child td { border-bottom: none; }
.cepe-table tbody tr:hover { background: var(--surface2); }

.trend-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.3px;
}
.trend-tag.bullish { background:rgba(16,185,129,0.12); color:var(--green);  border:1px solid rgba(16,185,129,0.3); }
.trend-tag.bearish { background:rgba(239,68,68,0.12);  color:var(--red);    border:1px solid rgba(239,68,68,0.3); }
.trend-tag.neutral { background:rgba(245,158,11,0.12); color:var(--yellow); border:1px solid rgba(245,158,11,0.3); }

/* ══════════════════════════════════════════════════════
   OPTION CHAIN TAB
══════════════════════════════════════════════════════ */

/* ── MARKET SENTIMENT METER ──────────────────────────── */
.oc-sentiment-bar {
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 10px;
  flex-shrink: 0;
}
.osb-title {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--muted); margin-bottom: 8px;
}
.osb-meter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.osb-bull-pct { font-size: 22px; font-weight: 900; color: var(--green); min-width: 50px; }
.osb-bear-pct { font-size: 22px; font-weight: 900; color: var(--red);   min-width: 50px; text-align: right; }
.osb-track {
  flex: 1; height: 12px; border-radius: 6px; overflow: hidden;
  display: flex; background: var(--surface3); border: 1px solid var(--border);
}
.osb-fill-bull { background: linear-gradient(90deg, #059669, #10b981); height: 100%; transition: width 0.7s ease; }
.osb-fill-bear { background: linear-gradient(90deg, #ef4444, #dc2626); height: 100%; transition: width 0.7s ease; }

.osb-labels-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.osb-lbl-bull { font-size: 9px; font-weight: 700; color: var(--green); }
.osb-lbl-bear { font-size: 9px; font-weight: 700; color: var(--red); }
.osb-verdict  { font-size: 11px; font-weight: 700; color: var(--text); text-align: center; flex: 1; padding: 0 10px; }
.osb-verdict-bull { color: var(--green2); }
.osb-verdict-bear { color: var(--red2); }
.osb-verdict-neut { color: var(--yellow2); }

.osb-factors { display: flex; flex-wrap: wrap; gap: 4px; }
.osb-factor {
  font-size: 8px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid; white-space: nowrap;
}
.osf-bull { color: var(--green2); border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.08); }
.osf-neut { color: var(--muted);  border-color: var(--border);         background: var(--surface3); }
.osf-bear { color: var(--red2);   border-color: rgba(239,68,68,0.4);  background: rgba(239,68,68,0.08); }

/* ── Sub-tab nav ─────────────────────────────────────── */
.oc-sub-nav {
  display: flex; gap: 6px;
  padding: 10px 16px 0;
  flex-shrink: 0;
}
.oc-sub-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-bottom: none; color: var(--muted);
  font-size: 11px; font-weight: 700; font-family: inherit;
  padding: 6px 20px; cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.15s, background 0.15s;
}
.oc-sub-btn:hover  { color: var(--text2); background: var(--surface3); }
.oc-sub-btn.active { color: var(--accent2); background: var(--surface); border-color: var(--border); }

/* ── Panels container ────────────────────────────────── */
.oc-panels { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

.oc-panel {
  display: none; flex-direction: column; flex: 1; min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  margin: 0 16px;
  overflow: hidden;
}
.oc-panel.active { display: flex; }

/* ── Summary bar ─────────────────────────────────────── */
.oc-summary {
  display: flex; align-items: center; gap: 28px;
  padding: 12px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; flex-wrap: wrap;
}
.oc-stat { display: flex; flex-direction: column; gap: 3px; }
.oc-lbl  { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.oc-val  { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.oc-val.accent { color: var(--accent2); }
.oc-val.muted  { font-size: 12px; color: var(--muted); font-weight: 600; }
.oc-val.ce { color: var(--ce); }
.oc-val.pe { color: var(--pe); }

/* ── Body: S/R left + Options right ─────────────────── */
.oc-body { display: grid; grid-template-columns: 270px 1fr; gap: 0; flex: 1; min-height: 0; overflow: hidden; }

.oc-sr-panel {
  padding: 14px; border-right: 1px solid var(--border);
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.oc-options-panel {
  padding: 14px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
}

.oc-section-title {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.7px;
  padding-bottom: 7px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}

/* ── Best Options ↔ Hero-Zero tab switcher ───────────── */
.oc-opts-tab-nav {
  display: flex; gap: 6px; margin-bottom: 10px; flex-shrink: 0;
}
.oc-opts-tab-btn {
  padding: 6px 15px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface2); color: var(--muted);
  transition: all .2s; font-family: inherit;
}
.oc-opts-tab-btn.active {
  background: linear-gradient(135deg, #7c6df7, #9f93fb);
  color: #fff; border-color: rgba(124,109,247,0.5);
  box-shadow: 0 2px 8px rgba(124,109,247,0.3);
}
.oc-opts-tab-btn:not(.active):hover { background: var(--surface3); color: var(--text2); }

/* ── Options grid — responsive cards ────────────────── */
.oc-opts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* ── Single option card ──────────────────────────────── */
.opt-card {
  background: linear-gradient(160deg, var(--surface2) 0%, #111826 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.opt-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  border-color: var(--border2);
}
.opt-card.bullish { border-color: rgba(0,214,143,0.25); border-top: 2px solid var(--green); }
.opt-card.bearish { border-color: rgba(255,82,82,0.25); border-top: 2px solid var(--red); }
.opt-card.neutral { border-color: rgba(255,179,0,0.25); border-top: 2px solid var(--yellow); }

.opt-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.opt-rank {
  font-size: 9px; font-weight: 800; color: var(--muted);
  background: var(--surface3); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 20px;
}
.opt-strike {
  font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums;
  color: var(--text); flex: 1;
}
.opt-type {
  font-size: 10px; font-weight: 800;
  padding: 3px 9px; border-radius: 20px; letter-spacing: 0.5px;
}
.opt-type.ce { background: rgba(248,113,113,0.12); color: var(--ce);  border: 1px solid rgba(248,113,113,0.35); }
.opt-type.pe { background: rgba(52,211,153,0.12);  color: var(--pe);  border: 1px solid rgba(52,211,153,0.35); }

/* Strategy badge */
.opt-strategy-badge {
  font-size: 7px; font-weight: 700; letter-spacing: 0.3px;
  padding: 3px 7px; border-radius: 20px;
  white-space: normal; line-height: 1.2; text-align: center;
  flex-shrink: 0; max-width: 100px;
}
.strat-safe       { background: rgba(0,214,143,0.12);   color: var(--green2);  border: 1px solid rgba(0,214,143,0.3); }
.strat-best       { background: rgba(124,109,247,0.12); color: var(--accent2); border: 1px solid rgba(124,109,247,0.3); }
.strat-momentum   { background: rgba(255,179,0,0.12);   color: var(--yellow2); border: 1px solid rgba(255,179,0,0.3); }
.strat-affordable { background: rgba(169,156,249,0.12); color: var(--accent2); border: 1px solid rgba(169,156,249,0.3); }
.strat-hedge      { background: var(--surface3); color: var(--muted); border: 1px solid var(--border); }

.opt-reason { font-size: 9.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* ── Greeks ──────────────────────────────────────────── */
.opt-greeks { display: flex; flex-direction: column; gap: 5px; }

.greek-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.15s;
}
.greek-row:hover { border-color: var(--border2); }

.greek-header { display: flex; justify-content: space-between; align-items: center; }
.greek-lbl {
  font-size: 8px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.greek-val { font-size: 12px; font-weight: 800; color: var(--text); }
.greek-val:empty { display: none; }
.greek-val.high   { color: var(--green2); }
.greek-val.medium { color: var(--yellow2); }
.greek-val.low    { color: var(--muted); }
.greek-val.vlow   { color: var(--red2); }
.greek-explain { font-size: 9px; color: var(--text2); line-height: 1.5; opacity: 0.85; }

/* ── Option Price row ────────────────────────────────── */
.opt-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.opt-price-item {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 8px;
}
.price-lbl { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.price-val { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }

/* ── Trade levels ────────────────────────────────────── */
.opt-trade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.opt-trade-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 7px 9px; border-radius: var(--radius-sm);
}
.opt-trade-item.entry  { background: rgba(124,109,247,0.08); border: 1px solid rgba(124,109,247,0.25); }
.opt-trade-item.target { background: rgba(0,214,143,0.08);   border: 1px solid rgba(0,214,143,0.25); }
.opt-trade-item.sl     { background: rgba(255,82,82,0.08);   border: 1px solid rgba(255,82,82,0.25); }

.trade-lbl { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.trade-val { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.trade-sub { font-size: 9px; color: var(--muted); font-weight: 600; }

.oc-disclaimer {
  font-size: 9px; color: var(--muted); line-height: 1.5;
  padding: 7px 10px; background: var(--surface3);
  border: 1px solid var(--border); border-radius: var(--radius-sm); flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  text-align: center; padding: 6px;
  font-size: 9px; color: var(--muted);
  border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface);
}

/* ══════════════════════════════════════════════════════
   GLOBAL MARKETS TAB
══════════════════════════════════════════════════════ */
.gm-page {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 8px;
}

.gm-hero-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  flex-shrink: 0; gap: 10px; flex-wrap: wrap;
}
.gm-clocks-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.gm-clock-item { display: flex; flex-direction: column; gap: 0; }
.gm-clock-city { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.gm-clock-time { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.2; }
.gm-clock-date { font-size: 8px; color: var(--muted); }

.gm-active-pill { display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; }
.gm-active-num  { font-size: 24px; font-weight: 900; color: var(--green); line-height: 1; }
.gm-active-lbl  { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }

.gm-section { display: flex; flex-direction: column; gap: 5px; margin-bottom: 7px; flex-shrink: 0; }
.gm-section:last-of-type { margin-bottom: 0; }

.gm-sec-hdr {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  padding: 3px 10px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
}
.gm-sec-hdr.asia     { background:rgba(6,182,212,0.10);  color:#22d3ee; border:1px solid rgba(6,182,212,0.25); }
.gm-sec-hdr.europe   { background:rgba(168,85,247,0.10); color:#c084fc; border:1px solid rgba(168,85,247,0.25); }
.gm-sec-hdr.americas { background:rgba(249,115,22,0.10); color:#fb923c; border:1px solid rgba(249,115,22,0.25); }
.gm-sec-hdr.macro    { background:rgba(250,204,21,0.10); color:#fde047; border:1px solid rgba(250,204,21,0.25); }

.gm-mini-grid { display: grid; gap: 6px; }
#gmGridAsia     { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
#gmGridEurope   { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
#gmGridAmericas { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.gm-mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
  overflow: hidden; position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gm-mini-card:hover { box-shadow: var(--shadow-sm); }
.gm-mini-card.is-open       { box-shadow: 0 0 0 1px rgba(16,185,129,0.2) inset; }
.gm-mini-card.is-premarket  { box-shadow: 0 0 0 1px rgba(99,102,241,0.2) inset; }
.gm-mini-card.is-afterhours { box-shadow: 0 0 0 1px rgba(245,158,11,0.2) inset; }

/* Price-direction — bright solid colour cards */
.gm-mini-card.card-up   { background: #0a3d22; border-color: #10b981; border-width: 1.5px; }
.gm-mini-card.card-down { background: #3d0a0a; border-color: #ef4444; border-width: 1.5px; }
.gm-mini-card.card-up   .gmc-city,
.gm-mini-card.card-up   .gmc-price { color: #d1fae5; }
.gm-mini-card.card-down .gmc-city,
.gm-mini-card.card-down .gmc-price { color: #fee2e2; }

/* India impact badge on each card */
.gmc-impact-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 8.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px; margin-top: 2px;
  background: rgba(99,102,241,0.18); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.35);
  white-space: nowrap;
}
.gmc-impact-badge.live { background: rgba(16,185,129,0.18); color: #6ee7b7; border-color: rgba(16,185,129,0.4); }

/* ── Global Sentiment Meter ──────────────────────────── */
.gm-sentiment-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.gm-sent-title {
  font-size: 11px; font-weight: 700; color: var(--text2);
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px;
}
.gm-sent-meter-row {
  display: flex; align-items: center; gap: 10px;
}
.gm-sent-bull-pct { font-size: 18px; font-weight: 800; color: var(--green); min-width: 48px; text-align: right; }
.gm-sent-bear-pct { font-size: 18px; font-weight: 800; color: var(--red);   min-width: 48px; text-align: left; }
.gm-sent-track {
  flex: 1; height: 10px; border-radius: 10px; overflow: hidden;
  background: var(--surface2); display: flex;
}
.gm-sent-fill-bull { height: 100%; background: var(--green); border-radius: 10px 0 0 10px; transition: width .5s; }
.gm-sent-fill-bear { height: 100%; background: var(--red);   border-radius: 0 10px 10px 0; transition: width .5s; }
.gm-sent-labels-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; font-size: 10px;
}
.gm-sent-lbl-bull { color: var(--green); font-weight: 600; }
.gm-sent-lbl-bear { color: var(--red);   font-weight: 600; }
.gm-sent-verdict  { font-size: 12px; font-weight: 700; color: var(--text); }
.gm-sent-sub      { font-size: 9px; color: var(--muted); margin-top: 4px; text-align: center; }

.gmc-row1 { display: flex; align-items: center; gap: 6px; }
.gmc-flag { font-size: 15px; line-height: 1; flex-shrink: 0; }
.gmc-names { flex: 1; min-width: 0; }
.gmc-city { font-size: 10px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmc-exch { font-size: 8px; color: var(--muted); }

.gmc-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.gmc-dot.open       { background: var(--green); box-shadow: 0 0 5px var(--green); }
.gmc-dot.closed     { background: var(--border2); }
.gmc-dot.premarket  { background: var(--accent); }
.gmc-dot.afterhours { background: var(--yellow); }
.gmc-dot.lunch      { background: var(--yellow); }

.gmc-index { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gmc-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.gmc-price { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.gmc-price.loading { font-size: 10px; color: var(--muted); font-weight: 400; }

.gmc-dir {
  font-size: 8px; font-weight: 800; padding: 1px 6px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}
.gmc-dir.up   { background:rgba(16,185,129,0.12); color:var(--green2); border:1px solid rgba(16,185,129,0.35); }
.gmc-dir.down { background:rgba(239,68,68,0.12);  color:var(--red2);   border:1px solid rgba(239,68,68,0.35); }
.gmc-dir.na   { background:var(--surface2); color:var(--muted); border:1px solid var(--border); }

.gmc-change { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gmc-change.up   { color: var(--green2); }
.gmc-change.down { color: var(--red2); }

.gmc-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding-top: 4px; border-top: 1px solid var(--border);
}
.gmc-ist { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmc-now { font-size: 8px; font-weight: 700; color: var(--accent2); white-space: nowrap; flex-shrink: 0; }
.gmc-now .next-day { color: var(--muted); font-weight: 400; }

.gm-foot-note {
  font-size: 8px; color: var(--muted); padding: 5px 10px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); flex-shrink: 0; margin-top: 5px;
}

/* ── Next Session Prediction (Global Markets tab) ─── */
.gm-next-session {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(16,185,129,0.05));
  border: 1.5px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  flex-shrink: 0;
}
.gm-next-loading { font-size: 11px; color: var(--muted); padding: 6px 0; }
.gm-next-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.gm-next-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 0.6px;
  background: rgba(99,102,241,0.2); color: var(--accent2);
  border: 1px solid rgba(99,102,241,0.4);
  padding: 3px 10px; border-radius: 20px;
}
.gm-next-ctx { font-size: 10px; color: var(--muted); font-weight: 600; }
.gm-next-body {
  display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: start;
}
@media (max-width: 800px) { .gm-next-body { grid-template-columns: 1fr; } }
.gm-next-verdict {
  font-size: 15px; font-weight: 800; margin-bottom: 10px;
}
.gm-next-verdict.bull { color: var(--green2); }
.gm-next-verdict.bear { color: var(--red2); }
.gm-next-verdict.neut { color: var(--yellow2); }
.gm-next-advice {
  font-size: 10.5px; color: var(--text2); line-height: 1.6;
  margin-top: 8px;
}
.gm-next-right {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.gm-next-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  padding: 3px 0; border-bottom: 1px solid var(--border);
}
.gm-next-row:last-child { border-bottom: none; }
.gm-next-lbl { font-size: 9px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.gm-next-val { font-size: 10px; font-weight: 700; color: var(--text2); text-align: right; }
.gm-next-val.bull { color: var(--green2); }
.gm-next-val.bear { color: var(--red2); }
.gm-next-val.neut { color: var(--yellow2); }

/* ── Price bar (global market full card) ────────────── */
.gm-price-bar { padding: 8px 10px; border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px; }
.gm-price-bar.up      { background: rgba(16,185,129,0.07);  border: 1px solid rgba(16,185,129,0.25); }
.gm-price-bar.down    { background: rgba(239,68,68,0.07);   border: 1px solid rgba(239,68,68,0.25); }
.gm-price-bar.loading,
.gm-price-bar.no-data { background: var(--surface2); border: 1px solid var(--border); }
.gm-price-fetching    { font-size: 10px; color: var(--muted); }
.gm-price-top  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gm-price-val  { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
.gm-dir-badge  { font-size: 9px; font-weight: 800; padding: 2px 9px; border-radius: 20px; letter-spacing: 0.5px; white-space: nowrap; }
.gm-dir-badge.up   { background: rgba(16,185,129,0.15); color: var(--green2); border: 1px solid rgba(16,185,129,0.4); }
.gm-dir-badge.down { background: rgba(239,68,68,0.15);  color: var(--red2);   border: 1px solid rgba(239,68,68,0.4); }
.gm-price-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gm-price-chg.up   { color: var(--green2); font-size: 11px; font-weight: 700; }
.gm-price-chg.down { color: var(--red2);   font-size: 11px; font-weight: 700; }
.gm-price-state { font-size: 9px; color: var(--muted); font-weight: 600; }
.gm-price-hl    { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-hl-item { font-size: 9px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gm-hl-lbl  { font-weight: 800; color: var(--border2); margin-right: 2px; font-size: 8px; text-transform: uppercase; }
.gm-hl-sep  { color: var(--border2); }

/* ══════════════════════════════════════════════════════
   HERO-ZERO / PENNY OPTIONS
══════════════════════════════════════════════════════ */
.penny-pane { overflow-y: auto; }

.penny-header-note {
  font-size: 10.5px; color: var(--text2); line-height: 1.5;
  background: #1a1200; border: 1px solid #f59e0b44; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 10px;
}

.penny-empty {
  text-align: center; padding: 30px 10px;
  color: var(--muted); font-size: 11px; line-height: 1.8;
}

.penny-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}

/* Individual penny card */
.penny-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 3px solid var(--border);
}
.penny-card.ce { border-top-color: var(--green); }
.penny-card.pe { border-top-color: var(--red); }

/* Top section */
.penny-card-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
}
.penny-card-left { flex: 1; }
.penny-badge-hz {
  display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: .6px;
  padding: 2px 6px; border-radius: 4px;
  background: #f59e0b22; color: #f59e0b; border: 1px solid #f59e0b55;
  margin-bottom: 4px;
}
.penny-strike-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.penny-strike { font-size: 16px; font-weight: 800; color: var(--text); }
.penny-type-tag {
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 4px;
}
.penny-type-tag.ce { background: rgba(16,185,129,.15); color: var(--green2); border: 1px solid rgba(16,185,129,.35); }
.penny-type-tag.pe { background: rgba(239,68,68,.15);  color: var(--red2);   border: 1px solid rgba(239,68,68,.35); }
.penny-dir-tag { font-size: 9px; font-weight: 700; }

.penny-buy-box {
  display: flex; flex-direction: column; align-items: flex-end;
  background: var(--surface3); border-radius: 6px; padding: 6px 10px;
  border: 1px solid var(--border); flex-shrink: 0;
}
.penny-buy-lbl   { font-size: 8px; color: var(--muted); font-weight: 600; }
.penny-buy-price { font-size: 20px; font-weight: 900; color: var(--accent2); line-height: 1.1; }
.penny-buy-range { font-size: 8px; color: var(--muted); }

/* Trigger rows */
.penny-trigger-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; padding: 3px 0; border-bottom: 1px solid var(--border);
}
.penny-trig-lbl { color: var(--muted); }
.penny-trig-val { font-weight: 700; color: var(--text); }

/* Scenario table */
.penny-scenarios { background: var(--surface3); border-radius: 6px; padding: 8px; }
.penny-scen-title { font-size: 8.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.penny-scen-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 10px;
}
.penny-scen-row:last-child { border-bottom: none; }
.penny-scen-row.loss-row { margin-top: 3px; padding-top: 5px; border-top: 1px dashed var(--red); border-bottom: none; }
.penny-scen-move { color: var(--text2); }
.penny-scen-ret { font-weight: 800; }
.penny-ret-ok    { color: #fbbf24; }
.penny-ret-good  { color: #34d399; }
.penny-ret-great { color: #10b981; }
.penny-ret-loss  { color: var(--red); }

/* Meta row */
.penny-meta-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px;
}
.penny-meta-item {
  font-size: 8.5px; color: var(--muted);
  background: var(--surface3); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  html, body { overflow: auto; height: auto; }
  .tabs-content, .tab-panel, .page { overflow: auto; height: auto; flex: none; }
  .row-top  { grid-template-columns: 1fr 1fr; }
  .row-cepe { grid-template-columns: 1fr 1fr; }
  .oc-body  { grid-template-columns: 1fr; }
  .oc-sr-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .gm-page { overflow-y: auto; height: auto; }
}

@media (max-width: 700px) {
  html, body { overflow: auto; height: auto; }
  .topbar { padding: 8px 12px; flex-wrap: wrap; gap: 8px; height: auto; }
  .tagline { display: none; }
  .topbar-right { gap: 8px; flex-wrap: wrap; }
  .main-tabs-nav { padding: 0 12px; }
  .main-tab-btn  { padding: 0 12px; font-size: 11px; }
  .page { padding: 8px 10px; }
  .row-top  { grid-template-columns: 1fr; }
  .row-cepe { grid-template-columns: 1fr; }
  .oc-body  { grid-template-columns: 1fr; }
  .gm-page { overflow-y: auto; height: auto; }
  .oc-panel { margin: 0 8px; }
  .lt-inner { flex-direction: column; gap: 12px; }
  .lt-actions { align-self: stretch; }
  .lt-exit-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════
   MULTI-TRADE TRACKER BANNER
══════════════════════════════════════════════════════ */
.locked-trade-banner {
  margin: 12px 16px 0;
  border-radius: 10px;
  border: 1.5px solid #f59e0b;
  background: #100e00;
  overflow: hidden;
}
.lt-multi-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 8px; border-bottom: 1px solid #f59e0b22;
}
.lt-multi-title { font-size: 12px; font-weight: 700; color: #f59e0b; }
.lt-multi-count {
  display: inline-block; background: #f59e0b; color: #000;
  font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 10px; margin-left: 5px;
}
.lt-clear-all-btn {
  background: #ef444420; color: var(--red); border: 1px solid var(--red);
  padding: 4px 10px; border-radius: 5px; font-size: 10px; font-weight: 700;
  cursor: pointer;
}
.lt-clear-all-btn:hover { background: #ef444435; }

/* Grid of trade mini-cards */
.lt-multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 10px 14px;
}

/* Individual trade card inside the banner */
.ltc-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; position: relative;
}
.ltc-card.ce { border-top-color: #6366f1; }
.ltc-card.pe { border-top-color: #ef4444; }
.ltc-card.ltc-penny { border-top-color: #f59e0b; }

.ltc-top { display: flex; align-items: flex-start; justify-content: space-between; }
.ltc-title-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ltc-type-tag {
  font-size: 8px; font-weight: 800; padding: 1px 5px; border-radius: 3px;
}
.ltc-type-tag.ce { background: #6366f122; color: var(--accent2); border: 1px solid #6366f155; }
.ltc-type-tag.pe { background: #ef444422; color: var(--red);     border: 1px solid #ef444455; }
.ltc-name { font-size: 12px; font-weight: 700; color: var(--text); }
.ltc-hz-badge { font-size: 11px; }
.ltc-close {
  background: none; border: none; color: var(--muted); font-size: 11px;
  cursor: pointer; padding: 0 2px; line-height: 1; flex-shrink: 0;
}
.ltc-close:hover { color: var(--red); }

.ltc-strat { font-size: 9px; color: var(--muted); }
.ltc-entry-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ltc-lbl { font-size: 9px; color: var(--muted); }
.ltc-entry-val { font-weight: 700; color: var(--text); }

.ltc-pl-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; font-weight: 700;
}
.ltc-ltp  { color: var(--text); }
.ltc-pos  { color: var(--green); }
.ltc-neg  { color: var(--red); }
.ltc-na   { font-size: 9px; color: var(--muted); }

.ltc-range { font-size: 9px; color: var(--muted); }
.ltc-low   { color: var(--green); }
.ltc-high  { color: var(--red); }

.ltc-levels {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 10px; padding-top: 3px; border-top: 1px solid var(--border);
}
.ltc-tgt    { font-weight: 700; color: var(--green); }
.ltc-sl-val { font-weight: 700; color: var(--red); }

.ltc-penny-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto;
  gap: 3px; font-size: 9px; padding-top: 3px; border-top: 1px solid var(--border);
  align-items: center;
}

.ltc-status-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px; padding-top: 4px; border-top: 1px solid var(--border);
}
.ltc-status {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}
.ltc-hit    { background: #10b98122; color: var(--green); border: 1px solid var(--green); }
.ltc-sl     { background: #ef444422; color: var(--red);   border: 1px solid var(--red); }
.ltc-profit { background: #10b98115; color: #34d399; }
.ltc-wait   { background: var(--surface3); color: var(--muted); }
.ltc-spot-lbl { font-size: 8px; color: var(--muted); }

.lt-note {
  font-size: 10px; color: #92701a; background: #f59e0b0d;
  padding: 6px 14px; border-top: 1px solid #f59e0b22; line-height: 1.5;
}

/* Lock button on best-options cards */
.opt-lock-btn {
  display: block; width: 100%; margin-top: 6px;
  background: linear-gradient(135deg, rgba(124,109,247,0.1), rgba(124,109,247,0.06));
  color: var(--accent2);
  border: 1px solid rgba(124,109,247,0.3); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 11px; font-weight: 700;
  cursor: pointer; text-align: center; transition: all 0.2s;
  font-family: inherit;
}
.opt-lock-btn:hover {
  background: linear-gradient(135deg, rgba(124,109,247,0.2), rgba(124,109,247,0.12));
  box-shadow: 0 0 10px rgba(124,109,247,0.25);
}
.opt-lock-btn.locked {
  background: linear-gradient(135deg, rgba(255,179,0,0.1), rgba(255,179,0,0.06));
  color: var(--yellow); border: 1px solid rgba(255,179,0,0.4);
}
.opt-lock-btn.locked:hover { background: rgba(255,179,0,0.2); }
.opt-card.is-locked {
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 1px rgba(255,179,0,0.3), 0 4px 16px rgba(255,179,0,0.1);
}

/* Track button on penny cards */
.penny-track-btn {
  display: block; width: 100%; margin-top: 6px;
  background: #f59e0b15; color: #f59e0b;
  border: 1px dashed #f59e0b88; border-radius: 6px;
  padding: 6px 10px; font-size: 10px; font-weight: 700;
  cursor: pointer; text-align: center; transition: background .15s;
}
.penny-track-btn:hover  { background: #f59e0b25; }
.penny-track-btn.tracked { background: #f59e0b22; border-style: solid; }
.penny-card.penny-is-tracked { border-color: #f59e0b !important; box-shadow: 0 0 0 1px #f59e0b55; }

/* Penny high/low row inside the buy box */
.penny-hl-row  { display: flex; gap: 4px; align-items: center; margin-top: 2px; font-size: 9px; }
.penny-hl-item { font-weight: 700; }
.penny-hl-item.green { color: var(--green); }
.penny-hl-item.red   { color: var(--red); }
.penny-hl-sep  { color: var(--muted); }

/* ═══════════════════════════════════════════════════════
   DECISION TAB
═══════════════════════════════════════════════════════ */
.dec-page {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 16px;
  flex: 1; min-height: 0; overflow-y: auto;
}

/* ── Overall meter box ─────────────────────────────── */
.dec-overall-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  flex-shrink: 0;
}
.dec-overall-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 14px; text-align: center; letter-spacing: .3px;
}
.dec-meter-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.dec-bull-pct { font-size: 15px; font-weight: 800; color: var(--green); min-width: 44px; text-align: right; }
.dec-bear-pct { font-size: 15px; font-weight: 800; color: var(--red);   min-width: 44px; text-align: left;  }
.dec-meter-track {
  flex: 1; height: 14px; border-radius: 7px;
  background: var(--surface3);
  display: flex; overflow: hidden;
  border: 1px solid var(--border);
}
.dec-fill-bull { background: linear-gradient(90deg, #059669, #10b981); transition: width .6s ease; }
.dec-fill-bear { background: linear-gradient(90deg, #ef4444, #dc2626); transition: width .6s ease; }
.dec-labels-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; margin-bottom: 14px;
}
.dec-lbl-bull { color: var(--green); font-weight: 600; }
.dec-lbl-bear { color: var(--red);   font-weight: 600; }
.dec-verdict {
  font-size: 12px; font-weight: 700; text-align: center;
  padding: 4px 12px; border-radius: 20px;
}
.dec-verdict-bull { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.dec-verdict-neut { background: rgba(245,158,11,.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.dec-verdict-bear { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.3); }

/* ── Signal confidence badge ───────────────────────── */
.dec-confidence-row { margin-bottom: 10px; }
.dec-conf-badge {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
}
.conf-high { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.conf-med  { background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.conf-low  { background: rgba(107,114,128,.15); color: var(--muted); border: 1px solid rgba(107,114,128,.3); }

/* ── Factor pills ──────────────────────────────────── */
.dec-factors-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px; margin-top: 4px;
}
.dec-factor-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.dec-factor-pill.bull { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.04); }
.dec-factor-pill.bear { border-color: rgba(239,68,68,.4);  background: rgba(239,68,68,.04);  }
.dec-factor-pill.neut { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.04); }
.dec-fp-top   { display: flex; align-items: center; justify-content: space-between; }
.dec-fp-icon  { font-size: 14px; }
.dec-fp-weight{ font-size: 8px; color: var(--muted); font-weight: 600; }
.dec-fp-label { font-size: 9.5px; font-weight: 700; color: var(--text2); }
.dec-fp-bar-track {
  height: 5px; border-radius: 3px; background: var(--surface3); overflow: hidden;
}
.dec-fp-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #059669, #10b981);
  transition: width .5s ease;
}
.dec-factor-pill.bear .dec-fp-bar-fill { background: linear-gradient(90deg, #ef4444, #dc2626); }
.dec-factor-pill.neut .dec-fp-bar-fill { background: linear-gradient(90deg, #d97706, #f59e0b); }
.dec-fp-bottom { display: flex; flex-direction: column; gap: 2px; }
.dec-fp-pct { font-size: 11px; font-weight: 800; }
.dec-fp-pct.bull { color: var(--green); }
.dec-fp-pct.bear { color: var(--red);   }
.dec-fp-pct.neut { color: var(--yellow);}
.dec-fp-detail { font-size: 8.5px; color: var(--muted); line-height: 1.4; }

/* ── Timeline section ──────────────────────────────── */
.dec-timeline-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  flex-shrink: 0;
}
.dec-timeline-title {
  font-size: 12px; font-weight: 700; color: var(--text2);
  margin-bottom: 12px; letter-spacing: .3px;
}
.dec-timeline-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}
.dec-timeline-grid {
  display: flex; gap: 10px;
  min-width: max-content;
  padding: 4px 2px;
}

/* Individual time slot card */
.dec-slot {
  width: 130px; flex-shrink: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 10px 8px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  transition: box-shadow .2s;
}
.dec-slot.bull { border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.06); }
.dec-slot.bear { border-color: rgba(239,68,68,.5);  background: rgba(239,68,68,.06);  }
.dec-slot.neut { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.05); }
.dec-slot.is-active {
  box-shadow: 0 0 0 2px #10b981, 0 4px 14px rgba(16,185,129,.2);
  border-color: #10b981;
}
.dec-slot.is-past { opacity: .55; }
.dec-slot.is-future { border-style: dashed; }
.dec-slot.no-data  { opacity: .65; }

.dec-slot-time {
  font-size: 11px; font-weight: 800; color: var(--accent2);
  display: flex; align-items: center; gap: 4px;
}
.dec-slot-now {
  font-size: 8px; background: var(--green); color: #000;
  padding: 1px 5px; border-radius: 4px; font-weight: 800;
}
.dec-slot-icon   { font-size: 18px; line-height: 1; }
.dec-slot-label  { font-size: 10px; font-weight: 700; color: var(--text); line-height: 1.3; }
.dec-slot-flags  { font-size: 12px; letter-spacing: 1px; min-height: 14px; }
.dec-slot-sent   { font-size: 10px; font-weight: 700; margin-top: 2px; }
.dec-slot.bull .dec-slot-sent { color: var(--green); }
.dec-slot.bear .dec-slot-sent { color: var(--red);   }
.dec-slot.neut .dec-slot-sent { color: var(--yellow); }
.dec-slot.no-data .dec-slot-sent { color: var(--muted); }
.dec-slot-dur        { font-size: 8.5px; color: var(--muted); }
.dec-slot-trend      { font-size: 8.5px; color: var(--text2); font-weight: 600; margin-top: 1px; }
.dec-slot-avgpct     { font-weight: 800; }
.dec-slot.bull .dec-slot-avgpct { color: var(--green); }
.dec-slot.bear .dec-slot-avgpct { color: var(--red);   }
.dec-slot.no-data .dec-slot-sent { color: var(--muted); font-size: 9px; }
.dec-slot-progress {
  height: 3px; border-radius: 2px;
  background: var(--surface3); overflow: hidden; margin-top: 4px;
}
.dec-slot-prog-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #818cf8);
  transition: width .5s;
}

/* Timeline legend */
.dec-timeline-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; font-size: 10px; color: var(--muted);
}
.dec-leg-item { font-weight: 600; }
.dec-leg-item.bull { color: var(--green); }
.dec-leg-item.bear { color: var(--red);   }
.dec-leg-item.neut { color: var(--yellow); }
.dec-leg-sep       { color: var(--border); }
.dec-leg-note      { font-size: 9px; color: var(--muted); }

/* ── Reasoning section — list layout (no overflow) ─── */
.dec-reasoning-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  flex-shrink: 0;
}
.dec-reasoning-title {
  font-size: 12px; font-weight: 700; color: var(--text2);
  margin-bottom: 10px;
}
/* Each row = full width, two-part layout: left label+bar | right explanation */
.dec-reasoning-list { display: flex; flex-direction: column; gap: 8px; }
.dec-rsn-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  border-left-width: 3px;
}
.dec-rsn-row.bull { border-left-color: var(--green); }
.dec-rsn-row.bear { border-left-color: var(--red);   }
.dec-rsn-row.neut { border-left-color: var(--yellow); }
.dec-rsn-row.info { border-left-color: var(--accent);  }
/* Left side: title + % + mini bar */
.dec-rsn-left {
  flex-shrink: 0; width: 130px; display: flex; flex-direction: column; gap: 4px;
}
.dec-rsn-hdr {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.dec-rsn-title { font-size: 10px; font-weight: 700; color: var(--text); line-height: 1.3; }
.dec-rsn-pct {
  font-size: 10px; font-weight: 800;
  padding: 1px 6px; border-radius: 8px; white-space: nowrap;
}
.dec-rsn-pct.bull { background: rgba(16,185,129,.2); color: var(--green); }
.dec-rsn-pct.bear { background: rgba(239,68,68,.2);  color: var(--red);   }
.dec-rsn-pct.neut { background: rgba(245,158,11,.2); color: var(--yellow); }
/* Mini horizontal bar */
.dec-rsn-bar-track {
  height: 5px; border-radius: 3px;
  background: var(--surface3); overflow: hidden;
}
.dec-rsn-bar-fill {
  height: 100%; border-radius: 3px; transition: width .5s;
}
.dec-rsn-bar-fill.bull { background: linear-gradient(90deg,#059669,#10b981); }
.dec-rsn-bar-fill.bear { background: linear-gradient(90deg,#ef4444,#dc2626); }
.dec-rsn-bar-fill.neut { background: linear-gradient(90deg,#d97706,#f59e0b); }
/* Right side: explanation text — allows full wrap */
.dec-rsn-detail {
  flex: 1; font-size: 10px; color: var(--text2);
  line-height: 1.65; word-break: break-word;
  min-width: 0;   /* critical: lets flex item shrink past content size */
}

/* Disclaimer */
.dec-disclaimer {
  font-size: 10px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  line-height: 1.6; flex-shrink: 0;
}

/* ══ Decision Index Selector ══════════════════════════ */
.dec-idx-nav {
  display: flex; gap: 6px; flex-shrink: 0;
}
.dec-idx-btn {
  flex: 1; padding: 9px 8px; border: 1px solid var(--border);
  cursor: pointer; font-size: 11px; font-weight: 700;
  border-radius: var(--radius); background: var(--surface);
  color: var(--muted); transition: all .2s; font-family: inherit;
}
.dec-idx-btn:hover { background: var(--surface2); color: var(--text2); }
.dec-idx-btn.active {
  background: linear-gradient(135deg, #7c6df7, #9f93fb);
  color: #fff; border-color: rgba(124,109,247,0.5);
  box-shadow: 0 2px 10px rgba(124,109,247,0.35);
}

/* ══ Decision Sub-tabs ════════════════════════════════ */
.dec-sub-nav {
  display: flex; gap: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 5px;
  flex-shrink: 0;
}
.dec-sub-btn {
  flex: 1; padding: 9px 6px; border: 1px solid transparent;
  cursor: pointer; font-size: 11px; font-weight: 700;
  border-radius: var(--radius); background: transparent;
  color: var(--muted); transition: all .2s; font-family: inherit;
}
.dec-sub-btn:hover { background: var(--surface2); color: var(--text2); }
.dec-sub-btn.active {
  background: var(--surface2); color: var(--accent2);
  border-color: rgba(124,109,247,0.3);
  box-shadow: 0 0 8px rgba(124,109,247,0.15);
}
.dec-sub-btn-combined.active {
  background: linear-gradient(135deg, rgba(124,109,247,0.15), rgba(124,109,247,0.08));
  color: var(--accent2);
  border-color: rgba(124,109,247,0.35);
}

/* Sub-tab panels */
.dec-sub-panel { display: none; flex-direction: column; gap: 14px; }
.dec-sub-panel.active { display: flex; }

/* ── Verdict box per sub-tab ── */
.dec-subverdict-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  flex-shrink: 0;
}
.dec-sv-title {
  font-size: 12px; font-weight: 700; color: var(--text2);
  margin-bottom: 12px; letter-spacing: .3px;
}
.dec-sv-badge {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.dec-sv-direction {
  font-size: 18px; font-weight: 900; letter-spacing: .8px;
  padding: 6px 18px; border-radius: 24px;
}
.dec-sv-direction.positive { background: rgba(16,185,129,.15); color: #34d399; border: 2px solid rgba(16,185,129,.35); }
.dec-sv-direction.negative { background: rgba(239,68,68,.15);  color: #f87171; border: 2px solid rgba(239,68,68,.35); }
.dec-sv-direction.neutral  { background: rgba(245,158,11,.12); color: #fbbf24; border: 2px solid rgba(245,158,11,.35); }
.dec-sv-pct-block { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.dec-sv-pct.bull  { color: var(--green); }
.dec-sv-pct.bear  { color: var(--red);   }
.dec-sv-pct-sep   { color: var(--muted); }
.dec-sv-advice {
  font-size: 10.5px; color: var(--text2); line-height: 1.6;
  background: var(--surface2); border-radius: var(--radius);
  padding: 8px 12px; margin-bottom: 10px;
}
.dec-sv-factors { display: flex; flex-wrap: wrap; gap: 5px; }
.dec-sv-factor {
  font-size: 10px; font-weight: 600; padding: 3px 9px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text2);
}
.dec-sv-factor.bull { border-color: rgba(16,185,129,.3); color: #34d399; background: rgba(16,185,129,.06); }
.dec-sv-factor.bear { border-color: rgba(239,68,68,.3);  color: #f87171; background: rgba(239,68,68,.06); }
.dec-sv-factor.neut { border-color: rgba(245,158,11,.3); color: #fbbf24; background: rgba(245,158,11,.06); }

/* ── Suggestion section title ── */
.dec-sugg-section-title {
  font-size: 12px; font-weight: 700; color: var(--text2);
  letter-spacing: .3px; flex-shrink: 0;
}

/* ── 5-column compact grid — fills screen, no scroll ── */
.dec-sugg-grid5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

/* ── Compact Decision Suggestion Card ── */
.dsc-card {
  background: linear-gradient(160deg, var(--surface2) 0%, #111826 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 3px solid var(--border);
  transition: box-shadow .2s, border-color .2s;
  min-width: 0;
}
.dsc-card.bull  { border-top-color: var(--green); border-color: rgba(0,214,143,0.2); }
.dsc-card.bear  { border-top-color: var(--red);   border-color: rgba(255,82,82,0.2); }
.dsc-card.hedge { border-top-color: var(--yellow); border-style: dashed; }
.dsc-card.locked { border-color: var(--yellow) !important; box-shadow: 0 0 0 1px rgba(255,179,0,0.3); }
.dsc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

.dsc-header {
  display: flex; align-items: center; gap: 5px;
}
.dsc-rank {
  font-size: 9px; font-weight: 800; color: var(--muted);
  background: var(--surface3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 20px;
}
.dsc-dir {
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  letter-spacing: .4px; flex: 1; text-align: center;
}
.dsc-dir.ce   { background: rgba(255,138,128,0.15); color: var(--ce);    border: 1px solid rgba(255,138,128,0.3); }
.dsc-dir.pe   { background: rgba(74,233,186,0.12);  color: var(--pe);    border: 1px solid rgba(74,233,186,0.3); }
.dsc-dir.hedge{ background: rgba(255,179,0,0.1);    color: var(--yellow);border: 1px solid rgba(255,179,0,0.25); }

.dsc-prob {
  font-size: 14px; font-weight: 900;
}
.dsc-prob.high { color: var(--green); }
.dsc-prob.mid  { color: var(--yellow); }
.dsc-prob.low  { color: var(--red); }

.dsc-strike {
  font-size: 20px; font-weight: 900; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.dsc-strategy {
  font-size: 9px; color: var(--muted); font-weight: 600; line-height: 1.3;
}
.dsc-ltp {
  font-size: 10px; color: var(--text2);
}
.dsc-ltp strong { color: var(--text); }

.dsc-levels {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface3); border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.dsc-level {
  display: flex; align-items: baseline; justify-content: space-between; gap: 4px;
}
.dsc-lv-lbl {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); white-space: nowrap;
}
.dsc-lv-val {
  font-size: 9.5px; font-weight: 700; text-align: right;
  color: var(--text2); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.dsc-lv-val.green { color: var(--green); }
.dsc-lv-val.red   { color: var(--red); }
.dsc-lv-val em    { font-size: 8px; color: var(--muted); font-style: normal; }

.dsc-nodata {
  font-size: 9px; color: var(--muted); font-style: italic; text-align: center;
  padding: 4px 0;
}

.dsc-track {
  display: block; width: 100%; margin-top: 2px;
  background: rgba(124,109,247,0.1); color: var(--accent2);
  border: 1px solid rgba(124,109,247,0.3); border-radius: var(--radius-sm);
  padding: 6px 8px; font-size: 10px; font-weight: 700;
  cursor: pointer; text-align: center; transition: all .2s;
  font-family: inherit;
}
.dsc-track:hover {
  background: rgba(124,109,247,0.2);
  box-shadow: 0 0 8px rgba(124,109,247,0.25);
}
.dsc-track.locked {
  background: rgba(255,179,0,0.1); color: var(--yellow);
  border-color: rgba(255,179,0,0.4);
}




/* ── Conflict / Agreement box ── */
.dec-conflict-box {
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 11px; font-weight: 600; line-height: 1.5;
}
.dec-conflict-box.agree {
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.25); color: #34d399;
}
.dec-conflict-box.conflict {
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); color: #fbbf24;
}
.dec-conflict-box.strong-conflict {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); color: #f87171;
}

/* ── Factor pill sentiment label ── */
.dec-fp-sent {
  font-size: 9px; font-weight: 900; letter-spacing: .5px;
  text-transform: uppercase;
}
.dec-fp-sent.positive { color: var(--green); }
.dec-fp-sent.negative { color: var(--red);   }
.dec-fp-sent.neutral  { color: var(--yellow); }

/* ── Timeline slot — clear BULLISH/BEARISH/NEUTRAL ── */
.dec-slot-sent-main {
  font-size: 11px; font-weight: 900; letter-spacing: .5px;
  text-transform: uppercase; margin-top: 2px;
}
.dec-slot.bull .dec-slot-sent-main { color: var(--green); }
.dec-slot.bear .dec-slot-sent-main { color: var(--red);   }
.dec-slot.neut .dec-slot-sent-main { color: var(--yellow); }
.dec-slot-sent-sub { font-size: 8.5px; color: var(--muted); }
.no-data-sent { color: var(--muted) !important; font-size: 9px !important; }

/* ── Reasoning row POSITIVE/NEGATIVE/NEUTRAL badge ── */
.dec-rsn-sent {
  font-size: 8.5px; font-weight: 900; letter-spacing: .4px;
  padding: 1px 5px; border-radius: 6px; text-transform: uppercase;
}
.dec-rsn-sent.positive { background: rgba(16,185,129,.15); color: var(--green); }
.dec-rsn-sent.negative { background: rgba(239,68,68,.15);  color: var(--red);   }
.dec-rsn-sent.neutral  { background: rgba(245,158,11,.12); color: var(--yellow); }

/* ── Pre-Market / After-Hours Prediction Box ─────── */
.dec-premarket-box {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(16,185,129,0.06));
  border: 1.5px solid rgba(99,102,241,0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  flex-shrink: 0;
}
.dec-pm-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.dec-pm-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  background: rgba(99,102,241,0.2); color: var(--accent2);
  border: 1px solid rgba(99,102,241,0.4);
  padding: 3px 10px; border-radius: 20px;
}
.dec-pm-session {
  font-size: 11px; color: var(--text2); font-weight: 600;
}
.dec-pm-body {
  display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start;
}
.dec-pm-verdict {
  font-size: 16px; font-weight: 800; margin-bottom: 10px;
}
.dec-pm-verdict.bull { color: var(--green2); }
.dec-pm-verdict.bear { color: var(--red2); }
.dec-pm-verdict.neut { color: var(--yellow2); }
.dec-pm-meter-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.dec-pm-track {
  flex: 1; height: 10px; border-radius: 8px; overflow: hidden;
  background: var(--surface3); display: flex;
}
.dec-pm-fill-bull { background: var(--green); height: 100%; transition: width .5s; }
.dec-pm-fill-bear { background: var(--red);   height: 100%; transition: width .5s; }
.dec-pm-bull { font-size: 13px; font-weight: 800; color: var(--green); min-width: 38px; text-align: right; }
.dec-pm-bear { font-size: 13px; font-weight: 800; color: var(--red);   min-width: 38px; }
.dec-pm-gap {
  font-size: 11px; font-weight: 700; margin-bottom: 8px;
}
.dec-pm-gap.bull { color: var(--green2); }
.dec-pm-gap.bear { color: var(--red2); }
.dec-pm-gap.neut { color: var(--yellow2); }
.dec-pm-advice {
  font-size: 11px; color: var(--text2); line-height: 1.6;
}
.dec-pm-right {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.dec-pm-signals { display: flex; flex-direction: column; gap: 8px; }
.dec-pm-sig-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--border);
}
.dec-pm-sig-row:last-child { border-bottom: none; }
.dec-pm-sig-lbl { font-size: 10px; color: var(--muted); font-weight: 600; }
.dec-pm-sig-val { font-size: 10px; font-weight: 700; color: var(--text2); text-align: right; max-width: 160px; }
.dec-pm-sig-val.bull { color: var(--green2); }
.dec-pm-sig-val.bear { color: var(--red2); }
.dec-pm-sig-val.neut { color: var(--yellow2); }
.dec-pm-loading { font-size: 11px; color: var(--muted); padding: 8px 0; }

/* ═══════════════════════════════════════════════════════
   ACTIVE TRADES TAB
═══════════════════════════════════════════════════════ */

/* Tab button badge (trade count) */
.tab-trade-count {
  display: inline-block;
  background: #f59e0b; color: #000;
  font-size: 9px; font-weight: 900;
  padding: 1px 5px; border-radius: 8px;
  margin-left: 3px; vertical-align: middle;
}

/* ── Page wrapper ─────────────────────────────────── */
.at-page {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 16px;
  flex: 1; min-height: 0; overflow-y: auto;
}

/* ── Section wrapper ─────────────────────────────── */
.at-best-section,
.at-tracked-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}
.at-section-hdr {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.at-section-title {
  font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 3px;
}
.at-section-sub {
  font-size: 10px; color: var(--muted); line-height: 1.5;
}

/* ── Index sub-tabs ─────────────────────────────── */
.at-idx-nav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.at-idx-btn {
  flex: 1; padding: 9px 8px;
  background: none; border: none;
  font-size: 11px; font-weight: 700; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.at-idx-btn:hover { color: var(--text2); }
.at-idx-btn.active { color: var(--accent2); border-bottom-color: var(--accent); background: var(--surface); }

/* ── Index panels ───────────────────────────────── */
.at-idx-panel { display: none; padding: 12px 14px; }
.at-idx-panel.active { display: block; }

/* Summary chip row */
.at-idx-summary {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.at-sum-chip {
  font-size: 10px; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
}
.at-sum-chip strong { color: var(--text); font-weight: 700; }
.at-pcr-bull { color: var(--green) !important; }
.at-pcr-bear { color: var(--red)   !important; }

/* No data message */
.at-no-data {
  font-size: 11px; color: var(--muted);
  padding: 20px; text-align: center;
}

/* Disclaimer line */
.at-disclaimer {
  font-size: 9.5px; color: var(--muted);
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* ── Tracked trades section ─────────────────────── */
.at-container {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}

/* Empty state */
.at-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 36px 20px; text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
}
.at-empty-icon  { font-size: 32px; }
.at-empty-title { font-size: 13px; font-weight: 700; color: var(--text2); }
.at-empty-sub   { font-size: 10.5px; color: var(--muted); line-height: 1.6; max-width: 300px; }
.at-empty-sub b { color: var(--accent2); }

/* Trades grid */
.at-trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

/* Footer note */
.at-footer-note {
  font-size: 10px; color: #92701a; background: #f59e0b0d;
  border: 1px solid #f59e0b22; border-radius: var(--radius);
  padding: 8px 12px; line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   CARRY FORWARD TAB
═══════════════════════════════════════════════════════ */
.cf-page {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 16px;
  flex: 1; min-height: 0; overflow-y: auto;
}

/* ── Section card ─────────────────────────────────── */
.cf-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}
.cf-section-hdr {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.cf-section-title {
  font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 3px;
}
.cf-section-sub {
  font-size: 10px; color: var(--muted); line-height: 1.5;
}

/* ── Next Session panel ───────────────────────────── */
.cf-next-session { padding: 14px 16px; }
.cf-next-meter { display: flex; flex-direction: column; gap: 10px; }
.cf-next-verdict {
  font-size: 18px; font-weight: 900;
}
.cf-next-verdict.bull { color: var(--green2); }
.cf-next-verdict.bear { color: var(--red2); }
.cf-next-verdict.neut { color: var(--yellow2); }
.cf-next-gap {
  font-size: 12px; font-weight: 700;
}
.cf-next-gap.bull { color: var(--green2); }
.cf-next-gap.bear { color: var(--red2); }
.cf-next-gap.neut { color: var(--yellow2); }
.cf-next-advice {
  font-size: 11px; color: var(--text2); line-height: 1.6;
  padding: 10px 12px; background: var(--surface2);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.cf-next-signals {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cf-sig-pill {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text2);
}
.cf-sig-pill.bull { background: rgba(16,185,129,0.1); color: var(--green2); border-color: rgba(16,185,129,0.3); }
.cf-sig-pill.bear { background: rgba(239,68,68,0.1);  color: var(--red2);   border-color: rgba(239,68,68,0.3); }
.cf-sig-pill.neut { background: rgba(245,158,11,0.1); color: var(--yellow2);border-color: rgba(245,158,11,0.3); }
.cf-next-note {
  font-size: 9px; color: var(--muted); font-style: italic;
}

/* ── Tracked Trades CF Analysis ───────────────────── */
.cf-trades-panel {
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.cf-trade-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cf-trade-card.bull { border-left: 4px solid var(--green); }
.cf-trade-card.bear { border-left: 4px solid var(--red); }
.cf-trade-card.neut { border-left: 4px solid var(--yellow); }
.cf-tc-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--surface2);
  border-bottom: 1px solid var(--border);
  gap: 10px; flex-wrap: wrap;
}
.cf-tc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-tc-type {
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.5px;
}
.cf-tc-type.ce { background: rgba(248,113,113,0.12); color: var(--ce); border: 1px solid rgba(248,113,113,0.3); }
.cf-tc-type.pe { background: rgba(52,211,153,0.12);  color: var(--pe); border: 1px solid rgba(52,211,153,0.3); }
.cf-tc-name { font-size: 13px; font-weight: 800; color: var(--text); }
.cf-tc-strat { font-size: 9px; color: var(--muted); }
.cf-rec-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.cf-rec-badge.bull { background: rgba(16,185,129,0.12); color: var(--green2); border: 1px solid rgba(16,185,129,0.3); }
.cf-rec-badge.bear { background: rgba(239,68,68,0.12);  color: var(--red2);   border: 1px solid rgba(239,68,68,0.3); }
.cf-rec-badge.neut { background: rgba(245,158,11,0.12); color: var(--yellow2);border: 1px solid rgba(245,158,11,0.3); }
.cf-tc-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cf-tc-metrics {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px;
}
.cf-metric {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
}
.cf-m-lbl { font-size: 8px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.cf-m-val { font-size: 13px; font-weight: 800; color: var(--text); }
.cf-pos { color: var(--green2); }
.cf-neg { color: var(--red2); }
.cf-na  { color: var(--muted); }
.cf-tc-advice {
  font-size: 11px; color: var(--text2); line-height: 1.6;
  padding: 8px 12px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

/* ── CF Rating badge on opt cards ─────────────────── */
.cf-rating-badge {
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; margin-bottom: 4px;
  display: inline-block;
}
.cf-rating-badge.bull { background: rgba(16,185,129,0.12); color: var(--green2); border: 1px solid rgba(16,185,129,0.3); }
.cf-rating-badge.bear { background: rgba(239,68,68,0.12);  color: var(--red2);   border: 1px solid rgba(239,68,68,0.3); }
.cf-rating-badge.neut { background: rgba(245,158,11,0.12); color: var(--yellow2);border: 1px solid rgba(245,158,11,0.3); }

/* ── Empty/no-data states ─────────────────────────── */
.cf-empty, .cf-no-data {
  font-size: 11px; color: var(--muted);
  padding: 20px 16px; text-align: center; line-height: 1.7;
}

/* ── Disclaimer ───────────────────────────────────── */
.cf-disclaimer {
  font-size: 10px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  line-height: 1.6; flex-shrink: 0;
}

/* Responsive: pre-market body single column on narrow */
@media (max-width: 900px) {
  .dec-pm-body { grid-template-columns: 1fr; }
}

/* ── Overnight summary grid (CF tab section 1) ────── */
.cf-overnight-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px;
  padding: 12px 16px;
}
.cf-ov-pill {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.cf-ov-pill.bull { border-left: 3px solid var(--green); }
.cf-ov-pill.bear { border-left: 3px solid var(--red); }
.cf-ov-pill.neut { border-left: 3px solid var(--yellow); }
.cf-ov-icon  { font-size: 16px; line-height: 1; }
.cf-ov-label { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cf-ov-val   { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.3; }
.cf-ov-pill.bull .cf-ov-val { color: var(--green2); }
.cf-ov-pill.bear .cf-ov-val { color: var(--red2); }
.cf-ov-pill.neut .cf-ov-val { color: var(--yellow2); }
.cf-ov-note {
  font-size: 9.5px; color: var(--muted); padding: 0 16px 10px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════
   AI TRADE TAB
══════════════════════════════════════════════════════ */
.ait-page {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 10px 16px; display: flex; flex-direction: column; gap: 10px;
}

/* ── Header bar ──────────────────────────────────────── */
.ait-header-bar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
}
.ait-header-left { flex: 1; min-width: 0; }
.ait-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  letter-spacing: 0.3px; margin-bottom: 4px;
}
.ait-subtitle { font-size: 10px; color: var(--text2); line-height: 1.6; }

.ait-api-row { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ait-key-input {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 6px 12px;
  font-size: 11px; color: var(--text); outline: none; width: 220px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.ait-key-input:focus { border-color: var(--accent); }
.ait-save-btn {
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text2); font-size: 11px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: inherit; transition: background 0.15s, color 0.15s;
}
.ait-save-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Predict bar ─────────────────────────────────────── */
.ait-predict-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(16,185,129,0.06));
  border: 1.5px solid rgba(99,102,241,0.3); border-radius: var(--radius-lg);
  padding: 12px 18px;
}
.ait-predict-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 0.4px;
  padding: 10px 24px; border-radius: var(--radius); border: none;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
  flex-shrink: 0;
}
.ait-predict-btn:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.5); }
.ait-predict-btn:active { transform: translateY(0); }
.ait-predict-btn:disabled { background: var(--surface3); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.ait-btn-icon { font-size: 16px; }
.ait-predict-note { font-size: 10px; color: var(--text2); line-height: 1.5; flex: 1; }
.ait-status { font-size: 10px; font-weight: 600; color: var(--red2); flex-shrink: 0; }
.ait-status.ok { color: var(--green2); }

/* ── Loading ─────────────────────────────────────────── */
.ait-loading-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ait-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  animation: ait-spin 0.8s linear infinite;
}
@keyframes ait-spin { to { transform: rotate(360deg); } }
.ait-loading-text { font-size: 13px; font-weight: 700; color: var(--text); }
.ait-loading-sub  { font-size: 10px; color: var(--muted); }

/* ── Results container ───────────────────────────────── */
.ait-results { display: flex; flex-direction: column; gap: 10px; }

/* ── Section headers ─────────────────────────────────── */
.ait-section-hdr {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text2);
  padding: 4px 0; border-bottom: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Market Verdict box ──────────────────────────────── */
.ait-verdict-box {
  border-radius: var(--radius-lg); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ait-verdict-box.bull { background: rgba(16,185,129,0.10); border: 1.5px solid rgba(16,185,129,0.35); }
.ait-verdict-box.bear { background: rgba(239,68,68,0.10);  border: 1.5px solid rgba(239,68,68,0.35); }
.ait-verdict-box.neut { background: rgba(245,158,11,0.10); border: 1.5px solid rgba(245,158,11,0.35); }

.ait-vdict-icon  { font-size: 36px; flex-shrink: 0; line-height: 1; }
.ait-vdict-body  { flex: 1; min-width: 0; }
.ait-vdict-label { font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 3px; }
.ait-vdict-label.bull { color: var(--green2); }
.ait-vdict-label.bear { color: var(--red2); }
.ait-vdict-label.neut { color: var(--yellow2); }
.ait-vdict-sub   { font-size: 11px; color: var(--text2); line-height: 1.6; }

.ait-vdict-meter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ait-vdict-pct-bull { font-size: 22px; font-weight: 900; color: var(--green); }
.ait-vdict-pct-bear { font-size: 22px; font-weight: 900; color: var(--red); }
.ait-vdict-track {
  width: 120px; height: 8px; border-radius: 8px;
  background: var(--surface2); overflow: hidden; display: flex;
}
.ait-vdict-fill-bull { height: 100%; background: var(--green); border-radius: 8px 0 0 8px; }
.ait-vdict-fill-bear { height: 100%; background: var(--red);   border-radius: 0 8px 8px 0; }

/* ── Duration box ────────────────────────────────────── */
.ait-duration-box {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.ait-dur-pill {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
}
.ait-dur-pill.bull { border-left: 3px solid var(--green); }
.ait-dur-pill.bear { border-left: 3px solid var(--red); }
.ait-dur-pill.neut { border-left: 3px solid var(--yellow); }
.ait-dur-lbl { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.ait-dur-val { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.3; }
.ait-dur-pill.bull .ait-dur-val { color: var(--green2); }
.ait-dur-pill.bear .ait-dur-val { color: var(--red2); }
.ait-dur-pill.neut .ait-dur-val { color: var(--yellow2); }
.ait-dur-note { font-size: 9px; color: var(--muted); line-height: 1.5; }

/* ── Trade recommendation cards ──────────────────────── */
.ait-trades-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.ait-trade-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow 0.2s;
}
.ait-trade-card:hover { box-shadow: var(--shadow); }
.ait-trade-card.ce { border-top: 3px solid var(--ce); }
.ait-trade-card.pe { border-top: 3px solid var(--pe); }

.ait-tc-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ait-tc-rank {
  font-size: 9px; font-weight: 800; color: var(--muted);
  background: var(--surface3); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 20px;
}
.ait-tc-index { font-size: 11px; font-weight: 700; color: var(--text2); }
.ait-tc-strike { font-size: 20px; font-weight: 900; color: var(--text); flex: 1; }
.ait-tc-type {
  font-size: 10px; font-weight: 800; padding: 3px 9px;
  border-radius: 20px; letter-spacing: 0.5px;
}
.ait-tc-type.ce { background: rgba(248,113,113,0.12); color: var(--ce); border: 1px solid rgba(248,113,113,0.35); }
.ait-tc-type.pe { background: rgba(52,211,153,0.12);  color: var(--pe); border: 1px solid rgba(52,211,153,0.35); }

.ait-tc-prob {
  display: flex; align-items: center; gap: 8px;
}
.ait-tc-prob-val {
  font-size: 26px; font-weight: 900; line-height: 1;
}
.ait-tc-prob-val.high   { color: var(--green2); }
.ait-tc-prob-val.medium { color: var(--yellow2); }
.ait-tc-prob-val.low    { color: var(--red2); }
.ait-tc-prob-bar-wrap { flex: 1; }
.ait-tc-prob-label { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.ait-tc-prob-track {
  height: 6px; border-radius: 6px; background: var(--surface2); overflow: hidden;
}
.ait-tc-prob-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.6s ease;
}

.ait-tc-levels {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.ait-tc-level {
  display: flex; flex-direction: column; gap: 3px;
  padding: 7px 9px; border-radius: var(--radius-sm);
}
.ait-tc-level.entry  { background: rgba(99,102,241,0.08);  border: 1px solid rgba(99,102,241,0.25); }
.ait-tc-level.target { background: rgba(16,185,129,0.08);  border: 1px solid rgba(16,185,129,0.25); }
.ait-tc-level.sl     { background: rgba(239,68,68,0.08);   border: 1px solid rgba(239,68,68,0.25); }
.ait-tc-lev-lbl { font-size: 7px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.ait-tc-lev-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.ait-tc-lev-sub { font-size: 9px; color: var(--muted); font-weight: 600; }

.ait-tc-rationale { font-size: 10px; color: var(--text2); line-height: 1.6; }

/* ── Probability breakdown — signal lights ───────────── */
.ait-prob-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}

/* Each factor row */
.pb-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.pb-row:last-child { border-bottom: none; }
.pb-row.pb-bull { background: rgba(16,185,129,0.04); }
.pb-row.pb-bear { background: rgba(239,68,68,0.04); }
.pb-row.pb-neut { background: transparent; }

/* Left: factor name + note */
.pb-left { display: flex; flex-direction: column; gap: 2px; }
.pb-factor { font-size: 11px; font-weight: 700; color: var(--text); }
.pb-note   { font-size: 9px; color: var(--muted); line-height: 1.4; }

/* Centre: labelled bar + score */
.pb-center { display: flex; flex-direction: column; gap: 4px; }
.pb-track-wrap { display: flex; align-items: center; gap: 6px; }
.pb-track-label { font-size: 8px; font-weight: 700; color: var(--muted); min-width: 24px; }
.pb-track-label:last-child { text-align: right; }
.pb-track {
  flex: 1; height: 8px; border-radius: 8px;
  background: var(--surface2); overflow: hidden; position: relative;
}
.pb-track-mid {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--border2); z-index: 1;
}
.pb-fill {
  height: 100%; border-radius: 8px;
  transition: width 0.6s ease;
}
.pb-score {
  font-size: 10px; font-weight: 800; text-align: center;
}

/* Right: signal pill */
.pb-right { flex-shrink: 0; }
.pb-signal {
  font-size: 9px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; white-space: nowrap;
}
.pb-sig-bull { background: rgba(16,185,129,0.14); color: var(--green2); border: 1px solid rgba(16,185,129,0.35); }
.pb-sig-bear { background: rgba(239,68,68,0.14);  color: var(--red2);   border: 1px solid rgba(239,68,68,0.35); }
.pb-sig-neut { background: rgba(245,158,11,0.14); color: var(--yellow2);border: 1px solid rgba(245,158,11,0.35); }

/* Tally row */
.pb-tally {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 16px; border-top: 1px solid var(--border);
  background: var(--surface2);
}
.pb-tally-item { font-size: 10px; font-weight: 700; }
.pb-tally-item.bull { color: var(--green2); }
.pb-tally-item.bear { color: var(--red2); }
.pb-tally-item.neut { color: var(--yellow2); }

/* Big conclusion box */
.pb-conclusion {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-top: 2px solid var(--border);
}
.pb-conclusion.bull { background: rgba(16,185,129,0.10); border-top-color: var(--green); }
.pb-conclusion.bear { background: rgba(239,68,68,0.10);  border-top-color: var(--red); }
.pb-conclusion.neut { background: rgba(245,158,11,0.08); border-top-color: var(--yellow); }

.pb-conc-icon   { font-size: 30px; flex-shrink: 0; line-height: 1; }
.pb-conc-body   { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pb-conc-verdict { font-size: 15px; font-weight: 900; color: var(--text); }
.pb-conclusion.bull .pb-conc-verdict { color: var(--green2); }
.pb-conclusion.bear .pb-conc-verdict { color: var(--red2); }
.pb-conclusion.neut .pb-conc-verdict { color: var(--yellow2); }
.pb-conc-sub    { font-size: 10px; color: var(--muted); }

/* The BIG action badge */
.pb-conc-action {
  font-size: 20px; font-weight: 900; letter-spacing: 1px;
  padding: 10px 22px; border-radius: var(--radius);
  flex-shrink: 0;
}
.pb-conc-action.ce   { background: rgba(248,113,113,0.18); color: var(--ce); border: 2px solid rgba(248,113,113,0.5); }
.pb-conc-action.pe   { background: rgba(52,211,153,0.18);  color: var(--pe); border: 2px solid rgba(52,211,153,0.5); }
.pb-conc-action.neut { background: rgba(245,158,11,0.12);  color: var(--yellow2); border: 2px solid rgba(245,158,11,0.4); }

/* Responsive: stack on small screens */
@media (max-width: 700px) {
  .pb-row { grid-template-columns: 1fr; gap: 6px; }
  .pb-right { align-self: flex-start; }
}

/* ── AI Reasoning box ────────────────────────────────── */
.ait-reason-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: 11px; color: var(--text2); line-height: 1.8;
  white-space: pre-wrap;
}

/* ── Disclaimer ──────────────────────────────────────── */
.ait-disclaimer {
  font-size: 10px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  line-height: 1.6; flex-shrink: 0;
}

/* ── Dual Sentiment Row ───────────────────────────────── */
.ait-dual-sent-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 700px) { .ait-dual-sent-row { grid-template-columns: 1fr; } }

/* ── Sentiment Box (shared) ───────────────────────────── */
.ait-sent-box {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.2s;
}
.ait-sent-box-bull { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.06); }
.ait-sent-box-bear { border-color: rgba(239,68,68,0.4);  background: rgba(239,68,68,0.06); }
.ait-sent-box-neut { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.04); }
.ait-sent-box-ai   { position: relative; }
.ait-sent-box-ai::before {
  content: '🌐 AI + LIVE NEWS';
  position: absolute; top: -1px; right: 12px;
  font-size: 7px; font-weight: 800; letter-spacing: 0.6px;
  background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 0 0 6px 6px;
}

.ait-sent-box-title { font-size: 11px; font-weight: 800; color: var(--text); letter-spacing: 0.3px; }
.ait-sent-box-sub   { font-size: 9px; color: var(--muted); line-height: 1.5; }

.ait-sent-meter-row {
  display: flex; align-items: center; gap: 8px;
}
.ait-sent-bull { font-size: 20px; font-weight: 900; color: var(--green); min-width: 44px; text-align: right; }
.ait-sent-bear { font-size: 20px; font-weight: 900; color: var(--red);   min-width: 44px; text-align: left; }
.ait-sent-track {
  flex: 1; height: 10px; border-radius: 10px;
  background: var(--surface2); display: flex; overflow: hidden;
}
.ait-sent-fill-bull { height: 100%; background: var(--green); transition: width .6s; border-radius: 10px 0 0 10px; }
.ait-sent-fill-bear { height: 100%; background: var(--red);   transition: width .6s; border-radius: 0 10px 10px 0; }

.ait-sent-verdict {
  font-size: 12px; font-weight: 800; color: var(--text); text-align: center;
}
.ait-sent-verdict.bull { color: var(--green2); }
.ait-sent-verdict.bear { color: var(--red2); }
.ait-sent-verdict.neut { color: var(--yellow2); }

.ait-sent-factors,
.ait-sent-news-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.ait-ntag {
  font-size: 8.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.ait-ntag-bull { background: rgba(16,185,129,0.12); color: var(--green2); border: 1px solid rgba(16,185,129,0.3); }
.ait-ntag-bear { background: rgba(239,68,68,0.12);  color: var(--red2);   border: 1px solid rgba(239,68,68,0.3); }
.ait-ntag-neut { background: var(--surface3);        color: var(--muted);  border: 1px solid var(--border); }

/* ── Duration box — 4 columns ────────────────────────── */
.ait-duration-box {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
@media (max-width: 700px) { .ait-duration-box { grid-template-columns: 1fr 1fr; } }

/* (dual bar styles removed — replaced by signal-light design) */

/* ── Hero-Zero Card ───────────────────────────────────── */
.ait-herozero-box { }
.ait-hz-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.ait-hz-card.ce { border-top: 3px solid var(--ce); background: rgba(248,113,113,0.04); }
.ait-hz-card.pe { border-top: 3px solid var(--pe); background: rgba(52,211,153,0.04); }

.ait-hz-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ait-hz-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff; padding: 3px 10px; border-radius: 20px;
  animation: hz-pulse 2s ease-in-out infinite;
}
@keyframes hz-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
.ait-hz-index  { font-size: 10px; font-weight: 700; color: var(--text2); }
.ait-hz-strike { font-size: 22px; font-weight: 900; color: var(--text); flex: 1; }

.ait-hz-body { display: flex; flex-direction: column; gap: 8px; }

.ait-hz-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.ait-hz-returns {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.ait-hz-ret-pill {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.ait-hz-prob { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.ait-hz-ret-lbl { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.ait-hz-ret-val { font-size: 16px; font-weight: 900; color: var(--yellow2); }
.ait-hz-prob .ait-hz-ret-val { color: var(--accent2); }

.ait-hz-trigger {
  font-size: 10px; color: var(--text2); line-height: 1.5;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px;
}

/* ── Inline loading placeholder ─────────────────────── */
.ait-loading-inline {
  font-size: 11px; color: var(--muted); padding: 14px 16px;
  font-style: italic;
}

/* ── Track This Trade button (inside AI trade cards) ── */
.ait-track-btn {
  width: 100%; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit; border: none;
  background: rgba(99,102,241,0.12);
  color: var(--accent2);
  border: 1px solid rgba(99,102,241,0.35);
  transition: background 0.15s, color 0.15s;
  margin-top: 2px;
}
.ait-track-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ait-track-btn.tracked {
  background: rgba(16,185,129,0.10);
  color: var(--green2);
  border-color: rgba(16,185,129,0.4);
}
.ait-track-btn.tracked:hover { background: rgba(239,68,68,0.10); color: var(--red2); border-color: rgba(239,68,68,0.4); }

/* ── Tracked state border glow ──────────────────────── */
.ait-trade-card.ait-is-tracked {
  box-shadow: 0 0 0 2px rgba(16,185,129,0.3);
  border-color: rgba(16,185,129,0.5);
}

/* ── Hold duration row ───────────────────────────────── */
.ait-tc-hold {
  display: flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.ait-tc-hold-icon { font-size: 12px; }
.ait-tc-hold-lbl  { font-size: 9px; font-weight: 700; color: var(--yellow2); text-transform: uppercase; letter-spacing: 0.3px; }
.ait-tc-hold-val  { font-size: 11px; font-weight: 700; color: var(--text); flex: 1; }

/* ── Exit condition row ──────────────────────────────── */
.ait-tc-exit {
  font-size: 10px; color: var(--text2); line-height: 1.5;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm); padding: 6px 10px;
}

/* ── No qualifying trades state ──────────────────────── */
.ait-no-trades {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 20px; text-align: center;
  background: var(--surface); border: 1px dashed var(--border2);
  border-radius: var(--radius-lg); grid-column: 1 / -1;
}
.ait-no-trades-icon { font-size: 28px; }
.ait-no-trades-msg  { font-size: 12px; font-weight: 700; color: var(--text2); }
.ait-no-trades-sub  { font-size: 10px; color: var(--muted); line-height: 1.5; }

/* ══════════════════════════════════════════════════════
   AI TRADE — NEW COMPONENTS (Readiness, Regime, R:R)
══════════════════════════════════════════════════════ */

/* ── Market Readiness Box ──────────────────────────── */
.ait-readiness-box {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 16px 18px;
  margin-bottom: 14px;
}
.ait-ready-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
}
.ait-ready-grade {
  width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; letter-spacing: -1px;
  border: 2px solid transparent;
}
.ait-ready-grade.bull { background: rgba(0,214,143,0.15); color: var(--green); border-color: rgba(0,214,143,0.35); }
.ait-ready-grade.neut { background: rgba(255,179,0,0.15);  color: var(--yellow); border-color: rgba(255,179,0,0.35); }
.ait-ready-grade.bear { background: rgba(255,82,82,0.15);  color: var(--red); border-color: rgba(255,82,82,0.35); }
.ait-ready-info { flex: 1; }
.ait-ready-score { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ait-ready-msg   { font-size: 11px; color: var(--text2); line-height: 1.5; }
.ait-ready-checks { display: flex; flex-direction: column; gap: 6px; }
.ait-chk {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 10.5px; padding: 5px 8px; border-radius: 8px;
}
.ait-chk.pass { background: rgba(0,214,143,0.07); color: var(--text2); }
.ait-chk.fail { background: rgba(255,82,82,0.07);  color: var(--text2); }
.ait-chk.warn { background: rgba(255,179,0,0.07);  color: var(--text2); }
.ait-chk-icon { font-size: 11px; font-weight: 800; flex-shrink: 0; padding-top: 1px; }
.ait-chk.pass .ait-chk-icon { color: var(--green); }
.ait-chk.fail .ait-chk-icon { color: var(--red); }
.ait-chk.warn .ait-chk-icon { color: var(--yellow); }
.ait-chk-text { line-height: 1.5; }

/* ── Market Regime Box ────────────────────────────── */
.ait-regime-box {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 14px 16px;
  margin-bottom: 14px;
}
.ait-regime-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ait-regime-badge {
  font-size: 12px; font-weight: 800; padding: 5px 12px;
  border-radius: 20px; letter-spacing: 0.3px;
}
.ait-regime-badge.bull { background: rgba(0,214,143,0.15); color: var(--green); }
.ait-regime-badge.bear { background: rgba(255,82,82,0.15);  color: var(--red2); }
.ait-regime-badge.neut { background: rgba(255,179,0,0.15);  color: var(--yellow); }
.ait-regime-conf { font-size: 10px; color: var(--muted); }
.ait-regime-expl { font-size: 10.5px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; }
.ait-consensus-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── R:R ratio badge on trade cards ─────────────────── */
.ait-rr-great { font-size: 11px; font-weight: 800; color: var(--green); background: rgba(0,214,143,0.12); border-radius: 6px; padding: 3px 8px; }
.ait-rr-ok    { font-size: 11px; font-weight: 800; color: var(--yellow); background: rgba(255,179,0,0.12); border-radius: 6px; padding: 3px 8px; }
.ait-rr-poor  { font-size: 11px; font-weight: 800; color: var(--red2); background: rgba(255,82,82,0.12); border-radius: 6px; padding: 3px 8px; }

/* ── Catalyst & Invalidation rows ───────────────────── */
.ait-tc-catalyst {
  font-size: 10px; color: var(--text2); line-height: 1.5;
  background: rgba(124,109,247,0.08); border: 1px solid rgba(124,109,247,0.2);
  border-radius: var(--radius-sm); padding: 6px 10px;
}
.ait-tc-inval {
  font-size: 10px; color: var(--text2); line-height: 1.5;
  background: rgba(255,82,82,0.06); border: 1px solid rgba(255,82,82,0.18);
  border-radius: var(--radius-sm); padding: 6px 10px;
}
.ait-tc-size {
  font-size: 10px; color: var(--yellow2); font-weight: 600;
  background: rgba(255,179,0,0.07); border-radius: var(--radius-sm);
  padding: 4px 10px;
}

/* ── Section header filter badge ────────────────────── */
.ait-filter-badge {
  font-size: 9px; font-weight: 600; color: var(--accent2);
  background: rgba(124,109,247,0.15); border-radius: 10px;
  padding: 2px 8px; margin-left: 8px; vertical-align: middle;
  letter-spacing: 0.2px;
}

/* ── Probability: honest colours (70–75 = low, 76–80 = medium, 81+ = high) ── */
.ait-tc-prob-val.high   { color: var(--green); }
.ait-tc-prob-val.medium { color: var(--yellow); }
.ait-tc-prob-val.low    { color: var(--red2); }

/* ══════════════════════════════════════════════════════
   STRATEGY TAB  —  Next Session Predictor
══════════════════════════════════════════════════════ */

.strat-page { padding: 14px 16px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

/* ── Controls bar ────────────────────────────────── */
.strat-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; flex-shrink: 0;
}
.strat-sym-pills { display: flex; gap: 4px; }
.strat-idx-btn {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 20px;
  color: var(--text2); font-size: 12px; font-weight: 600; padding: 5px 14px;
  cursor: pointer; transition: all 0.18s;
}
.strat-idx-btn.active, .strat-idx-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.strat-load-btn {
  background: var(--surface2); border: 1px solid var(--accent); border-radius: var(--radius-sm);
  color: var(--accent2); font-size: 12px; font-weight: 700; padding: 7px 16px;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.strat-load-btn:hover  { background: rgba(124,109,247,0.15); }
.strat-load-btn:disabled { opacity: 0.5; cursor: default; }
.strat-ai-controls { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.strat-key-input {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-size: 12px; padding: 7px 12px; width: 200px; outline: none; transition: border 0.18s;
}
.strat-key-input:focus { border-color: var(--accent); }
.strat-analyse-btn {
  background: linear-gradient(135deg, var(--accent), #5a4fcf); border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 13px; font-weight: 700; padding: 8px 20px; cursor: pointer;
  transition: opacity 0.18s; white-space: nowrap; box-shadow: 0 2px 12px rgba(124,109,247,0.35);
}
.strat-analyse-btn:hover    { opacity: 0.88; }
.strat-analyse-btn:disabled { opacity: 0.45; cursor: default; }

/* ── Loading ─────────────────────────────────────── */
.strat-loading-box {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 200px; flex-direction: row;
}
.strat-spinner { width: 36px; height: 36px; border: 3px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.strat-loading-text { font-size: 15px; font-weight: 600; color: var(--text); }
.strat-loading-sub  { font-size: 11px; color: var(--text2); margin-top: 3px; }

/* ── Placeholder ─────────────────────────────────── */
.strat-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; text-align: center; padding: 40px 20px; gap: 12px; }
.strat-ph-icon  { font-size: 52px; opacity: 0.7; }
.strat-ph-title { font-size: 20px; font-weight: 700; color: var(--text); }
.strat-ph-sub   { font-size: 13px; color: var(--text2); max-width: 480px; line-height: 1.7; }

/* ── Cards ───────────────────────────────────────── */
.strat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; flex-shrink: 0;
}
.strat-card-hdr { font-size: 12px; font-weight: 700; color: var(--text2); letter-spacing: 0.3px; margin-bottom: 12px; }

/* ── 7-day strip ─────────────────────────────────── */
.strat-7day-strip {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.strat-7d-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface2); min-width: 52px; transition: transform 0.15s;
}
.strat-7d-bull { border-color: rgba(0,214,143,0.35); background: rgba(0,214,143,0.06); }
.strat-7d-bear { border-color: rgba(255,82,82,0.35);  background: rgba(255,82,82,0.06); }
.strat-7d-doji { border-color: rgba(255,179,0,0.3);   background: rgba(255,179,0,0.05); }
.strat-7d-next { border-color: var(--accent); background: rgba(124,109,247,0.08); border-style: dashed; }
.strat-7d-dow  { font-size: 11px; font-weight: 800; color: var(--text); }
.strat-7d-date { font-size: 9px; color: var(--muted); }
.strat-7d-candle { display: flex; flex-direction: column; align-items: center; gap: 1px; height: 28px; justify-content: center; }
.strat-7d-wick   { width: 1.5px; background: var(--border2); flex: 1; }
.strat-7d-body   { width: 10px; height: 12px; border-radius: 1px; flex-shrink: 0; }
.strat-7d-body-bull { background: rgba(0,214,143,0.8); }
.strat-7d-body-bear { background: rgba(255,82,82,0.8); }
.strat-7d-body-doji { background: rgba(255,179,0,0.7); height: 3px; }
.strat-7d-body-next { background: rgba(124,109,247,0.4); border: 1px dashed rgba(124,109,247,0.6); }
.strat-7d-move  { font-size: 10px; font-weight: 700; }
.strat-7d-bull .strat-7d-move { color: var(--green); }
.strat-7d-bear .strat-7d-move { color: var(--red); }
.strat-7d-doji .strat-7d-move { color: var(--yellow); }
.strat-7d-next .strat-7d-move { color: var(--accent2); }
.strat-7d-arrow { font-size: 14px; color: var(--muted); flex-shrink: 0; }

/* ── Prediction card ─────────────────────────────── */
.strat-pred-card { padding: 0; overflow: hidden; }
.strat-pred-bull { border-color: rgba(0,214,143,0.4) !important; }
.strat-pred-bear { border-color: rgba(255,82,82,0.4)  !important; }
.strat-pred-neutral { border-color: rgba(255,179,0,0.35) !important; }

.strat-pred-top {
  display: flex; gap: 0; align-items: stretch;
}
.strat-pred-dir-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 24px; gap: 4px; min-width: 130px; flex-shrink: 0;
}
.strat-pred-bull .strat-pred-dir-box { background: rgba(0,214,143,0.1); }
.strat-pred-bear .strat-pred-dir-box { background: rgba(255,82,82,0.1); }
.strat-pred-neutral .strat-pred-dir-box { background: rgba(255,179,0,0.08); }
.strat-pred-emoji { font-size: 32px; line-height: 1; }
.strat-pred-dir   { font-size: 18px; font-weight: 900; letter-spacing: 0.5px; }
.strat-pred-bull .strat-pred-dir { color: var(--green); }
.strat-pred-bear .strat-pred-dir { color: var(--red); }
.strat-pred-neutral .strat-pred-dir { color: var(--yellow); }
.strat-pred-move  { font-size: 13px; font-weight: 700; color: var(--text2); }

.strat-pred-meta {
  flex: 1; padding: 14px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px;
}
.strat-pred-prob    { font-size: 12px; color: var(--text2); }
.strat-pred-prob b  { color: var(--text); }
.strat-pred-pattern { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 2px; }
.strat-pred-key-txt { color: var(--accent2); font-weight: 700; font-size: 11px; word-break: break-all; }
.strat-pred-depth   { font-size: 10px; color: var(--muted); }
.strat-pred-depth-badge {
  font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
  background: rgba(124,109,247,0.18); color: var(--accent2); flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.strat-pred-bars { display: flex; flex-direction: column; gap: 6px; }
.strat-pb-row    { display: flex; align-items: center; gap: 8px; }
.strat-pb-lbl    { width: 26px; font-size: 10px; font-weight: 700; }
.strat-pb-lbl-bull { color: var(--green); }
.strat-pb-lbl-bear { color: var(--red); }
.strat-pb-lbl-doji { color: var(--yellow); }
.strat-pb-track  { flex: 1; height: 7px; background: var(--surface3); border-radius: 4px; overflow: hidden; max-width: 200px; }
.strat-pb-fill   { height: 100%; border-radius: 4px; transition: width 0.5s; }
.strat-pb-fill-bull { background: rgba(0,214,143,0.75); }
.strat-pb-fill-bear { background: rgba(255,82,82,0.75); }
.strat-pb-fill-doji { background: rgba(255,179,0,0.65); }
.strat-pb-val    { font-size: 10px; font-weight: 700; color: var(--text2); min-width: 28px; }

.strat-hist-section { padding: 10px 16px 14px; border-top: 1px solid var(--border); background: var(--surface2); }
.strat-hist-label   { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.strat-hist-list    { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.strat-hist-list::-webkit-scrollbar { width: 4px; }
.strat-hist-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.strat-hist-row     { display: flex; align-items: center; gap: 8px; font-size: 11px; padding: 4px 6px; border-radius: 4px; }
.strat-hist-bull    { background: rgba(0,214,143,0.04); }
.strat-hist-bear    { background: rgba(255,82,82,0.04); }
.strat-hist-doji    { background: rgba(255,179,0,0.03); }
.strat-hist-date    { color: var(--text2); min-width: 80px; font-size: 10px; }
.strat-hist-dow     { color: var(--muted); min-width: 28px; font-size: 10px; }
.strat-hist-move    { font-weight: 800; min-width: 48px; font-size: 12px; }
.strat-hist-bull .strat-hist-move { color: var(--green); }
.strat-hist-bear .strat-hist-move { color: var(--red); }
.strat-hist-doji .strat-hist-move { color: var(--yellow); }
.strat-hist-bar-wrap { flex: 1; height: 5px; background: var(--surface3); border-radius: 3px; overflow: hidden; max-width: 120px; }
.strat-hist-bar      { display: block; height: 100%; border-radius: 3px; transition: width 0.4s; }
.strat-hist-type    { font-size: 9px; color: var(--muted); min-width: 60px; }

/* ── Ensemble probability UI ─────────────────────── */
/* ── Setup Quality Banner ────────────────────────── */
.strat-setup-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-left: 4px solid;
  font-size: 13px;
}
.strat-setup-strong   { background: rgba(0,214,143,0.10);  border-color: var(--green); }
.strat-setup-moderate { background: rgba(240,192,64,0.10); border-color: var(--yellow); }
.strat-setup-weak     { background: rgba(255,152,0,0.10);  border-color: #ff9800; }
.strat-setup-skip     { background: rgba(255,82,82,0.12);  border-color: var(--red); }
.strat-setup-emoji    { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.strat-setup-label    { font-weight: 900; font-size: 15px; display: block; }
.strat-setup-strong   .strat-setup-label { color: var(--green); }
.strat-setup-moderate .strat-setup-label { color: var(--yellow); }
.strat-setup-weak     .strat-setup-label { color: #ff9800; }
.strat-setup-skip     .strat-setup-label { color: var(--red); }
.strat-setup-reason   { display: block; color: var(--text2); font-size: 12px; margin-top: 3px; line-height: 1.4; }

.strat-prob-big        { display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.strat-prob-num        { font-size:42px; font-weight:900; line-height:1; letter-spacing:-1px; }
.strat-prob-label      { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:0.5px; }
.strat-pred-sub        { font-size:11px; color:var(--muted); margin-top:6px; }

.strat-cons-row        { display:flex; align-items:center; gap:6px; margin-bottom:8px; font-size:11px; color:var(--muted); }
.strat-cons-label      { white-space:nowrap; }
.strat-cons-dot        { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.strat-cons-dot-agree  { background:var(--green); }
.strat-cons-dot-disagree { background:var(--surface3); border:1px solid var(--border); }
.strat-cons-pct        { font-weight:700; color:var(--text); margin-left:2px; }

.strat-ens-section     { margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
.strat-ens-list        { display:flex; flex-direction:column; gap:5px; margin-top:6px; }
.strat-ens-row         { display:flex; align-items:center; gap:8px; font-size:11px; }
.strat-factor-bar-wrap { flex:1; height:6px; background:var(--surface3); border-radius:3px; overflow:hidden; min-width:60px; }
.strat-factor-bar      { height:100%; border-radius:3px; transition:width 0.5s; }

/* ── Strategy card redesign — beginner-friendly ── */
.strat-regime-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
}
.strat-regime-label { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.strat-regime-desc  { font-size: 11px; color: var(--text2); line-height: 1.55; }

.strat-pred-dir-full   { font-size: 12px; color: var(--text2); font-weight: 600; margin-top: 3px; }
.strat-pred-candle-type { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* Signals section */
.strat-signals-section { padding: 14px 14px 6px; border-top: 1px solid var(--border); }
.strat-signals-header  { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.strat-signals-title   { font-size: 13px; font-weight: 800; color: var(--text); }
.strat-signals-sub     { font-size: 11px; color: var(--muted); }
.strat-signal-legend   {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 5px 8px;
  background: var(--surface2);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.strat-signal-list     { display: flex; flex-direction: column; gap: 1px; }
.strat-signal-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 6px;
  background: var(--surface2);
  margin-bottom: 5px;
  border: 1px solid var(--border);
}
.strat-signal-info { flex: 1; min-width: 0; }
.strat-signal-top  {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.strat-signal-icon   { font-size: 13px; flex-shrink: 0; }
.strat-signal-name   { font-size: 12px; font-weight: 800; color: var(--text); }
.strat-signal-status-text { font-size: 10px; color: var(--muted); font-weight: 600; }
.strat-signal-explain { font-size: 11px; color: var(--text2); line-height: 1.55; }
.strat-signal-score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 80px;
}
.strat-signal-score { font-size: 15px; font-weight: 900; }

/* Similarity block */
.strat-sim-block       { margin: 10px 14px; padding: 12px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.strat-sim-block-title { font-size: 12px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.strat-sim-block-sub   { font-size: 11px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.strat-sim-stats       { display: flex; gap: 12px; flex-wrap: wrap; }
.strat-sim-stat        { display: flex; flex-direction: column; align-items: center; background: var(--surface3); padding: 8px 14px; border-radius: 8px; min-width: 70px; }
.strat-sim-stat-val    { font-size: 16px; font-weight: 900; color: var(--text); }
.strat-sim-stat-lbl    { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; font-weight: 700; }

/* Historical table */
.strat-hist-hdr         { margin-bottom: 10px; }
.strat-hist-hdr-title   { font-size: 12px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.strat-hist-hdr-sub     { font-size: 11px; color: var(--muted); line-height: 1.5; }
.strat-hist-col-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.strat-ens-depth       { min-width:70px; color:var(--muted); font-size:10px; }
.strat-ens-dir         { font-weight:800; min-width:14px; font-size:13px; }
.strat-ens-val         { min-width:90px; color:var(--text2); font-size:10px; }
.strat-ens-cnt         { min-width:28px; color:var(--muted); font-size:10px; text-align:right; }

/* ── Similarity Engine ───────────────────────────── */
.strat-sim-section     { margin-top:14px; padding:10px; border-radius:8px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); }
.strat-sim-title       { font-size:11px; color:var(--muted); margin-bottom:8px; font-weight:600; }

/* ════════════════════════════════════════════════════
   AI INTELLIGENCE ENGINE — Status bar + cards
   ════════════════════════════════════════════════════ */

/* Train button */
.strat-train-btn {
  padding: 8px 14px; border-radius: 8px; border: 1.5px solid #f0c040;
  background: rgba(240,192,64,0.10); color: #f0c040; font-weight: 700;
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.strat-train-btn:hover:not(:disabled) { background: rgba(240,192,64,0.22); }
.strat-train-btn:disabled             { opacity: 0.4; cursor: not-allowed; }

/* Status bar */
.strat-ai-status-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 14px; border-radius: 8px; margin-bottom: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  font-size: 12px;
}
.strat-ai-status-title { font-weight: 800; color: #f0c040; font-size: 12px; }
.strat-ai-status-dot {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700;
  transition: all 0.3s;
}
.ai-dot-on  { background: rgba(0,214,143,0.18); color: #00d68f; border: 1px solid #00d68f44; }
.ai-dot-off { background: rgba(255,82,82,0.12);  color: #ff525288; border: 1px solid #ff525233; }
.strat-ai-status-text { flex: 1; color: var(--muted); font-size: 11px; }
.strat-llm-select {
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.strat-ai-run-btn {
  padding: 5px 14px; border-radius: 6px; border: 1.5px solid #7b68ee;
  background: rgba(123,104,238,0.14); color: #a08fff; font-weight: 700;
  font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.strat-ai-run-btn:hover:not(:disabled) { background: rgba(123,104,238,0.28); }
.strat-ai-run-btn:disabled             { opacity: 0.4; cursor: not-allowed; }

/* AI loading spinner */
.strat-ai-loading { display:flex; align-items:center; gap:12px; padding:24px; color:var(--muted); font-size:14px; }

/* Main AI card */
.ai-intelligence-card { border-color: rgba(123,104,238,0.35) !important; }

/* Direction / Regime header boxes */
.ai-dir-box {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; padding:16px 20px; border-radius:10px; min-width:130px;
  background:rgba(255,255,255,0.04); border: 2px solid transparent;
  text-align:center;
}
.ai-regime-box {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; padding:14px 16px; border-radius:10px; min-width:160px;
  background:rgba(255,255,255,0.04); border: 2px solid transparent; text-align:center;
}
.ai-signals-box {
  display:grid; grid-template-columns:repeat(4,1fr); gap:6px; flex:1; min-width:280px;
  padding:10px; border-radius:10px; background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.08);
}
.ai-sig-cell  { text-align:center; padding:4px 2px; }
.ai-sig-val   { font-size:12px; font-weight:700; }
.ai-sig-label { font-size:9px; color:var(--muted); margin-top:1px; }

/* Model cards grid */
.ai-model-grid { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.ai-model-card {
  flex:1; min-width:140px; padding:12px; border-radius:8px;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10);
  display:flex; flex-direction:column; gap:3px; align-items:center; text-align:center;
}
.ai-model-icon  { font-size:20px; }
.ai-model-name  { font-size:11px; color:var(--muted); font-weight:600; }
.ai-model-dir   { font-size:14px; font-weight:800; }
.ai-model-prob  { font-size:18px; font-weight:900; }
.ai-model-extra { font-size:9px; color:var(--muted); }
.ai-model-bar-wrap { width:100%; height:5px; background:var(--surface3); border-radius:3px; overflow:hidden; margin-top:3px; }
.ai-model-bar      { height:100%; border-radius:3px; transition:width 0.5s; }

/* LLM grid */
.ai-llm-grid  { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.ai-llm-block { flex:1; min-width:180px; padding:8px 10px; border-radius:7px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07); }
.ai-llm-wide  { min-width:100%; }
.ai-llm-label { font-size:9px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:3px; }
.ai-llm-val   { font-size:12px; line-height:1.5; }

/* Historical twins */
.ai-twin-header { display:flex; gap:8px; font-size:9px; color:var(--muted); font-weight:700; text-transform:uppercase; padding:4px 2px 4px; border-bottom:1px solid var(--border); margin-top:8px; }
.ai-twin-row    { display:flex; align-items:center; gap:8px; padding:4px 2px; border-bottom:1px solid rgba(255,255,255,0.04); font-size:11px; }
.ai-twin-date   { min-width:80px; color:var(--muted); }
.ai-twin-sim    { min-width:40px; color:var(--yellow); font-weight:700; }
.ai-twin-regime { min-width:55px; color:var(--muted); font-size:10px; }
.ai-twin-bar-wrap { flex:1; height:5px; background:var(--surface3); border-radius:2px; overflow:hidden; }
.ai-twin-bar    { height:100%; border-radius:2px; }

/* ── Intraday chart ──────────────────────────────── */
.strat-chart-card { }
.strat-chart-note { font-size: 10px; color: var(--muted); margin-bottom: 10px; }
.strat-chart-wrap { height: 320px; position: relative; }
.strat-chart-wrap-tall { height: 460px; }

/* ── AI insight ──────────────────────────────────── */
.strat-ai-dir { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.strat-ai-dir-green  { color: var(--green); }
.strat-ai-dir-red    { color: var(--red); }
.strat-ai-dir-yellow { color: var(--yellow); }
.strat-ai-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.strat-ai-block { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.strat-ai-block-title { font-size: 10px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.strat-ai-block-body  { font-size: 12px; color: var(--text); line-height: 1.6; }
.strat-retail-highlight { color: var(--green2); font-weight: 500; }
.strat-warning-text     { color: var(--yellow); }
.strat-ai-reasoning { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.strat-ai-reasoning-body { font-size: 12px; color: var(--text2); line-height: 1.75; margin-top: 6px; }

/* ── Generic ─────────────────────────────────────── */
.strat-nodata { font-size: 12px; color: var(--muted); font-style: italic; padding: 8px 0; }
.strat-disclaimer { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; background: rgba(255,255,255,0.02); flex-shrink: 0; }
.strat-conf-high { background: rgba(35,134,54,0.2);  color: #3fb950; border-radius: 8px; padding: 1px 6px; font-size: 10px; }
.strat-conf-med  { background: rgba(255,179,0,0.15); color: #ffb300; border-radius: 8px; padding: 1px 6px; font-size: 10px; }
.strat-conf-low  { background: rgba(255,82,82,0.15); color: #ff5252; border-radius: 8px; padding: 1px 6px; font-size: 10px; }

/* ── Smart Option Picker (AI Trade tab) ───────────────── */
.ait-smart-pick {
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.sop-header {
  background: var(--surface2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sop-title { font-size: 14px; font-weight: 800; color: var(--text); }
.sop-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sop-strategy-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sop-dir-badge {
  font-size: 14px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.sop-dir-bull    { background: rgba(35,134,54,0.2);  color: #3fb950; }
.sop-dir-bear    { background: rgba(255,82,82,0.18); color: #ff5252; }
.sop-dir-neutral { background: rgba(255,179,0,0.15); color: #ffb300; }
.sop-pill {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface3);
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 600;
}
.sop-pill b { color: var(--text); }
.sop-holding-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sop-holding-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 4px;
}
.sop-holding-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sop-holding-btn:hover { background: var(--surface3); }
.sop-holding-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sop-body { padding: 14px 16px; }
.sop-pick-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.sop-pick-card {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.sop-pick-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; color: var(--muted); }
.sop-pick-name  { font-size: 17px; font-weight: 900; margin-bottom: 3px; }
.sop-pick-ltp   { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.sop-pick-rows  { display: flex; flex-direction: column; gap: 5px; }
.sop-pick-line  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 4px 8px;
  background: var(--surface3);
  border-radius: 4px;
}
.sop-pick-lbl { color: var(--muted); font-weight: 600; }
.sop-pick-val { color: var(--text); font-weight: 700; }
.sop-pick-val.green { color: #3fb950; }
.sop-pick-val.red   { color: #ff5252; }
.sop-rr {
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  margin-top: 10px;
  padding: 6px;
  border-radius: 4px;
}
.sop-rr.good { background: rgba(35,134,54,0.18);  color: #3fb950; }
.sop-rr.ok   { background: rgba(255,179,0,0.15);  color: #ffb300; }
.sop-rr.bad  { background: rgba(255,82,82,0.12);  color: #ff5252; }
.sop-guidance { margin-top: 14px; }
.sop-guidance-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 8px;
}
.sop-guidance-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.7;
}
.sop-guidance-block b { color: var(--text); }
.sop-timeline { margin-top: 12px; }
.sop-timeline-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 8px;
}
.sop-tl-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
}
.sop-tl-row:last-child { border-bottom: none; }
.sop-tl-time { min-width: 90px; color: var(--accent); font-weight: 700; font-size: 11px; flex-shrink: 0; }
.sop-tl-desc { color: var(--text2); line-height: 1.55; }
.sop-skip-warn {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #ff5252;
  background: rgba(255,82,82,0.07);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.sop-no-data {
  padding: 20px 16px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ══════════════════════════════════════════════════════
   AI TRADE TAB v2  (ait2-*)
══════════════════════════════════════════════════════ */

/* Page: fills tab panel, header+nav sticky at top, body scrolls */
.ait2-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ait2-header  { flex-shrink: 0; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.ait2-title   { font-size: 16px; font-weight: 900; color: var(--text); }
.ait2-sub     { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Sub-tab nav */
.ait2-tab-nav {
  flex-shrink: 0;
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  padding: 0 16px;
}
.ait2-tab-btn {
  font-size: 13px;
  font-weight: 700;
  padding: 9px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.ait2-tab-btn:hover  { color: var(--text); }
.ait2-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Panels — fill remaining height */
.ait2-panel        { display: none; }
.ait2-panel.active { display: flex; flex: 1; min-height: 0; }
.ait2-loading      { padding: 24px 16px; font-size: 12px; color: var(--muted); }

/* Two-column body */
.ait2-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ait2-col {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 14px 16px 28px;
}
.ait2-col-left  { flex: 0 0 54%; border-right: 1px solid var(--border); }
.ait2-col-right { flex: 1; }

/* Column heading */
.ait2-col-hdr   { margin-bottom: 14px; }
.ait2-col-title { font-size: 14px; font-weight: 900; color: var(--text); margin-bottom: 2px; }
.ait2-col-sub   { font-size: 11px; color: var(--muted); }

/* Verdict box */
.ait2-verdict-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.ait2-verdict-bull    { background: rgba(0,214,143,0.10);  border: 1px solid rgba(0,214,143,0.3); }
.ait2-verdict-bear    { background: rgba(255,82,82,0.10);   border: 1px solid rgba(255,82,82,0.3); }
.ait2-verdict-neutral { background: rgba(255,179,0,0.08);  border: 1px solid rgba(255,179,0,0.3); }
.ait2-verdict-left  { display: flex; align-items: center; gap: 12px; }
.ait2-verdict-emoji { font-size: 32px; line-height: 1; flex-shrink: 0; }
.ait2-verdict-label { font-size: 20px; font-weight: 900; letter-spacing: 0.5px; }
.ait2-verdict-bull  .ait2-verdict-label { color: var(--green); }
.ait2-verdict-bear  .ait2-verdict-label { color: var(--red); }
.ait2-verdict-neutral .ait2-verdict-label { color: var(--yellow); }
.ait2-verdict-full  { font-size: 12px; color: var(--text2); margin-top: 4px; font-weight: 600; }
.ait2-verdict-right { text-align: right; flex-shrink: 0; }
.ait2-verdict-pct   { font-size: 36px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.ait2-verdict-conf  { font-size: 11px; font-weight: 700; margin-top: 3px; }

/* Meter bar */
.ait2-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ait2-meter-track {
  flex: 1;
  height: 10px;
  background: var(--surface3);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
}
.ait2-meter-fill-bull { background: rgba(0,214,143,0.75); height: 100%; transition: width 0.6s; }
.ait2-meter-fill-bear { background: rgba(255,82,82,0.75);  height: 100%; transition: width 0.6s; }
.ait2-meter-bull { font-size: 11px; font-weight: 800; color: var(--green); white-space: nowrap; }
.ait2-meter-bear { font-size: 11px; font-weight: 800; color: var(--red);   white-space: nowrap; }

/* Source breakdown */
.ait2-src-title { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.ait2-src-list  { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.ait2-src-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ait2-src-dot  { font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.ait2-src-info { flex: 1; min-width: 0; }
.ait2-src-top  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.ait2-src-top-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow: hidden; }
.ait2-src-icon { font-size: 13px; flex-shrink: 0; }
.ait2-src-name { font-size: 12px; font-weight: 800; color: var(--text); white-space: nowrap; }
.ait2-src-tag  { font-size: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ait2-src-score { font-size: 14px; font-weight: 900; flex-shrink: 0; margin-left: 6px; }
.ait2-src-desc { font-size: 11px; color: var(--text2); line-height: 1.55; }
.ait2-src-bar  {
  height: 5px;
  background: var(--surface3);
  border-radius: 3px;
  margin-top: 7px;
  overflow: hidden;
}

/* Regime box */
.ait2-regime-box {
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.ait2-regime-top   { display: flex; align-items: flex-start; gap: 10px; }
.ait2-regime-label { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.ait2-regime-hold  { font-size: 11px; color: var(--text2); line-height: 1.5; margin-top: 2px; }

/* Option cards */
.ait2-opt-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.ait2-opt-card {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.ait2-opt-best {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.ait2-opt-badge  { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.5px; }
.ait2-opt-name   { font-size: 16px; font-weight: 900; margin-bottom: 3px; }
.ait2-opt-ltp    { font-size: 11px; color: var(--text2); margin-bottom: 9px; }
.ait2-opt-rows   { display: flex; flex-direction: column; gap: 4px; }
.ait2-opt-row    { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 3px 7px; background: var(--surface3); border-radius: 4px; }
.ait2-opt-lbl    { color: var(--muted); font-weight: 600; min-width: 82px; flex-shrink: 0; }
.ait2-opt-val    { color: var(--text); font-weight: 700; text-align: right; }
.ait2-rr {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 9px;
  padding: 5px;
  border-radius: 4px;
}
.ait2-rr.good { background: rgba(0,214,143,0.15);  color: #3fb950; }
.ait2-rr.ok   { background: rgba(255,179,0,0.12);  color: #ffb300; }
.ait2-rr.bad  { background: rgba(255,82,82,0.10);  color: #ff5252; }
.ait2-no-opts { padding: 14px; font-size: 12px; color: var(--muted); font-style: italic; background: var(--surface2); border-radius: 6px; margin-bottom: 14px; }

/* Holding guidance */
.ait2-hold-box   { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; }
.ait2-hold-title { font-size: 12px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.ait2-hold-body  { display: flex; flex-direction: column; gap: 6px; }
.ait2-hold-row   { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; }
.ait2-hold-lbl   { min-width: 155px; color: var(--muted); font-weight: 700; flex-shrink: 0; }
.ait2-hold-val   { color: var(--text2); line-height: 1.5; }

.ait2-disclaimer { flex-shrink: 0; padding: 7px 16px 10px; font-size: 10px; color: var(--muted); border-top: 1px solid var(--border); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .strat-pred-top { flex-direction: column; }
  .strat-pred-dir-box { flex-direction: row; min-width: unset; padding: 14px 16px; justify-content: flex-start; gap: 12px; }
  .strat-pred-meta { border-left: none; border-top: 1px solid var(--border); }
  .strat-key-input { width: 150px; }
  .strat-ai-blocks { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  /* Two-column → single-column stack on tablet/phone */
  .ait2-page { overflow-y: auto; overflow-x: hidden; }
  .ait2-panel.active { flex: none; display: block; overflow: visible; }
  .ait2-body {
    flex-direction: column;
    flex: none;
    overflow: visible;
    min-height: unset;
  }
  .ait2-col {
    flex: none;
    overflow-y: visible;
    padding: 12px 12px 16px;
  }
  .ait2-col-left  { border-right: none; border-bottom: 1px solid var(--border); }
  .ait2-col-right { border-top: none; }
}

@media (max-width: 600px) {
  /* ── Strategy ───────── */
  .strat-ai-controls { margin-left: 0; }
  .strat-key-input { width: 100%; }

  /* ── AI Trade chrome ── */
  .ait2-header  { padding: 11px 12px 9px; }
  .ait2-tab-nav { padding: 0 8px; }
  .ait2-tab-btn { padding: 8px 14px; font-size: 12px; }
  .ait2-col-title { font-size: 13px; }

  /* ── Verdict box — stack rows ─ */
  .ait2-verdict-box   { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .ait2-verdict-left  { gap: 10px; }
  .ait2-verdict-emoji { font-size: 26px; }
  .ait2-verdict-label { font-size: 17px; }
  .ait2-verdict-full  { font-size: 11px; }
  .ait2-verdict-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .ait2-verdict-pct  { font-size: 26px; }
  .ait2-verdict-conf { font-size: 11px; margin-top: 0; }

  /* ── Meter bar ─────────────── */
  .ait2-meter-bull,
  .ait2-meter-bear { font-size: 10px; }
  .ait2-meter-track { height: 8px; }

  /* ── Source rows ───────────── */
  .ait2-src-tag   { display: none; }
  .ait2-src-score { font-size: 13px; }
  .ait2-src-bar   { height: 4px; margin-top: 5px; }

  /* ── Option cards ──────────── */
  .ait2-opt-name { font-size: 14px; }
  .ait2-opt-lbl  { min-width: 90px; font-size: 11px; }

  /* ── Holding guidance ──────── */
  .ait2-hold-box  { padding: 11px 12px; }
  .ait2-hold-row  { flex-direction: column; gap: 1px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
  .ait2-hold-row:last-child { border-bottom: none; padding-bottom: 0; }
  .ait2-hold-lbl  { min-width: unset; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
  .ait2-hold-val  { font-size: 12px; }

  /* ── Regime box ────────────── */
  .ait2-regime-box   { padding: 9px 10px; }
  .ait2-regime-label { font-size: 11px; }
  .ait2-regime-hold  { font-size: 10px; }
}

@media (max-width: 380px) {
  .ait2-verdict-label { font-size: 15px; }
  .ait2-verdict-pct   { font-size: 22px; }
  .ait2-src-name      { font-size: 11px; }
  .ait2-src-desc      { font-size: 10px; }
  .ait2-opt-name      { font-size: 13px; }
}
