:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: #0d1924;
  --panel-2: #101f2c;
  --line: #203240;
  --text: #eaf4f7;
  --muted: #90a4ae;
  --cyan: #56e6d3;
  --cyan-dark: #153e42;
  --amber: #f6bd60;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 520px) minmax(420px, 1fr); }
.login-panel { padding: clamp(2rem, 7vw, 7rem); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.brand-mark { width: 3rem; height: 3rem; display: grid; place-items: center; border: 1px solid var(--cyan); color: var(--cyan); font-weight: 800; letter-spacing: -.05em; margin-bottom: 2.5rem; }
.brand-mark.small { width: 2.4rem; height: 2.4rem; margin: 0; font-size: .85rem; }
.eyebrow, .label { color: var(--cyan); font-size: .75rem; font-weight: 800; letter-spacing: .16em; margin: 0 0 .65rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.05em; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
.muted { color: var(--muted); line-height: 1.6; }
form { margin-top: 2rem; display: grid; gap: .7rem; }
label { color: #bfd0d6; font-size: .9rem; margin-top: .55rem; }
input { width: 100%; padding: .95rem 1rem; border: 1px solid var(--line); background: #09141e; color: var(--text); outline: none; border-radius: .35rem; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(86,230,211,.12); }
form button { margin-top: .8rem; padding: 1rem; border: 0; border-radius: .35rem; background: var(--cyan); color: #05201e; font-weight: 800; }
.error { min-height: 1.25rem; color: #ff8f8f; font-size: .85rem; margin: .25rem 0 0; }
.login-context { padding: clamp(2rem, 8vw, 9rem); display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 75% 25%, rgba(86,230,211,.12), transparent 35%), linear-gradient(135deg, #09131d, #0b2027); }
.login-context h2 { font-size: clamp(2.6rem, 6vw, 6rem); line-height: .96; letter-spacing: -.065em; margin: 2rem 0; }
.login-context p { max-width: 42rem; color: #a9bbc1; line-height: 1.7; font-size: 1.05rem; }
.status-pill { display: inline-flex; width: fit-content; padding: .38rem .6rem; border: 1px solid #33505a; color: #b8ccd2; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.status-pill.locked { color: var(--amber); border-color: #6c5430; }
.dashboard { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { border-right: 1px solid var(--line); padding: 1.6rem; display: flex; flex-direction: column; min-height: 100vh; background: #08131c; }
.brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 3rem; }
nav { display: grid; gap: .4rem; }
.nav-item { text-align: left; padding: .8rem .9rem; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--muted); }
.nav-item.active { color: var(--text); border-left-color: var(--cyan); background: rgba(86,230,211,.06); }
.nav-item:disabled { cursor: not-allowed; opacity: .45; }
.safety-card { margin-top: auto; padding: 1rem; border: 1px solid #6c5430; background: rgba(246,189,96,.05); }
.safety-card strong { display: block; color: var(--amber); margin-bottom: .4rem; }
.safety-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.workspace { padding: clamp(1.4rem, 4vw, 3.5rem); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.topbar h1 { font-size: 2.2rem; margin: 0; }
.account { display: flex; align-items: center; gap: 1rem; color: var(--muted); }
.ghost { color: var(--text); background: transparent; border: 1px solid var(--line); padding: .65rem .85rem; border-radius: .3rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.metric, .panel { border: 1px solid var(--line); background: var(--panel); }
.metric { padding: 1.35rem; min-height: 145px; display: flex; flex-direction: column; }
.metric.accent { border-top: 2px solid var(--cyan); }
.metric span { color: var(--muted); font-size: .85rem; }
.metric strong { font-size: 1.8rem; letter-spacing: -.04em; margin: auto 0 .3rem; }
.metric small { color: #6f858f; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1rem; }
.panel { padding: 1.35rem; }
.panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.panel-head h2 { margin-bottom: 0; }
.strategy-row, .broker-row { display: grid; align-items: center; padding: 1rem 0; border-bottom: 1px solid rgba(32,50,64,.7); }
.strategy-row { grid-template-columns: 1.4fr 1fr auto; gap: 1rem; }
.strategy-row:last-child, .broker-row:last-child { border-bottom: 0; }
.strategy-row strong, .broker-row strong { font-size: .95rem; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip { padding: .25rem .45rem; border: 1px solid #2b4350; color: #9fb4bc; font-size: .72rem; }
.state { color: var(--muted); font-size: .8rem; }
.broker-row { grid-template-columns: 1fr auto; }
.broker-row span { color: var(--muted); font-size: .8rem; }
.notice { margin-top: 1.3rem; padding: 1rem; background: var(--cyan-dark); border-left: 2px solid var(--cyan); }
.notice strong { color: var(--cyan); }
.notice p { color: #aac1c5; margin: .4rem 0 0; line-height: 1.5; font-size: .85rem; }
.market-panel { margin-top: 1rem; }
.market-row { display: grid; grid-template-columns: 1fr .7fr .8fr 1.6fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(32,50,64,.7); align-items: center; }
.market-row:last-child { border-bottom: 0; }
.market-row span { color: var(--muted); font-size: .82rem; }
.market-row strong { font-size: .92rem; }
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-context { display: none; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav, .safety-card { display: none; }
  .brand { margin: 0; }
  .metric-grid, .content-grid { grid-template-columns: 1fr; }
  .strategy-row { grid-template-columns: 1fr; gap: .5rem; }
  .market-row { grid-template-columns: 1fr 1fr; }
  .topbar { align-items: flex-end; }
}
