/* ===========================================================
   Stock Tool — Terminal-Grade Theme
   Inspired by TradingView, Bloomberg Terminal, Linear
   =========================================================== */
:root {
  /* Brand — Claw Invest green (from logo gradient: #C2F84E → #8FEF26) */
  --brand: #8FEF26;
  --brand-hover: #a4f548;
  --brand-soft: #C2F84E;
  --accent: #C2F84E;
  --accent-2: #ff6b35;

  /* Surface (TradingView-style dark palette) */
  --bg: #0d1117;
  --bg-2: #131722;
  --bg-card: #181b25;
  --bg-elev: #1e222d;
  --bg-elev-2: #242832;
  --bg-hover: #2a2e39;
  --border: #2a2e39;
  --border-strong: #363a45;
  --border-soft: #1e222d;

  /* Text */
  --text: #d1d4dc;
  --text-strong: #f7f8fa;
  --text-muted: #787b86;
  --text-dim: #4d5260;

  /* Semantic */
  --up: #26a69a;
  --up-bright: #00c896;
  --up-bg: rgba(38, 166, 154, 0.12);
  --up-bg-strong: rgba(38, 166, 154, 0.22);
  --down: #ef5350;
  --down-bright: #ff5252;
  --down-bg: rgba(239, 83, 80, 0.12);
  --down-bg-strong: rgba(239, 83, 80, 0.22);
  --warning: #ff9800;
  --warning-bg: rgba(255, 152, 0, 0.12);
  --info: #2962ff;
  --info-bg: rgba(41, 98, 255, 0.12);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --glow-brand: 0 0 24px rgba(143, 239, 38, 0.35);
  --glow-up: 0 0 16px rgba(38, 166, 154, 0.3);
  --glow-down: 0 0 16px rgba(239, 83, 80, 0.3);

  /* Layout */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--brand); color: white; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

.mono, code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-feature-settings: "tnum", "zero";
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: #5b8bff; }

code {
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border);
}

kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text-muted);
}

/* SVG icons */
[data-lucide] { width: 16px; height: 16px; stroke-width: 2; vertical-align: middle; }
.svg-md [data-lucide] { width: 18px; height: 18px; }
.svg-lg [data-lucide] { width: 22px; height: 22px; }

/* ===========================================================
   TICKER TAPE (top scrolling)
   =========================================================== */
.ticker-tape {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  height: 38px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: scroll-ticker 120s linear infinite;
  padding-left: 100%;
}
.ticker-tape:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 26px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  border-right: 1px solid var(--border-soft);
}
.ticker-label {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.ticker-price {
  color: var(--text-strong);
  font-weight: 600;
}
.ticker-change {
  font-weight: 600;
  font-size: 12px;
}
.ticker-change.up { color: var(--up); }
.ticker-change.down { color: var(--down); }

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

/* ===========================================================
   TOP NAV BAR
   =========================================================== */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 76px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  flex-shrink: 0;
}
.brand a {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand a:hover { color: var(--text-strong); }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--glow-brand);
}
.brand-mark [data-lucide] { width: 16px; height: 16px; stroke-width: 2.5; }
.brand-logo {
  width: 52px;
  height: 52px;
  display: inline-block;
  filter: drop-shadow(0 0 14px rgba(143, 239, 38, 0.45));
  transition: filter var(--transition);
}
.brand a:hover .brand-logo {
  filter: drop-shadow(0 0 20px rgba(143, 239, 38, 0.65));
}
.brand-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link span { white-space: nowrap; }
.nav-link:hover {
  background: var(--bg-elev);
  color: var(--text-strong);
}
.nav-link [data-lucide] { width: 17px; height: 17px; flex-shrink: 0; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 1;
  min-width: 0;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up-bright);
  box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.7);
  animation: pulse 2s infinite;
}
.live-label { color: var(--up-bright); }
.live-time { color: var(--text); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(0, 200, 150, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0); }
}

.quick-search {
  position: relative;
  display: flex;
  align-items: center;
}
.quick-search .search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  pointer-events: none;
}
.quick-search input {
  width: 280px;
  max-width: 30vw;
  min-width: 180px;
  padding: 9px 40px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  transition: all var(--transition);
}
.quick-search input::placeholder { color: var(--text-dim); }
.quick-search input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-elev-2);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.18);
}
.quick-search kbd {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

/* ===========================================================
   CONTAINER
   =========================================================== */
.container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 24px;
  animation: fadeInUp 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   HERO / PAGE HEADER (simplified, less hype)
   =========================================================== */
.hero { padding: 8px 0 16px; }
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

.banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--warning-bg);
  border: 1px solid rgba(255, 152, 0, 0.25);
  color: #ffb84d;
}
.banner [data-lucide] { width: 14px; height: 14px; }

/* ===========================================================
   CARDS
   =========================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-strong); }
.card h2 {
  margin: 0 0 20px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card h2 [data-lucide] { width: 20px; height: 20px; color: var(--brand); }
.card h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 [data-lucide] { width: 18px; height: 18px; color: var(--brand); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.grid-stock-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-4, .grid-stock-detail { grid-template-columns: 1fr; }
}

/* ===========================================================
   TOPBAR RESPONSIVE — Mac 13" + 笔记本屏宽通常 1280-1440px
   - 1380px 以下: 缩窄 LIVE 时钟,只保留 LIVE 标签
   - 1280px 以下: 完全隐藏 LIVE 指示器
   - 1180px 以下: 隐藏 user-name 文本(只剩头像 + chevron)
   - 1080px 以下: 搜索框变小
   =========================================================== */
@media (max-width: 1380px) {
  .live-time { display: none; }
}
@media (max-width: 1280px) {
  .live-indicator { display: none; }
  .topbar { gap: 16px; padding: 0 18px; }
}
@media (max-width: 1180px) {
  .user-name { display: none; }
  .nav-link { padding: 8px 10px; font-size: 14px; }
  .brand a { gap: 10px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-text { font-size: 19px; }
}
@media (max-width: 1080px) {
  .quick-search input { width: 200px; min-width: 160px; }
  .quick-search kbd { display: none; }
}
@media (max-width: 960px) {
  .nav-link span { display: none; }   /* 只剩图标 */
  .nav-link { padding: 8px; }
}

.hint {
  color: var(--text-dim);
  font-size: 13px;
  margin: 12px 0 0;
  font-weight: 400;
}
.empty {
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 32px 0;
  font-size: 15px;
}

/* ===========================================================
   STAT TILES (TradingView-style market widgets)
   =========================================================== */
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.stat-tile:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev);
  transform: translateY(-1px);
}
.stat-tile .label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-tile .value {
  font-size: 30px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-tile .delta {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-tile .spark-mini {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 36px;
  opacity: 0.85;
}
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--text-muted); }

/* ===========================================================
   WATCHLIST (TV-style dense rows)
   =========================================================== */
.watchlist-rows { display: flex; flex-direction: column; gap: 1px; }
.watchlist-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 100px 110px 90px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background var(--transition);
  color: var(--text);
}
.watchlist-row:hover {
  background: var(--bg-elev);
  text-decoration: none;
}
.watchlist-row .wl-ticker {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}
.watchlist-row .wl-name {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 3px;
}
.watchlist-row .wl-spark {
  height: 36px;
}
.watchlist-row .wl-price {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-strong);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.watchlist-row .wl-change {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  text-align: right;
  padding: 4px 12px;
  border-radius: 5px;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}
.wl-change.up { background: var(--up-bg); color: var(--up); }
.wl-change.down { background: var(--down-bg); color: var(--down); }

/* ===========================================================
   HEATMAP (sector / market overview)
   =========================================================== */
.heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 4px;
}
.heatmap-cell {
  padding: 14px 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.heatmap-cell:hover { transform: scale(1.03); z-index: 2; }
.heatmap-cell .name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.heatmap-cell .change {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #0a1a00;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(143, 239, 38, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(143, 239, 38, 0.4), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary [data-lucide] { width: 14px; height: 14px; color: #0a1a00; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
  color: var(--text-strong);
  text-decoration: none;
}
.btn-secondary [data-lucide] { width: 14px; height: 14px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-elev); color: var(--text-strong); }
.btn-ghost.active { background: var(--brand); color: white; }

/* ===========================================================
   BRIEF LIST
   =========================================================== */
.brief-list { list-style: none; padding: 0; margin: 0; }
.brief-list li { margin-bottom: 1px; }
.brief-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  transition: all var(--transition);
}
.brief-link:hover { background: var(--bg-elev); text-decoration: none; }
.brief-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-elev);
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
  border: 1px solid var(--border);
}
.tag-global_morning { background: rgba(255, 152, 0, 0.1); color: #ffb84d; border-color: rgba(255, 152, 0, 0.3); }
.tag-a_close { background: var(--down-bg); color: var(--down); border-color: rgba(239, 83, 80, 0.3); }
.tag-us_premarket { background: var(--info-bg); color: #5b8bff; border-color: rgba(41, 98, 255, 0.3); }
.tag-watchlist { background: var(--up-bg); color: var(--up); border-color: rgba(38, 166, 154, 0.3); }
.tag-stock_detail { background: rgba(139, 92, 246, 0.1); color: #b794ff; border-color: rgba(139, 92, 246, 0.3); }
.brief-title { flex: 1; font-weight: 500; font-size: 15px; color: var(--text); }
.brief-time {
  color: var(--text-dim);
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
}

/* ===========================================================
   STOCK DETAIL PAGE
   =========================================================== */
.loading { text-align: center; padding: 100px 0; color: var(--text-muted); }
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }

.stock-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 22px;
  background: var(--bg-card);
  background-image: linear-gradient(180deg, rgba(143, 239, 38, 0.06) 0%, transparent 60%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}
.stock-title { display: flex; flex-direction: column; gap: 4px; }
.stock-title h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.stock-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.stock-ticker {
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 14px;
}
.market-tag {
  display: inline-block;
  padding: 3px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: "JetBrains Mono", monospace;
}
.stock-price { text-align: right; }
.stock-price .price {
  display: block;
  font-size: 44px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stock-price .price .currency {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 8px;
}
.stock-price .change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: 7px;
  font-size: 18px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin-top: 10px;
}
.stock-price .up { background: var(--up-bg); color: var(--up); }
.stock-price .down { background: var(--down-bg); color: var(--down); }

/* Chart card */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-card-header h3 { margin: 0; }
.chart-interval-buttons {
  display: flex;
  gap: 2px;
  background: var(--bg-elev);
  padding: 2px;
  border-radius: 6px;
}
.chart-interval-buttons button {
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.chart-interval-buttons button:hover { color: var(--text-strong); }
.chart-interval-buttons button.active {
  background: var(--bg-card);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}
.tv-chart-container { height: 320px; width: 100%; }

/* ===========================================================
   TABLES
   =========================================================== */
.metrics-table { width: 100%; border-collapse: collapse; }
.metrics-table th {
  text-align: left;
  padding: 14px 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}
.metrics-table td {
  padding: 14px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  text-align: right;
  font-size: 16px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.metrics-table tr:last-child th,
.metrics-table tr:last-child td { border-bottom: none; }

/* ===========================================================
   NEWS LIST
   =========================================================== */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
}
.news-list li:last-child { border-bottom: none; }
.news-time {
  display: block;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-dim);
  font-size: 10px;
  margin-bottom: 3px;
  letter-spacing: 0.04em;
}
.news-list a { color: var(--text); }
.news-list a:hover { color: var(--brand); }

/* ===========================================================
   CHAT
   =========================================================== */
.chat-card { display: flex; flex-direction: column; }
.chat-thread {
  min-height: 200px;
  max-height: 520px;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.chat-thread-large { min-height: 460px; }
.msg {
  padding: 12px 16px;
  border-radius: 11px;
  margin-bottom: 12px;
  max-width: 88%;
  font-size: 15px;
  line-height: 1.6;
  animation: msg-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-user {
  background: var(--brand);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 3px;
}
.msg-ai {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}
.msg-ai p { margin: 0.4em 0; }
.msg-ai ul, .msg-ai ol { margin: 0.4em 0; padding-left: 1.3em; }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 15px;
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
}
.chat-form input::placeholder { color: var(--text-dim); }
.chat-form input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-elev-2);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.18);
}

/* ===========================================================
   MARKDOWN BODY (for AI summary / brief)
   =========================================================== */
.markdown-body { color: var(--text); line-height: 1.75; font-size: 15px; }
.markdown-body h1, .markdown-body h2 { margin: 1.2em 0 0.5em; font-weight: 600; color: var(--text-strong); }
.markdown-body h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 9px;
}
.markdown-body h2 { font-size: 17px; }
.markdown-body h3 {
  font-size: 13px;
  margin: 1em 0 0.4em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.markdown-body p { margin: 0.5em 0; }
.markdown-body strong { color: var(--text-strong); font-weight: 600; }
.markdown-body ul, .markdown-body ol { padding-left: 1.4em; margin: 0.5em 0; }
.markdown-body li { margin: 0.25em 0; }
.markdown-body table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
  font-size: 14px;
}
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.markdown-body th { background: var(--bg-elev); font-weight: 600; color: var(--text-strong); }
.markdown-body td { font-family: "JetBrains Mono", monospace; color: var(--text); font-variant-numeric: tabular-nums; }
.markdown-body blockquote {
  border-left: 2px solid var(--brand);
  padding: 4px 12px;
  color: var(--text-muted);
  margin: 0.5em 0;
  background: var(--bg-elev);
  border-radius: 0 6px 6px 0;
}
.markdown-body code {
  font-size: 0.88em;
  background: var(--bg-elev);
  color: var(--accent);
}
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2em 0;
}

/* ===========================================================
   BRIEF PAGE
   =========================================================== */
.brief-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.brief-header h1 {
  flex: 1;
  margin: 0;
  font-size: 22px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.brief-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ===========================================================
   ERRORS
   =========================================================== */
.error {
  color: var(--down);
  background: var(--down-bg);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 83, 80, 0.2);
  font-size: 12px;
}

/* ===========================================================
   FOOTER (status bar)
   =========================================================== */
footer {
  margin: 28px auto 20px;
  max-width: 1400px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-left .dot { opacity: 0.5; }
.footer-left .version {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin-left: 4px;
  font-size: 10px;
}
.footer-right { display: flex; gap: 8px; align-items: center; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.status-chip .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}
.status-chip.ok { color: var(--up-bright); }
.status-chip.ok .status-dot { background: var(--up-bright); }
.status-chip.warn { color: var(--warning); }
.status-chip.warn .status-dot { background: var(--warning); }

/* ===========================================================
   PAGE HEADER & SECTION HEADING
   =========================================================== */
.page-header { padding: 12px 0 20px; }
.page-header h1 {
  margin: 0 0 4px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
  padding: 0;
}
.section-heading h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-heading h2 [data-lucide] { width: 16px; height: 16px; }

/* ===========================================================
   SHIMMER (loading)
   =========================================================== */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-elev) 0%,
    var(--bg-elev-2) 50%,
    var(--bg-elev) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  height: 16px;
  width: 80%;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===========================================================
   HERO COMMAND BAR (search + AI prompt) — Bloomberg-grade centerpiece
   =========================================================== */
.hero-command {
  margin: 8px 0 28px;
  padding: 32px 36px;
  background:
    radial-gradient(ellipse at top left, rgba(143, 239, 38, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(212, 255, 92, 0.10) 0%, transparent 50%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero-command::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.6;
}
.hero-command-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
}
/* Equal-weight tabs — same base style, only differentiator is the small AI accent on icon + badge */
.hero-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.hero-tab [data-lucide] { width: 18px; height: 18px; color: var(--text); }
.hero-tab:hover {
  background: var(--bg-elev-2);
  color: var(--text-strong);
  border-color: var(--border-strong);
}

/* Active tab — same treatment for both modes, no green */
.hero-tab.active {
  background: var(--bg-card);
  color: var(--text-strong);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--border-strong) inset, var(--shadow-sm);
}
.hero-tab.active [data-lucide] { color: var(--text-strong); }

/* AI mode keeps a small green sparkle on the icon only — minimal differentiation */
.hero-tab[data-mode="ai"] [data-lucide] {
  color: var(--brand);
}
.hero-tab[data-mode="ai"].active [data-lucide] {
  color: var(--brand);
  filter: drop-shadow(0 0 4px rgba(143, 239, 38, 0.4));
}
.hero-tab .badge {
  font-size: 12px;
  background: rgba(143, 239, 38, 0.12);
  color: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  border: 1px solid rgba(143, 239, 38, 0.4);
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.hero-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  padding: 4px 4px 4px 22px;
  transition: all var(--transition);
}
.hero-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(143, 239, 38, 0.18), 0 8px 32px rgba(143, 239, 38, 0.30);
}
.hero-input-wrap .hero-icon {
  flex-shrink: 0;
  color: var(--brand);
  margin-right: 16px;
}
.hero-input-wrap .hero-icon [data-lucide] { width: 22px; height: 22px; }
.hero-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-strong);
  font-size: 20px;
  font-family: inherit;
  font-weight: 500;
  padding: 16px 0;
  outline: none;
  letter-spacing: -0.01em;
}
.hero-input::placeholder { color: var(--text-dim); font-weight: 400; }
.hero-input-wrap .hero-kbd {
  display: flex;
  gap: 4px;
  margin-right: 6px;
}
.hero-input-wrap .hero-kbd kbd {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 4px 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-input-wrap .hero-submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 8px;
}
.hero-input-wrap .hero-submit:hover {
  background: var(--brand-hover);
  box-shadow: var(--glow-brand);
}
.hero-input-wrap .hero-submit [data-lucide] { width: 20px; height: 20px; }

.hero-suggestions {
  margin-top: 18px;
}
.hero-suggestions .suggestions-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* Search mode: round pills */
.hero-suggestions.search-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-suggestions.search-mode .hero-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.hero-suggestions.search-mode .hero-suggestion:hover {
  background: var(--bg-elev-2);
  color: var(--text-strong);
  border-color: var(--brand);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.hero-suggestions.search-mode .hero-suggestion [data-lucide] {
  width: 14px; height: 14px; color: var(--brand);
}

/* AI mode: 2-column quoted prompts */
.hero-suggestions.ai-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.hero-suggestions.ai-mode .hero-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 11px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.55;
}
.hero-suggestions.ai-mode .hero-suggestion:hover {
  background: var(--bg-elev-2);
  color: var(--text-strong);
  border-color: var(--brand);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.hero-suggestions.ai-mode .hero-suggestion .ai-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.hero-suggestions.ai-mode .hero-suggestion .ai-icon [data-lucide] {
  width: 16px; height: 16px; color: var(--brand);
}
.hero-suggestions.ai-mode .hero-suggestion:hover .ai-icon {
  background: var(--brand);
  border-color: var(--brand);
}
.hero-suggestions.ai-mode .hero-suggestion:hover .ai-icon [data-lucide] {
  color: white;
}
.hero-suggestions.ai-mode .hero-suggestion .ai-text {
  flex: 1;
}
.hero-suggestions.ai-mode .hero-suggestion .ai-text::before {
  content: "“";
  color: var(--text-dim);
  margin-right: 2px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
}
.hero-suggestions.ai-mode .hero-suggestion .ai-text::after {
  content: "”";
  color: var(--text-dim);
  margin-left: 2px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
}

.hero-ai-response {
  margin-top: 16px;
  padding: 18px 20px;
  background: rgba(143, 239, 38, 0.08);
  border: 1px solid rgba(143, 239, 38, 0.25);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  display: none;
}
.hero-ai-response.visible { display: block; }
.hero-ai-response.thinking {
  background: var(--bg-elev);
  border-color: var(--border);
}
.hero-ai-response p:first-child { margin-top: 0; }
.hero-ai-response p:last-child { margin-bottom: 0; }

/* ===========================================================
   TOOLTIPS (plain-language helper for newbies)
   =========================================================== */
.tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: help;
}
.tip-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  cursor: help;
  transition: all var(--transition);
  flex-shrink: 0;
}
.tip:hover .tip-icon {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #2a2e39;
  color: #f7f8fa;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  font-family: "Inter", -apple-system, "PingFang SC", sans-serif;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: normal;
  width: 240px;
  text-align: left;
  text-transform: none;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  z-index: 100;
  transition: opacity var(--transition), transform var(--transition);
}
.tip[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Tooltip arrow */
.tip[data-tip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2a2e39;
  pointer-events: none;
  opacity: 0;
  z-index: 101;
  transition: opacity var(--transition);
}
.tip[data-tip]:hover::before { opacity: 1; }
/* Position variants */
.tip.tip-right[data-tip]::after { left: calc(100% + 12px); top: 50%; bottom: auto; transform: translateY(-50%); }
.tip.tip-right[data-tip]::before { left: 100%; top: 50%; bottom: auto; transform: translateY(-50%); border-top-color: transparent; border-right-color: #2a2e39; }

/* ===========================================================
   NEWBIE HELP CALLOUT
   =========================================================== */
.newbie-callout {
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.10) 0%, rgba(212, 255, 92, 0.06) 100%);
  border: 1px solid rgba(143, 239, 38, 0.25);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.newbie-callout summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}
.newbie-callout summary::-webkit-details-marker { display: none; }
.newbie-callout summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.newbie-callout[open] summary::after { transform: rotate(180deg); }
.newbie-callout summary [data-lucide] { color: var(--brand); }
.newbie-callout .callout-body {
  padding: 0 18px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.callout-body .help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.help-grid .help-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.help-grid .help-item strong {
  display: block;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
}
.help-grid .help-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* ===========================================================
   K-LINE CHART CONTROLS
   =========================================================== */
.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.chart-toolbar .toolbar-group {
  display: flex;
  gap: 2px;
  background: var(--bg-elev);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.chart-toolbar button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chart-toolbar button:hover { color: var(--text-strong); }
.chart-toolbar button.active {
  background: var(--bg-card);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.chart-toolbar button [data-lucide] { width: 12px; height: 12px; }

.tv-chart-container { height: 380px; width: 100%; }
.tv-macd-container { height: 100px; width: 100%; margin-top: 4px; }

/* ===========================================================
   ORDER BOOK (Level 2 depth ladder)
   =========================================================== */
.orderbook { font-family: "JetBrains Mono", monospace; font-size: 14px; }
.ob-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 0;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.ob-header > span:nth-child(1) { text-align: left; }
.ob-header > span:nth-child(2) { text-align: right; }
.ob-header > span:nth-child(3) { text-align: right; }
.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 6px 0;
  position: relative;
  z-index: 1;
}
.ob-row .ob-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.18;
  border-radius: 2px;
}
.ob-row.ask .ob-price { color: var(--down); }
.ob-row.ask .ob-bar { right: 0; background: var(--down); }
.ob-row.bid .ob-price { color: var(--up); }
.ob-row.bid .ob-bar { left: 0; background: var(--up); }
.ob-row > span:nth-child(1) { text-align: left; font-weight: 600; }
.ob-row > span:nth-child(2) { text-align: right; color: var(--text); }
.ob-row > span:nth-child(3) { text-align: right; color: var(--text-muted); font-size: 12px; }
.ob-spread {
  text-align: center;
  padding: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 6px 0;
}
.ob-spread .spread-value {
  color: var(--text-strong);
  font-weight: 600;
}
.ob-spread .last-price {
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
}

/* ===========================================================
   NEWS WATERFALL
   =========================================================== */
.news-waterfall { display: flex; flex-direction: column; gap: 1px; }
.news-item {
  position: relative;
  padding: 12px 14px 12px 32px;
  border-radius: 6px;
  transition: background var(--transition);
  cursor: pointer;
  border-left: 2px solid var(--border);
}
.news-item:hover { background: var(--bg-elev); }
.news-item.positive { border-left-color: var(--up); }
.news-item.negative { border-left-color: var(--down); }
.news-item.neutral { border-left-color: var(--text-dim); }
.news-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.news-item.positive::before { background: var(--up); box-shadow: 0 0 8px var(--up); }
.news-item.negative::before { background: var(--down); box-shadow: 0 0 8px var(--down); }
.news-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.55;
}
.news-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-dim);
}
.news-item-meta .source {
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
}
.news-item-meta .tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(41, 98, 255, 0.15);
  color: #93c5fd;
}
.news-item-meta .time {
  margin-left: auto;
  color: var(--text-dim);
}

/* ===========================================================
   SECTOR ROTATION
   =========================================================== */
.sector-list { display: flex; flex-direction: column; gap: 8px; }
.sector-row {
  display: grid;
  grid-template-columns: 180px 1fr 100px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  position: relative;
  transition: background var(--transition);
}
.sector-row:hover { background: var(--bg-elev); }
.sector-row .sector-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--text-strong);
}
.sector-row .sector-name .en {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}
.sector-row .sector-leader {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
}
.sector-row .sector-leader a {
  color: var(--brand);
  font-weight: 500;
}
.sector-bar-container {
  position: relative;
  height: 30px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.sector-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sector-bar.up {
  left: 50%;
  background: linear-gradient(90deg, var(--up-bg-strong) 0%, var(--up) 100%);
  box-shadow: inset 0 0 8px rgba(38, 166, 154, 0.3);
}
.sector-bar.down {
  right: 50%;
  background: linear-gradient(270deg, var(--down-bg-strong) 0%, var(--down) 100%);
  box-shadow: inset 0 0 8px rgba(239, 83, 80, 0.3);
}
.sector-bar-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
  z-index: 2;
}
.sector-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.sector-value.up { color: var(--up); }
.sector-value.down { color: var(--down); }

/* ===========================================================
   BRIEF ACTIONS CARD (top-of-page prominent CTA)
   =========================================================== */
.brief-actions-card {
  background:
    linear-gradient(135deg, rgba(143, 239, 38, 0.06) 0%, rgba(194, 248, 78, 0.04) 100%),
    var(--bg-card);
  border: 1px solid rgba(143, 239, 38, 0.25);
}
.brief-actions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.brief-actions-hint {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.brief-actions-big {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.brief-btn {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 6px !important;
  padding: 18px 20px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%) !important;
  color: #0a1a00 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 12px rgba(143, 239, 38, 0.25), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.brief-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(143, 239, 38, 0.45), inset 0 1px 0 rgba(255,255,255,0.4) !important;
}
.brief-btn:active:not(:disabled) { transform: translateY(0); }
.brief-btn [data-lucide] {
  width: 24px !important;
  height: 24px !important;
  color: #0a1a00 !important;
}
.brief-btn span {
  font-size: 17px;
  font-weight: 700;
  display: block;
}
.brief-btn small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  color: #0a1a00;
}

/* ===========================================================
   DAILY PICKS CARD
   =========================================================== */
.daily-picks-card {
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.08) 0%, rgba(212, 255, 92, 0.04) 100%);
  border: 1px solid rgba(143, 239, 38, 0.3);
}
.daily-picks-card .picks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.daily-picks-card .market-view {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 14px;
  background: var(--bg-elev);
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 3px solid var(--brand);
}
.picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px 18px;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pick-card:hover {
  border-color: var(--brand);
  background: var(--bg-elev);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pick-card .pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pick-card .pick-ticker {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}
.pick-card .pick-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pick-card .pick-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-elev);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
}
.pick-card .pick-category {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pick-card .pick-thesis {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  font-weight: 500;
}
.pick-card .pick-action {
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.pick-card .pick-action strong { color: var(--text-strong); }
.pick-card .pick-risk {
  font-size: 12px;
  color: #ffb84d;
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.5;
}
.pick-card .pick-risk::before { content: "⚠"; flex-shrink: 0; }

/* ===========================================================
   SUBSCRIBE PAGE
   =========================================================== */
.subscribe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .subscribe-grid { grid-template-columns: 1fr; }
}
.subscribe-qr-card { text-align: center; }
.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 24px;
  background: white;
  border-radius: 14px;
  margin: 0 auto 18px;
  max-width: 260px;
}
.qr-image { width: 100%; height: auto; display: block; }
.qr-caption { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.qr-placeholder {
  padding: 60px 20px;
  background: var(--bg-elev);
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  margin: 0 auto 18px;
  max-width: 320px;
  color: var(--text-muted);
}
.qr-placeholder [data-lucide] { width: 60px; height: 60px; margin: 0 auto 12px; opacity: 0.5; }
.qr-placeholder p { font-size: 14px; line-height: 1.6; }

.subscribe-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}
.step strong { font-size: 15px; color: var(--text-strong); display: block; margin-bottom: 2px; }
.step-hint { font-size: 13px; color: var(--text-muted); }

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.benefit:last-child { border-bottom: none; }
.benefit-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
}
.benefit-icon [data-lucide] { width: 20px; height: 20px; }
.benefit strong { font-size: 15px; color: var(--text-strong); display: block; margin-bottom: 4px; }
.benefit p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.55; }

.subscribe-foot { margin-top: 8px; }

/* ===========================================================
   ADMIN PANEL
   =========================================================== */
.admin-toast {
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.18) 0%, rgba(194, 248, 78, 0.10) 100%);
  border: 1px solid rgba(143, 239, 38, 0.4);
  color: var(--text-strong);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.admin-form-inline {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-form-inline label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.admin-form-inline input {
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.admin-form-inline input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.18);
}
.admin-form-inline input[type="number"] { width: 90px; }

.admin-table-wrap { overflow-x: auto; margin: 0 -4px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg-elev); }
.admin-table .mono { font-family: "JetBrains Mono", monospace; font-size: 13px; }
.admin-table .cell-muted { color: var(--text-muted); }
.admin-table .cell-sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; font-family: "JetBrains Mono", monospace; }

.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #0a1a00;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.admin-pill {
  display: inline-block;
  margin-left: 6px;
  background: var(--brand);
  color: #0a1a00;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.status-pill [data-lucide] { width: 14px; height: 14px; }
.status-pill.used {
  background: var(--up-bg);
  color: var(--up);
}
.status-pill.unused {
  background: var(--bg-elev);
  color: var(--text-muted);
}

.cell-actions { display: inline-flex; gap: 6px; }
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-mini:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
  color: var(--text-strong);
}
.btn-mini [data-lucide] { width: 16px; height: 16px; }
.btn-mini.btn-danger:hover {
  background: var(--down-bg);
  border-color: var(--down);
  color: var(--down);
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-strong);
}
.modal-sub {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}
.modal-sub strong { color: var(--text-strong); }
.modal input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  margin-bottom: 18px;
}
.modal input[type="password"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.18);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===========================================================
   USER MENU (topbar dropdown)
   =========================================================== */
.user-menu { position: relative; }
.user-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.user-button:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
  color: var(--text-strong);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #0a1a00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.user-button [data-lucide] { width: 15px; height: 15px; opacity: 0.6; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  padding: 6px;
  z-index: 100;
  display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.user-dropdown-header strong {
  display: block;
  color: var(--text-strong);
  font-size: 15px;
  margin-bottom: 4px;
}
.user-dropdown-header .admin-tag {
  display: inline-block;
  margin-top: 6px;
  background: var(--brand);
  color: #0a1a00;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 7px;
  font-size: 14px;
  transition: background var(--transition);
}
.user-dropdown-item:hover {
  background: var(--bg-elev);
  text-decoration: none;
  color: var(--text-strong);
}
.user-dropdown-item [data-lucide] { width: 16px; height: 16px; color: var(--text-muted); }

/* ===========================================================
   AUTH PAGES (login / register)
   =========================================================== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(143, 239, 38, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(194, 248, 78, 0.06) 0%, transparent 55%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
.auth-bg-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(143, 239, 38, 0.05) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.auth-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  z-index: 1;
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 32px;
}
.auth-brand-logo {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 18px rgba(143, 239, 38, 0.5));
}
.auth-brand-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.auth-title {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.auth-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-error {
  background: var(--down-bg);
  border: 1px solid rgba(239, 83, 80, 0.3);
  color: var(--down);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-error [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.auth-field input {
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}
.auth-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.18);
  background: var(--bg-elev-2);
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #0a1a00;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(143, 239, 38, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(143, 239, 38, 0.45);
}
.auth-submit [data-lucide] { width: 16px; height: 16px; color: #0a1a00; }

.auth-bottom {
  text-align: center;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}
.auth-bottom a { color: var(--brand-soft); font-weight: 600; }

.auth-hint {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}
.auth-hint [data-lucide] {
  flex-shrink: 0;
  color: var(--brand);
  width: 18px; height: 18px;
  margin-top: 1px;
}
.auth-hint strong { color: var(--text); }

.auth-foot {
  text-align: center;
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ===========================================================
   SCROLLBAR
   =========================================================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
  border: 1px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #4a5060; }

/* ===========================================================
   MARKETS PAGE — /markets
   TradingView-style category browser
   =========================================================== */
.market-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 24px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}
.market-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.market-tab i { width: 16px; height: 16px; }
.market-tab:hover:not(.disabled) {
  color: var(--text-strong);
  background: var(--bg-elev);
}
.market-tab.active {
  color: #0a1a00;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  box-shadow: 0 4px 12px rgba(143, 239, 38, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}
.market-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tab-soon {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  background: rgba(143, 239, 38, 0.12);
  color: var(--brand-soft);
  border: 1px solid rgba(143, 239, 38, 0.25);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.market-section {
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.market-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.market-section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.market-section-header h2 i {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.market-section-count {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px;
  background: var(--bg-elev);
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.market-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.market-card:hover {
  border-color: var(--brand);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(143, 239, 38, 0.15);
}
.market-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.market-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}
.market-card-ticker {
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.market-card-tag {
  flex-shrink: 0;
  padding: 2px 7px;
  background: rgba(143, 239, 38, 0.1);
  color: var(--brand-soft);
  border: 1px solid rgba(143, 239, 38, 0.2);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.market-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.market-card-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.market-card-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.market-card-change.up { color: var(--up-bright); }
.market-card-change.down { color: var(--down-bright); }
.market-card-spark {
  width: 100%;
  height: 28px;
  margin-top: 2px;
}

/* ===========================================================
   NEWS PAGE — /news
   Article feed
   =========================================================== */
.news-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 8px 0 20px;
  flex-wrap: wrap;
}
.news-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.news-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.news-chip i { width: 14px; height: 14px; }
.news-chip:hover {
  color: var(--text-strong);
  background: var(--bg-elev);
}
.news-chip.active {
  color: #0a1a00;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  box-shadow: 0 2px 8px rgba(143, 239, 38, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.news-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.news-meta-dot {
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(143, 239, 38, 0.6);
  animation: pulse 2s infinite;
}
.news-meta-sep { color: var(--text-dim); }
.news-refresh-btn {
  margin-left: 8px;
  padding: 4px 10px !important;
  font-size: 12px !important;
}
.news-refresh-btn i { width: 13px; height: 13px; }
.news-mock-pill {
  display: inline-block;
  padding: 2px 8px;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.news-article-card {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.15s ease;
  position: relative;
}
.news-article-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.news-article-card.hot {
  border-left: 3px solid var(--brand);
}
.news-article-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 52px;
}
.news-article-cat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--brand-soft);
}
.news-article-cat-icon i { width: 20px; height: 20px; }
.news-hot-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: rgba(255, 107, 53, 0.15);
  color: #ff8c4a;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.news-hot-flag i { width: 10px; height: 10px; }

.news-article-body {
  flex: 1;
  min-width: 0;
}
.news-article-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.news-article-cat {
  color: var(--brand-soft);
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(143, 239, 38, 0.1);
  border: 1px solid rgba(143, 239, 38, 0.2);
  border-radius: 5px;
  font-size: 11px;
}
.news-article-dot { color: var(--text-dim); }
.news-article-source { color: var(--text); font-weight: 500; }
.news-article-author { color: var(--text); }
.news-article-time {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}

.news-article-title {
  margin: 4px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.news-article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.news-article-title a:hover { color: var(--brand-soft); }

.news-article-summary {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.news-article-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.news-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.news-ticker-pill i { width: 11px; height: 11px; color: var(--brand); }
.news-ticker-pill:hover {
  background: var(--bg-elev-2);
  border-color: var(--brand);
  color: var(--brand-soft);
}

/* Responsive */
@media (max-width: 720px) {
  .news-article-card { padding: 14px; gap: 12px; }
  .news-article-side { width: 40px; }
  .news-article-cat-icon { width: 36px; height: 36px; }
  .news-article-cat-icon i { width: 16px; height: 16px; }
  .news-article-title { font-size: 15px; }
  .news-article-summary { font-size: 13px; }
  .market-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ===========================================================
   STAR BUTTON — used on stock detail (large) + market cards (small)
   =========================================================== */
.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.15s ease;
}
.star-btn i { width: 18px; height: 18px; }
.star-btn:hover {
  background: var(--bg-elev-2);
  border-color: var(--brand);
  color: var(--brand-soft);
  transform: translateY(-1px);
}
.star-btn.starred {
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.18) 0%, rgba(143, 239, 38, 0.08) 100%);
  border-color: rgba(143, 239, 38, 0.45);
  color: var(--brand);
  box-shadow: 0 0 12px rgba(143, 239, 38, 0.25);
}
.star-btn.pulsing {
  animation: starPulse 0.4s ease;
}
@keyframes starPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Small star on market / news cards (absolutely positioned top-right) */
.card-star {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 17, 23, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.card-star i { width: 13px; height: 13px; }
.market-card:hover .card-star { opacity: 1; }
.card-star:hover {
  background: var(--bg-elev-2);
  color: var(--brand-soft);
  border-color: var(--brand);
}
.card-star.starred {
  opacity: 1;
  color: var(--brand);
  background: rgba(143, 239, 38, 0.15);
  border-color: rgba(143, 239, 38, 0.45);
}
.card-star.pulsing { animation: starPulse 0.4s ease; }

/* ===========================================================
   WATCHLIST PAGE — /watchlist
   =========================================================== */
.wl-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.wl-add-form {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 320px;
}
.wl-add-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.wl-add-input-wrap i {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--brand);
  pointer-events: none;
}
.wl-add-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-strong);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s ease;
}
.wl-add-input-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.12);
  background: var(--bg-elev);
}
.wl-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.wl-stats-dot {
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(143, 239, 38, 0.6);
}

.wl-table-wrap {
  padding: 0;
  overflow: hidden;
}
.wl-empty {
  text-align: center;
  padding: 60px 24px;
}
.wl-empty h3 {
  color: var(--text-strong);
  margin: 0 0 8px;
  font-size: 18px;
}
.wl-empty p {
  color: var(--text-muted);
  margin: 0 0 18px;
  font-size: 14px;
}
.wl-empty a {
  color: var(--brand-soft);
  text-decoration: none;
  font-weight: 600;
}
.wl-empty-suggest {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.wl-suggest {
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wl-suggest:hover {
  border-color: var(--brand);
  color: var(--brand-soft);
  background: var(--bg-elev-2);
}

.wl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wl-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.wl-table thead th.num { text-align: right; }
.wl-th-drag, .wl-th-actions { width: 1%; }
.wl-row {
  border-bottom: 1px solid var(--border-soft);
  cursor: grab;
  transition: background 0.1s ease;
}
.wl-row:hover { background: var(--bg-elev); }
.wl-row.dragging { opacity: 0.4; }
.wl-row.drag-over { background: rgba(143, 239, 38, 0.06); border-top: 2px solid var(--brand); }
.wl-table td {
  padding: 14px 16px;
  color: var(--text);
}
.wl-table td.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.wl-td-drag {
  color: var(--text-dim);
  cursor: grab;
}
.wl-td-drag i { width: 14px; height: 14px; }
.wl-td-ticker a {
  color: var(--text-strong);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.wl-td-ticker a:hover { color: var(--brand-soft); }
.wl-td-name {
  color: var(--text);
  font-weight: 500;
}
.wl-td-price { color: var(--text-strong); font-size: 15px; }
.wl-td-change.up { color: var(--up-bright); }
.wl-td-change.down { color: var(--down-bright); }
.wl-td-spark { width: 110px; }
.wl-spark-svg { width: 100px; height: 24px; display: block; }
.wl-td-actions { width: 1%; }
.wl-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.wl-action i { width: 14px; height: 14px; }
.wl-action:hover {
  color: var(--down-bright);
  border-color: var(--down);
  background: var(--down-bg);
}

@media (max-width: 720px) {
  .wl-table thead th, .wl-table td { padding: 10px 8px; }
  .wl-td-spark { display: none; }
}

/* ===========================================================
   WATCHLIST GROUPS — tabs, selector, per-row picker
   =========================================================== */
.wl-group-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 16px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}
.wl-group-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.wl-group-tab i { width: 14px; height: 14px; }
.wl-group-tab:hover {
  color: var(--text-strong);
  background: var(--bg-elev);
}
.wl-group-tab.active {
  color: #0a1a00;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  box-shadow: 0 2px 8px rgba(143, 239, 38, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.wl-group-count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-align: center;
}
.wl-group-tab.active .wl-group-count {
  background: rgba(0, 0, 0, 0.18);
  color: #0a1a00;
}

.wl-group-select {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-width: 130px;
}
.wl-group-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 239, 38, 0.12);
}

.wl-td-group { width: 130px; }
.wl-row-group-select {
  padding: 4px 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  max-width: 120px;
}
.wl-row-group-select:hover { border-color: var(--brand); }

/* ===========================================================
   STAR POPOVER — group picker on stock detail page
   =========================================================== */
.star-btn-wrap { position: relative; display: inline-block; vertical-align: middle; }
.star-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  animation: popIn 0.12s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.star-popover-head {
  padding: 6px 10px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.star-popover-list { display: flex; flex-direction: column; gap: 2px; }
.star-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.1s ease;
}
.star-popover-item i { width: 14px; height: 14px; color: var(--text-muted); }
.star-popover-item:hover {
  background: var(--bg-elev);
  color: var(--brand-soft);
}
.star-popover-item:hover i { color: var(--brand); }
.star-popover-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 0;
}
.star-popover-custom { color: var(--text-muted); }
.star-popover-custom:hover { color: var(--brand-soft); }

/* ===========================================================
   MY BRIEF CTA + RESULT CARD
   =========================================================== */
.my-brief-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px !important;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.06) 0%, rgba(194, 248, 78, 0.02) 100%) !important;
  border: 1px solid rgba(143, 239, 38, 0.2) !important;
}
.my-brief-cta-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.my-brief-cta-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  border-radius: 12px;
  color: #0a1a00;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(143, 239, 38, 0.3);
}
.my-brief-cta-icon i { width: 26px; height: 26px; }
.my-brief-cta h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
}
.my-brief-cta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.my-brief-cta button { white-space: nowrap; flex-shrink: 0; }
.my-brief-cta button:disabled { opacity: 0.7; cursor: wait; }

.brief-result-card {
  margin-bottom: 16px;
  padding: 0 !important;
  overflow: hidden;
}
.brief-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.brief-result-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}
.brief-result-actions { display: flex; gap: 8px; }
.brief-result-body {
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  max-height: 600px;
  overflow-y: auto;
}
.brief-result-body h1, .brief-result-body h2, .brief-result-body h3 {
  color: var(--text-strong);
  margin-top: 18px;
  margin-bottom: 8px;
}
.brief-result-body h2 { font-size: 17px; }
.brief-result-body h3 { font-size: 15px; }
.brief-result-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}
.brief-result-body th, .brief-result-body td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}
.brief-result-body th {
  background: var(--bg-elev);
  font-weight: 700;
  color: var(--text-strong);
}
.brief-result-body code {
  background: var(--bg-elev);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--brand-soft);
}
.brief-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-2);
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Spin animation (loader-2 icon) */
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* My-brief CTA action group (primary + ghost side-by-side) */
.my-brief-cta-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.my-brief-cta-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(143, 239, 38, 0.25);
  color: var(--brand-soft);
}
.my-brief-cta-actions .btn-ghost:hover {
  background: rgba(143, 239, 38, 0.08);
  border-color: rgba(143, 239, 38, 0.5);
}

/* LLM-fallback banner inside brief result */
.brief-fallback-banner {
  margin: -20px -24px 18px;
  padding: 10px 24px;
  background: var(--warning-bg);
  border-bottom: 1px solid rgba(255, 152, 0, 0.3);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
}

/* ===========================================================
   BULK SELECTION BAR (watchlist page)
   =========================================================== */
.wl-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(143, 239, 38, 0.08) 0%, rgba(143, 239, 38, 0.02) 100%);
  border-bottom: 1px solid rgba(143, 239, 38, 0.25);
  flex-wrap: wrap;
}
.wl-bulk-info {
  font-size: 13px;
  color: var(--text);
}
.wl-bulk-info strong {
  color: var(--brand-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
}
.wl-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wl-bulk-label {
  font-size: 12px;
  color: var(--text-muted);
}
.wl-bulk-actions .wl-group-select {
  padding: 6px 10px;
  font-size: 12px;
  min-width: 110px;
}
.wl-bulk-actions .btn-ghost {
  padding: 6px 12px;
  font-size: 12px;
}
.wl-bulk-actions .btn-ghost i { width: 13px; height: 13px; }
.wl-bulk-danger {
  border-color: rgba(239, 83, 80, 0.3) !important;
  color: #ff8a85 !important;
}
.wl-bulk-danger:hover {
  background: var(--down-bg) !important;
  border-color: var(--down) !important;
}

/* Checkbox column */
.wl-th-check, .wl-td-check { width: 1%; padding-right: 0 !important; }
.wl-row-check, #wl-check-all {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand);
}

@media (max-width: 720px) {
  .my-brief-cta { flex-direction: column; align-items: flex-start; }
  .my-brief-cta button { width: 100%; justify-content: center; }
  .my-brief-cta-actions { flex-direction: column; width: 100%; }
  .wl-add-form { flex-wrap: wrap; }
  .wl-add-input-wrap { min-width: 100%; }
  .wl-td-group { display: none; }
  .wl-bulk-bar { flex-direction: column; align-items: flex-start; }
}
