.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;padding:8px 10px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#334155;font:600 12px/20px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.theme-toggle:focus-visible{outline:2px solid var(--brand-primary,#dc2626);outline-offset:3px}
.theme-toggle-track{position:relative;width:30px;height:18px;background:#cbd5e1;border-radius:20px}
.theme-toggle-track::after{content:'';position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background:#fff;transition:transform .2s}
.theme-toggle[aria-checked=true] .theme-toggle-track{background:var(--brand-primary,#dc2626)}
.theme-toggle[aria-checked=true] .theme-toggle-track::after{transform:translateX(12px)}
html[data-theme=dark]{color-scheme:dark;--theme-bg:#0b1220;--theme-panel:#111c2e;--theme-raised:#1b293d;--theme-border:#334155;--theme-text:#e2e8f0;--theme-muted:#a8b5c8}
html[data-theme=dark] body{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme=dark] :is(.bg-white,[class*="bg-white/"],.bg-surface-50,.bg-surface-100,.card,.btn-secondary,.input-field,.theme-toggle){background-color:var(--theme-panel)!important;color:var(--theme-text);border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.bg-surface-200,.bg-surface-300){background-color:var(--theme-raised)!important}
html[data-theme=dark] :is(.text-surface-900,.text-surface-800,.text-surface-700,.text-slate-900,.text-slate-800,.text-slate-700,.text-gray-900,.text-gray-800,.nav-link){color:var(--theme-text)!important}
html[data-theme=dark] :is(.text-surface-600,.text-surface-500,.text-slate-600,.text-slate-500,.text-gray-600,.text-gray-500){color:var(--theme-muted)!important}
html[data-theme=dark] :is(.border-surface-100,.border-surface-200,.border-surface-300,.border-gray-200,.border-slate-200){border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.bg-primary-50,.bg-primary-100){background-color:color-mix(in srgb,var(--brand-primary,#dc2626) 12%,transparent)!important}
html[data-theme=dark] :is(.text-primary-500,.text-primary-600,.text-primary-700,.text-primary-800){color:#fb7185!important}
html[data-theme=dark] .from-primary-50{--tw-gradient-from:color-mix(in srgb,var(--brand-primary,#dc2626) 8%,transparent) var(--tw-gradient-from-position)!important;--tw-gradient-to:transparent var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)!important}
html[data-theme=dark] .to-white{--tw-gradient-to:var(--theme-bg) var(--tw-gradient-to-position)!important}
html[data-theme=dark] .via-white{--tw-gradient-stops:var(--tw-gradient-from),var(--theme-bg) var(--tw-gradient-via-position),var(--tw-gradient-to)!important}
html[data-theme=dark] :is(.from-surface-50,.from-white){--tw-gradient-from:var(--theme-panel) var(--tw-gradient-from-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)!important}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),textarea,select){background-color:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#94a3b8!important}
html[data-theme=dark] :is(.hover\:bg-surface-50,.hover\:bg-surface-100,.hover\:bg-primary-50):hover{background-color:var(--theme-raised)!important}
html[data-theme=dark] :is(.gt_float_switcher,.gt_float_switcher .gt-selected,.gt_float_switcher .gt_options){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.gt_float_switcher .gt-current-lang,.gt_float_switcher .gt_options a){color:var(--theme-text)!important}
html[data-theme=dark] .gt_float_switcher .gt_options a:hover{background:var(--theme-raised)!important}
html[data-theme=dark] :is(.panel,.stat-card,.topbar,.login-card,.button,.cms-save){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.button.primary,.btn-primary){background:var(--brand-primary,#dc2626)!important;color:white!important;border-color:var(--brand-primary,#dc2626)!important}
html[data-theme=dark] :is(.muted,.topbar,.topbar-date,.stat-card span,.stat-card small,td small,.back-link,.admin-footer,label small){color:var(--theme-muted)!important}
html[data-theme=dark] :is(.tracking-link,.topbar strong,.brand.dark,.detail-list dd){color:var(--theme-text)!important}
html[data-theme=dark] :is(th,.filters,.quick-panel,.danger-panel,.login-page){background:var(--theme-raised)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(td,th,.panel-heading,.detail-list div,.form-actions,.cms-field,.topbar){border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.badge,.notice.error){background:color-mix(in srgb,var(--brand-primary,#dc2626) 12%,transparent)!important;color:#fda4af!important}
html[data-theme=dark] :is(.badge.delivered,.notice.success){background:#05966920!important;color:#6ee7b7!important}
html[data-theme=dark] .badge.hold{background:#d9770620!important;color:#fcd34d!important}
html[data-theme=dark] .leaflet-tooltip{background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] ::-webkit-scrollbar-track{background:var(--theme-bg)}
html[data-theme=dark] ::-webkit-scrollbar-thumb{background:#475569}
@media(min-width:1024px){nav .hidden.lg\:flex.items-center.gap-3 .btn-primary,nav .hidden.lg\:flex.items-center.gap-3 .btn-secondary{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){.theme-toggle-track::after{transition:none}}
@media print{html[data-theme=dark] body,html[data-theme=dark] .receipt{background:white!important;color:#111!important}html[data-theme=dark] .receipt :is(h1,p,dt,dd,.brand){color:#111!important}.theme-toggle{display:none!important}}

@media(max-width:1279px){nav .flex.gap-3.mt-4.px-4{flex-wrap:wrap}nav .flex.gap-3.mt-4.px-4 :is(.btn-primary,.btn-secondary){flex:1 1 40%}}
@media(min-width:1280px){nav .hidden.xl\:flex.items-center.gap-3 :is(.btn-primary,.btn-secondary){padding-left:12px;padding-right:12px}}
