/* Max Trading Desk - static port of the Next.js/Tailwind theme (src/app/globals.css). */
:root {
  --bg: #080c11;
  --fg: #e8eef5;
  --panel: #101820;
  --raised: #17212c;
  --line: #2c3a4a;
  --muted: #8ea0b5;
  --amber: #e4b55a;
  --gain: #3dce8a;
  --loss: #ff5d73;
  --info: #79b8ff;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 480px at -10% -20%, rgba(228, 181, 90, 0.1), transparent 55%),
    radial-gradient(900px 420px at 110% -10%, rgba(121, 184, 255, 0.08), transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(228, 181, 90, 0.35); color: #fff; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
table { border-collapse: collapse; }

/* layout */
.wrap { margin: 0 auto; width: 100%; max-width: 1440px; padding: 12px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .wrap { padding: 20px; } }
.stack-3 > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.row-5 { display: grid; gap: 16px; }
@media (min-width: 1024px) { .row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .lg-span-2 { grid-column: span 2; } .lg-span-3 { grid-column: span 3; } }
.row-5x { display: grid; gap: 16px; }
@media (min-width: 1280px) { .row-5x { grid-template-columns: repeat(5, minmax(0, 1fr)); } .xl-span-2 { grid-column: span 2; } .xl-span-3 { grid-column: span 3; } }
.quote-cards { display: grid; gap: 12px; }
@media (min-width: 640px) { .quote-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.flex { display: flex; }
.wrap-row { display: flex; flex-wrap: wrap; gap: 6px; }
.between { display: flex; justify-content: space-between; gap: 12px; }
.baseline { align-items: baseline; }
.center { align-items: center; }
.h-full { height: 100%; }

/* text */
.muted { color: var(--muted); }
.fg { color: var(--fg); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.amber { color: var(--amber); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.text-xs { font-size: 12px; line-height: 16px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-lg { font-size: 18px; line-height: 28px; }
.text-11 { font-size: 11px; line-height: 15px; }
.text-10 { font-size: 10px; line-height: 14px; }
.semibold { font-weight: 600; }
.upper { text-transform: uppercase; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--amber); }
.label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mb-3 { margin-bottom: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.capitalize { text-transform: capitalize; }

/* surfaces */
.card { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.inset { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.panel-head h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 16px 0 0; }

/* header */
.head { padding: 12px 16px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .head { padding: 12px 20px; } }
@media (min-width: 1024px) { .head { flex-direction: row; align-items: center; justify-content: space-between; } }
.head h1 { margin-top: 4px; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; }
@media (min-width: 640px) { .head h1 { font-size: 1.7rem; } }
.head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 640px) { .head-tools { gap: 12px; } }
.clock { min-width: 9.5rem; padding: 8px 12px; }
.clock .time { font-family: var(--mono); font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .tz { margin-left: 4px; font-size: 11px; color: var(--amber); }
.chip { padding: 8px 12px; font-size: 12px; }
.chip .label { letter-spacing: 0.16em; font-weight: 400; }
.feed { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--muted); display: inline-block; }
.dot.gain { background: var(--gain); } .dot.amber { background: var(--amber); } .dot.loss { background: var(--loss); }

/* badges & buttons */
.badge { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid; padding: 2px 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.025em; white-space: nowrap; }
.badge.lg { height: 32px; padding: 0 12px; }
.tone-neutral { border-color: var(--line); background: var(--raised); color: var(--muted); }
.tone-gain { border-color: rgba(61,206,138,.3); background: rgba(61,206,138,.15); color: var(--gain); }
.tone-loss { border-color: rgba(255,93,115,.3); background: rgba(255,93,115,.15); color: var(--loss); }
.tone-amber { border-color: rgba(228,181,90,.4); background: rgba(228,181,90,.15); color: var(--amber); }
.tone-info { border-color: rgba(121,184,255,.3); background: rgba(121,184,255,.15); color: var(--info); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; font-size: 12px; font-weight: 500; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--raised); color: var(--fg); transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: rgba(228,181,90,.5); }
.btn.solid { background: var(--amber); color: #000; border-color: var(--amber); }
.btn.solid:hover { background: rgba(228,181,90,.9); }
.btn.md { height: 40px; padding: 0 14px; font-size: 14px; }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.sep { display: none; width: 1px; height: 32px; background: var(--line); margin: 0 4px; }
@media (min-width: 640px) { .sep { display: inline-block; } }
.input { height: 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; font-size: 12px; outline: none; width: 100%; }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: rgba(228,181,90,.6); }
@media (min-width: 1024px) { .input.w44-lg { width: 11rem; } }
@media (min-width: 640px) { .input.w44-sm { width: 11rem; margin-left: auto; } }

/* banners */
.banner { border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.banner.amber { border: 1px solid rgba(228,181,90,.4); background: rgba(228,181,90,.1); }
.banner.loss { border: 1px solid rgba(255,93,115,.4); background: rgba(255,93,115,.1); }

/* KPI */
.stat { padding: 12px 16px; }
.stat .value { margin-top: 4px; font-family: var(--mono); font-size: 20px; line-height: 28px; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .stat .value { font-size: 24px; line-height: 32px; } }
.stop-card { padding: 16px; }
@media (min-width: 640px) { .stop-card { padding: 16px 20px; } }
.stop-top { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .stop-top { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.stop-top .label { color: var(--amber); letter-spacing: 0.18em; }
.stop-top h2 { margin-top: 4px; font-size: 18px; line-height: 28px; font-weight: 600; }
.stop-top .big { font-family: var(--mono); font-size: 30px; line-height: 36px; font-variant-numeric: tabular-nums; }
.gauge { position: relative; height: 12px; overflow: hidden; border-radius: 999px; background: rgba(0,0,0,.4); }
.gauge .neg { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: linear-gradient(to right, rgba(255,93,115,.7), rgba(255,93,115,.1)); }
.gauge .pos { position: absolute; top: 0; bottom: 0; right: 0; width: 50%; background: linear-gradient(to right, rgba(61,206,138,.1), rgba(61,206,138,.5)); }
.gauge .mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.7); }
.gauge .mark { position: absolute; top: 50%; height: 16px; width: 4px; transform: translate(-50%, -50%); border-radius: 2px; background: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.gauge-scale { margin-top: 6px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* regime */
.qcard { padding: 12px; }
.qcard .px { margin-top: 4px; font-size: 24px; line-height: 32px; padding: 0; }
.qcard .vw { margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.025em; }

/* positions */
.flat { display: flex; min-height: 10rem; flex-direction: column; align-items: flex-start; justify-content: center; border-radius: 8px; border: 1px dashed var(--line); padding: 32px 16px; }
.pos { padding: 12px; }
.pos + .pos { margin-top: 12px; }
.bracket { position: relative; height: 8px; border-radius: 999px; background: rgba(0,0,0,.4); }
.bracket .fill { position: absolute; inset: 0; border-radius: 999px; }
.bracket .fill.up { background: linear-gradient(to right, rgba(255,93,115,.8), rgba(228,181,90,.4), rgba(61,206,138,.8)); }
.bracket .fill.down { background: linear-gradient(to right, rgba(61,206,138,.8), rgba(228,181,90,.4), rgba(255,93,115,.8)); }
.bracket .entry { position: absolute; top: 50%; height: 12px; width: 1px; transform: translateY(-50%); background: rgba(255,255,255,.8); }
.bracket .mark { position: absolute; top: 50%; height: 14px; width: 6px; transform: translate(-50%, -50%); border-radius: 2px; background: var(--fg); }

/* confidence meter */
.meter { display: flex; align-items: center; gap: 8px; }
.meter .bar { position: relative; height: 6px; width: 64px; overflow: hidden; border-radius: 999px; background: rgba(0,0,0,.5); }
.meter .bar .f { height: 100%; }
.meter .bar .f.gain { background: var(--gain); } .meter .bar .f.amber { background: var(--amber); }
.meter .bar .gate { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.7); }

/* tables */
.tools { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 12px; }
@media (min-width: 1024px) { .tools.lg-row { flex-direction: row; align-items: center; justify-content: space-between; } }
.tools .sub { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { .tools .sub { flex-direction: row; align-items: center; } }
.scroll-x { overflow-x: auto; }
.tbl { width: 100%; border-top: 1px solid var(--line); text-align: left; font-size: 14px; }
.tbl.w920 { min-width: 920px; } .tbl.w860 { min-width: 860px; }
.tbl thead { font-size: 10px; color: var(--muted); }
.tbl th { padding: 8px 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.025em; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl td { padding: 12px; border-top: 1px solid rgba(44,58,74,.8); vertical-align: middle; }
.tbl.tight td { padding-top: 10px; padding-bottom: 10px; }
.tbl .reason { max-width: 20rem; }
.sort { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; text-transform: uppercase; letter-spacing: 0.025em; font-size: 10px; color: var(--muted); font-weight: 500; }
.sort .arrow { color: var(--amber); }
.empty { padding: 0 16px 24px; font-size: 14px; color: var(--muted); }

/* equity curve */
.curve { width: 100%; height: 14rem; display: block; }
.tier { padding: 12px; }

/* tick flash */
.tick { border-radius: 4px; padding: 0 4px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tick.p0 { padding: 0; }
@keyframes tick-up { from { background-color: rgba(61, 206, 138, 0.45); } to { background-color: transparent; } }
@keyframes tick-down { from { background-color: rgba(255, 93, 115, 0.42); } to { background-color: transparent; } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pulse { 50% { opacity: .5; } }
.tick-up { animation: tick-up 700ms ease-out; }
.tick-down { animation: tick-down 700ms ease-out; }
.pulse-dot { animation: pulse-dot 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tick-up, .tick-down, .pulse-dot, .sk { animation: none; } }

/* skeleton / error */
.sk { border-radius: 12px; border: 1px solid var(--line); background: var(--panel); animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.sk-28 { height: 7rem; } .sk-24 { height: 6rem; } .sk-48 { height: 12rem; }
.fail { margin: 0 auto; display: flex; min-height: 100vh; max-width: 32rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: 64px 24px; }
.fail h1 { font-size: 24px; font-weight: 600; }
