/* =============================================
   投研 Dashboard · 全局样式
   ============================================= */

:root {
  /* Light theme (默认) */
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-soft: #f1f3f7;
  --border: #e3e6ed;
  --border-strong: #cfd4de;
  --text: #1f2433;
  --text-dim: #5b6478;
  --text-faint: #98a0b1;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent2: #d97706;
  --accent2-soft: #fde68a;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0ea5e9;
  --info-soft: #e0f2fe;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 4px 12px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0f1118;
  --bg-elev: #181b25;
  --bg-soft: #1f2330;
  --border: #2a2f3d;
  --border-strong: #3a4150;
  --text: #e7eaf0;
  --text-dim: #a1a8b8;
  --text-faint: #6c7488;
  --accent: #60a5fa;
  --accent-soft: #1e3a8a;
  --accent2: #fbbf24;
  --accent2-soft: #78350f;
  --success: #4ade80;
  --success-soft: #14532d;
  --warning: #fbbf24;
  --warning-soft: #78350f;
  --danger: #f87171;
  --danger-soft: #7f1d1d;
  --info: #38bdf8;
  --info-soft: #0c4a6e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
  transition: background .2s, color .2s;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; background: transparent; border: none; outline: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* =============================================
   HEADER
   ============================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.topbar-center {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}
.logo-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 8px;
  text-align: center;
  line-height: 28px;
  font-size: 14px;
}

.week-badge, .date-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}
.date-badge {
  background: var(--bg-soft);
  color: var(--text-dim);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .15s;
}
.search-box:focus-within {
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-icon { color: var(--text-faint); }
#globalSearch {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}
#globalSearch::placeholder { color: var(--text-faint); }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-soft); }
.search-result-ticker { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.search-result-name { color: var(--text); }
.search-result-meta { font-size: 11px; color: var(--text-faint); }
.search-result-layer { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg-soft); }

.theme-toggle, .action-btn {
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  transition: all .15s;
}
.theme-toggle { padding: 7px 10px; font-size: 16px; }
.theme-toggle:hover, .action-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   TAB BAR
   ============================================= */
.tabbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 24px 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 90;
  flex-wrap: wrap;
}

.tab {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-icon { font-size: 16px; }
.tab-label { font-weight: 600; }
.tab-hint { font-size: 11px; color: var(--text-faint); font-weight: 400; }

.filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-bottom: 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip:hover { opacity: .8; }

/* =============================================
   MAIN CONTAINER & VIEWS
   ============================================= */
.container {
  padding: 20px 24px 80px;
  min-height: calc(100vh - 140px);
}

.view {
  display: none;
  animation: fadeIn .25s ease-out;
}
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   OVERVIEW (3-column)
   ============================================= */
.overview-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;   /* L1 占主导 (用户要求放大) */
  gap: 16px;
  align-items: start;
}

.overview-col {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: calc(100vh - 200px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.col-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.col-header h2 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.col-num {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.col-l2 .col-num { background: var(--accent2); }
.col-l3 .col-num { background: var(--info); }
.col-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-faint);
}

.tree-container, .picks-container, .signals-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Convergence strip */
.convergence-strip {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent2-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.convergence-strip:empty { display: none; }
.convergence-strip strong { color: var(--accent); }

/* =============================================
   LAYER 1 - TREE
   ============================================= */
.l1-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
.l1-sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 130px;
  height: fit-content;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.l1-sidebar h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.l1-nav-item {
  display: block;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
}
.l1-nav-item:hover { background: var(--bg-soft); color: var(--text); }
.l1-nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.l1-main { min-width: 0; }

.tree-category {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.tree-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tree-cat-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  color: #fff;
}
.tree-cat-name {
  font-size: 20px;
  font-weight: 700;
}
.tree-cat-desc {
  font-size: 12px;
  color: var(--text-faint);
}

.tree-sub {
  margin-bottom: 20px;
}
.tree-sub-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.tree-sub-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}
.tree-sub-desc {
  font-size: 12px;
  color: var(--text-faint);
}

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

.tree-branch {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: all .15s;
}
.tree-branch:hover {
  background: var(--bg-elev);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.tree-branch-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.tree-branch-icon { font-size: 18px; }
.tree-branch-name {
  font-size: 14px;
  font-weight: 700;
}
.tree-branch-tagline {
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
  line-height: 1.4;
}

.tree-chains {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tree-chain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all .12s;
}
.tree-chain:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.tree-chain.has-l2 { border-left: 3px solid var(--accent2); }
.tree-chain.has-l3 { border-right: 3px solid var(--info); }
.tree-chain.has-both {
  border-left: 3px solid var(--accent2);
  border-right: 3px solid var(--info);
}
.tree-chain-name {
  font-weight: 600;
  color: var(--text);
}
.tree-chain-meta {
  display: flex;
  gap: 4px;
}
.tree-chain-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.badge-l2 { background: var(--accent2-soft); color: var(--accent2); }
.badge-l3 { background: var(--info-soft); color: var(--info); }
.badge-count { background: var(--bg-soft); color: var(--text-dim); }

/* Tree overview (in overview view, 现在 L1 列变大了, 支持 2 列布局) */
.overview .tree-cat-header { padding-bottom: 10px; margin-bottom: 12px; }
.overview .tree-cat-icon { width: 36px; height: 36px; font-size: 20px; }
.overview .tree-cat-name { font-size: 15px; }
.overview .tree-cat-desc { display: none; }
.overview .tree-branches { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.overview .tree-sub-name { font-size: 13px; }
.overview .tree-branch { padding: 10px; }
.overview .tree-branch-name { font-size: 13px; }
.overview .tree-branch-tagline { font-size: 10px; margin-bottom: 6px; }
.overview .tree-chain { padding: 4px 8px; font-size: 11px; }

/* =============================================
   LAYER 2 - PICKS
   ============================================= */
.l2-toolbar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.l2-toolbar h2 {
  font-size: 16px;
  font-weight: 700;
  margin-right: auto;
}
.l2-filters {
  display: flex;
  gap: 6px;
}
.chip-filter {
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all .12s;
}
.chip-filter:hover { background: var(--bg-elev); }
.chip-filter.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip-filter span {
  margin-left: 4px;
  opacity: .7;
  font-weight: 400;
}
.l2-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.l2-sort select {
  padding: 5px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.l2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pick-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.pick-card.conviction-P1 { border-left-color: var(--success); }
.pick-card.conviction-P2 { border-left-color: var(--info); }
.pick-card.conviction-AVOID { border-left-color: var(--danger); }

.pick-card-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pick-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}
.pick-conviction {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  background: var(--success-soft);
  color: var(--success);
}
.pick-conviction.P2 { background: var(--info-soft); color: var(--info); }
.pick-conviction.AVOID { background: var(--danger-soft); color: var(--danger); }

.pick-name {
  font-size: 16px;
  font-weight: 700;
}
.pick-chain {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  color: var(--text-dim);
  width: fit-content;
  cursor: pointer;
}
.pick-chain:hover { background: var(--accent-soft); color: var(--accent); }

.pick-mcap-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.pick-mcap-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pick-mcap-label {
  color: var(--text-faint);
  font-size: 10px;
}
.pick-mcap-value {
  font-weight: 700;
  font-size: 12px;
}

.pick-odds {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}
.pick-odds.positive { background: var(--success-soft); color: var(--success); }
.pick-odds.neutral { background: var(--bg-soft); color: var(--text-dim); }
.pick-odds.negative { background: var(--danger-soft); color: var(--danger); }
.pick-odds.high { background: linear-gradient(135deg, var(--success), var(--accent)); color: #fff; }

.pick-thesis {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pick-action {
  padding: 6px 10px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.pick-action:empty { display: none; }

.pick-sources {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.pick-source-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--bg-soft);
  border-radius: 3px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Compact card for overview */
.overview-col .pick-card {
  padding: 10px 12px;
  gap: 5px;
}
.overview-col .pick-name { font-size: 14px; }
.overview-col .pick-thesis { -webkit-line-clamp: 2; font-size: 11px; }
.overview-col .pick-mcap-row { padding: 6px 8px; font-size: 10px; }

/* Catalyst timeline */
.catalyst-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.catalyst-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}
.catalyst-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.catalyst-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.catalyst-item.imp-5 { border-left-color: var(--danger); }
.catalyst-item.imp-4 { border-left-color: var(--warning); }
.catalyst-item.imp-3 { border-left-color: var(--accent); }
.catalyst-date {
  font-weight: 700;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  min-width: 100px;
}
.catalyst-event {
  flex: 1;
  font-size: 13px;
}
.catalyst-tickers {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.catalyst-ticker {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--mono);
  cursor: pointer;
}
.catalyst-ticker:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   LAYER 3 - TECHNICAL
   ============================================= */
.l3-header {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.l3-header h2 {
  font-size: 16px;
  font-weight: 700;
}
.l3-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}
.l3-meta-item {
  padding: 4px 10px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.l3-meta-item span { font-weight: 700; color: var(--text); }

.indices-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.index-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.index-name {
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.index-close {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  margin-bottom: 4px;
}
.index-changes {
  display: flex;
  gap: 8px;
  font-size: 11px;
}
.index-change {
  display: flex;
  flex-direction: column;
}
.index-change-label { color: var(--text-faint); font-size: 9px; }
.index-change-value { font-weight: 600; }
.up { color: var(--success); }
.down { color: var(--danger); }
.flat { color: var(--text-dim); }

.l3-scenario-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.scenario-tab {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.scenario-tab:hover { box-shadow: var(--shadow); }
.scenario-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.scenario-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.scenario-id {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text-dim);
}
.scenario-icon { font-size: 18px; }
.scenario-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.scenario-tag {
  font-size: 10px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.scenario-count {
  display: inline-block;
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}

.l3-scenario-content {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.scenario-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.scenario-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.scenario-header .scenario-pattern {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
}
.scenario-position {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-weight: 600;
}

.stocks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stocks-table th, .stocks-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.stocks-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .3px;
  background: var(--bg-soft);
  position: sticky;
  top: 0;
}
.stocks-table tr { cursor: pointer; transition: background .1s; }
.stocks-table tr:hover { background: var(--bg-soft); }
.stocks-table .col-code { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.stocks-table .col-name { font-weight: 600; }
.stocks-table .col-chg.up { color: var(--success); font-weight: 700; }
.stocks-table .col-chg.down { color: var(--danger); font-weight: 700; }
.stocks-table .col-conf {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
}
.stocks-table .col-conf.high { background: var(--success-soft); color: var(--success); }
.col-action-ready {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  text-align: center;
  line-height: 16px;
  font-size: 10px;
  font-weight: 700;
}
.col-chain-link {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg-soft);
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
}
.col-chain-link:hover { background: var(--accent-soft); color: var(--accent); }
.col-chain-link.other { opacity: .5; }
.col-evidence {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 320px;
}

/* Compact L3 list for overview */
.overview-col .signal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  border-left: 3px solid var(--accent);
}
.overview-col .signal-row:hover { background: var(--bg-elev); }
.overview-col .signal-scenario {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  color: #fff;
  min-width: 28px;
  text-align: center;
}
.overview-col .signal-code {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
}
.overview-col .signal-name { font-weight: 600; flex: 1; }
.overview-col .signal-chg { font-weight: 700; font-size: 11px; }
.overview-col .signal-conf { font-size: 10px; color: var(--text-faint); }
.overview-col .signal-section-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 12px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.overview-col .signal-section-header:first-child { margin-top: 0; }

.l3-summary {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.summary-item { text-align: center; }
.summary-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
}
.summary-label {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* =============================================
   FEISHU
   ============================================= */
.feishu-header {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.feishu-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.feishu-desc {
  font-size: 12px;
  color: var(--text-faint);
}

.feishu-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.feishu-tab {
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.feishu-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.feishu-feed {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 200px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.feishu-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 40px;
}
.feishu-msg {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.feishu-msg-time {
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.feishu-msg-content { font-size: 13px; }

.feishu-manual {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.feishu-manual h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}
.feishu-manual textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  resize: vertical;
  margin-bottom: 10px;
}
.feishu-manual textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elev);
}

/* =============================================
   DRAWER
   ============================================= */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.drawer.open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.4);
  opacity: 0;
  transition: opacity .2s;
}
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column;
}
.drawer.open .drawer-panel { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 4px;
}
.drawer-name {
  font-size: 22px;
  font-weight: 700;
}
.drawer-close {
  background: var(--bg-soft);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text-dim);
}
.drawer-close:hover { background: var(--danger-soft); color: var(--danger); }

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.drawer-section {
  margin-bottom: 18px;
}
.drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.drawer-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.drawer-stat {
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.drawer-stat-label {
  font-size: 10px;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.drawer-stat-value {
  font-size: 14px;
  font-weight: 700;
}
.drawer-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.drawer-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.drawer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.drawer-pill.l3 { background: var(--info-soft); color: var(--info); }
.drawer-pill.l1 { background: var(--bg-soft); color: var(--text-dim); cursor: pointer; }
.drawer-pill.l1:hover { background: var(--accent-soft); color: var(--accent); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 24px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-faint);
  align-items: center;
  z-index: 50;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1280px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .col-l3 { grid-column: 1 / -1; height: 400px; }
  .l3-scenario-tabs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-col { height: auto; max-height: 500px; }
  .l1-layout { grid-template-columns: 1fr; }
  .l1-sidebar { position: static; }
  .indices-strip { grid-template-columns: repeat(2, 1fr); }
  .l3-summary { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   STOCK DETAIL VIEW (full-screen)
   ============================================= */
.stock-detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  animation: sdSlideIn .25s ease-out;
}
.stock-detail.open { display: block; }
@keyframes sdSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sd-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.sd-back {
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-dim);
}
.sd-back:hover { background: var(--accent-soft); color: var(--accent); }

.sd-ticker-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}
.sd-ticker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}
.sd-name {
  font-size: 20px;
  font-weight: 700;
}

.sd-meta-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.sd-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.sd-meta-chip.conv-P1 { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.sd-meta-chip.conv-P2 { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.sd-meta-chip.conv-AVOID { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.sd-meta-chip.odds-pos { background: var(--success-soft); color: var(--success); }
.sd-meta-chip.odds-neg { background: var(--danger-soft); color: var(--danger); }
.sd-meta-chip.odds-high { background: linear-gradient(135deg, var(--success), var(--accent)); color: #fff; }

.sd-actions {
  display: flex;
  gap: 6px;
}
.sd-action-btn {
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-dim);
}
.sd-action-btn:hover { background: var(--accent-soft); color: var(--accent); }

.sd-body {
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sd-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.sd-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sd-section-header h3 {
  font-size: 14px;
  font-weight: 700;
}
.sd-section-hint {
  font-size: 11px;
  color: var(--text-faint);
}

.sd-tv-container {
  width: 100%;
  height: 540px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.sd-tv-container iframe { width: 100% !important; height: 100% !important; border: 0; }
.sd-tv-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
  padding: 40px;
}

/* 3-col layout for model */
.sd-row-3col {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 16px;
}
@media (max-width: 1100px) {
  .sd-row-3col { grid-template-columns: 1fr; }
}

/* Model table */
.sd-model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.sd-model-table th, .sd-model-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.sd-model-table th:first-child, .sd-model-table td:first-child { text-align: left; }
.sd-model-table th {
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
}
.sd-model-table td.col-year {
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
}
.sd-model-table td.col-note {
  text-align: left;
  color: var(--text-faint);
  font-size: 11px;
  font-style: italic;
}
.sd-model-table td.value {
  font-family: var(--mono);
  font-weight: 600;
}

/* Valuation cards */
.sd-val-card {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  border-left: 4px solid var(--accent);
}
.sd-val-card.bear { border-left-color: var(--danger); background: var(--danger-soft); }
.sd-val-card.base { border-left-color: var(--success); background: var(--success-soft); }
.sd-val-card.bull { border-left-color: var(--accent2); background: var(--accent2-soft); }
.sd-val-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.sd-val-case {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sd-val-odds {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}
.sd-val-target {
  font-size: 13px;
  margin-bottom: 4px;
}
.sd-val-target strong {
  font-family: var(--mono);
  font-size: 15px;
}
.sd-val-formula {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 6px;
}
.sd-val-drivers {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Monitor list */
.sd-monitor-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  align-items: center;
  font-size: 12px;
}
.sd-monitor-status {
  width: 18px; height: 18px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}
.sd-monitor-status.ok { background: var(--success); }
.sd-monitor-status.warn { background: var(--warning); }
.sd-monitor-status.fail { background: var(--danger); }
.sd-monitor-var { font-weight: 700; }
.sd-monitor-threshold {
  font-size: 11px;
  color: var(--text-faint);
}
.sd-monitor-arrow { color: var(--text-faint); }
.sd-monitor-value {
  font-family: var(--mono);
  font-weight: 600;
}

/* Research tabs + body */
.sd-research-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sd-research-tab {
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all .12s;
}
.sd-research-tab:hover { background: var(--bg-elev); }
.sd-research-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.sd-research-tab .tab-date {
  margin-left: 4px;
  opacity: 0.7;
  font-size: 10px;
}
.sd-research-tab .tab-type {
  margin-right: 4px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-elev);
  color: var(--text-faint);
}
.sd-research-tab.active .tab-type { background: rgba(255,255,255,0.2); color: #fff; }

.sd-research-body {
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
}
.sd-research-body h1, .sd-research-body h2, .sd-research-body h3, .sd-research-body h4 {
  margin: 18px 0 10px;
  font-weight: 700;
}
.sd-research-body h1 { font-size: 20px; }
.sd-research-body h2 { font-size: 17px; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.sd-research-body h3 { font-size: 14px; color: var(--accent2); }
.sd-research-body h4 { font-size: 13px; }
.sd-research-body p { margin: 6px 0; }
.sd-research-body ul, .sd-research-body ol { margin: 6px 0 6px 20px; }
.sd-research-body li { margin: 2px 0; }
.sd-research-body code {
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}
.sd-research-body pre {
  background: var(--bg-elev);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 10px 0;
}
.sd-research-body pre code {
  background: none;
  padding: 0;
}
.sd-research-body blockquote {
  margin: 10px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-style: italic;
}
.sd-research-body table.research-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.sd-research-body table.research-table th,
.sd-research-body table.research-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.sd-research-body table.research-table th {
  background: var(--bg-elev);
  font-weight: 700;
}
.sd-research-body hr { margin: 16px 0; border: none; border-top: 1px solid var(--border); }
.sd-research-body strong { color: var(--text); }
.sd-research-body em { color: var(--text-dim); }
.sd-research-body a { color: var(--accent); text-decoration: none; }
.sd-research-body a:hover { text-decoration: underline; }

.sd-research-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-faint);
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* Catalyst feed */
.sd-catalyst-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border-left: 3px solid var(--accent);
  align-items: center;
}
.sd-catalyst-item.imp-pos { border-left-color: var(--success); }
.sd-catalyst-item.imp-neg { border-left-color: var(--danger); }
.sd-catalyst-item.imp-neu { border-left-color: var(--info); }
.sd-catalyst-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}
.sd-catalyst-content { font-size: 13px; }
.sd-catalyst-source {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--bg-elev);
  color: var(--text-dim);
  font-weight: 600;
}

/* Drawer "查看完整模型" button */
.drawer-cta {
  margin-top: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.drawer-cta:hover { opacity: 0.92; transform: translateY(-1px); }

/* =============================================
   CHAIN DETAIL VIEW (产业链深度页)
   ============================================= */
.chain-detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  animation: sdSlideIn .25s ease-out;
}
.chain-detail.open { display: block; }

/* feishu link card */
.feishu-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--accent-soft), var(--info-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
}
.feishu-link-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.feishu-link-card.empty {
  background: var(--bg-soft);
  cursor: default;
  color: var(--text-faint);
}
.feishu-link-icon {
  width: 40px;
  height: 40px;
  background: #3370ff;
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.feishu-link-card.empty .feishu-link-icon { background: var(--text-faint); }
.feishu-link-text { flex: 1; }
.feishu-link-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.feishu-link-url {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
  word-break: break-all;
}
.feishu-link-arrow {
  font-size: 18px;
  color: var(--accent);
}

/* key tickers list */
.cd-ticker-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  align-items: center;
  cursor: pointer;
  transition: all .12s;
  font-size: 12px;
}
.cd-ticker-row:hover {
  background: var(--accent-soft);
  transform: translateX(2px);
}
.cd-ticker-code {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  min-width: 90px;
}
.cd-ticker-role { color: var(--text-dim); }
.cd-ticker-share {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
}

/* simple list */
.cd-bullet-item {
  padding: 6px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 5px;
  font-size: 12px;
  border-left: 3px solid var(--accent);
}
.cd-bullet-item.risk { border-left-color: var(--danger); }
.cd-bullet-item.monitor { border-left-color: var(--info); }

/* primary button */
.sd-action-btn.primary,
.action-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.sd-action-btn.primary:hover,
.action-btn.primary:hover {
  opacity: 0.92;
  color: #fff;
}

/* =============================================
   ADMIN UPLOAD MODAL
   ============================================= */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-modal.open { display: flex; }
.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}
.admin-panel {
  position: relative;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.admin-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-header h2 { font-size: 16px; font-weight: 700; }
.admin-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.admin-field {
  margin-bottom: 14px;
}
.admin-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.admin-field input,
.admin-field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
}
.admin-field input:focus,
.admin-field textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elev);
  outline: none;
}
.admin-field textarea {
  font-family: var(--mono);
  line-height: 1.5;
}
.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.admin-msg {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: none;
}
.admin-msg.show { display: block; }
.admin-msg.error { background: var(--danger-soft); color: var(--danger); }
.admin-msg.success { background: var(--success-soft); color: var(--success); }
.admin-msg.info { background: var(--info-soft); color: var(--info); }

/* Highlight when filtered */
.highlighted { animation: pulseHighlight 1.5s ease-out; }
@keyframes pulseHighlight {
  0% { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
  100% { background: transparent; box-shadow: none; }
}
.dim { opacity: 0.3; transition: opacity .2s; }
