:root {
  --bg: #080b0b;
  --surface: #101514;
  --surface-elevated: #151c1a;
  --surface-soft: #0d1211;
  --text: #f3f1e9;
  --muted: #9aa29e;
  --muted-strong: #c3c7c3;
  --gold: #d7b45b;
  --gold-bright: #f0d486;
  --gold-dim: #705d2e;
  --border: #28302d;
  --border-soft: #1c2421;
  --positive: #45cf9a;
  --positive-bg: #0d2a20;
  --negative: #ff827d;
  --negative-bg: #321716;
  --neutral: #aeb8b2;
  --focus: #f4d67f;
  --radius: 14px;
  --shadow: 0 18px 50px rgb(0 0 0 / 24%);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 75% -10%, #1a2018 0, var(--bg) 34rem); color: var(--text); line-height: 1.55; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-150%); background: var(--gold-bright); color: #171207; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px; border-right: 1px solid var(--border-soft); background: rgb(8 12 11 / 92%); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--gold-dim); border-radius: 50%; background: linear-gradient(145deg, #2b2619, #15140f); color: var(--gold-bright); font-family: Georgia, serif; font-size: 1.35rem; box-shadow: inset 0 0 0 4px rgb(215 180 91 / 5%); }
.brand strong { display: block; letter-spacing: .14em; }
.brand small { display: block; color: var(--muted); font-size: .71rem; letter-spacing: .08em; }
.brand.large .brand-mark { width: 56px; height: 56px; font-size: 1.7rem; }
.nav-list { display: grid; gap: 8px; margin-top: 54px; }
.nav-item { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 13px; border-radius: 10px; color: var(--muted); text-decoration: none; transition: background .2s ease, color .2s ease; }
.nav-item span { color: var(--gold-dim); font-size: .72rem; letter-spacing: .08em; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgb(215 180 91 / 13%), transparent); color: var(--gold-bright); box-shadow: inset 2px 0 var(--gold); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 14px 8px 0; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--border-soft); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 12px rgb(69 207 154 / 55%); }
.text-button { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; min-height: 44px; padding: 0 8px; }
.text-button:hover { color: var(--text); }
.mobile-header, .mobile-nav { display: none; }

.main-content { min-width: 0; width: 100%; max-width: 1560px; margin: 0 auto; padding: 34px clamp(22px, 4vw, 64px) 30px; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.page-header h1 { margin: 2px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.035em; }
.eyebrow { margin: 0; color: var(--gold); font-size: .67rem; font-weight: 700; letter-spacing: .23em; }
.clock-block { text-align: right; }
.clock-block span { display: block; color: var(--muted); font-size: .72rem; }
.clock-block strong { font-variant-numeric: tabular-nums; font-size: 1.2rem; letter-spacing: .06em; }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(155deg, rgb(21 28 26 / 94%), rgb(13 18 17 / 94%)); box-shadow: var(--shadow); padding: clamp(18px, 2.2vw, 26px); }
.panel.slim { padding-top: 14px; padding-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; color: var(--muted-strong); font-size: .78rem; letter-spacing: .045em; }
.panel-head a { color: var(--gold); text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }
.source-label { color: var(--muted); font-size: .72rem; font-weight: 650; }
.source-label.platform { color: var(--positive); }
.source-label.manual { color: var(--gold); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 18px; margin-bottom: 18px; }
.content-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: 1 / -1; }

.price-panel { min-height: 310px; position: relative; overflow: hidden; }
.price-panel::after { content: "AU"; position: absolute; right: -8px; top: 25px; font-family: Georgia, serif; font-size: 8rem; line-height: 1; color: rgb(215 180 91 / 3.5%); pointer-events: none; }
.price-line { display: flex; align-items: baseline; gap: 16px; }
.price-line strong { font-size: clamp(2.55rem, 6vw, 5.2rem); line-height: 1; font-weight: 450; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.delta { font-size: 1rem; font-weight: 700; }
.up { color: var(--positive) !important; }
.down { color: var(--negative) !important; }
.flat { color: var(--neutral) !important; }
.meta-row { color: var(--muted); font-size: .8rem; margin-top: 12px; }
.sparkline { display: block; width: 100%; height: 105px; margin-top: 26px; overflow: visible; }
.sparkline polyline { fill: none; stroke: var(--gold); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.sparkline path { fill: rgb(215 180 91 / 7%); }

.metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 18px; }
.metric-pair.compact { margin-top: 12px; }
.metric-pair > div { padding: 15px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgb(0 0 0 / 10%); }
.metric-pair span, .quote-card span, .model-kpis span { display: block; color: var(--muted); font-size: .72rem; }
.metric-pair strong { display: block; margin-top: 5px; font-size: clamp(1rem, 2vw, 1.35rem); font-variant-numeric: tabular-nums; }
.alert-list { display: grid; gap: 6px; }
.alert-list div { padding: 9px 11px; border: 1px solid rgb(215 180 91 / 25%); border-radius: 8px; color: var(--muted-strong); font-size: .74rem; }
.alert-list span { margin-right: 8px; color: var(--gold-bright); font-weight: 700; }

.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted-strong); background: rgb(255 255 255 / 2%); font-size: .67rem; }
.badge.positive { border-color: rgb(69 207 154 / 35%); color: var(--positive); background: var(--positive-bg); }
.badge.negative { border-color: rgb(255 130 125 / 35%); color: var(--negative); background: var(--negative-bg); }
.badge.neutral { color: var(--neutral); }
.recommendation-card { position: relative; }
.recommendation-main { display: flex; align-items: center; gap: 18px; }
.action { display: inline-flex; align-items: center; justify-content: center; min-width: 126px; min-height: 52px; padding: 0 20px; border-radius: 10px; font-family: Georgia, "Noto Serif SC", serif; font-size: 1.35rem; }
.action.add { color: var(--positive); background: var(--positive-bg); border: 1px solid rgb(69 207 154 / 25%); }
.action.reduce { color: var(--negative); background: var(--negative-bg); border: 1px solid rgb(255 130 125 / 25%); }
.action.hold { color: var(--gold-bright); background: rgb(215 180 91 / 8%); border: 1px solid rgb(215 180 91 / 20%); }
.recommendation-main > strong { color: var(--muted); font-size: .9rem; }
.recommendation-reason { min-height: 48px; margin: 18px 0 0; color: var(--muted-strong); }
.evidence-list { display: grid; gap: 7px; margin-top: 15px; }
.evidence-list span { padding-left: 12px; border-left: 2px solid var(--gold-dim); color: var(--muted); font-size: .77rem; }
.feedback-row { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: .75rem; }
.feedback-row button { min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.feedback-row button:hover { border-color: var(--gold-dim); }

.progress-ring-wrap { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 22px; min-height: 150px; }
.progress-stack { position: relative; display: grid; place-items: center; }
.progress-stack progress { width: 130px; height: 12px; accent-color: var(--gold); }
.progress-stack span { margin-top: 7px; color: var(--gold-bright); font-weight: 700; }
.progress-ring-wrap strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 1.4rem; font-weight: 500; }
.muted { color: var(--muted); }
.empty-state { display: grid; place-items: center; min-height: 84px; color: var(--muted); text-align: center; }
.health-list { list-style: none; display: grid; gap: 11px; margin: 0; padding: 0; }
.health-list li { display: grid; grid-template-columns: 10px minmax(75px, auto) 1fr; align-items: center; gap: 9px; font-size: .75rem; }
.health-list li span:last-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-list .health-state { color: var(--muted-strong); text-transform: uppercase; font-size: .65rem; }
.health-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); }
.health-indicator.healthy { background: var(--positive); }
.health-indicator.degraded, .health-indicator.circuit_open { background: var(--negative); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toolbar strong { margin-right: 12px; }
.toolbar-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 16px; }
.filter-group { display: flex; gap: 7px; overflow-x: auto; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip:hover, .chip.active { border-color: var(--gold-dim); color: var(--gold-bright); background: rgb(215 180 91 / 7%); }
.news-feed { display: grid; gap: 12px; }
.news-card { display: grid; grid-template-columns: 82px minmax(0, 1fr) 160px; gap: 20px; align-items: start; }
.news-time { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.news-source { display: block; margin-top: 5px; color: var(--gold); }
.news-merged { display: block; margin-top: 5px; color: var(--muted); }
.news-body h2 { margin: 0 0 8px; font-size: 1.03rem; font-weight: 600; }
.news-body p { margin: 0; color: var(--muted-strong); font-size: .84rem; }
.news-evidence { margin-top: 10px; color: var(--muted); font-size: .73rem; }
.news-score { text-align: right; }
.news-state { display: block; margin-bottom: 4px; color: var(--gold); font-size: .67rem; }
.score-number { display: block; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.news-score small { color: var(--muted); }

.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quote-card { min-height: 126px; }
.quote-card strong { display: block; margin: 13px 0 5px; font-size: clamp(1.35rem, 3vw, 2rem); font-variant-numeric: tabular-nums; }
.quote-card small { display: block; color: var(--muted); }
.quote-card .quote-source { margin-top: 8px; color: var(--muted); font-size: .66rem; letter-spacing: .035em; }
.dark-gold-card { border-color: color-mix(in srgb, var(--gold) 42%, var(--border)); }
.jd-quote-card { border-color: color-mix(in srgb, var(--positive) 30%, var(--border)); }
.dark-gold-card #darkGoldGap { margin-top: 8px; }
.session-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.session-card { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 10px; }
.session-card .light { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral); }
.session-card.open .light { background: var(--positive); box-shadow: 0 0 12px rgb(69 207 154 / 45%); }
.session-card small { color: var(--muted); }
.flow-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flow-board div { padding: 13px; border: 1px solid var(--border-soft); border-radius: 9px; }
.flow-board span { display: block; color: var(--muted); font-size: .7rem; }
.flow-board strong { display: block; margin-top: 4px; }
.global-flow-panel { min-width: 0; }
.global-flow-panel > .panel-head { align-items: flex-start; }
.flow-panel-heading { display: grid; gap: 3px; }
.flow-panel-heading strong { color: var(--text); font-size: 1rem; letter-spacing: 0; }
.flow-panel-heading small { color: var(--muted); font-size: .7rem; letter-spacing: 0; }
.global-flow-board { min-width: 0; }
.global-flow-board > .empty-state { border: 1px solid var(--border-soft); border-radius: 12px; }
.flow-unified-board { min-width: 0; overflow: hidden; border: 1px solid var(--border-soft); border-radius: 12px; background: rgb(0 0 0 / 10%); }
.flow-unified-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--border-soft); }
.flow-summary-market { min-width: 0; padding: 17px; }
.flow-summary-market + .flow-summary-market { border-left: 1px solid var(--border-soft); }
.flow-summary-market.is-unavailable { background: rgb(255 255 255 / 1.5%); }
.flow-summary-market-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.flow-summary-market-head strong, .flow-summary-market-head small { display: block; }
.flow-summary-market-head strong { font-size: .94rem; }
.flow-summary-market-head small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.flow-window-label { min-height: 22px; margin: 12px 0 0; color: var(--gold-bright); font-size: .7rem; }
.flow-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.flow-summary-grid > div { min-width: 0; padding: 11px; border: 1px solid var(--border-soft); border-radius: 9px; }
.flow-summary-grid span { display: block; color: var(--muted); font-size: .65rem; }
.flow-summary-grid strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-variant-numeric: tabular-nums; }
.flow-summary-bias { color: var(--muted); font-size: .65rem; }
.flow-summary-bias .flow-pressure { margin-top: 7px; }
.flow-unified-axis-label { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 42px; padding: 0 15px; border-bottom: 1px solid var(--border-soft); background: rgb(255 255 255 / 1.5%); }
.flow-unified-axis-label strong { color: var(--gold-bright); font-size: .7rem; }
.flow-unified-axis-label span { color: var(--muted); font-size: .65rem; }
.flow-unified-timeline { max-height: 620px; margin: 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-color: var(--border) transparent; }
.flow-unified-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); border-bottom: 1px solid var(--border-soft); }
.flow-unified-row:last-child { border-bottom: 0; }
.flow-unified-time { min-width: 0; padding: 16px 13px; border-right: 1px solid var(--border-soft); background: rgb(255 255 255 / 1%); }
.flow-unified-time time, .flow-unified-time small { display: block; }
.flow-unified-time time { color: var(--gold-bright); font-size: .75rem; font-variant-numeric: tabular-nums; }
.flow-unified-time small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.flow-unified-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.flow-hour-market { min-width: 0; padding: 14px 16px; }
.flow-hour-market + .flow-hour-market { border-left: 1px solid var(--border-soft); }
.flow-hour-market.is-empty { display: grid; align-content: center; background: rgb(255 255 255 / 1%); }
.flow-hour-market-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-hour-market-head > span:first-child { overflow: hidden; color: var(--muted-strong); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; font-weight: 600; }
.flow-hour-net { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; }
.flow-hour-net span { color: var(--muted); font-size: .62rem; }
.flow-hour-net strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-variant-numeric: tabular-nums; }
.flow-hour-empty { margin: 11px 0 0; color: var(--muted); font-size: .68rem; }
.flow-row-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.flow-row-metrics > span { min-width: 0; color: var(--muted); font-size: .62rem; }
.flow-row-metrics strong { display: block; margin-top: 2px; overflow: hidden; color: var(--muted-strong); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; font-variant-numeric: tabular-nums; }
.flow-pressure { height: 3px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--negative-bg); }
.flow-pressure i { display: block; height: 100%; background: var(--positive); }
.flow-source-note { margin: 11px 0 0; color: var(--muted); font-size: .65rem; }
.event-list { display: grid; gap: 8px; }
.event-row { display: grid; grid-template-columns: 70px 60px minmax(0, 1fr) 160px; gap: 12px; align-items: center; min-height: 48px; padding: 0 10px; border-bottom: 1px solid var(--border-soft); font-size: .79rem; }
.event-row time { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.event-row span:last-child { color: var(--muted); text-align: right; }

.model-hero { margin-bottom: 18px; }
.model-status-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr); gap: 30px; align-items: center; }
.model-status-layout h2 { margin: 8px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; }
.model-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.model-kpis div { padding: 13px; border-left: 1px solid var(--border); }
.model-kpis strong { display: block; margin: 5px 0; font-size: 1.1rem; }
.model-kpis small { color: var(--muted); font-size: .65rem; }
.gate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gate-item { padding: 14px; border: 1px solid var(--border-soft); border-radius: 9px; }
.gate-item span { display: block; color: var(--muted); font-size: .7rem; }
.gate-item strong { display: block; margin-top: 4px; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.pipeline li { display: flex; align-items: center; gap: 13px; min-height: 43px; border-bottom: 1px solid var(--border-soft); }
.pipeline span { color: var(--gold); font-size: .7rem; }
.prediction-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(440px, 1.35fr); gap: 28px; align-items: center; }
.prediction-layout.empty-state { display: grid; grid-template-columns: 1fr; }
.prediction-event { min-width: 0; }
.prediction-event > span, .prediction-event > small { display: block; color: var(--muted); font-size: .72rem; }
.prediction-event > strong { display: block; margin: 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.prediction-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.prediction-metrics > div { min-width: 0; padding: 12px; border-left: 1px solid var(--border); }
.prediction-metrics span { display: block; color: var(--muted); font-size: .68rem; }
.prediction-metrics strong { display: block; margin-top: 5px; font-variant-numeric: tabular-nums; }
.evaluation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.evaluation-card { padding: 14px; border: 1px solid var(--border-soft); border-radius: 9px; }
.evaluation-card span { display: block; color: var(--muted); font-size: .7rem; }
.evaluation-card strong { display: block; margin-top: 5px; }

.settings-grid { display: grid; gap: 18px; }
fieldset.panel { margin: 0; min-width: 0; }
fieldset.panel legend { padding: 0 10px; color: var(--gold-bright); font-family: Georgia, "Noto Serif SC", serif; font-size: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
label { color: var(--muted-strong); font-size: .78rem; }
input { display: block; width: 100%; min-height: 46px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: #0a0e0d; color: var(--text); }
input:hover { border-color: #3b4743; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check-row input { width: 19px; min-height: 19px; margin: 0; accent-color: var(--gold); }
.form-actions { display: flex; align-items: center; gap: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-elevated); color: var(--text); cursor: pointer; font-weight: 650; text-decoration: none; }
.button.primary { border-color: var(--gold-dim); background: linear-gradient(135deg, #d8b65f, #9b782d); color: #171207; }
.button:hover { filter: brightness(1.08); }
.button.danger { border-color: rgb(255 130 125 / 35%); color: var(--negative); background: var(--negative-bg); }
.button:disabled { cursor: wait; opacity: .55; filter: none; }
.button.wide { width: 100%; }
.form-error { min-height: 22px; color: var(--negative); }

.account-hero { margin-bottom: 18px; }
.account-status-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.2fr); gap: 28px; align-items: center; }
.account-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.account-title-row h2 { margin: 8px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 500; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.account-message { min-height: 24px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted-strong); font-size: .78rem; }
.account-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.position-settings-form { margin-bottom: 18px; }
.position-source-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 2px 0 20px; padding: 15px 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgb(0 0 0 / 12%); }
.position-source-banner strong { display: block; margin-top: 5px; color: var(--text); font-size: 1rem; }
.position-source-banner p { margin: 5px 0 0; font-size: .74rem; }
.position-settings-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.setting-section { min-width: 0; padding: 18px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgb(255 255 255 / 1.5%); }
.setting-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.setting-section-head h2 { margin: 0; color: var(--text); font-size: .93rem; font-weight: 650; }
.setting-section-head span { color: var(--muted); font-size: .68rem; }
.field-help { margin: 13px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.position-form-actions { margin-top: 18px; }
.summary-card { min-width: 0; padding: 18px; }
.summary-card span, .summary-card small { display: block; color: var(--muted); font-size: .7rem; }
.summary-card strong { display: block; margin: 8px 0 3px; overflow: hidden; text-overflow: ellipsis; font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-data-grid { margin-top: 0; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: .76rem; font-variant-numeric: tabular-nums; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table td { max-width: 260px; padding: 12px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { margin-top: 2px; color: var(--muted); }
.data-table tbody tr:hover { background: rgb(255 255 255 / 2%); }
.data-table .table-empty { height: 90px; color: var(--muted); text-align: center; }
.data-table .order-id { max-width: 150px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }

.login-body { background: #080b0a; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr); }
.login-story { min-width: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 6vw, 90px); background: radial-gradient(circle at 20% 80%, rgb(215 180 91 / 16%), transparent 26rem), linear-gradient(140deg, #111713, #080b0a); border-right: 1px solid var(--border); }
.login-story::after { content: "79"; position: absolute; right: -2vw; bottom: -8vw; font-family: Georgia, serif; font-size: clamp(16rem, 38vw, 38rem); color: rgb(215 180 91 / 2.8%); line-height: .8; }
.login-story h1 { max-width: 720px; margin: 13px 0; font-family: Georgia, "Noto Serif SC", serif; font-weight: 400; font-size: clamp(3rem, 7vw, 7.5rem); line-height: .98; letter-spacing: -.055em; }
.login-story p:not(.eyebrow) { max-width: 550px; color: var(--muted); }
.login-metric { position: relative; z-index: 1; }
.login-metric span, .login-metric small { display: block; color: var(--muted); font-size: .72rem; }
.login-metric strong { display: block; color: var(--gold-bright); font-family: Georgia, serif; font-size: 2rem; }
.login-panel { min-width: 0; display: grid; place-items: center; padding: 32px; }
.login-form { width: min(100%, 400px); }
.login-form h2 { margin: 8px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 2.2rem; font-weight: 500; }
.login-form label:not(.check-row) { display: block; margin-top: 21px; }
.login-form .check-row { margin: 15px 0; }

.disclaimer { margin-top: 28px; padding: 15px 0; border-top: 1px solid var(--border-soft); color: #7d8581; font-size: .7rem; }
.toast { position: fixed; z-index: 80; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 13px 16px; border: 1px solid var(--gold-dim); border-radius: 9px; background: #171c19; color: var(--text); box-shadow: var(--shadow); }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .model-status-layout { grid-template-columns: 1fr; }
  .prediction-layout { grid-template-columns: 1fr; }
  .span-5, .span-7 { grid-column: 1 / -1; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .account-status-layout { grid-template-columns: 1fr; }
  .account-actions { justify-content: flex-start; }
  .account-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .position-settings-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { position: sticky; z-index: 40; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: rgb(8 12 11 / 95%); backdrop-filter: blur(14px); }
  .brand.compact .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .icon-button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 9px; background: transparent; color: var(--text); font-size: 1.2rem; }
  .mobile-nav { position: sticky; z-index: 39; top: 66px; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); background: #0b100e; }
  .mobile-nav:not([hidden]) { display: grid; }
  .mobile-nav a, .mobile-nav button { display: grid; place-items: center; min-height: 50px; padding: 0; border: 0; background: transparent; color: var(--muted); text-decoration: none; font-size: .72rem; cursor: pointer; }
  .main-content { padding: 22px 14px 26px; }
  .page-header { align-items: center; margin-bottom: 20px; }
  .page-header h1 { font-size: 2rem; }
  .clock-block span { display: none; }
  .clock-block strong { font-size: .86rem; }
  .panel { padding: 17px; border-radius: 11px; }
  .price-panel { min-height: 270px; }
  .price-line { display: block; }
  .price-line strong { font-size: 3rem; }
  .price-line .delta { display: block; margin-top: 8px; }
  .metric-pair { margin-top: 18px; }
  .progress-ring-wrap { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .news-score { grid-column: 2; text-align: left; }
  .news-score .score-number { display: inline; margin-right: 8px; font-size: 1.2rem; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-controls { width: 100%; justify-content: flex-start; }
  .filter-group { width: 100%; }
  .quote-grid, .session-board, .form-grid, .form-grid.two, .model-kpis, .evaluation-grid, .prediction-metrics { grid-template-columns: 1fr 1fr; }
  .flow-unified-summary { grid-template-columns: 1fr; }
  .flow-summary-market + .flow-summary-market { border-top: 1px solid var(--border-soft); border-left: 0; }
  .flow-unified-axis-label { grid-template-columns: 1fr; gap: 2px; padding: 9px 13px; }
  .flow-unified-row { grid-template-columns: 1fr; }
  .flow-unified-time { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 13px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .flow-unified-cells { grid-template-columns: 1fr; }
  .flow-hour-market + .flow-hour-market { border-top: 1px solid var(--border-soft); border-left: 0; }
  .event-row { grid-template-columns: 54px 48px minmax(0,1fr); }
  .event-row span:last-child { grid-column: 3; text-align: left; }
  .account-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .account-actions .button { flex: 1 1 180px; }
  .position-source-banner { align-items: flex-start; flex-direction: column; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 38vh; padding: 28px; }
  .login-story h1 { font-size: clamp(2.4rem, 13vw, 4.2rem); }
  .login-story p:not(.eyebrow), .login-metric { display: none; }
  .login-panel { align-items: start; padding: 30px 22px; }
}

@media (max-width: 440px) {
  .quote-grid, .form-grid, .form-grid.two, .model-kpis, .evaluation-grid, .gate-grid, .prediction-metrics { grid-template-columns: 1fr; }
  .metric-pair { grid-template-columns: 1fr; }
  .account-summary-grid { grid-template-columns: 1fr; }
  .page-header .eyebrow { display: none; }
  .content-grid { gap: 12px; }
  .hero-grid { gap: 12px; }
  .flow-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-summary-grid > div:last-child { grid-column: 1 / -1; }
  .flow-hour-market { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
