/* Web3 Universe design for the whole Trade-Rechner (user 2026-11-16: „Verpass dem ganzen Rechner auch mal das Web3-Design“).
   Loaded last; only the look changes, layout and behaviour stay. Mapped onto the app's own tokens (style.css) so every tab
   follows. References: the Web3 platform tokens as used by the V3 DEX Simulator (design-web3) and the FRF Web3 design
   (public/web3-design.css, --w3-*): ground #040811, card #080c15, surface #11141d, accent #9ed3ff, positive #9effa2,
   red text #ff6369, warning #ffb224, hint box #141b2b, font Geist. Light variant = the simulator's light theme
   (#eef1f6 / white cards / #1270d6 / ink #0a0e18).
   Rules (user): flat dark cards with a 1 px edge, no glows, no gradients, no space motifs; white primary button with dark
   text (light theme: ink button with white text); selected segments white/10 like the platform. The Copy tab's PerpPilot
   replica (.pp) keeps its own look on purpose.
   Way back: drop the <link> to this file in index.html. */

/* Geist (SIL OFL 1.1, fonts/LICENSE-geist.txt), the platform font; same files as the V3 DEX Simulator and the FRF. */
@font-face{font-family:'Geist';src:url('fonts/geist-variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Geist Mono';src:url('fonts/geist-mono-variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}

:root{
  color-scheme:dark;
  --bg:#040811;
  --surface:#080c15;
  --surface-alt:#11141d;
  --input:#0e121b;
  --text:#ffffff;
  --muted:#9a9da4;
  --line:#1d212a;
  --accent:#9ed3ff;
  --accent-solid:#ffffff;
  --accent-text:#040811;
  --accent-soft:#111b27;
  --green:#9effa2;
  --red:#ff6369;
  --green-bg:#13211f;
  --red-bg:#1d111a;
  --shadow:none;
  --font:'Geist','Segoe UI',system-ui,sans-serif;
  --w3-tip:#141b2b;
  --w3-head:#0b0f18;
  --w3-seg-on:#20242d;            /* white/10 over the field, opaque so contrast stays measurable */
  --w3-seg-edge:inset 1px 1px 0 0 rgba(255,255,255,.1),inset -1px -1px 0 0 rgba(0,0,0,.1);
  --w3-ring:0 0 0 3px rgba(158,211,255,.22);
  --w3-backdrop:rgba(4,8,17,.78);
  --w3-pop-shadow:0 12px 40px -9px rgba(0,0,0,.6);
}
:root[data-theme=light]{
  color-scheme:light;
  --bg:#eef1f6;
  --surface:#ffffff;
  --surface-alt:#f4f6fa;
  --input:#f7f8fb;
  --text:#0a0e18;
  --muted:#5b6474;
  --line:#dde2ea;
  --accent:#1270d6;
  --accent-solid:#0a0e18;
  --accent-text:#ffffff;
  --accent-soft:#e8f1fc;
  --green:#15803d;
  --red:#dc2626;
  --green-bg:#e9f6ee;
  --red-bg:#fdeeee;
  --shadow:none;
  --w3-tip:#ffffff;
  --w3-head:#f4f6fa;
  --w3-seg-on:#e5e8ee;
  --w3-seg-edge:inset 0 0 0 1px rgba(10,14,24,.06);
  --w3-ring:0 0 0 3px rgba(18,112,214,.18);
  --w3-backdrop:rgba(10,14,24,.35);
  --w3-pop-shadow:0 12px 40px -9px rgba(15,23,42,.25);
}

body{font-feature-settings:'tnum' 0;letter-spacing:-.005em}
::selection{background:rgba(158,211,255,.3)}

/* Header and tab bar: pills like the platform's filters, selected = white pill with dark text. */
.brand{letter-spacing:.02em}
.brand-mark{border-radius:10px}
.view-switch{border-radius:999px;padding:4px;background:var(--surface)}
.view-switch button{border-radius:999px;padding:7px 16px}
.theme-switch{border-radius:999px}
.theme-switch button{border-radius:999px}
.theme-switch button[aria-pressed=true]{background:var(--w3-seg-on);box-shadow:var(--w3-seg-edge)}

/* Cards: flat, 1 px edge, 12 px radius, no shadow. */
.calc-card,.live-item,.mp-dialog,.mp-chart-dialog,.da-dialog{box-shadow:none}
.calc-card{border-radius:12px}
.live-item{border-radius:12px}

/* Segments and chips: selected like the platform (white/10 + inner edge), not a filled colour. */
.segmented{border-radius:999px;background:var(--input)}
.segmented button{border-radius:999px}
.segmented button[aria-pressed=true],
.hedge-sizing-toggle button[aria-pressed=true],
.extra-mode-pills button[aria-pressed=true]{background:var(--w3-seg-on);color:var(--text);border-color:transparent;box-shadow:var(--w3-seg-edge)}
.tab-btn{border-radius:12px}
.tab-btn[aria-pressed=true]{background:var(--w3-seg-on);box-shadow:var(--w3-seg-edge);border-color:var(--line)}
.chip{border-radius:999px}
.chip:hover,.chip[aria-pressed=true]{background:var(--w3-seg-on);border-color:var(--line);color:var(--text)}
.expectation-auto,.setup-expectation{border-radius:999px}
.market-launch{border-radius:999px}
.market-launch:hover{background:var(--w3-seg-on);border-color:var(--line)}

/* Primary buttons: white with dark text (light theme: ink with white text), pill shaped. */
.live-apply,.mp-apply,.da-haupt,.live-range-save{border-radius:999px}
.mp-apply:hover:not(:disabled){filter:none;opacity:.9}
.live-apply:hover:not(:disabled),.live-range-save:hover:not(:disabled),.da-haupt:hover:not(:disabled){opacity:.9}

/* Fields: quiet fill, accent edge and soft ring on focus. */
.input-wrap input{border-radius:10px}
.input-wrap input:hover{border-color:rgba(158,211,255,.35)}
:root[data-theme=light] .input-wrap input:hover{border-color:rgba(18,112,214,.35)}
.input-wrap input:focus{border-color:var(--accent);box-shadow:var(--w3-ring)}
.live-range-field input{border-radius:10px}
.icon-button{border-radius:999px}

/* Tooltips and popovers: the platform's hint box. */
.field-tooltip{background:var(--w3-tip);border-radius:8px;box-shadow:var(--w3-pop-shadow)}
.help-image{background:var(--surface)}
.toast{border-radius:999px;box-shadow:var(--w3-pop-shadow)}

/* Tables: header row slightly lifted, thin row lines. */
.live-table th{background:var(--w3-head)}

/* Dialogs: plain dark veil instead of the old blue tint, no glows on the signal buttons. */
.mp-dialog::backdrop,.mp-chart-dialog::backdrop,.da-dialog::backdrop{background:var(--w3-backdrop)}
.mp-count-ready[data-active=true],.mp-count-waiting[data-active=true],
.mp-signal-button[data-state=bereit],.mp-signal-button[data-state=waiting-entry]{box-shadow:none}
.mp-dialog,.mp-chart-dialog{border-radius:12px}

/* Amber and signal colours aligned to the platform's warning tone. */
#liveTrades{--live-wait:#ffb224;--live-wait-bg:#241d10}
:root[data-theme=light] #liveTrades{--live-wait:#b45309;--live-wait-bg:#fdf3e3}
.mp-dialog{--signal-wait:#ffb224;--signal-wait-bg:#241d10}
:root[data-theme=light] .mp-dialog{--signal-wait:#b45309;--signal-wait-bg:#fdf3e3}
