/* Dark theme. Applied when <html data-theme="dark">. Covers Tailwind utilities, inline hex styles and page-level CSS. */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #0b1220; color: #e6edf7; }

/* Surfaces */
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-slate-50, html[data-theme="dark"] .from-white { background-color: #111a2e !important; }
html[data-theme="dark"] .bg-slate-100, html[data-theme="dark"] .bg-slate-200, html[data-theme="dark"] .to-slate-100 { background-color: #1a2740 !important; }
html[data-theme="dark"] .bg-blue-50, html[data-theme="dark"] .bg-blue-100, html[data-theme="dark"] .bg-sky-50, html[data-theme="dark"] .bg-sky-100 { background-color: #12284a !important; }
html[data-theme="dark"] .bg-emerald-50, html[data-theme="dark"] .bg-emerald-100, html[data-theme="dark"] .bg-green-50, html[data-theme="dark"] .bg-green-100 { background-color: #0f2c25 !important; }
html[data-theme="dark"] .bg-amber-50, html[data-theme="dark"] .bg-amber-100, html[data-theme="dark"] .bg-orange-100 { background-color: #33270f !important; }
html[data-theme="dark"] .bg-rose-50, html[data-theme="dark"] .bg-rose-100, html[data-theme="dark"] .bg-red-50, html[data-theme="dark"] .bg-red-100 { background-color: #35151d !important; }
html[data-theme="dark"] .bg-violet-50, html[data-theme="dark"] .bg-fuchsia-50, html[data-theme="dark"] .bg-purple-100 { background-color: #251a3d !important; }
html[data-theme="dark"] .hover\:bg-slate-50:hover, html[data-theme="dark"] .hover\:bg-slate-100:hover, html[data-theme="dark"] .hover\:bg-blue-50:hover { background-color: #1b2a47 !important; }

/* Borders */
html[data-theme="dark"] .border-slate-100, html[data-theme="dark"] .border-slate-200, html[data-theme="dark"] .border-slate-300, html[data-theme="dark"] .ring-slate-200, html[data-theme="dark"] .ring-slate-300 { border-color: #2a3a58 !important; --tw-ring-color: #2a3a58 !important; }
html[data-theme="dark"] .divide-slate-100 > * + *, html[data-theme="dark"] .divide-slate-200 > * + * { border-color: #243049 !important; }
html[data-theme="dark"] .border-slate-400, html[data-theme="dark"] .border-slate-500 { border-color: #3b4f75 !important; }
html[data-theme="dark"] .border-amber-200, html[data-theme="dark"] .border-amber-300, html[data-theme="dark"] .ring-amber-200 { border-color: #6b5420 !important; }
html[data-theme="dark"] .border-blue-200, html[data-theme="dark"] .ring-blue-200 { border-color: #24467e !important; }
html[data-theme="dark"] .border-emerald-200, html[data-theme="dark"] .border-emerald-300, html[data-theme="dark"] .border-green-200, html[data-theme="dark"] .ring-emerald-200 { border-color: #1e5b4b !important; }
html[data-theme="dark"] .border-rose-200, html[data-theme="dark"] .border-rose-300, html[data-theme="dark"] .border-red-300 { border-color: #6b2634 !important; }

/* Text */
html[data-theme="dark"] .text-slate-900, html[data-theme="dark"] .text-slate-800, html[data-theme="dark"] .text-slate-700, html[data-theme="dark"] .text-\[\#0F172A\] { color: #e6edf7 !important; }
html[data-theme="dark"] .text-slate-600, html[data-theme="dark"] .text-slate-500 { color: #b4c2d9 !important; }
html[data-theme="dark"] .text-slate-400, html[data-theme="dark"] .text-slate-300 { color: #9fb0cb !important; }
html[data-theme="dark"] .text-blue-600, html[data-theme="dark"] .text-blue-700, html[data-theme="dark"] .text-blue-800, html[data-theme="dark"] .text-\[\#2563EB\], html[data-theme="dark"] .text-sky-700, html[data-theme="dark"] .text-sky-800, html[data-theme="dark"] .text-sky-900 { color: #8cbcff !important; }
html[data-theme="dark"] .text-amber-600, html[data-theme="dark"] .text-amber-700, html[data-theme="dark"] .text-amber-800, html[data-theme="dark"] .text-amber-900, html[data-theme="dark"] .text-orange-800 { color: #fcd34d !important; }
html[data-theme="dark"] .text-rose-600, html[data-theme="dark"] .text-rose-700, html[data-theme="dark"] .text-rose-800, html[data-theme="dark"] .text-rose-900, html[data-theme="dark"] .text-red-700, html[data-theme="dark"] .text-red-800 { color: #fda4af !important; }
html[data-theme="dark"] .text-emerald-700, html[data-theme="dark"] .text-emerald-800, html[data-theme="dark"] .text-emerald-900, html[data-theme="dark"] .text-green-700, html[data-theme="dark"] .text-green-800 { color: #6ee7b7 !important; }
html[data-theme="dark"] .text-violet-700, html[data-theme="dark"] .text-purple-800, html[data-theme="dark"] .text-fuchsia-700 { color: #d4b8ff !important; }
html[data-theme="dark"] ::placeholder { color: #8396b5 !important; opacity: 1; }
html[data-theme="dark"] .bg-blue-600, html[data-theme="dark"] .bg-\[\#2563EB\] { background-color: #2f6fe4 !important; color: #fff !important; }
html[data-theme="dark"] .bg-emerald-600 { background-color: #0f8a62 !important; color: #fff !important; }
html[data-theme="dark"] .bg-rose-600, html[data-theme="dark"] .bg-red-600 { background-color: #c4283f !important; color: #fff !important; }
html[data-theme="dark"] .bg-sky-700 { background-color: #0a6aa1 !important; color: #fff !important; }
html[data-theme="dark"] .bg-slate-800 { background-color: #1e2b45 !important; }

/* Form controls and tables */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background-color: #0d1729; color: #e6edf7; border-color: #3b4f75; }
html[data-theme="dark"] input:disabled, html[data-theme="dark"] select:disabled, html[data-theme="dark"] textarea:disabled { background-color: #162239; color: #8396b5; }
html[data-theme="dark"] option { background: #0d1729; color: #e6edf7; }
html[data-theme="dark"] table thead, html[data-theme="dark"] thead tr { background-color: #172238 !important; }
html[data-theme="dark"] tbody tr:hover { background-color: #162239; }
html[data-theme="dark"] #site-footer { background-color: #0d1729 !important; border-color: #243049 !important; }
html[data-theme="dark"] #site-footer a { color: #b4c2d9; }
html[data-theme="dark"] #site-footer .font-bold { color: #e6edf7; }

/* Inline-style colours used by live/results/roster/events pages */
html[data-theme="dark"] [style*="background:#fff"], html[data-theme="dark"] [style*="background: #fff"], html[data-theme="dark"] [style*="background:#ffffff"] { background: #111a2e !important; }
html[data-theme="dark"] [style*="background:#f8fafc"], html[data-theme="dark"] [style*="background:#f1f5f9"] { background: #172238 !important; }
html[data-theme="dark"] [style*="background:#fffbeb"], html[data-theme="dark"] [style*="background:#fef3c7"] { background: #33270f !important; }
html[data-theme="dark"] [style*="border:1px solid #e2e8f0"], html[data-theme="dark"] [style*="border:1px solid #cbd5e1"], html[data-theme="dark"] [style*="border:1px dashed #cbd5e1"] { border-color: #2a3a58 !important; }
html[data-theme="dark"] [style*="border:1px solid #fcd34d"], html[data-theme="dark"] [style*="border:1px solid #fde68a"] { border-color: #6b5420 !important; }
html[data-theme="dark"] [style*="color:#334155"], html[data-theme="dark"] [style*="color:#475569"] { color: #cfd9ea !important; }
html[data-theme="dark"] [style*="color:#64748b"], html[data-theme="dark"] [style*="color:#94a3b8"], html[data-theme="dark"] [style*="color:#9"] { color: #a3b3cd !important; }
html[data-theme="dark"] [style*="color:#92400e"], html[data-theme="dark"] [style*="color:#b45309"] { color: #fcd34d !important; }
html[data-theme="dark"] [style*="color:#047857"] { color: #6ee7b7 !important; }
html[data-theme="dark"] [style*="color:#dc2626"] { color: #fda4af !important; }
html[data-theme="dark"] [style*="color:#0369a1"] { color: #8cbcff !important; }

/* Live scoring / results pages */
html[data-theme="dark"] .lv-pill { background: #111a2e; border-color: #2a3a58; color: #cfd9ea; }
html[data-theme="dark"] .lv-pill.on { background: #0a6aa1; border-color: #0a6aa1; color: #fff; }
html[data-theme="dark"] .lv-card, html[data-theme="dark"] .lv-md, html[data-theme="dark"] .pr-card { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .lv-tbl tr + tr, html[data-theme="dark"] .lv-m { border-top-color: #243049; }
html[data-theme="dark"] .lv-m:hover, html[data-theme="dark"] .lv-q:hover { background: #1b2a47; }
html[data-theme="dark"] .lv-m.tbd { color: #a3b3cd; }
html[data-theme="dark"] .lv-done { color: #6ee7b7; }
html[data-theme="dark"] .lv-q { background: #172238; border-color: #2a3a58; color: #e6edf7; }

/* Host dashboard / presets (page styles) */
html[data-theme="dark"] .hs-card, html[data-theme="dark"] .hs-menu, html[data-theme="dark"] .hs-in, html[data-theme="dark"] .hs-btn-subtle { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .hs-btn-subtle:hover, html[data-theme="dark"] .hs-menu button:hover { background: #1b2a47; }
html[data-theme="dark"] .hs-bar { background: #243049; }
html[data-theme="dark"] .hs-tab { color: #b4c2d9; }
html[data-theme="dark"] .hs-tab.on { background: #12284a; color: #8cbcff; }
html[data-theme="dark"] .hs-btn { background: #2f6fe4; color: #fff; }
html[data-theme="dark"] .hs-btn:hover { background: #4a84ee; }

/* Organizer settings dashboard (settings.css) */
html[data-theme="dark"] .od { color: #e6edf7; }
html[data-theme="dark"] .od-bar { background: rgba(17, 26, 46, .96); border-color: #2a3a58; box-shadow: none; }
html[data-theme="dark"] .od-side, html[data-theme="dark"] .od-card, html[data-theme="dark"] .od-ev { background: #111a2e; border-color: #2a3a58; box-shadow: none; }
html[data-theme="dark"] .od-nav { color: #cfd9ea; }
html[data-theme="dark"] .od-nav:hover { background: #1b2a47; }
html[data-theme="dark"] .od-nav.on { background: #12284a; color: #8cbcff; }
html[data-theme="dark"] .od-card h3, html[data-theme="dark"] .od-tabs button:hover { color: #e6edf7; }
html[data-theme="dark"] .od-card .sub, html[data-theme="dark"] .od .od-f small, html[data-theme="dark"] .od .od-f .hint, html[data-theme="dark"] .od-sec, html[data-theme="dark"] .od-tabs button, html[data-theme="dark"] .od .od-seg span { color: #b4c2d9; }
html[data-theme="dark"] .od .od-f, html[data-theme="dark"] .od .od-sw { color: #e6edf7; }
html[data-theme="dark"] .od .od-f input:not([type=checkbox]):not([type=radio]):not([type=hidden]), html[data-theme="dark"] .od .od-f select, html[data-theme="dark"] .od .od-f textarea { background: #0d1729; color: #e6edf7; border-color: #3b4f75; box-shadow: none; }
html[data-theme="dark"] .od .od-f ::placeholder { color: #8396b5; }
html[data-theme="dark"] .od .od-f input:disabled, html[data-theme="dark"] .od .od-f select:disabled, html[data-theme="dark"] .od .od-f textarea:disabled { background: #162239; color: #8396b5; }
html[data-theme="dark"] .od .od-seg { background: #172238; border-color: #2a3a58; }
html[data-theme="dark"] .od .od-seg input:checked + span { background: #2a3d63; color: #8cbcff; }
html[data-theme="dark"] .od .od-sw { border-bottom-color: #243049; }
html[data-theme="dark"] .od .od-sw i { background: #3b4f75; }
html[data-theme="dark"] .od-ev > summary { background: #172238; }
html[data-theme="dark"] .od-ev > summary span { background: #243049; color: #cfd9ea; }
html[data-theme="dark"] .od-ev[open] > summary, html[data-theme="dark"] .od-tabs, html[data-theme="dark"] .od-sec { border-color: #243049; }
html[data-theme="dark"] .od-tabs button.on { color: #8cbcff; border-bottom-color: #4a84ee; }

/* Arbitrary-color utilities and gradients used by server-rendered pages */
html[data-theme="dark"] .text-\[\#0F172A\], html[data-theme="dark"] .text-\[\#0f172a\] { color: #e6edf7 !important; }
html[data-theme="dark"] .text-\[\#2563EB\], html[data-theme="dark"] .text-\[\#2563eb\] { color: #8cbcff !important; }
html[data-theme="dark"] .bg-gradient-to-b, html[data-theme="dark"] .bg-gradient-to-r, html[data-theme="dark"] .bg-gradient-to-br { background-image: none !important; background-color: #0b1220 !important; }
html[data-theme="dark"] section.bg-gradient-to-b { border-color: #2a3a58 !important; }

/* Results / bracket pages */
html[data-theme="dark"] .pr-UPCOMING { background: #243049; color: #cfd9ea; }
html[data-theme="dark"] .pr-LIVE { background: #35151d; color: #fda4af; }
html[data-theme="dark"] .pr-COMPLETED { background: #0f2c25; color: #6ee7b7; }
html[data-theme="dark"] .pr-tabs { background: #0b1220; }
html[data-theme="dark"] .pr-tab, html[data-theme="dark"] .pr-node { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .pr-tab.on { background: #2f6fe4; border-color: #2f6fe4; color: #fff; }
html[data-theme="dark"] .pr-seg { background: #172238; }
html[data-theme="dark"] .pr-seg button { color: #cfd9ea; }
html[data-theme="dark"] .pr-seg button.on { background: #2a3d63; color: #fff; box-shadow: none; }
html[data-theme="dark"] .pr-badge { background: #243049; color: #cfd9ea; }
html[data-theme="dark"] .pr-main, html[data-theme="dark"] .pr-win { background: #0f2c25; }
html[data-theme="dark"] .pr-consolation { background: #12284a; }
html[data-theme="dark"] .pr-slot + .pr-slot { border-top-color: #2a3a58; }
html[data-theme="dark"] .pr-det { border-top-color: #2a3a58; color: #b4c2d9; }
html[data-theme="dark"] .pr-tbd { color: #a3b3cd; }

/* Event lifecycle stepper */
html[data-theme="dark"] .lc { background: #111a2e; border-color: #2a3a58; box-shadow: none; }
html[data-theme="dark"] .lc-steps li:not(:last-child):after { background: #2a3a58; }
html[data-theme="dark"] .lc-steps b { background: #1b2a47; color: #cfd9ea; }
html[data-theme="dark"] .lc-steps .lc-done { color: #6ee7b7; }
html[data-theme="dark"] .lc-steps .lc-done b { background: #0f8a62; color: #fff; }
html[data-theme="dark"] .lc-steps .lc-current b { background: #2f6fe4; color: #fff; }
html[data-theme="dark"] .lc-act { color: #b4c2d9; }
html[data-theme="dark"] .lc-back { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .lc-back:hover { background: #1b2a47; }

/* Shared UI kit surfaces */
html[data-theme="dark"] .ui-badge-ok { background: #0f2c25; color: #6ee7b7; }
html[data-theme="dark"] .ui-badge-warn { background: #33270f; color: #fcd34d; }
html[data-theme="dark"] .ui-badge-bad { background: #35151d; color: #fda4af; }
html[data-theme="dark"] .ui-error { background: #35151d; border-color: #6b2634; color: #fda4af; }
html[data-theme="dark"] .lc-steps li, html[data-theme="dark"] .lv-m.tbd, html[data-theme="dark"] .pr-tbd { color: #a3b3cd; }
html[data-theme="dark"] .lc-steps .lc-current { color: #8cbcff; }

html[data-theme="dark"] .border-blue-400, html[data-theme="dark"] .border-blue-600 { border-color: #6ea8ff !important; }
html[data-theme="dark"] .text-sky-100 { color: #e0f2fe !important; }

.hs-pill-off { background: #e2e8f0; color: #334155; }
.hs-pill-on { background: #1d63ed; color: #fff; }
html[data-theme="dark"] .hs-pill-off { background: #243049; color: #d6e0f0; }
html[data-theme="dark"] .hs-pill-on { background: #2f6fe4; color: #fff; }
html[data-theme="dark"] .od-preset { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .od-preset span { color: #a9b8d0; }
html[data-theme="dark"] .od-preset.on { background: #12284a; border-color: #4a84ee; }
html[data-theme="dark"] .od-prev { background: #12284a; border-color: #2a3a58; color: #bcd6ff; }
html[data-theme="dark"] .od-adv, html[data-theme="dark"] .od-adv[open] > summary { border-color: #2a3a58; }

html[data-theme="dark"] .od-chips { background: #0b1324; border-color: #2a3a58; }
html[data-theme="dark"] .od-chip { background: #111a2e; border-color: #2a3a58; color: #e6edf7; }
html[data-theme="dark"] .od-chip small { color: #a9b8d0; }
html[data-theme="dark"] .od-chip.on { background: #12284a; border-color: #4a84ee; }
html[data-theme="dark"] .od-ev-h span { background: #243049; color: #cfd9ea; }

