:root {
    color-scheme: dark;
    --theme-bg: #030817;
    --theme-bg-strong: #081426;
    --theme-panel: rgba(10, 24, 44, 0.94);
    --theme-panel-soft: rgba(15, 31, 54, 0.88);
    --theme-line: rgba(148, 163, 184, 0.22);
    --theme-ink: #f8fafc;
    --theme-muted: #9fb0c7;
}

:root[data-theme="light"] {
    color-scheme: light;
    --theme-bg: #eef4fb;
    --theme-bg-strong: #fbfdff;
    --theme-panel: rgba(255, 255, 255, 0.96);
    --theme-panel-soft: rgba(248, 250, 252, 0.92);
    --theme-line: rgba(148, 163, 184, 0.24);
    --theme-ink: #0f172a;
    --theme-muted: #64748b;
}

.theme-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 2.45rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 0.58rem 0.82rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
}

.theme-toggle:focus-visible {
    outline: 3px solid rgba(56, 189, 248, 0.38);
    outline-offset: 2px;
}

.theme-toggle__icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.theme-toggle__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.theme-toggle--floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: rgba(5, 15, 32, 0.9);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.back-to-top-button {
    appearance: none;
    position: fixed;
    right: clamp(1rem, 2vw, 1.5rem);
    bottom: clamp(1rem, 2vw, 1.5rem);
    z-index: 60;
    display: inline-flex;
    width: 2.8rem;
    height: 2.8rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 50%;
    background: rgba(8, 23, 44, 0.9);
    color: #93c5fd;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.65rem) scale(0.96);
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.back-to-top-button svg {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
}

.back-to-top-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top-button:hover {
    border-color: rgba(125, 211, 252, 0.62);
    background: rgba(15, 39, 70, 0.96);
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.11);
    transform: translateY(-0.12rem) scale(1.01);
}

.back-to-top-button:focus-visible {
    outline: 3px solid rgba(56, 189, 248, 0.38);
    outline-offset: 3px;
}

:root[data-theme="dark"] body {
    --canvas: #071426;
    --canvas-strong: #0b1b33;
    --ink: var(--theme-ink);
    --muted: var(--theme-muted);
    --line: var(--theme-line);
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.14), transparent 26rem),
        radial-gradient(circle at 86% 12%, rgba(99, 102, 241, 0.13), transparent 24rem),
        radial-gradient(circle at 72% 82%, rgba(20, 184, 166, 0.08), transparent 27rem),
        linear-gradient(135deg, #020617 0%, #071426 48%, #091a31 100%) !important;
    color: var(--theme-ink);
}

:root[data-theme="dark"] body::before {
    opacity: 0.58;
}

:root[data-theme="dark"] body.marketplace-etsy {
    background:
        radial-gradient(circle at 12% 10%, rgba(241, 100, 30, 0.18), transparent 26rem),
        radial-gradient(circle at 86% 12%, rgba(20, 184, 166, 0.13), transparent 24rem),
        radial-gradient(circle at 72% 82%, rgba(168, 85, 247, 0.08), transparent 27rem),
        linear-gradient(135deg, #160b07 0%, #2b160d 48%, #0c2420 100%) !important;
}

:root[data-theme="dark"] body.marketplace-shopify {
    background:
        radial-gradient(circle at 12% 10%, rgba(149, 191, 71, 0.17), transparent 26rem),
        radial-gradient(circle at 86% 12%, rgba(16, 185, 129, 0.12), transparent 24rem),
        radial-gradient(circle at 72% 82%, rgba(56, 189, 248, 0.07), transparent 27rem),
        linear-gradient(135deg, #06110b 0%, #0d2417 48%, #071b20 100%) !important;
}

:root[data-theme="dark"] body :where(input, select, textarea) {
    color-scheme: dark;
}

:root[data-theme="dark"] body :where(input, select, textarea):-webkit-autofill,
:root[data-theme="dark"] body :where(input, select, textarea):-webkit-autofill:hover,
:root[data-theme="dark"] body :where(input, select, textarea):-webkit-autofill:focus {
    -webkit-text-fill-color: #eaf1fb !important;
    -webkit-box-shadow: 0 0 0 1000px #071727 inset !important;
    caret-color: #eaf1fb;
}

:root[data-theme="dark"] body :where(.surface-panel, .premium-card, .admin-stat-tile, .admin-section-card, .user-card, .user-panel, .integration-shell, .integration-sidebar, .integration-settings-card, .integration-secret-card, .secret-block, .probe-row, .app-setting-tile, .permission-card, .group-card) {
    border-color: var(--theme-line) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.97), rgba(8, 21, 39, 0.95)) !important;
    color: var(--theme-ink) !important;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

:root[data-theme="dark"] body :where(.input, .input-shell, .file-drop, .date-input-shell, .search-input-shell, .session-search-shell) {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: rgba(2, 10, 25, 0.62) !important;
    color: #eaf1fb !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

:root[data-theme="dark"] body :where(input, select, textarea)::placeholder {
    color: #71839b !important;
}

:root[data-theme="dark"] body :where(.text-slate-950, .text-slate-900, .text-slate-800, .text-slate-700) {
    color: #f1f5f9 !important;
}

:root[data-theme="dark"] body :where(.text-slate-600, .text-slate-500, .text-slate-400) {
    color: #9fb0c7 !important;
}

:root[data-theme="dark"] body :where(.bg-white, .bg-slate-50, .bg-slate-100) {
    background-color: rgba(15, 31, 54, 0.94) !important;
}

:root[data-theme="dark"] body :where([class~="bg-slate-50/70"], [class~="bg-slate-50/80"], [class~="bg-white/55"], [class~="bg-white/58"], [class~="bg-white/70"]) {
    background: rgba(8, 23, 44, 0.86) !important;
}

:root[data-theme="dark"] body :where(.border-slate-100, .border-slate-200, .border-slate-300) {
    border-color: rgba(148, 163, 184, 0.24) !important;
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .task-runner-quickbar__toggle {
    border-color: rgba(148, 163, 184, 0.3) !important;
    background: rgba(15, 31, 54, 0.92) !important;
    color: #e2e8f0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.18) !important;
}

:root[data-theme="dark"] .app-subnav-shell .tab-link {
    transform: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

:root[data-theme="dark"] .app-subnav-shell .tab-link:hover {
    color: #f8fafc !important;
    background: rgba(51, 65, 85, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

:root[data-theme="dark"] .app-subnav-shell .tab-link.active {
    color: #ffffff !important;
    background: rgba(71, 85, 105, 0.68) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] :where(.category-card, .category-card__controls, .category-live-panel) {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: linear-gradient(180deg, rgba(12, 28, 49, 0.98), rgba(7, 19, 36, 0.98)) !important;
}

:root[data-theme="dark"] .timeline-section {
    border-color: rgba(96, 165, 250, 0.2) !important;
    background:
        linear-gradient(180deg, rgba(10, 27, 48, 0.96), rgba(5, 18, 34, 0.96)) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

:root[data-theme="dark"] .timeline-body {
    background: transparent !important;
}

:root[data-theme="dark"] :where(.category-card__chevron, .node-meta) {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: rgba(11, 28, 50, 0.88) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

:root[data-theme="dark"] :where(.dashboard-session-bar, .task-runner-runtime) {
    color: var(--theme-ink) !important;
}

:root[data-theme="dark"] .dashboard-session-bar {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(8, 23, 44, 0.74) !important;
}

:root[data-theme="dark"] :where(.dashboard-session-bar__value, .task-runner-runtime__value) {
    color: #f8fafc !important;
}

:root[data-theme="dark"] :where(.dashboard-session-bar__label, .task-runner-runtime__label, .task-runner-runtime__detail) {
    color: var(--theme-muted) !important;
}

:root[data-theme="dark"] .node-shell {
    border-color: rgba(var(--cat-accent, 56, 189, 248), 0.24) !important;
    background:
        linear-gradient(120deg, rgba(var(--cat-accent, 37, 99, 235), 0.2), transparent 42%),
        linear-gradient(135deg, rgba(19, 38, 65, 0.98), rgba(8, 22, 41, 0.98)) !important;
}

:root[data-theme="dark"] .node-shell::after {
    opacity: 0.16 !important;
}

:root[data-theme="dark"] :where(.category-progress-panel, .category-live-fetcher) {
    border-color: rgba(96, 165, 250, 0.28) !important;
    background: linear-gradient(135deg, rgba(15, 36, 64, 0.98), rgba(8, 23, 43, 0.98)) !important;
    color: #cbd5e1 !important;
}

:root[data-theme="dark"] .category-live-panel__columns {
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #8394aa !important;
}

:root[data-theme="dark"] .category-live-row {
    border-top-color: rgba(148, 163, 184, 0.12) !important;
    color: #dbe7f5 !important;
    background: linear-gradient(90deg, color-mix(in srgb, var(--batch-row-color, transparent) 18%, transparent), rgba(8, 21, 39, 0.2) 58%) !important;
}

:root[data-theme="dark"] .category-live-row:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--batch-row-color, #334155) 26%, #0b1b32), rgba(15, 35, 60, 0.94) 62%) !important;
}

:root[data-theme="dark"] :where(.category-live-row__order, .category-live-row__name, .category-live-row__name-text, .category-live-row__qty, .meta-stat__value, .admin-stat-value) {
    color: #eef5ff !important;
}

:root[data-theme="dark"] .category-live-row__product-title {
    color: #dbeafe !important;
}

:root[data-theme="dark"] .category-live-row__order-line {
    color: #cbd5e1 !important;
}

:root[data-theme="dark"] .category-live-row__order-text {
    color: #93c5fd !important;
}

:root[data-theme="dark"] .category-live-row__number {
    color: #94a3b8 !important;
}

:root[data-theme="dark"] :where(.meta-stat__label, .category-live-panel__title, .category-live-panel__summary, .category-progress-panel__title, .category-progress-panel__meta, .field-note, .muted-kicker, .file-drop__meta, .admin-stat-meta, .integration-link-subtitle, .permission-subtitle, .brand-subtitle) {
    color: var(--theme-muted) !important;
}

:root[data-theme="dark"] body .password-toggle {
    color: #9fb0c7 !important;
}

:root[data-theme="dark"] body .password-toggle:hover {
    color: #f1f5f9 !important;
}

:root[data-theme="dark"] :where(.file-drop__title, .permission-title, .integration-link-title, .secret-value) {
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.integration-link, .permission-card, .file-drop) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(11, 27, 49, 0.9) !important;
}

:root[data-theme="dark"] :where(table, thead, tbody, tr, th, td) {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

:root[data-theme="dark"] :where(.report-row, .archive-card, .archive-row, .order-result-card, .search-result-card) {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.96), rgba(8, 21, 39, 0.94)) !important;
    color: #eef5ff !important;
}

:root[data-theme="dark"] .session-date {
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.archive-sidebar, .sidebar-head, .workspace-head, .explorer-row, .explorer-row--folder, .confirm-modal__panel) {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.97), rgba(8, 21, 39, 0.95)) !important;
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.tree-link, .crumbs, .crumbs a, .workspace-micro, .explorer-meta, .empty-state, .confirm-modal__message) {
    color: #9fb0c7 !important;
}

:root[data-theme="dark"] :where(.tree-link:hover, .tree-link.active, .crumbs a:hover, .explorer-label, .confirm-modal__title) {
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.tree-link:hover, .tree-link.active, .tertiary-button, .mini-icon-button) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(19, 39, 66, 0.9) !important;
}

:root[data-theme="dark"] :where(.tertiary-button, .mini-icon-button) {
    color: #eaf1fb !important;
}

:root[data-theme="dark"] :where(.trigger-card, .pill, .section) {
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.97), rgba(8, 21, 39, 0.95)) !important;
    color: #eef5ff !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2) !important;
}

:root[data-theme="dark"] :where(.trigger-card, .pill, .section) :where(h1, h2, h3, td) {
    color: #eef5ff !important;
}

:root[data-theme="dark"] .section th {
    background: rgba(2, 10, 25, 0.62) !important;
    color: #9fb0c7 !important;
}

:root[data-theme="dark"] .section td {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

:root[data-theme="dark"] .section tr:hover td {
    background: rgba(30, 50, 78, 0.58) !important;
}

:root[data-theme="dark"] :where(.modal-panel, [class$="-modal__panel"], [class*="-modal__dialog"], [class*="-modal__content"]) {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background: linear-gradient(180deg, #102541, #08172c) !important;
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.login-focus--auth .premium-card, .login-focus--task .premium-card) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.98), rgba(8, 21, 39, 0.97)) !important;
}

:root[data-theme="dark"] .login-focus--auth :where(.auth-form-panel, .auth-input),
:root[data-theme="dark"] .login-focus--task :where(.task-brand-lockup, .task-date-panel, .task-date-picker-shell) {
    border-color: rgba(148, 163, 184, 0.25) !important;
    background: rgba(8, 23, 44, 0.88) !important;
    color: #eef5ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

:root[data-theme="dark"] .login-focus--auth :where(.auth-input, .password-toggle),
:root[data-theme="dark"] .login-focus--task .task-date-input {
    color: #eef5ff !important;
}

:root[data-theme="dark"] .login-focus--auth .auth-kicker {
    border-color: rgba(96, 165, 250, 0.3) !important;
    background: rgba(37, 99, 235, 0.16) !important;
    color: #bfdbfe !important;
}

:root[data-theme="dark"] .login-focus--task .task-date-alert {
    border-color: rgba(96, 165, 250, 0.28) !important;
    background: rgba(37, 99, 235, 0.15) !important;
    color: #bfdbfe !important;
}

:root[data-theme="dark"] .login-focus--task .task-date-secondary {
    border-color: rgba(96, 165, 250, 0.3) !important;
    background: rgba(15, 39, 70, 0.94) !important;
    color: #eaf1fb !important;
}

:root[data-theme="dark"] :where(.report-hero, .report-filter-card, .archive-hero, .archive-filter-card, .search-hero, .glass-bar, .result-card) {
    border-color: rgba(148, 163, 184, 0.23) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.97), rgba(8, 21, 39, 0.95)) !important;
    color: #eef5ff !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

:root[data-theme="dark"] .report-filter-card::before {
    opacity: 0.16 !important;
}

:root[data-theme="dark"] .report-hero > div > div:last-child,
:root[data-theme="dark"] .search-shell > section {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(2, 10, 25, 0.5) !important;
}

:root[data-theme="dark"] .search-shell :where(.glass-bar, .result-card) :where(h1, h2, h3) {
    color: #f8fafc !important;
}

:root[data-theme="dark"] .search-shell :where(.glass-bar, .result-card) p {
    color: #aebdd0 !important;
}

:root[data-theme="dark"] .search-shell .glass-bar > a,
:root[data-theme="dark"] .search-shell .glass-bar > div > a {
    border-color: rgba(148, 163, 184, 0.25) !important;
    background: rgba(15, 39, 70, 0.82) !important;
    color: #eef5ff !important;
}

:root[data-theme="dark"] :where(.category-queue-modal__header, .category-queue-modal__footer) {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

:root[data-theme="dark"] .category-queue-modal__footer {
    background: rgba(5, 17, 33, 0.72) !important;
}

:root[data-theme="dark"] :where(.category-queue-modal__title, .category-queue-option__title, .preset-confirm-modal__title, .preset-confirm-modal__check-title, .task-toast__title) {
    color: #f8fafc !important;
}

:root[data-theme="dark"] :where(.category-queue-modal__copy, .category-queue-modal__count, .category-queue-option__meta, .category-message, .preset-confirm-modal__message, .preset-confirm-modal__check-note, .task-toast__message) {
    color: #aebdd0 !important;
}

:root[data-theme="dark"] :where(.category-queue-option, .category-queue-empty, .preset-confirm-modal__check) {
    border-color: rgba(148, 163, 184, 0.23) !important;
    background: rgba(11, 28, 50, 0.86) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

:root[data-theme="dark"] .category-queue-option:hover {
    border-color: rgba(96, 165, 250, 0.48) !important;
    background: rgba(19, 45, 77, 0.94) !important;
}

:root[data-theme="dark"] .category-queue-option.is-selected {
    border-color: rgba(96, 165, 250, 0.72) !important;
    background: rgba(30, 64, 110, 0.88) !important;
}

:root[data-theme="dark"] .task-toast {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background: linear-gradient(180deg, rgba(15, 31, 54, 0.99), rgba(8, 21, 39, 0.98)) !important;
    color: #eef5ff !important;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34) !important;
}

:root[data-theme="dark"] .task-toast--error {
    border-color: rgba(248, 113, 113, 0.42) !important;
    background: linear-gradient(180deg, rgba(72, 20, 32, 0.98), rgba(31, 15, 27, 0.98)) !important;
}

:root[data-theme="dark"] .task-toast--success {
    border-color: rgba(45, 212, 191, 0.36) !important;
    background: linear-gradient(180deg, rgba(9, 55, 55, 0.98), rgba(6, 31, 38, 0.98)) !important;
}

:root[data-theme="dark"] .task-toast__close {
    border-color: rgba(148, 163, 184, 0.3) !important;
    background: rgba(15, 39, 70, 0.9) !important;
    color: #dbe7f5 !important;
}

:root[data-theme="dark"] audio {
    color-scheme: dark;
}

:root[data-theme="light"] body {
    --canvas: #eef4fb;
    --canvas-strong: #fbfdff;
    --ink: var(--theme-ink);
    --muted: var(--theme-muted);
    --line: var(--theme-line);
    background:
        radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.1), transparent 28rem),
        radial-gradient(circle at 86% 12%, rgba(249, 115, 22, 0.08), transparent 25rem),
        linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%) !important;
    color: var(--theme-ink);
}

:root[data-theme="light"] body::before {
    background: radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.11), transparent 28rem) !important;
    opacity: 0.72;
}

:root[data-theme="light"] body::after {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px) !important;
}

:root[data-theme="light"] body.marketplace-etsy {
    background:
        radial-gradient(circle at 12% 10%, rgba(241, 100, 30, 0.12), transparent 28rem),
        radial-gradient(circle at 86% 12%, rgba(20, 184, 166, 0.08), transparent 25rem),
        linear-gradient(180deg, #fffdfb 0%, #f8f3ef 100%) !important;
}

:root[data-theme="light"] body.marketplace-shopify {
    background:
        radial-gradient(circle at 12% 10%, rgba(149, 191, 71, 0.13), transparent 28rem),
        radial-gradient(circle at 86% 12%, rgba(16, 185, 129, 0.08), transparent 25rem),
        linear-gradient(180deg, #fbfefb 0%, #eef7f1 100%) !important;
}

:root[data-theme="light"] :where(.header-world-clocks, .header-world-clock__time) {
    color: #0f172a !important;
}

:root[data-theme="light"] :where(.header-world-clock__place, .header-world-clock__date) {
    color: #64748b !important;
}

:root[data-theme="light"] :where(.header-world-clock__icon, .header-order-search__shell, .header-order-search__button) {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: rgba(255, 255, 255, 0.84) !important;
    color: #334155 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

:root[data-theme="light"] .header-world-clock + .header-world-clock {
    border-color: rgba(148, 163, 184, 0.24) !important;
}

:root[data-theme="light"] .dashboard-session-bar {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff !important;
}

:root[data-theme="light"] .dashboard-session-bar__value,
:root[data-theme="light"] .task-runner-runtime__value {
    color: #0f172a !important;
}

:root[data-theme="light"] :where(.dashboard-session-bar__label, .task-runner-runtime__label, .task-runner-runtime__detail) {
    color: #64748b !important;
}

:root[data-theme="light"] .dashboard-session-button {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: rgba(248, 250, 252, 0.9) !important;
    color: #334155 !important;
}

:root[data-theme="light"] .back-to-top-button {
    border-color: rgba(147, 197, 253, 0.68);
    background: rgba(255, 255, 255, 0.94);
    color: #1d4ed8;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .header-order-search__input {
    color: #0f172a !important;
}

:root[data-theme="light"] .header-order-search__input::placeholder {
    color: #94a3b8 !important;
}

:root[data-theme="light"] .brand-lockup {
    border-color: rgba(148, 163, 184, 0.25) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

:root[data-theme="light"] .brand-copy > p:first-child {
    color: #64748b !important;
}

:root[data-theme="light"] .brand-copy h1 {
    color: #0f172a !important;
}

:root[data-theme="light"] .brand-subtitle {
    color: #64748b !important;
}

:root[data-theme="light"] :where(.top-nav-link, .global-nav-link, .tab-link) {
    color: #526177 !important;
}

:root[data-theme="light"] :where(.top-nav-link:hover, .global-nav-link:hover, .tab-link:hover, .top-nav-link.active, .global-nav-link.active, .tab-link.active) {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

:root[data-theme="light"] :where(.top-nav-link.logout-link, .global-nav-link.logout-link) {
    color: #b45309 !important;
}

:root[data-theme="light"] .theme-toggle {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.82);
    color: #253044;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .theme-toggle:hover {
    border-color: rgba(100, 116, 139, 0.4);
    background: #ffffff;
}

:root[data-theme="light"] :where(.report-hero, .report-filter-card, .archive-hero, .archive-filter-card, .search-hero) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.92)) !important;
    color: #0f172a !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08) !important;
}

:root[data-theme="light"] :where(.report-row, .archive-card, .archive-row, .order-result-card, .search-result-card) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] :where(.report-hero, .report-filter-card, .archive-hero, .archive-filter-card, .search-hero) :where(h1, h2, h3, p, label, span) {
    color: inherit;
}

:root[data-theme="light"] .report-hero h2 {
    color: #0f172a !important;
}

:root[data-theme="light"] :where(.filter-status-pill, .filter-reset-link, .pagination-shell, .page-link) {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #475569 !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 8px 18px rgba(15, 23, 42, 0.05) !important;
}

:root[data-theme="light"] .page-link.active {
    border-color: rgba(242, 140, 40, 0.48) !important;
    background: #f28c28 !important;
    color: #fff7ed !important;
}

:root[data-theme="light"] .date-field label {
    color: #64748b !important;
}

:root[data-theme="light"] .date-input-shell {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: #ffffff !important;
    color: #334155 !important;
}

:root[data-theme="light"] .date-input-shell input {
    color: #0f172a !important;
    color-scheme: light;
}

:root[data-theme="light"] .report-hero > div > div:last-child {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(255, 255, 255, 0.82) !important;
}

:root[data-theme="light"] .report-hero > div > div:last-child :where(p, span) {
    color: #334155 !important;
}

:root[data-theme="light"] .pagination-shell :where(p, span) {
    color: #475569 !important;
}

:root[data-theme="light"] :where(.glass-bar, .result-card) {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.92)) !important;
    color: #0f172a !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08) !important;
}

:root[data-theme="light"] .search-shell :where(.glass-bar, .result-card) :where(h1, h2, h3) {
    color: #0f172a !important;
}

:root[data-theme="light"] .search-shell :where(.glass-bar, .result-card) p {
    color: #64748b !important;
}

:root[data-theme="light"] .search-shell .glass-bar > a,
:root[data-theme="light"] .search-shell .glass-bar > div > a {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .search-shell > section {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(255, 255, 255, 0.82) !important;
}

:root[data-theme="light"] .search-shell .search-input-shell {
    border-color: rgba(148, 163, 184, 0.3) !important;
    background: #ffffff !important;
}

:root[data-theme="light"] .search-shell .search-input-shell input {
    color: #0f172a !important;
}

:root[data-theme="light"] .taskstation-setup {
    color: #0f172a !important;
}

:root[data-theme="light"] .taskstation-setup > div > div {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0f172a !important;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1) !important;
}

:root[data-theme="light"] .taskstation-setup :where(.text-zinc-100, .text-zinc-200, .text-zinc-300) {
    color: #1e293b !important;
}

:root[data-theme="light"] .taskstation-setup :where(.text-zinc-400, .text-zinc-500) {
    color: #64748b !important;
}

@media (max-width: 720px) {
    .theme-toggle {
        min-width: 2.45rem;
        padding-inline: 0.68rem;
    }

    .theme-toggle__label {
        display: none;
    }

    .back-to-top-button {
        right: 0.9rem;
        bottom: 0.9rem;
        width: 2.55rem;
        height: 2.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .back-to-top-button {
        transition: none;
    }
}
