/* Shared theme layer for all base.html Throne Room pages. */
:root {
    color-scheme: light;
    --throne-bg-dark: #f8fafc;
    --throne-bg-mid: #ffffff;
    --throne-sidebar-bg: #0353a4;
    --throne-accent-blue: #023e7d;
    --throne-accent-gold: #fbbf24;
    --throne-text-primary: #0f172a;
    --throne-text-secondary: #475569;
    --throne-surface: #ffffff;
    --throne-surface-muted: #f8fafc;
    --throne-surface-raised: #ffffff;
    --throne-surface-hover: #f1f5f9;
    --throne-input-bg: #f8fafc;
    --throne-text-muted: #64748b;
    --throne-border: rgba(0, 0, 0, 0.08);
    --throne-body-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --throne-accent-gradient: linear-gradient(135deg, var(--throne-sidebar-bg) 0%, var(--throne-accent-blue) 100%);
    --throne-status-info-bg: #eef6ff;
    --throne-status-info-text: #0353a4;
    --throne-status-success-bg: #ecfdf5;
    --throne-status-success-text: #047857;
    --throne-status-warning-bg: #fffbeb;
    --throne-status-warning-text: #92400e;
    --throne-status-danger-bg: #fff5f5;
    --throne-status-danger-text: #b91c1c;
    --throne-sidebar-surface: var(--throne-sidebar-bg);
    --throne-shadow-soft: 0 14px 34px rgba(15, 40, 83, 0.08);
    --throne-shadow-raised: 0 22px 58px rgba(15, 40, 83, 0.14);
    --throne-focus-ring: rgba(3, 83, 164, 0.22);
}

html[data-throne-theme="dark"] {
    color-scheme: dark;
    --throne-bg-dark: #07111f;
    --throne-bg-mid: #0b1726;
    --throne-sidebar-bg: #28b7c8;
    --throne-sidebar-surface: #07111f;
    --throne-accent-blue: #4f8cff;
    --throne-accent-gold: #f6c350;
    --throne-text-primary: #edf3f8;
    --throne-text-secondary: #a8b5c4;
    --throne-text-muted: #7f8fa1;
    --throne-border: rgba(221, 229, 238, 0.13);
    --throne-body-gradient: #07111f;
    --throne-sidebar-text: #f8fbff;
    --throne-sidebar-text-muted: rgba(226, 236, 245, 0.88);
    --throne-accent-gradient: linear-gradient(135deg, #15a6b8 0%, #3777ff 100%);
    --throne-surface: #101820;
    --throne-surface-muted: #151f29;
    --throne-surface-raised: #17222d;
    --throne-surface-hover: #1d2a36;
    --throne-input-bg: #0d151e;
    --throne-status-info-bg: rgba(40, 183, 200, 0.14);
    --throne-status-info-text: #9becf6;
    --throne-status-success-bg: rgba(94, 224, 162, 0.16);
    --throne-status-success-text: #c4f8dd;
    --throne-status-warning-bg: rgba(246, 195, 80, 0.16);
    --throne-status-warning-text: #ffe8a6;
    --throne-status-danger-bg: rgba(255, 154, 168, 0.14);
    --throne-status-danger-text: #ffd0d7;
    --throne-shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.34);
    --throne-shadow-raised: 0 26px 70px rgba(0, 0, 0, 0.46);
    --throne-focus-ring: rgba(40, 183, 200, 0.24);

    /* Common page-local variable names used by existing and future templates. */
    --surface: var(--throne-surface);
    --surface-hover: var(--throne-surface-hover);
    --surface-soft: var(--throne-surface-muted);
    --border: var(--throne-border);
    --border-hover: rgba(221, 229, 238, 0.22);
    --text-primary: var(--throne-text-primary);
    --text-secondary: var(--throne-text-secondary);
    --text-muted: var(--throne-text-muted);
    --accent: var(--throne-sidebar-bg);
    --accent-blue: var(--throne-sidebar-bg);
    --accent-gradient: var(--throne-accent-gradient);
    --bg-card: var(--throne-surface);
    --bg-input: var(--throne-input-bg);
    --bg-hover: var(--throne-surface-hover);
    --bg-primary: var(--throne-bg-dark);
    --bg-secondary: var(--throne-surface);
    --bg-dark: var(--throne-bg-dark);
    --bg: var(--throne-input-bg);
    --text: var(--throne-text-primary);
    --card-bg: var(--throne-surface);
    --border-color: var(--throne-border);
    --glass-shadow: var(--throne-shadow-soft);
    --accent-emerald: #5ee0a2;
    --accent-rose: #ff9aa8;
    --border-focus: var(--throne-sidebar-bg);
    --shadow-sm: var(--throne-shadow-soft);
    --shadow-md: var(--throne-shadow-raised);

    /* Inventory Manager page-local tokens. */
    --inv-surface: var(--throne-surface);
    --inv-surface-soft: var(--throne-surface-muted);
    --inv-border: var(--throne-border);
    --inv-muted: var(--throne-text-secondary);
    --inv-accent: var(--throne-sidebar-bg);
    --inv-accent-2: var(--throne-accent-blue);
    --inv-green: #5ee0a2;
    --inv-amber: #f6c350;
    --inv-red: #ff9aa8;
    --inv-shadow: var(--throne-shadow-soft);

    /* eBay Analytics page-local tokens. */
    --ea-bg: var(--throne-bg-dark);
    --ea-surface: var(--throne-surface);
    --ea-surface-soft: var(--throne-surface-muted);
    --ea-border: var(--throne-border);
    --ea-text: var(--throne-text-primary);
    --ea-muted: var(--throne-text-secondary);
    --ea-soft: var(--throne-text-muted);
    --ea-soft-text: var(--throne-text-muted);
    --ea-blue: var(--throne-sidebar-bg);
    --ea-blue-dark: #9becf6;
    --ea-gold: #f6c350;
    --ea-green: #5ee0a2;
    --ea-red: #ff9aa8;
    --ea-shadow: var(--throne-shadow-soft);

    /* TCGplayer Repricer page-local tokens. */
    --tcg-surface: var(--throne-surface);
    --tcg-surface-soft: var(--throne-surface-muted);
    --tcg-border: var(--throne-border);
    --tcg-muted: var(--throne-text-secondary);
    --tcg-text: var(--throne-text-primary);
    --tcg-blue: var(--throne-sidebar-bg);
    --tcg-green: #5ee0a2;
    --tcg-amber: #f6c350;
    --tcg-red: #ff9aa8;
    --tcg-shadow: var(--throne-shadow-soft);

    /* Throne UI kit tokens. */
    --tr-blue-900: #c8f7ff;
    --tr-blue-800: #85ddea;
    --tr-blue-700: #28b7c8;
    --tr-blue-600: #34c3dd;
    --tr-blue-100: #133541;
    --tr-blue-050: #0d252f;
    --tr-gold-500: #f6c350;
    --tr-green-700: #5ee0a2;
    --tr-green-100: rgba(94, 224, 162, 0.16);
    --tr-amber-700: #f6c350;
    --tr-amber-100: rgba(246, 195, 80, 0.17);
    --tr-red-700: #ff9aa8;
    --tr-red-100: rgba(255, 154, 168, 0.14);
    --tr-slate-950: #edf3f8;
    --tr-slate-800: #d8e1ea;
    --tr-slate-700: #c5d0dc;
    --tr-slate-600: #a8b5c4;
    --tr-slate-500: #7f8fa1;
    --tr-slate-300: #435262;
    --tr-slate-200: #2c3946;
    --tr-slate-100: #1d2a36;
    --tr-slate-050: #151f29;
    --tr-surface: var(--throne-surface);
    --tr-border: var(--throne-border);
    --tr-shadow-soft: var(--throne-shadow-soft);
    --tr-shadow-raised: var(--throne-shadow-raised);
}

html[data-throne-theme="dark"] body {
    background: var(--throne-body-gradient);
    background-attachment: fixed;
    color: var(--throne-text-primary);
}

/*
   Future-page theme contract:
   - Use throne-theme-surface/card/panel for white card surfaces.
   - Use throne-theme-surface-muted for nested light gray areas.
   - Use throne-theme-input/button-secondary/pill for controls.
   These classes stay correct in light mode and inherit dark mode automatically.
*/
.throne-theme-page {
    background: var(--throne-body-gradient);
    color: var(--throne-text-primary);
}

.throne-theme-surface,
.throne-theme-card,
.throne-theme-panel {
    background: var(--throne-surface);
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
    box-shadow: var(--throne-shadow-soft);
}

.throne-theme-card,
.throne-theme-panel {
    border-radius: 10px;
}

.throne-theme-surface-muted,
.throne-theme-well {
    background: var(--throne-surface-muted);
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
}

.throne-theme-input {
    background: var(--throne-input-bg);
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
}

.throne-theme-button-secondary,
.throne-theme-pill {
    background: var(--throne-surface-muted);
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
}

.throne-theme-text-muted {
    color: var(--throne-text-secondary);
}

.throne-theme-status-info {
    background: var(--throne-status-info-bg);
    color: var(--throne-status-info-text);
}

.throne-theme-status-success {
    background: var(--throne-status-success-bg);
    color: var(--throne-status-success-text);
}

.throne-theme-status-warning {
    background: var(--throne-status-warning-bg);
    color: var(--throne-status-warning-text);
}

.throne-theme-status-danger {
    background: var(--throne-status-danger-bg);
    color: var(--throne-status-danger-text);
}

.account-actions-stack {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
}

.sidebar-action-icon,
.account-actions-stack .settings-btn {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--throne-sidebar-text-muted);
    cursor: pointer;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    margin-left: 0;
    padding: 5px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    width: 30px;
}

.sidebar-action-icon:hover,
.sidebar-action-icon:focus-visible,
.account-actions-stack .settings-btn:hover,
.account-actions-stack .settings-btn:focus-visible {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--throne-accent-gold);
    outline: none;
}

.sidebar-action-icon:active {
    transform: translateY(1px);
}

.theme-toggle-btn svg {
    display: block;
    height: 18px;
    width: 18px;
}

.theme-toggle-icon {
    display: inline-flex;
}

.theme-toggle-icon-sun {
    display: none;
}

html[data-throne-theme="dark"] .theme-toggle-icon-moon {
    display: none;
}

html[data-throne-theme="dark"] .theme-toggle-icon-sun {
    display: inline-flex;
}

html[data-throne-theme="dark"] .throne-sidebar {
    background: var(--throne-sidebar-surface);
    border-right-color: rgba(221, 229, 238, 0.11);
    box-shadow: 9px 0 34px rgba(0, 0, 0, 0.5);
}

html[data-throne-theme="dark"] .sidebar-header,
html[data-throne-theme="dark"] .sidebar-account {
    border-color: rgba(221, 229, 238, 0.1);
}

html[data-throne-theme="dark"] .sidebar-account {
    background: rgba(0, 0, 0, 0.22);
}

html[data-throne-theme="dark"] .nav-divider {
    border-top-color: rgba(221, 229, 238, 0.1);
}

html[data-throne-theme="dark"] .nav-section-label,
html[data-throne-theme="dark"] .account-legal-links a {
    color: rgba(226, 236, 245, 0.74);
}

html[data-throne-theme="dark"] .nav-section-label::after {
    background: rgba(226, 236, 245, 0.12);
}

html[data-throne-theme="dark"] .nav-section-toggle-icon {
    color: rgba(226, 236, 245, 0.84);
}

html[data-throne-theme="dark"] .nav-item:hover:not(.active) {
    background: rgba(221, 229, 238, 0.08);
}

html[data-throne-theme="dark"] .nav-item.active {
    background: linear-gradient(90deg, rgba(40, 183, 200, 0.18), transparent);
    border-left-color: var(--throne-accent-gold);
}

html[data-throne-theme="dark"] .sidebar-toggle {
    background: #0d1820;
    border-color: rgba(221, 229, 238, 0.14);
}

html[data-throne-theme="dark"] .sidebar-toggle:hover {
    background: #16232d;
}

@media (min-width: 1025px) {
    html[data-throne-theme="dark"] body.throne-sidebar-collapsed .sidebar-toggle {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    html[data-throne-theme="dark"] body.throne-sidebar-collapsed .sidebar-toggle:hover,
    html[data-throne-theme="dark"] body.throne-sidebar-collapsed .sidebar-toggle:focus-visible {
        background: rgba(13, 24, 32, 0.92);
        border-color: rgba(221, 229, 238, 0.18);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
    }
}

html[data-throne-theme="dark"] .throne-main,
html[data-throne-theme="dark"] .throne-content-wrapper {
    color: var(--throne-text-primary);
}

body.listing-view-list .throne-main {
    min-height: 100vh !important;
}

html[data-throne-theme="dark"] .topbar {
    background: rgba(16, 24, 32, 0.86);
    border-color: var(--throne-border);
    box-shadow: var(--throne-shadow-soft);
}

html[data-throne-theme="dark"] .topbar-logo,
html[data-throne-theme="dark"] .topbar-nav a:hover,
html[data-throne-theme="dark"] .topbar-stat strong {
    color: var(--throne-sidebar-bg);
}

html[data-throne-theme="dark"] .topbar-nav a:hover {
    background: rgba(40, 183, 200, 0.12);
}

html[data-throne-theme="dark"] :is(
    .throne-card,
    .quick-card,
    .throne-stat-card,
    .throne-table-container,
    .throne-panel,
    .dashboard-command-panel,
    .dashboard-auth-card,
    .dashboard-panel,
    .dashboard-tools,
    .dashboard-metric,
    .dashboard-tool,
    .dashboard-batch-list a,
    .dashboard-loading-row,
    .section,
    .profile-bar,
    .account-settings-box,
    .advanced-pricing-card,
    .advanced-pricing-rules,
    .advanced-pricing-body,
    .card,
    .panel,
    .modal,
    .modal-content,
    .dialog,
    .listing-dialog,
    .list-edit-dialog,
    .export-dialog,
    .direct-merge-dialog,
    .table-card,
    .filter-card,
    .settings-card,
    .config-card,
    .collection-card,
    .search-card,
    .cs-card,
    .cs-view-toggle,
    .cs-pagination-wrap,
    .cs-card-modal-dialog,
    .smooth-select-trigger,
    .smooth-select-panel,
    .smooth-select-search,
    .inventory-panel,
    .inventory-card,
    .inventory-metric,
    .inventory-tabbar,
    .inventory-flow-step,
    .inventory-guide,
    .inventory-guide-card,
    .inventory-review-cluster,
    .inventory-review-cluster-item,
    .inventory-pick-card,
    .inventory-modal-dialog,
    .inventory-modal-choice,
    .inventory-empty,
    .inventory-denied,
    .analytics-card,
    .kpi-card,
    .chart-card,
    .batch-detail-card,
    .analytics-table-card,
    .range-control,
    .series-section,
    .loading-indicator,
    .auth-email-popover,
    .tr-panel,
    dialog
) {
    background: var(--throne-surface) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: var(--throne-shadow-soft) !important;
}

/* Broad legacy coverage for older templates that predate the theme contract. */
html[data-throne-theme="dark"] .throne-main :is(
    article[class*="-card"],
    aside[class*="-card"],
    div[class*="-card"],
    section[class*="-card"],
    article[class*="-panel"],
    aside[class*="-panel"],
    div[class*="-panel"],
    section[class*="-panel"],
    div[class*="-modal"],
    section[class*="-modal"],
    div[class*="-dialog"],
    section[class*="-dialog"],
    div[class*="-drawer"],
    section[class*="-drawer"],
    div[class*="-popover"],
    section[class*="-popover"],
    div[class*="-tooltip"],
    div[class*="-table"],
    section[class*="-table"],
    div[class*="-toolbar"],
    section[class*="-toolbar"],
    div[class*="-well"],
    section[class*="-well"],
    div[class*="-empty"],
    section[class*="-empty"],
    div[class*="-gate"],
    section[class*="-gate"],
    .admin-tab,
    .analytics-select,
    .analytics-loading,
    .buylist-table,
    .rates-table,
    .card-row,
    .collection-row,
    .collection-detail,
    .database-card,
    .detail-empty,
    .dropdown-content,
    .dropdown-menu,
    .filter-bar,
    .filter-chip,
    .filter-panel,
    .filters-bar,
    .filters-panel,
    .limits-pill,
    .queue-row,
    .report-list,
    .report-detail,
    .search-panel,
    .tracking-item,
    .truncation-item,
    .truncation-modal
) {
    background: var(--throne-surface) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    div[class*="-card"]:hover,
    section[class*="-card"]:hover,
    div[class*="-panel"]:hover,
    section[class*="-panel"]:hover,
    .card-row:hover,
    .collection-row:hover,
    .queue-row:hover,
    .report-row:hover
) {
    background: var(--throne-surface-raised) !important;
    border-color: rgba(40, 183, 200, 0.3) !important;
}

html[data-throne-theme="dark"] :is(.throne-card, .quick-card, .dashboard-tool, .card, .panel, .tr-panel):hover {
    background: var(--throne-surface-raised) !important;
    border-color: rgba(40, 183, 200, 0.34) !important;
    box-shadow: var(--throne-shadow-raised) !important;
}

html[data-throne-theme="dark"] .dashboard-command-panel::before {
    background: linear-gradient(180deg, #28b7c8, #5ee0a2 58%, #f6c350);
}

html[data-throne-theme="dark"] :is(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .buylist-title,
    .card-title,
    .dashboard-command-copy h1,
    .dashboard-auth-card h2,
    .dashboard-panel-header h2,
    .dashboard-metric strong,
    .dashboard-tool strong,
    .quick-card-title,
    .throne-page-title,
    .tr-page-title,
    .tr-panel-title
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    div[class*="-title"],
    span[class*="-title"],
    div[class*="-heading"],
    span[class*="-heading"],
    div[class*="-name"],
    span[class*="-name"],
    div[class*="-value"],
    span[class*="-value"],
    div[class*="-amount"],
    span[class*="-amount"],
    div[class*="-count"],
    span[class*="-count"]
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-batch-list a,
    .dashboard-batch-main strong,
    .dashboard-checklist strong,
    .dashboard-empty-row,
    .matching-settings-title,
    .matching-rule-title,
    .cs-results-title,
    .cs-card-name,
    .inventory-header h1,
    .inventory-metric strong,
    .inventory-flow-step strong,
    .inventory-guide-hero h3,
    .inventory-guide-card h4,
    .inventory-panel-header h2,
    .inventory-review-heading strong,
    .inventory-review-cluster-head strong
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(
    p,
    small,
    label,
    figcaption,
    .dashboard-command-copy p,
    .dashboard-panel-header p,
    .dashboard-auth-card p,
    .dashboard-tool small,
    .dashboard-checklist small,
    .dashboard-batch-main small,
    .dashboard-metric span,
    .dashboard-metric small,
    .quick-card-desc,
    .throne-page-subtitle,
    .overview-subtitle,
    .tr-page-copy,
    .tr-panel-copy
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    div[class*="-subtitle"],
    span[class*="-subtitle"],
    div[class*="-subline"],
    span[class*="-subline"],
    div[class*="-description"],
    span[class*="-description"],
    div[class*="-copy"],
    span[class*="-copy"],
    div[class*="-meta"],
    span[class*="-meta"],
    div[class*="-muted"],
    span[class*="-muted"],
    div[class*="-hint"],
    span[class*="-hint"],
    div[class*="-help"],
    span[class*="-help"]
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-batch-main small,
    .dashboard-checklist small,
    .matching-settings-copy,
    .matching-help,
    .matching-filter-status,
    .cs-control-label,
    .cs-affiliate-note,
    .cs-card-set,
    .cs-card-meta,
    .cs-page-info,
    .inventory-header p,
    .inventory-flow-step,
    .inventory-flow-step span,
    .inventory-panel-header p,
    .inventory-guide-hero p,
    .inventory-guide-card li,
    .inventory-review-heading span,
    .inventory-review-cluster-head span,
    .inventory-modal-dialog p,
    .inventory-modal-choice span,
    .inventory-sub,
    .inventory-status
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-primary-action,
    .tr-button-primary,
    .login-btn,
    .billing-action-button[data-billing-action="manage"]
) {
    background: var(--throne-accent-gradient) !important;
    border-color: rgba(40, 183, 200, 0.38) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(40, 183, 200, 0.2) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-secondary-action,
    .throne-filter-btn,
    .tr-button-secondary,
    .tr-button-plain,
    .auth-email-popover-secondary
) {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-secondary-action,
    .throne-filter-btn,
    .tr-button-secondary,
    .tr-button-plain,
    .auth-email-popover-secondary
):hover {
    background: var(--throne-surface-hover) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .analytics-tf-btn,
    .btn-dismiss,
    .filter-btn,
    .load-more,
    .missing-specific-input,
    .pagination-btn,
    .tab-btn,
    .truncation-btn-secondary,
    .view-btn,
    button[class*="-secondary"],
    button[class*="-tab"]:not(.active),
    button[class*="-filter"]:not(.active),
    button[class*="-toggle"]:not(.active),
    button[class*="-page"],
    button[class*="-dismiss"],
    input[class*="-input"],
    select[class*="-select"],
    textarea[class*="-input"]
) {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: none !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .analytics-tf-btn:hover,
    .btn-dismiss:hover,
    .filter-btn:hover,
    .load-more:hover,
    .pagination-btn:hover,
    .tab-btn:hover,
    .truncation-btn-secondary:hover,
    .view-btn:hover,
    button[class*="-secondary"]:hover,
    button[class*="-tab"]:not(.active):hover,
    button[class*="-filter"]:not(.active):hover,
    button[class*="-toggle"]:not(.active):hover,
    button[class*="-page"]:hover,
    button[class*="-dismiss"]:hover
) {
    background: var(--throne-surface-hover) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [class*="-pill"],
    [class*="-badge"],
    [class*="-tag"],
    [class*="-chip"]
) {
    border-color: rgba(40, 183, 200, 0.24) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .status-pill.staged,
    .limits-pill.unknown,
    [class*="-pill"].info,
    [class*="-badge"].info,
    [class*="-tag"].info,
    [class*="-chip"].info
) {
    background: var(--throne-status-info-bg) !important;
    color: var(--throne-status-info-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .status-pill.listed,
    [class*="-pill"].success,
    [class*="-badge"].success,
    [class*="-tag"].success,
    [class*="-chip"].success
) {
    background: var(--throne-status-success-bg) !important;
    color: var(--throne-status-success-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [class*="-pill"].warning,
    [class*="-badge"].warning,
    [class*="-tag"].warning,
    [class*="-chip"].warning
) {
    background: var(--throne-status-warning-bg) !important;
    color: var(--throne-status-warning-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [class*="-pill"].error,
    [class*="-pill"].danger,
    [class*="-badge"].error,
    [class*="-badge"].danger,
    [class*="-tag"].error,
    [class*="-tag"].danger,
    [class*="-chip"].error,
    [class*="-chip"].danger
) {
    background: var(--throne-status-danger-bg) !important;
    color: var(--throne-status-danger-text) !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-btn.primary,
    .inventory-tab.active,
    .inventory-tab-start.active,
    .cs-view-btn.active
) {
    background: var(--throne-accent-gradient) !important;
    border-color: rgba(40, 183, 200, 0.38) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(40, 183, 200, 0.2) !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-btn.secondary,
    .inventory-tab,
    .inventory-connection,
    .matching-clear-btn,
    .cs-view-btn,
    .cs-page-btn,
    .cs-modal-close,
    .smooth-select-option,
    .cs-variant-chip,
    .cs-cond-chip
) {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-btn.secondary,
    .matching-clear-btn,
    .cs-view-btn,
    .cs-page-btn,
    .smooth-select-option,
    .cs-variant-chip,
    .cs-cond-chip
):hover:not(:disabled) {
    background: var(--throne-surface-hover) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(button, .inventory-btn, .matching-clear-btn, .cs-page-btn):disabled {
    background: #16212b !important;
    border-color: rgba(221, 229, 238, 0.1) !important;
    color: #91a0af !important;
    opacity: 1 !important;
}

html[data-throne-theme="dark"] :is(
    input,
    select,
    textarea,
    .throne-input,
    .tr-field-control
) {
    background-color: var(--throne-input-bg) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(input, select, textarea, .throne-input, .tr-field-control)::placeholder {
    color: var(--throne-text-muted) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .bg-white,
    .bg-gray-50,
    .bg-gray-100,
    .bg-gray-200,
    .bg-slate-50,
    .bg-slate-100
) {
    background-color: var(--throne-surface) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .bg-gray-50\/60,
    .bg-gray-50\/80,
    .bg-slate-50\/60,
    .bg-slate-50\/80
) {
    background-color: var(--throne-surface-muted) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.bg-blue-50, .bg-blue-100) {
    background-color: var(--throne-status-info-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.bg-green-50, .bg-green-100) {
    background-color: var(--throne-status-success-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.bg-orange-50, .bg-orange-100, .bg-amber-50, .bg-amber-100) {
    background-color: var(--throne-status-warning-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .bg-\[\#fbbf24\]\/10,
    .bg-\[\#fbbf24\]\/20
) {
    background-color: var(--throne-status-warning-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.bg-red-50, .bg-red-100) {
    background-color: var(--throne-status-danger-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .border-gray-200,
    .border-gray-300,
    .border-slate-200,
    .border-slate-300
) {
    border-color: var(--throne-border) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .border-blue-200,
    .border-green-200,
    .border-orange-200,
    .border-amber-200,
    .border-red-200,
    .border-\[\#fbbf24\],
    .border-\[\#fbbf24\]\/40,
    .border-\[\#fbbf24\]\/50
) {
    border-color: var(--throne-border) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .text-slate-900,
    .text-slate-800,
    .text-slate-700,
    .text-gray-900,
    .text-gray-800,
    .text-gray-700
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .text-slate-600,
    .text-slate-500,
    .text-gray-600,
    .text-gray-500
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .text-blue-600,
    .text-blue-700,
    .text-blue-800,
    .text-\[\#0353A4\]
) {
    color: var(--throne-sidebar-bg) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.text-green-600, .text-green-700, .text-green-800) {
    color: var(--throne-status-success-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.text-orange-600, .text-orange-700, .text-orange-800, .text-\[\#f59e0b\]) {
    color: var(--throne-status-warning-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.text-\[\#b45309\], .text-\[\#fbbf24\]) {
    color: var(--throne-status-warning-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(.text-red-500, .text-red-600, .text-red-700) {
    color: var(--throne-status-danger-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .collection-summary,
    .collection-tools,
    .collection-tab-row,
    .collection-stat,
    .collection-tier-range,
    .collection-detail-tab,
    .collection-tab-delete,
    .collection-tier-remove,
    .collection-remove,
    .collections-modal-card
) {
    background: var(--throne-surface) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .collection-thumb,
    .collection-notes,
    .collection-name-input,
    .collection-toolbar-select,
    .collection-item-select,
    .collection-qty-input,
    .collection-planning-input,
    .collection-setting-input,
    .collection-tier-input,
    .collection-mobile-picker select
) {
    background: var(--throne-input-bg) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main .collections-action.secondary {
    background: var(--throne-surface-muted) !important;
    border-color: rgba(40, 183, 200, 0.34) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .throne-main .collections-action.danger {
    background: var(--throne-status-danger-bg) !important;
    border-color: rgba(255, 154, 168, 0.28) !important;
    color: var(--throne-status-danger-text) !important;
}

html[data-throne-theme="dark"] .inventory-code,
html[data-throne-theme="dark"] .inventory-location {
    background: rgba(40, 183, 200, 0.14) !important;
    border: 1px solid rgba(40, 183, 200, 0.28) !important;
    color: #9becf6 !important;
    box-shadow: none !important;
}

html[data-throne-theme="dark"] .inventory-pill {
    background: rgba(168, 181, 196, 0.13) !important;
    border: 1px solid rgba(221, 229, 238, 0.14) !important;
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .inventory-pill.green {
    background: var(--throne-status-success-bg) !important;
    border-color: rgba(94, 224, 162, 0.34) !important;
    color: var(--throne-status-success-text) !important;
}

html[data-throne-theme="dark"] .inventory-pill.amber,
html[data-throne-theme="dark"] .inventory-location.reserved {
    background: var(--throne-status-warning-bg) !important;
    border-color: rgba(246, 195, 80, 0.3) !important;
    color: var(--throne-status-warning-text) !important;
}

html[data-throne-theme="dark"] .inventory-pill.red {
    background: var(--throne-status-danger-bg) !important;
    border-color: rgba(255, 154, 168, 0.3) !important;
    color: var(--throne-status-danger-text) !important;
}

html[data-throne-theme="dark"] .inventory-pill.blue {
    background: var(--throne-status-info-bg) !important;
    border-color: rgba(40, 183, 200, 0.3) !important;
    color: var(--throne-status-info-text) !important;
}

html[data-throne-theme="dark"] .inventory-location.picked {
    background: rgba(168, 181, 196, 0.13) !important;
    border-color: rgba(221, 229, 238, 0.12) !important;
    color: var(--throne-text-muted) !important;
}

html[data-throne-theme="dark"] .inventory-location-action {
    border-left-color: rgba(221, 229, 238, 0.16) !important;
    color: #ffd0d7 !important;
}

html[data-throne-theme="dark"] .stock-search-input {
    background: #0b121a !important;
    border-color: rgba(221, 229, 238, 0.24) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

html[data-throne-theme="dark"] .stock-result-row {
    background: linear-gradient(135deg, rgba(23, 34, 45, 0.96) 0%, rgba(13, 21, 30, 0.98) 100%) !important;
    border-color: rgba(221, 229, 238, 0.14) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

html[data-throne-theme="dark"] .stock-result-row:hover {
    border-color: rgba(40, 183, 200, 0.34) !important;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

html[data-throne-theme="dark"] .stock-result-title {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .stock-result-meta,
html[data-throne-theme="dark"] .stock-result-meta-item {
    color: #c9d4df !important;
}

html[data-throne-theme="dark"] .stock-result-meta-separator {
    color: rgba(201, 212, 223, 0.42) !important;
}

html[data-throne-theme="dark"] .stock-result-price {
    color: #5ee7f3 !important;
}

html[data-throne-theme="dark"] .stock-result-image {
    background: #0b121a !important;
    border-color: rgba(221, 229, 238, 0.18) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

html[data-throne-theme="dark"] .stock-result-placeholder,
html[data-throne-theme="dark"] .stock-empty-state {
    background: rgba(21, 31, 41, 0.84) !important;
    border-color: rgba(221, 229, 238, 0.16) !important;
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .stock-result-select,
html[data-throne-theme="dark"] .stock-result-qty {
    background: #0b121a !important;
    border-color: rgba(221, 229, 238, 0.18) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

html[data-throne-theme="dark"] .stock-result-select:focus,
html[data-throne-theme="dark"] .stock-result-qty:focus {
    border-color: rgba(40, 183, 200, 0.56) !important;
    box-shadow: 0 0 0 3px rgba(40, 183, 200, 0.16);
    outline: none;
}

html[data-throne-theme="dark"] .stock-result-select option {
    background: #0b121a;
    color: var(--throne-text-primary);
}

html[data-throne-theme="dark"] .batch-status-tabs,
html[data-throne-theme="dark"] .batch-card,
html[data-throne-theme="dark"] .empty-state {
    background: var(--throne-surface) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: var(--throne-shadow-soft) !important;
}

html[data-throne-theme="dark"] .batch-card.status-listed {
    background: linear-gradient(90deg, rgba(94, 224, 162, 0.14) 0, rgba(23, 34, 45, 0.98) 78px, rgba(16, 24, 32, 0.98) 100%) !important;
    border-color: rgba(94, 224, 162, 0.26) !important;
}

html[data-throne-theme="dark"] .batch-card:hover,
html[data-throne-theme="dark"] .batch-card.selected {
    background: var(--throne-surface-raised) !important;
    border-color: rgba(40, 183, 200, 0.36) !important;
    box-shadow: var(--throne-shadow-raised) !important;
}

html[data-throne-theme="dark"] .batch-name,
html[data-throne-theme="dark"] .batch-name span,
html[data-throne-theme="dark"] .batch-page-current,
html[data-throne-theme="dark"] .empty-state h3 {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .batch-meta,
html[data-throne-theme="dark"] .batch-page-info,
html[data-throne-theme="dark"] .selection-count,
html[data-throne-theme="dark"] .empty-state p {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .batch-meta-icon,
html[data-throne-theme="dark"] .btn-rename,
html[data-throne-theme="dark"] .empty-state-icon {
    color: var(--throne-text-muted) !important;
}

html[data-throne-theme="dark"] .batch-preview,
html[data-throne-theme="dark"] .game-tag {
    background: #0b121a !important;
    border-color: rgba(221, 229, 238, 0.16) !important;
    color: #d6e0ea !important;
    box-shadow: none !important;
}

html[data-throne-theme="dark"] .batch-preview-placeholder {
    color: var(--throne-text-muted) !important;
}

html[data-throne-theme="dark"] .batch-status-tab {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .batch-status-tab:not(.active):hover {
    background: var(--throne-surface-hover) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .batch-page-btn,
html[data-throne-theme="dark"] .btn-secondary,
html[data-throne-theme="dark"] .btn-stage {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
    box-shadow: var(--throne-shadow-soft) !important;
}

html[data-throne-theme="dark"] .batch-page-btn:hover:not(:disabled),
html[data-throne-theme="dark"] .btn-secondary:hover,
html[data-throne-theme="dark"] .btn-stage:hover {
    background: var(--throne-surface-hover) !important;
    border-color: rgba(40, 183, 200, 0.34) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .btn-listed,
html[data-throne-theme="dark"] .status-pill.listed {
    background: rgba(94, 224, 162, 0.16) !important;
    border-color: rgba(94, 224, 162, 0.34) !important;
    color: #c4f8dd !important;
}

html[data-throne-theme="dark"] .status-pill.staged {
    background: rgba(40, 183, 200, 0.14) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .btn-danger-icon {
    background: rgba(255, 154, 168, 0.14) !important;
    border-color: rgba(255, 154, 168, 0.32) !important;
    color: #ffd0d7 !important;
}

html[data-throne-theme="dark"] .btn-danger-icon:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

html[data-throne-theme="dark"] .batch-name input {
    background: #0b121a !important;
    border-color: rgba(221, 229, 238, 0.18) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] :is(input, select, textarea, button, a, [tabindex]):focus-visible {
    outline-color: var(--throne-focus-ring);
}

html[data-throne-theme="dark"] :is(
    .throne-table th,
    .tr-table th,
    table th
) {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-sidebar-bg) !important;
}

html[data-throne-theme="dark"] :is(
    .throne-table td,
    .tr-table td,
    table td
) {
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary);
}

html[data-throne-theme="dark"] :is(.throne-table tr:hover td, .tr-table tr:hover td, table tr:hover td) {
    background: rgba(40, 183, 200, 0.08) !important;
}

html[data-throne-theme="dark"] .throne-table th.sortable:hover {
    background: var(--throne-surface-hover) !important;
}

html[data-throne-theme="dark"] .quick-card-icon,
html[data-throne-theme="dark"] .dashboard-tool-icon,
html[data-throne-theme="dark"] .overview-badge {
    background: rgba(40, 183, 200, 0.13) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: var(--throne-sidebar-bg) !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-panel-header a,
    .dashboard-status-listed,
    .dashboard-batch-status,
    .inventory-metric span,
    .inventory-guide-rule span,
    .inventory-guide-kicker,
    .inventory-tab-start,
    .cs-results-count,
    .cs-variant-chip.active,
    .cs-cond-chip.active
) {
    background: rgba(40, 183, 200, 0.14) !important;
    border-color: rgba(40, 183, 200, 0.26) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-checklist span,
    .dashboard-batch-preview,
    .inventory-flow-count
) {
    background: rgba(40, 183, 200, 0.12) !important;
    border-color: rgba(40, 183, 200, 0.24) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] :is(
    .dashboard-checklist li.is-complete span,
    .inventory-connection.ready
) {
    background: rgba(94, 224, 162, 0.18) !important;
    border-color: rgba(94, 224, 162, 0.34) !important;
    color: #c4f8dd !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-connection.warning,
    .inventory-flow-step.has-work .inventory-flow-count,
    .inventory-status.warning
) {
    background: rgba(246, 195, 80, 0.16) !important;
    border-color: rgba(246, 195, 80, 0.28) !important;
    color: #ffe8a6 !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-connection.error,
    .inventory-status.error
) {
    background: rgba(255, 154, 168, 0.14) !important;
    border-color: rgba(255, 154, 168, 0.28) !important;
    color: #ffd0d7 !important;
}

html[data-throne-theme="dark"] :is(
    .inventory-flow-step.active,
    .inventory-flow-step.active.has-work,
    .inventory-flow-step.has-work,
    .inventory-panel-header,
    .inventory-toolbar,
    .inventory-review-section,
    .inventory-review-heading,
    .inventory-review-clusters,
    .inventory-pick-mobile-sticky,
    .inventory-guide-hero,
    .inventory-guide-card.is-critical,
    .cs-card-img-wrap,
    .cs-modal-image-frame,
    .smooth-select-search-input:focus
) {
    background: var(--throne-surface-muted) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .inventory-guide-rule {
    background: linear-gradient(135deg, #101827 0%, #17233a 100%) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .toggle {
    background: #25313d !important;
    border: 1px solid rgba(221, 229, 238, 0.16);
}

html[data-throne-theme="dark"] .toggle::after {
    background: #dce8f3 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

html[data-throne-theme="dark"] .toggle.active {
    background: var(--throne-accent-gradient) !important;
    border-color: rgba(40, 183, 200, 0.36);
}

html[data-throne-theme="dark"] .billing-action-button[data-billing-action="upgrade"] {
    background: linear-gradient(135deg, #ff9d45 0%, #f36c21 100%) !important;
    border-color: rgba(255, 157, 69, 0.48) !important;
}

html[data-throne-theme="dark"] .billing-action-error {
    background: rgba(127, 29, 29, 0.58);
    border-color: rgba(248, 113, 113, 0.42);
    color: #fecaca;
}

html[data-throne-theme="dark"] .billing-action-error[data-type="info"] {
    background: rgba(8, 47, 73, 0.68);
    border-color: rgba(56, 189, 248, 0.34);
    color: #bae6fd;
}

html[data-throne-theme="dark"] .auth-email-popover-close,
html[data-throne-theme="dark"] .scope-btn,
html[data-throne-theme="dark"] .range-btn,
html[data-throne-theme="dark"] .pricing-tabs,
html[data-throne-theme="dark"] .pricing-tab-btn,
html[data-throne-theme="dark"] .store-category-new-btn {
    background: var(--throne-surface-muted) !important;
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .auth-email-popover-status.info {
    background: rgba(40, 183, 200, 0.14);
    border-color: rgba(40, 183, 200, 0.28);
    color: #b8f5ff;
}

html[data-throne-theme="dark"] .auth-email-popover-status.success {
    background: rgba(94, 224, 162, 0.14);
    border-color: rgba(94, 224, 162, 0.28);
    color: #c4f8dd;
}

html[data-throne-theme="dark"] .auth-email-popover-status.error {
    background: rgba(255, 154, 168, 0.14);
    border-color: rgba(255, 154, 168, 0.28);
    color: #ffd0d7;
}

html[data-throne-theme="dark"] .throne-skeleton-bar {
    background: linear-gradient(90deg, rgba(127, 143, 161, 0.12) 25%, rgba(168, 181, 196, 0.24) 50%, rgba(127, 143, 161, 0.12) 75%);
    background-size: 800px 100%;
}

html[data-throne-theme="dark"] .dashboard-skeleton,
html[data-throne-theme="dark"] .dashboard-home.is-dashboard-loading .dashboard-metric strong::before,
html[data-throne-theme="dark"] .dashboard-home.is-dashboard-loading .dashboard-metric small::before,
html[data-throne-theme="dark"] .dashboard-home.is-dashboard-loading [data-dashboard-recent-note]::before,
html[data-throne-theme="dark"] .dashboard-home.is-value-loading [data-dashboard-batch-count]::before,
html[data-throne-theme="dark"] .dashboard-home.is-value-loading [data-dashboard-batch-note]::before,
html[data-throne-theme="dark"] .dashboard-home.is-value-loading [data-dashboard-batch-value]::before,
html[data-throne-theme="dark"] .dashboard-home.is-value-loading [data-dashboard-value-note]::before {
    background: linear-gradient(90deg, rgba(127, 143, 161, 0.12) 0%, rgba(168, 181, 196, 0.24) 45%, rgba(127, 143, 161, 0.12) 100%) !important;
    background-size: 220% 100%;
}

html[data-throne-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(226, 236, 245, 0.16);
}

html[data-throne-theme="dark"] .sidebar-nav:hover::-webkit-scrollbar-thumb {
    background-color: rgba(226, 236, 245, 0.28);
}

/* Last-resort coverage for legacy inline light styles in older templates. */
html[data-throne-theme="dark"] .throne-main :is(
    [style*="background: #fff"],
    [style*="background:#fff"],
    [style*="background: #ffffff"],
    [style*="background:#ffffff"],
    [style*="background: #FFFFFF"],
    [style*="background:#FFFFFF"],
    [style*="background: white"],
    [style*="background:white"],
    [style*="background-color: #fff"],
    [style*="background-color:#fff"],
    [style*="background-color: #ffffff"],
    [style*="background-color:#ffffff"],
    [style*="background-color: #FFFFFF"],
    [style*="background-color:#FFFFFF"],
    [style*="background-color: white"],
    [style*="background-color:white"]
),
html[data-throne-theme="dark"] body > dialog:is(
    [style*="background: #fff"],
    [style*="background:#fff"],
    [style*="background: #ffffff"],
    [style*="background:#ffffff"],
    [style*="background: #FFFFFF"],
    [style*="background:#FFFFFF"]
) {
    background: var(--throne-surface) !important;
    background-color: var(--throne-surface) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .analytics-scope-panel,
    .accuracy-panel,
    .bulk-command-actions,
    .bulk-field-actions,
    .bulk-title-actions,
    .chart-stat,
    .description-preview-frame,
    .direct-ebay-dock,
    .ea-sync-progress,
    .inventory-action-progress,
    .inventory-publish-summary,
    .inventory-publish-summary div,
    .inventory-sync-stats div,
    .list-bottom-actions,
    .lv-ebay-cell,
    .math-content,
    .price-basis-control,
    .spread-container,
    .tag-builder,
    .tag-chip.literal,
    .tcg-table,
    .title-preview-container,
    .title-truncate-action,
    .title-truncate-settings,
    [style*="background: #f8fafc"],
    [style*="background:#f8fafc"],
    [style*="background: #f9fafb"],
    [style*="background:#f9fafb"],
    [style*="background: #f3f4f6"],
    [style*="background:#f3f4f6"],
    [style*="background: #f1f5f9"],
    [style*="background:#f1f5f9"],
    [style*="background: #e2e8f0"],
    [style*="background:#e2e8f0"],
    [style*="background-color: #f8fafc"],
    [style*="background-color:#f8fafc"],
    [style*="background-color: #f9fafb"],
    [style*="background-color:#f9fafb"],
    [style*="background-color: #f3f4f6"],
    [style*="background-color:#f3f4f6"],
    [style*="background-color: #f1f5f9"],
    [style*="background-color:#f1f5f9"],
    [style*="background-color: #e2e8f0"],
    [style*="background-color:#e2e8f0"]
) {
    background: var(--throne-surface-muted) !important;
    background-color: var(--throne-surface-muted) !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock {
    border-color: rgba(221, 229, 238, 0.16) !important;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.48) !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock-icon {
    background: rgba(40, 183, 200, 0.14) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock.is-warning .direct-ebay-dock-icon {
    background: rgba(246, 195, 80, 0.16) !important;
    color: #ffe8a6 !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock.is-complete .direct-ebay-dock-icon {
    background: rgba(94, 224, 162, 0.16) !important;
    color: #c4f8dd !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock-progress {
    background: rgba(221, 229, 238, 0.14) !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock-actions button {
    background: var(--throne-input-bg) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock-actions button:hover:not(:disabled) {
    border-color: rgba(40, 183, 200, 0.34) !important;
    color: #9becf6 !important;
    background: var(--throne-surface-hover) !important;
}

html[data-throne-theme="dark"] .throne-main .direct-ebay-dock-actions button:disabled {
    color: var(--throne-text-muted) !important;
    opacity: 0.72;
}

html[data-throne-theme="dark"] .throne-main :is(
    #titleLength,
    .advanced-pricing-rule,
    .card-item,
    .card-nav-position,
    .description-preview-container,
    .matching-reprint-row,
    .matching-rule-group,
    .matching-rule-group textarea,
    .matching-set-add,
    .matching-set-select,
    .matching-selected-chip,
    .matching-selected-chip button,
    .ea-btn,
    .ea-date-range,
    .ea-input,
    .ea-page-btn,
    .ea-range-tabs,
    .ea-select,
    .ea-sync-progress-track,
    .lv-ebay-box,
    .lv-ebay-check,
    .lv-price.lv-input-control,
    .lv-select,
    .lv-text-input,
    .modal-card-position,
    .scan-mode,
    .set-code,
    .tcg-btn,
    .tcg-check,
    .tcg-input,
    .tcg-row-status,
    .tcg-select,
    .tcg-table th,
    .advanced-rule-add,
    .advanced-rule-remove,
    .matching-clear-btn,
    .topbar-batch-field,
    .topbar-batch-icon-button.add,
    .topbar-batch-icon-button.readiness,
    .topbar-batch-icon-button.direct-ebay.direct-ebay-locked,
    .title-truncate-buttons button
) {
    background: var(--throne-input-bg) !important;
    background-color: var(--throne-input-bg) !important;
    border-color: var(--throne-border) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .topbar-batch-field input[type="text"]
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .topbar-field-kicker
) {
    background: rgba(40, 183, 200, 0.14) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .throne-main .lv-price.lv-input-control:focus-within {
    background: var(--throne-input-bg) !important;
    border-color: rgba(40, 183, 200, 0.52) !important;
    box-shadow: 0 0 0 2px rgba(40, 183, 200, 0.18) !important;
}

html[data-throne-theme="dark"] .throne-main .lv-price.lv-market-display {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html[data-throne-theme="dark"] .throne-main .lv-price input:focus {
    outline: none !important;
    box-shadow: none !important;
    caret-color: #9becf6;
}

html[data-throne-theme="dark"] .throne-main :is(
    .card-item:hover,
    .ea-btn:hover:not(:disabled),
    .ea-page-btn:hover:not(:disabled),
    .lv-ebay-price-chip:hover,
    .lv-ebay-check:hover:not(:disabled),
    .lv-ebay-result:hover,
    .lv-ebay-refresh:hover,
    .scan-mode-btn:hover,
    .tcg-btn:hover:not(:disabled),
    .topbar-batch-icon-button.add:hover:not(:disabled),
    .topbar-batch-icon-button.readiness:hover:not(:disabled),
    .topbar-batch-icon-button.direct-ebay.direct-ebay-locked:hover:not(:disabled),
    .tooltip-trigger:hover
) {
    background: var(--throne-surface-hover) !important;
    background-color: var(--throne-surface-hover) !important;
    border-color: rgba(40, 183, 200, 0.28) !important;
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .bulk-field-actions::before,
    .bulk-price-prefix,
    .bulk-tool-label,
    .chart-stat-label,
    .chart-stat-value,
    .ea-card span,
    .ea-card strong,
    .ea-card em,
    .lv-ebay-check,
    .lv-ebay-price,
    .price-basis-btn,
    .spread-label,
    .tcg-empty,
    .tcg-panel-head h2,
    .tcg-repricer-title h1,
    .tcg-repricer-title p
) {
    color: inherit !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .lv-ebay-check,
    .lv-ebay-price,
    .lv-ebay-price-chip,
    .lv-ebay-refresh,
    .price-basis-btn.active,
    .tcg-table th,
    .tooltip-trigger
) {
    color: #9becf6 !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .chart-stat-value,
    .ea-card strong,
    .tcg-repricer-title h1
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    .chart-stat-label,
    .ea-card span,
    .ea-card em,
    .spread-label,
    .tcg-empty,
    .tcg-repricer-title p
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="background: #eef6ff"],
    [style*="background:#eef6ff"],
    [style*="background: #dbeafe"],
    [style*="background:#dbeafe"],
    [style*="background-color: #eef6ff"],
    [style*="background-color:#eef6ff"],
    [style*="background-color: #dbeafe"],
    [style*="background-color:#dbeafe"]
) {
    background: var(--throne-status-info-bg) !important;
    background-color: var(--throne-status-info-bg) !important;
    color: var(--throne-status-info-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="background: #ecfdf5"],
    [style*="background:#ecfdf5"],
    [style*="background: #d1fae5"],
    [style*="background:#d1fae5"],
    [style*="background-color: #ecfdf5"],
    [style*="background-color:#ecfdf5"],
    [style*="background-color: #d1fae5"],
    [style*="background-color:#d1fae5"]
) {
    background: var(--throne-status-success-bg) !important;
    background-color: var(--throne-status-success-bg) !important;
    color: var(--throne-status-success-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="background: #fffbeb"],
    [style*="background:#fffbeb"],
    [style*="background: #fff7ed"],
    [style*="background:#fff7ed"],
    [style*="background: #fffaf0"],
    [style*="background:#fffaf0"],
    [style*="background-color: #fffbeb"],
    [style*="background-color:#fffbeb"],
    [style*="background-color: #fff7ed"],
    [style*="background-color:#fff7ed"],
    [style*="background-color: #fffaf0"],
    [style*="background-color:#fffaf0"]
) {
    background: var(--throne-status-warning-bg) !important;
    background-color: var(--throne-status-warning-bg) !important;
    color: var(--throne-status-warning-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="background: #fff5f5"],
    [style*="background:#fff5f5"],
    [style*="background: #fff7f7"],
    [style*="background:#fff7f7"],
    [style*="background: #fee2e2"],
    [style*="background:#fee2e2"],
    [style*="background-color: #fff5f5"],
    [style*="background-color:#fff5f5"],
    [style*="background-color: #fff7f7"],
    [style*="background-color:#fff7f7"],
    [style*="background-color: #fee2e2"],
    [style*="background-color:#fee2e2"]
) {
    background: var(--throne-status-danger-bg) !important;
    background-color: var(--throne-status-danger-bg) !important;
    color: var(--throne-status-danger-text) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="color: #071b3d"],
    [style*="color:#071b3d"],
    [style*="color: #0f172a"],
    [style*="color:#0f172a"],
    [style*="color: #1e293b"],
    [style*="color:#1e293b"],
    [style*="color: #334155"],
    [style*="color:#334155"]
),
html[data-throne-theme="dark"] body > dialog :is(
    [style*="color: #071b3d"],
    [style*="color:#071b3d"],
    [style*="color: #0f172a"],
    [style*="color:#0f172a"],
    [style*="color: #1e293b"],
    [style*="color:#1e293b"],
    [style*="color: #334155"],
    [style*="color:#334155"]
) {
    color: var(--throne-text-primary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="color: #475569"],
    [style*="color:#475569"],
    [style*="color: #64748b"],
    [style*="color:#64748b"],
    [style*="color: #94a3b8"],
    [style*="color:#94a3b8"]
),
html[data-throne-theme="dark"] body > dialog :is(
    [style*="color: #475569"],
    [style*="color:#475569"],
    [style*="color: #64748b"],
    [style*="color:#64748b"],
    [style*="color: #94a3b8"],
    [style*="color:#94a3b8"]
) {
    color: var(--throne-text-secondary) !important;
}

html[data-throne-theme="dark"] .throne-main :is(
    [style*="border: 1px solid rgba(0,0,0"],
    [style*="border:1px solid rgba(0,0,0"],
    [style*="border: 1px solid rgba(0, 0, 0"],
    [style*="border:1px solid rgba(0, 0, 0"],
    [style*="border: 1px dashed rgba(0,0,0"],
    [style*="border:1px dashed rgba(0,0,0"],
    [style*="border: 1px dashed rgba(0, 0, 0"],
    [style*="border:1px dashed rgba(0, 0, 0"],
    [style*="border: 1px solid #e2e8f0"],
    [style*="border:1px solid #e2e8f0"],
    [style*="border: 1px solid #cbd5e1"],
    [style*="border:1px solid #cbd5e1"],
    [style*="border: 1px solid #334155"],
    [style*="border:1px solid #334155"]
),
html[data-throne-theme="dark"] body > dialog :is(
    [style*="border: 1px solid rgba(0,0,0"],
    [style*="border:1px solid rgba(0,0,0"],
    [style*="border: 1px solid rgba(0, 0, 0"],
    [style*="border:1px solid rgba(0, 0, 0"],
    [style*="border: 1px solid #e2e8f0"],
    [style*="border:1px solid #e2e8f0"],
    [style*="border: 1px solid #334155"],
    [style*="border:1px solid #334155"]
) {
    border-color: var(--throne-border) !important;
}

@media (max-width: 520px) {
    .account-actions-stack {
        gap: 4px;
    }
}
