:root {
  --bg: #f4f5f7; --card: #ffffff; --border: #e2e4e8; --text: #1a1d23; --muted: #6b7280;
  --good: #0a7d33; --bad: #c02626; --neutral: #4b5563; --accent: #111827;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 8px; }
header h1 { font-size: 20px; margin: 0; }
.header-right { display: flex; align-items: center; gap: 12px; }
.market-badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.market-badge.open { background: #dcfce7; color: var(--good); }
.market-badge.closed { background: #f3f4f6; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; padding: 10px 14px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
main { padding: 16px 20px 60px; }
.index-panel { display: none; }
.index-panel.active { display: block; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.card-title-row h2 { font-size: 15px; margin: 0; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.chip.neutral { background: #f3f4f6; color: var(--neutral); }
.chip.bull-strong { background: #dcfce7; color: var(--good); }
.chip.bear-strong { background: #fee2e2; color: var(--bad); }
.chip.bear-mild { background: #ffedd5; color: #9a3412; }
.chip.mode-dry { background: #e0e7ff; color: #3730a3; }
.chip.mode-live { background: #fee2e2; color: var(--bad); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.stat-tile { background: #fafafa; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 120px; }
.stat-tile .label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.stat-tile .value { font-size: 16px; font-weight: 700; }
.stat-tile .note { font-size: 11px; color: var(--muted); }
.export-btn, .mode-btn { background: var(--accent); color: #fff; border: none; padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.mode-btn.live { background: var(--bad); }
.export-btn:hover, .mode-btn:hover { opacity: 0.85; }
.error-box { color: var(--bad); font-size: 12px; margin-top: 6px; }
input[type="text"], input[type="password"] { border: 1px solid var(--border); border-radius: 6px; }
