:root{--theme-bg:#f5f8fc;--theme-surface:#fff;--theme-soft:#edf4ff;--theme-text:#10203d;--theme-muted:#536580;--theme-line:#d2dfed}
html[data-theme=dark]{--theme-bg:#080f1d;--theme-surface:#121e30;--theme-soft:#1a2b43;--theme-text:#edf4ff;--theme-muted:#b1c2da;--theme-line:#354861;--bg:var(--theme-bg);--card:var(--theme-surface);--surface:var(--theme-surface);--soft:var(--theme-soft);--text:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-line);color-scheme:dark}
.global-theme-toggle{position:fixed;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:250;min-height:44px;padding:8px 14px;border:1px solid var(--theme-line);border-radius:24px;background:var(--theme-surface);color:var(--theme-text);box-shadow:0 3px 14px #0002;font:600 12px system-ui;cursor:pointer}
body:has(.pulse-page),body:has(.br-page){background:var(--theme-bg)}
.pulse-page,.pulse-section,.pulse-wallet,.pulse-modal,.seller-dialog,.br-event-manager{color:var(--theme-text);background-color:var(--theme-surface)}
.pulse-section,.pulse-wallet,.pulse-field,.operator-target,.seller-dialog{border-color:var(--theme-line)}
.pulse-section h2,.pulse-warning b,.operator-target strong,.wallet-data .pulse-field input{color:var(--theme-text)}
.pulse-section header p,.pulse-summary small,.pulse-drop small,.operator-target small{color:var(--theme-muted)}
.pulse-summary>div,.pulse-wallet.active,.pulse-drop,.pulse-operator-note{background:var(--theme-soft)}
.operator-target,.pulse-topbar .pulse-header-action,.pulse-topbar .header-notice{background:var(--theme-surface)}
html[data-theme=dark] .pulse-warning{background:#332b16;color:#f5dfa0;border-color:#736039}
html[data-theme=dark] .pulse-summary strong.green{color:#55e39d}
html[data-theme=dark] .pulse-summary strong.blue{color:#77b8ff}
html[data-theme=dark] .pulse-operator-note{color:#b7d9ff}
html[data-theme=dark] .pulse-modal>p,html[data-theme=dark] .pulse-modal small{color:var(--theme-muted)}
html[data-theme=dark] .pulse-receipt{color:#101a34;color-scheme:light}
html[data-theme=dark] .seller-dialog input,html[data-theme=dark] .br-event-manager input,html[data-theme=dark] .br-event-manager select{background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] :is(.login-page,.login-card,.admin-modal,.card,.stat,.admin-main,.admin-header,.table,.toolbar input,.toolbar select,.field input,.field select,.field textarea){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] .table th,html[data-theme=dark] .table td{color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] .table th,html[data-theme=dark] .btn-light{background:var(--theme-soft);color:var(--theme-text)}
html[data-theme=dark] .sidebar{background:#0b1628}
html[data-theme=light] :is(.br-page,.br-panel,.br-board,.br-fullscreen,.br-presentation,.br-event-manager){background:#f3f7fc;color:#14233e;border-color:#bbcee4}
html[data-theme=light] :is(.br-settings>label,.br-settings fieldset,.br-match,.br-top button,.br-tools button,.orientation button,.br-team-inputs input,.br-panel>#br-name,.br-team-row>input,.br-event-select,.br-present-nav button,.br-pan-hint){background:#fff;color:#152740;border-color:#b0c8e0;box-shadow:none}
html[data-theme=light] :is(.br-panel header p,.br-settings span,.br-settings legend,.br-team-head,.br-match small,.br-pan-hint p,.br-pan-hint small){color:#4b607c}
html[data-theme=light] :is(.br-present-title small,.br-presentation>.br-present-title h1,.br-event-select select){color:#14233e;text-shadow:none}
html[data-theme=light] .br-presentation .br-team-row{color:#18304c}
html[data-theme=light] .br-presentation .br-team-row.winner{background:#d8edff}
html[data-theme=light] .br-team-inputs label>span{background:#eaf1fa;color:#173053}
html[data-theme=light] .br-trophy strong{background:#fff;color:#614800}
html[data-theme=light] .br-connections{stroke:#007cc5;filter:none}
/* Hero artwork, brand marks and illustrative receipts keep their original colors. */
.br-hero,.pulse-hero{color:#fff}
@media print{.global-theme-toggle{display:none}}
