:root,
[data-theme="neutral"] {
    color-scheme: light;
    --app-page-bg: #f3f5f8;
    --app-page-background: linear-gradient(145deg, #f7f8fa, #eef1f5);
    --app-surface: #ffffff;
    --app-panel-bg: #f8fafc;
    --app-control-bg: #ffffff;
    --app-ink: #263244;
    --app-muted: #687588;
    --app-border: #e2e7ee;
    --app-primary: #526579;
    --app-primary-dark: #3f5266;
    --app-primary-hover: #3f5266;
    --app-accent: #526579;
    --app-hover-bg: #edf1f5;
    --app-shadow: 0 16px 38px rgba(31, 45, 61, .07);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #eef1f5;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 82, 101, 121;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="light"] {
    color-scheme: light;
    --app-page-bg: #f8fafc;
    --app-page-background: #f8fafc;
    --app-surface: #ffffff;
    --app-panel-bg: #f5f7fb;
    --app-control-bg: #ffffff;
    --app-ink: #202b3c;
    --app-muted: #667085;
    --app-border: #e5e9f0;
    --app-primary: #5b5bd6;
    --app-primary-dark: #4847b8;
    --app-primary-hover: #4847b8;
    --app-accent: #5b5bd6;
    --app-hover-bg: #f0f0ff;
    --app-shadow: 0 12px 30px rgba(27, 39, 61, .055);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f3f5f9;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 91, 91, 214;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Clinic Blue (key: clinic-teal): the old SSDC blue palette (#4e73df / #224abe, SB Admin 2) */
[data-theme="clinic-teal"] {
    color-scheme: light;
    --app-page-bg: #f8f9fc;
    --app-page-background: #f8f9fc;
    --app-surface: #ffffff;
    --app-panel-bg: #f8f9fc;
    --app-control-bg: #ffffff;
    --app-ink: #5a5c69;
    --app-muted: #858796;
    --app-border: #e3e6f0;
    --app-primary: #4e73df;
    --app-primary-dark: #224abe;
    --app-primary-hover: #2653d4;
    --app-accent: #4e73df;
    --app-hover-bg: #eef2fc;
    --app-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f8f9fc;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 78, 115, 223;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Clinic Blue: the default "Match workspace" sidebar uses the old blue gradient. Other sidebar palettes are unchanged. */
[data-theme="clinic-teal"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="clinic-teal"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    --sidebar-ink: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, .72);
    --sidebar-border: rgba(255, 255, 255, .15);
    --sidebar-hover: rgba(255, 255, 255, .12);
    --sidebar-active-background: rgba(255, 255, 255, .2);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #ffffff;
}

/* Soft Indigo: modern light theme with indigo accents */
[data-theme="soft-indigo"] {
    color-scheme: light;
    --app-page-bg: #f4f5fb;
    --app-page-background: #f4f5fb;
    --app-surface: #ffffff;
    --app-panel-bg: #f7f8fd;
    --app-control-bg: #ffffff;
    --app-ink: #1f2a44;
    --app-muted: #6b7590;
    --app-border: #e3e6f3;
    --app-primary: #4f46e5;
    --app-primary-dark: #3730a3;
    --app-primary-hover: #4338ca;
    --app-accent: #6366f1;
    --app-hover-bg: #eef0ff;
    --app-shadow: 0 14px 34px rgba(49, 46, 129, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f1f2fb;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="soft-indigo"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="soft-indigo"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #4f46e5 0%, #312e81 100%);
    --sidebar-ink: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, .72);
    --sidebar-border: rgba(255, 255, 255, .14);
    --sidebar-hover: rgba(255, 255, 255, .1);
    --sidebar-active-background: rgba(255, 255, 255, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #c7d2fe;
}

/* Warm Sand: warm light theme with terracotta accents */
[data-theme="warm-sand"] {
    color-scheme: light;
    --app-page-bg: #faf7f2;
    --app-page-background: #faf7f2;
    --app-surface: #ffffff;
    --app-panel-bg: #fbf8f3;
    --app-control-bg: #ffffff;
    --app-ink: #2b2622;
    --app-muted: #7c7266;
    --app-border: #ebe4d9;
    --app-primary: #c2410c;
    --app-primary-dark: #9a3412;
    --app-primary-hover: #9a3412;
    --app-accent: #ea580c;
    --app-hover-bg: #fdf1e8;
    --app-shadow: 0 14px 34px rgba(120, 80, 40, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f5efe6;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 194, 65, 12;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="warm-sand"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="warm-sand"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #3a2f27 0%, #231d19 100%);
    --sidebar-ink: #f7f1e8;
    --sidebar-muted: rgba(247, 241, 232, .72);
    --sidebar-border: rgba(247, 241, 232, .14);
    --sidebar-hover: rgba(247, 241, 232, .1);
    --sidebar-active-background: rgba(247, 241, 232, .16);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #fdba74;
}

/* Midnight Mode: dark theme with sky-blue accents */
[data-theme="midnight-mode"] {
    color-scheme: dark;
    --app-page-bg: #0b1020;
    --app-page-background: #0b1020;
    --app-surface: #121a2f;
    --app-panel-bg: #16203a;
    --app-control-bg: #0f1729;
    --app-ink: #e5ebf7;
    --app-muted: #94a3b8;
    --app-border: #24304d;
    --app-primary: #0284c7;
    --app-primary-dark: #7dd3fc;
    --app-primary-hover: #0369a1;
    --app-accent: #38bdf8;
    --app-hover-bg: #1a2540;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #17213a;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 2, 132, 199;
    --bs-link-color: #7dd3fc;
    --bs-link-hover-color: #bae6fd;
}

/* Sage Garden: calm light theme in sage green */
[data-theme="sage-garden"] {
    color-scheme: light;
    --app-page-bg: #f4f8f3;
    --app-page-background: #f4f8f3;
    --app-surface: #ffffff;
    --app-panel-bg: #f7faf6;
    --app-control-bg: #ffffff;
    --app-ink: #1f2d24;
    --app-muted: #5f7065;
    --app-border: #dfe9e1;
    --app-primary: #2f6b4f;
    --app-primary-dark: #1f4d38;
    --app-primary-hover: #245a42;
    --app-accent: #3f8f66;
    --app-hover-bg: #e9f3ec;
    --app-shadow: 0 14px 34px rgba(30, 60, 42, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #eef5f0;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 47, 107, 79;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="sage-garden"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="sage-garden"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #2f6b4f 0%, #1b4232 100%);
    --sidebar-ink: #f1faf5;
    --sidebar-muted: rgba(241, 250, 245, .72);
    --sidebar-border: rgba(241, 250, 245, .14);
    --sidebar-hover: rgba(241, 250, 245, .1);
    --sidebar-active-background: rgba(241, 250, 245, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #a7f3d0;
}

/* Rose Quartz: soft light theme with rose accents */
[data-theme="rose-quartz"] {
    color-scheme: light;
    --app-page-bg: #fdf6f8;
    --app-page-background: #fdf6f8;
    --app-surface: #ffffff;
    --app-panel-bg: #fdf9fa;
    --app-control-bg: #ffffff;
    --app-ink: #3a1f2b;
    --app-muted: #7d5b69;
    --app-border: #f1dfe6;
    --app-primary: #be185d;
    --app-primary-dark: #9d174d;
    --app-primary-hover: #9d174d;
    --app-accent: #db2777;
    --app-hover-bg: #fce7f0;
    --app-shadow: 0 14px 34px rgba(131, 24, 67, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fbeef3;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 190, 24, 93;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="rose-quartz"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="rose-quartz"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #9d174d 0%, #6b1039 100%);
    --sidebar-ink: #fff5f9;
    --sidebar-muted: rgba(255, 245, 249, .72);
    --sidebar-border: rgba(255, 245, 249, .14);
    --sidebar-hover: rgba(255, 245, 249, .1);
    --sidebar-active-background: rgba(255, 245, 249, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #fbcfe8;
}

/* Ocean Breeze: clean, cool light theme with ocean-blue accents */
[data-theme="ocean-breeze"] {
    color-scheme: light;
    --app-page-bg: #f0f9ff;
    --app-page-background: #f0f9ff;
    --app-surface: #ffffff;
    --app-panel-bg: #f5fbff;
    --app-control-bg: #ffffff;
    --app-ink: #0c2a3f;
    --app-muted: #5b7388;
    --app-border: #d6eaf5;
    --app-primary: #0369a1;
    --app-primary-dark: #075985;
    --app-primary-hover: #075985;
    --app-accent: #0ea5e9;
    --app-hover-bg: #e0f2fe;
    --app-shadow: 0 14px 34px rgba(7, 89, 133, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #e8f6fc;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 3, 105, 161;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="ocean-breeze"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="ocean-breeze"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #0c4a6e 0%, #082f49 100%);
    --sidebar-ink: #f0f9ff;
    --sidebar-muted: rgba(240, 249, 255, .72);
    --sidebar-border: rgba(240, 249, 255, .14);
    --sidebar-hover: rgba(240, 249, 255, .1);
    --sidebar-active-background: rgba(240, 249, 255, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #7dd3fc;
}

/* Graphite Pro: sleek dark theme with emerald accents */
[data-theme="graphite-pro"] {
    color-scheme: dark;
    --app-page-bg: #0f1115;
    --app-page-background: #0f1115;
    --app-surface: #171a21;
    --app-panel-bg: #1c2029;
    --app-control-bg: #12151b;
    --app-ink: #e7e9ee;
    --app-muted: #9aa3b2;
    --app-border: #2a2f3a;
    --app-primary: #047857;
    --app-primary-dark: #6ee7b7;
    --app-primary-hover: #065f46;
    --app-accent: #34d399;
    --app-hover-bg: #1f242e;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #1a1e26;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 4, 120, 87;
    --bs-link-color: #6ee7b7;
    --bs-link-hover-color: #a7f3d0;
}

/* Lavender Dusk: dark violet theme with lavender accents */
[data-theme="lavender-dusk"] {
    color-scheme: dark;
    --app-page-bg: #140f24;
    --app-page-background: #140f24;
    --app-surface: #1d1733;
    --app-panel-bg: #231c3e;
    --app-control-bg: #181230;
    --app-ink: #ece8fb;
    --app-muted: #a59cc4;
    --app-border: #342b52;
    --app-primary: #7c3aed;
    --app-primary-dark: #c4b5fd;
    --app-primary-hover: #6d28d9;
    --app-accent: #a78bfa;
    --app-hover-bg: #291f48;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #201a3b;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 124, 58, 237;
    --bs-link-color: #c4b5fd;
    --bs-link-hover-color: #ddd6fe;
}

/* Lemon Citrus: bright light theme with citrus-yellow accents */
[data-theme="lemon-citrus"] {
    color-scheme: light;
    --app-page-bg: #fefce8;
    --app-page-background: #fefce8;
    --app-surface: #ffffff;
    --app-panel-bg: #fefce8;
    --app-control-bg: #ffffff;
    --app-ink: #332d12;
    --app-muted: #7a7152;
    --app-border: #f0e9c4;
    --app-primary: #a16207;
    --app-primary-dark: #854d0e;
    --app-primary-hover: #854d0e;
    --app-accent: #eab308;
    --app-hover-bg: #fef9c3;
    --app-shadow: 0 14px 34px rgba(113, 83, 10, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fdf9dc;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 161, 98, 7;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="lemon-citrus"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="lemon-citrus"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #4a4212 0%, #2a2608 100%);
    --sidebar-ink: #fdfbe7;
    --sidebar-muted: rgba(253, 251, 231, .72);
    --sidebar-border: rgba(253, 251, 231, .14);
    --sidebar-hover: rgba(253, 251, 231, .1);
    --sidebar-active-background: rgba(253, 251, 231, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #fde047;
}

/* Lilac Mist: soft light theme with lilac-purple accents */
[data-theme="lilac-mist"] {
    color-scheme: light;
    --app-page-bg: #f7f5fc;
    --app-page-background: #f7f5fc;
    --app-surface: #ffffff;
    --app-panel-bg: #faf8fe;
    --app-control-bg: #ffffff;
    --app-ink: #2a1f3d;
    --app-muted: #6f6585;
    --app-border: #e7e1f3;
    --app-primary: #7e22ce;
    --app-primary-dark: #6b21a8;
    --app-primary-hover: #6b21a8;
    --app-accent: #a855f7;
    --app-hover-bg: #f3ecfd;
    --app-shadow: 0 14px 34px rgba(88, 28, 135, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f2eefa;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 126, 34, 206;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="lilac-mist"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="lilac-mist"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #7e22ce 0%, #581c87 100%);
    --sidebar-ink: #faf5ff;
    --sidebar-muted: rgba(250, 245, 255, .72);
    --sidebar-border: rgba(250, 245, 255, .14);
    --sidebar-hover: rgba(250, 245, 255, .1);
    --sidebar-active-background: rgba(250, 245, 255, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #e9d5ff;
}

/* Cocoa Latte: warm dark theme with amber accents */
[data-theme="cocoa-latte"] {
    color-scheme: dark;
    --app-page-bg: #1c1512;
    --app-page-background: #1c1512;
    --app-surface: #241c18;
    --app-panel-bg: #2c231e;
    --app-control-bg: #201915;
    --app-ink: #f3e9df;
    --app-muted: #b09f92;
    --app-border: #3d322b;
    --app-primary: #b45309;
    --app-primary-dark: #fcd34d;
    --app-primary-hover: #92400e;
    --app-accent: #f59e0b;
    --app-hover-bg: #302720;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #2a211c;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 180, 83, 9;
    --bs-link-color: #fcd34d;
    --bs-link-hover-color: #fde68a;
}

/* Ember Dark: dark theme with ember-red accents */
[data-theme="ember-dark"] {
    color-scheme: dark;
    --app-page-bg: #140c0c;
    --app-page-background: #140c0c;
    --app-surface: #1c1212;
    --app-panel-bg: #241717;
    --app-control-bg: #171010;
    --app-ink: #f5e9e9;
    --app-muted: #b09393;
    --app-border: #3a2424;
    --app-primary: #b91c1c;
    --app-primary-dark: #fca5a5;
    --app-primary-hover: #991b1b;
    --app-accent: #f87171;
    --app-hover-bg: #2a1818;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #211515;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 185, 28, 28;
    --bs-link-color: #fca5a5;
    --bs-link-hover-color: #fecaca;
}

/* Forest Night: dark theme in deep forest green */
[data-theme="forest-night"] {
    color-scheme: dark;
    --app-page-bg: #0c1410;
    --app-page-background: #0c1410;
    --app-surface: #121d18;
    --app-panel-bg: #17241e;
    --app-control-bg: #0f1914;
    --app-ink: #e3efe9;
    --app-muted: #97ada3;
    --app-border: #24382f;
    --app-primary: #15803d;
    --app-primary-dark: #86efac;
    --app-primary-hover: #166534;
    --app-accent: #22c55e;
    --app-hover-bg: #1a2a22;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #15211b;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 21, 128, 61;
    --bs-link-color: #86efac;
    --bs-link-hover-color: #bbf7d0;
}

/* Peach Blossom: soft light theme in peach and coral */
[data-theme="peach-blossom"] {
    color-scheme: light;
    --app-page-bg: #fff6f1;
    --app-page-background: #fff6f1;
    --app-surface: #ffffff;
    --app-panel-bg: #fffaf7;
    --app-control-bg: #ffffff;
    --app-ink: #3d2320;
    --app-muted: #8a6661;
    --app-border: #f6e0d7;
    --app-primary: #c2553a;
    --app-primary-dark: #9a3b26;
    --app-primary-hover: #9a3b26;
    --app-accent: #f4a58a;
    --app-hover-bg: #fdeee8;
    --app-shadow: 0 14px 34px rgba(138, 59, 40, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fdf1ec;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 194, 85, 58;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="peach-blossom"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="peach-blossom"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #c2553a 0%, #8a3b28 100%);
    --sidebar-ink: #fff8f5;
    --sidebar-muted: rgba(255, 248, 245, .72);
    --sidebar-border: rgba(255, 248, 245, .14);
    --sidebar-hover: rgba(255, 248, 245, .1);
    --sidebar-active-background: rgba(255, 248, 245, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #fcd5c5;
}

/* Orchid Bloom: light theme with orchid-pink accents */
[data-theme="orchid-bloom"] {
    color-scheme: light;
    --app-page-bg: #fbf4fb;
    --app-page-background: #fbf4fb;
    --app-surface: #ffffff;
    --app-panel-bg: #fdf9fd;
    --app-control-bg: #ffffff;
    --app-ink: #3b1d3a;
    --app-muted: #7f5d7c;
    --app-border: #f0dcef;
    --app-primary: #a21caf;
    --app-primary-dark: #86198f;
    --app-primary-hover: #86198f;
    --app-accent: #d946ef;
    --app-hover-bg: #faeafa;
    --app-shadow: 0 14px 34px rgba(112, 26, 117, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f9eef9;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 162, 28, 175;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="orchid-bloom"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="orchid-bloom"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #a21caf 0%, #701a75 100%);
    --sidebar-ink: #fdf4ff;
    --sidebar-muted: rgba(253, 244, 255, .72);
    --sidebar-border: rgba(253, 244, 255, .14);
    --sidebar-hover: rgba(253, 244, 255, .1);
    --sidebar-active-background: rgba(253, 244, 255, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #f5d0fe;
}

/* Champagne Gold: elegant light theme with gold accents */
[data-theme="champagne-gold"] {
    color-scheme: light;
    --app-page-bg: #fbf8f1;
    --app-page-background: #fbf8f1;
    --app-surface: #ffffff;
    --app-panel-bg: #fcfaf5;
    --app-control-bg: #ffffff;
    --app-ink: #3a2f1e;
    --app-muted: #7d6e52;
    --app-border: #efe6d0;
    --app-primary: #8a6a2f;
    --app-primary-dark: #6b4f1f;
    --app-primary-hover: #6b4f1f;
    --app-accent: #c9a24a;
    --app-hover-bg: #f7f0de;
    --app-shadow: 0 14px 34px rgba(107, 79, 31, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f8f3e6;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 138, 106, 47;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="champagne-gold"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="champagne-gold"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #5c4520 0%, #3a2b12 100%);
    --sidebar-ink: #fbf5e6;
    --sidebar-muted: rgba(251, 245, 230, .72);
    --sidebar-border: rgba(251, 245, 230, .14);
    --sidebar-hover: rgba(251, 245, 230, .1);
    --sidebar-active-background: rgba(251, 245, 230, .18);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #f0d58c;
}

/* Mauve Mist: gentle light theme in soft mauve */
[data-theme="mauve-mist"] {
    color-scheme: light;
    --app-page-bg: #f6f2f5;
    --app-page-background: #f6f2f5;
    --app-surface: #ffffff;
    --app-panel-bg: #faf7f9;
    --app-control-bg: #ffffff;
    --app-ink: #2e2230;
    --app-muted: #7a6676;
    --app-border: #e6dce3;
    --app-primary: #7c4d6e;
    --app-primary-dark: #5e3852;
    --app-primary-hover: #5e3852;
    --app-accent: #a86f96;
    --app-hover-bg: #f3ebf0;
    --app-shadow: 0 14px 34px rgba(94, 56, 82, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f3eef2;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 124, 77, 110;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Velvet Plum: dark theme in velvet plum with rose-pink accents */
[data-theme="velvet-plum"] {
    color-scheme: dark;
    --app-page-bg: #1a0f1d;
    --app-page-background: #1a0f1d;
    --app-surface: #241528;
    --app-panel-bg: #2c1b32;
    --app-control-bg: #1f1224;
    --app-ink: #f6eaf7;
    --app-muted: #b89bbb;
    --app-border: #3b2643;
    --app-primary: #9d174d;
    --app-primary-dark: #f9a8d4;
    --app-primary-hover: #831843;
    --app-accent: #f472b6;
    --app-hover-bg: #2f1d37;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #251630;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 157, 23, 77;
    --bs-link-color: #f9a8d4;
    --bs-link-hover-color: #fbcfe8;
}

/* Idol Pink: light pink workspace with a dark pink sidebar */
[data-theme="idol-pink"] {
    color-scheme: light;
    --app-page-bg: #fff0f7;
    --app-page-background: #fff0f7;
    --app-surface: #ffffff;
    --app-panel-bg: #fff7fb;
    --app-control-bg: #ffffff;
    --app-ink: #3b1430;
    --app-muted: #8b5a7a;
    --app-border: #fbd5ea;
    --app-primary: #be185d;
    --app-primary-dark: #9d174d;
    --app-primary-hover: #9d174d;
    --app-accent: #f472b6;
    --app-hover-bg: #fde7f3;
    --app-shadow: 0 14px 34px rgba(157, 23, 77, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fef0f7;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 190, 24, 93;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

[data-theme="idol-pink"] .admin-sidebar[data-sidebar-theme="app"],
[data-theme="idol-pink"] .theme-preview-sidebar {
    --sidebar-background: linear-gradient(180deg, #2a0b1f 0%, #12050d 100%);
    --sidebar-ink: #fff0f7;
    --sidebar-muted: rgba(255, 240, 247, .72);
    --sidebar-border: rgba(255, 240, 247, .14);
    --sidebar-hover: rgba(255, 240, 247, .1);
    --sidebar-active-background: rgba(255, 92, 168, .3);
    --sidebar-active-ink: #ffffff;
    --sidebar-accent: #ff5ca8;
}

/* Holo Pastel: light holographic-pastel workspace */
[data-theme="holo-pastel"] {
    color-scheme: light;
    --app-page-bg: #f7f4ff;
    --app-page-background: linear-gradient(145deg, #f7f4ff, #eefbff 55%, #fdf2ff);
    --app-surface: #ffffff;
    --app-panel-bg: #faf8ff;
    --app-control-bg: #ffffff;
    --app-ink: #1e1b3a;
    --app-muted: #66618a;
    --app-border: #e6e1f7;
    --app-primary: #0e7490;
    --app-primary-dark: #155e75;
    --app-primary-hover: #155e75;
    --app-accent: #c084fc;
    --app-hover-bg: #eef7ff;
    --app-shadow: 0 14px 34px rgba(60, 50, 120, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f3f0fd;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 14, 116, 144;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Bubblegum Pop: playful light workspace in bubblegum pink */
[data-theme="bubblegum-pop"] {
    color-scheme: light;
    --app-page-bg: #fff5fb;
    --app-page-background: #fff5fb;
    --app-surface: #ffffff;
    --app-panel-bg: #fffafd;
    --app-control-bg: #ffffff;
    --app-ink: #3b1430;
    --app-muted: #8b5a7a;
    --app-border: #fbd9ec;
    --app-primary: #be185d;
    --app-primary-dark: #9d174d;
    --app-primary-hover: #9d174d;
    --app-accent: #f9a8d4;
    --app-hover-bg: #fdeaf5;
    --app-shadow: 0 14px 34px rgba(190, 24, 93, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fef2f9;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 190, 24, 93;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Stage Lights: dark workspace with neon magenta and cyan */
[data-theme="stage-lights"] {
    color-scheme: dark;
    --app-page-bg: #09090f;
    --app-page-background: #09090f;
    --app-surface: #13131c;
    --app-panel-bg: #1b1b28;
    --app-control-bg: #101018;
    --app-ink: #f1f1fb;
    --app-muted: #a3a3be;
    --app-border: #2b2b3d;
    --app-primary: #c026d3;
    --app-primary-dark: #f0abfc;
    --app-primary-hover: #a21caf;
    --app-accent: #22d3ee;
    --app-hover-bg: #20202f;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #181824;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 192, 38, 211;
    --bs-link-color: #f0abfc;
    --bs-link-hover-color: #f5d0fe;
}

/* Neon Galaxy: dark indigo workspace with neon lime accents */
[data-theme="neon-galaxy"] {
    color-scheme: dark;
    --app-page-bg: #0a0a1f;
    --app-page-background: #0a0a1f;
    --app-surface: #111131;
    --app-panel-bg: #17173d;
    --app-control-bg: #0e0e28;
    --app-ink: #e8e8ff;
    --app-muted: #9d9dd1;
    --app-border: #2a2a5c;
    --app-primary: #4338ca;
    --app-primary-dark: #a5b4fc;
    --app-primary-hover: #3730a3;
    --app-accent: #a3e635;
    --app-hover-bg: #1c1c48;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #15153a;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 67, 56, 202;
    --bs-link-color: #a5b4fc;
    --bs-link-hover-color: #c7d2fe;
}

/* Sky Pastel: bright, airy light theme in pastel sky blue */
[data-theme="sky-pastel"] {
    color-scheme: light;
    --app-page-bg: #f0f7ff;
    --app-page-background: #f0f7ff;
    --app-surface: #ffffff;
    --app-panel-bg: #f7fbff;
    --app-control-bg: #ffffff;
    --app-ink: #1e293b;
    --app-muted: #64748b;
    --app-border: #dbe7f5;
    --app-primary: #2563eb;
    --app-primary-dark: #1e40af;
    --app-primary-hover: #1e40af;
    --app-accent: #60a5fa;
    --app-hover-bg: #e8f1fd;
    --app-shadow: 0 14px 34px rgba(30, 64, 175, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #eef5fd;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Matcha Latte: calm light theme in soft matcha green */
[data-theme="matcha-latte"] {
    color-scheme: light;
    --app-page-bg: #f5f7ee;
    --app-page-background: #f5f7ee;
    --app-surface: #ffffff;
    --app-panel-bg: #f9faf4;
    --app-control-bg: #ffffff;
    --app-ink: #26301a;
    --app-muted: #6b7556;
    --app-border: #e4e9d6;
    --app-primary: #4d7c0f;
    --app-primary-dark: #3f6212;
    --app-primary-hover: #3f6212;
    --app-accent: #84cc16;
    --app-hover-bg: #eef4e0;
    --app-shadow: 0 14px 34px rgba(63, 98, 18, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f1f5e6;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 77, 124, 15;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Parchment Classic: cream light theme with warm brown accents */
[data-theme="parchment-classic"] {
    color-scheme: light;
    --app-page-bg: #fbf6ea;
    --app-page-background: #fbf6ea;
    --app-surface: #fffdf7;
    --app-panel-bg: #faf4e4;
    --app-control-bg: #fffdf7;
    --app-ink: #3b2f1c;
    --app-muted: #7d6e55;
    --app-border: #ebe0c6;
    --app-primary: #7c5a2b;
    --app-primary-dark: #5c4220;
    --app-primary-hover: #5c4220;
    --app-accent: #b08d57;
    --app-hover-bg: #f5ecd6;
    --app-shadow: 0 14px 34px rgba(92, 66, 32, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f7f0de;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 124, 90, 43;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Midnight Teal: dark teal theme with aqua accents */
[data-theme="midnight-teal"] {
    color-scheme: dark;
    --app-page-bg: #07191c;
    --app-page-background: #07191c;
    --app-surface: #0d2327;
    --app-panel-bg: #12302f;
    --app-control-bg: #0a1f22;
    --app-ink: #dff5f2;
    --app-muted: #8fb8b3;
    --app-border: #1f3d3d;
    --app-primary: #0f766e;
    --app-primary-dark: #5eead4;
    --app-primary-hover: #115e59;
    --app-accent: #2dd4bf;
    --app-hover-bg: #15302f;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #112b2b;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 15, 118, 110;
    --bs-link-color: #5eead4;
    --bs-link-hover-color: #99f6e4;
}

/* Gunmetal Pro: focused dark theme in gunmetal gray with blue accents */
[data-theme="gunmetal-pro"] {
    color-scheme: dark;
    --app-page-bg: #0d1117;
    --app-page-background: #0d1117;
    --app-surface: #161b22;
    --app-panel-bg: #1c2330;
    --app-control-bg: #11151c;
    --app-ink: #e6edf3;
    --app-muted: #8b98a9;
    --app-border: #30363d;
    --app-primary: #1f6feb;
    --app-primary-dark: #79c0ff;
    --app-primary-hover: #1158c7;
    --app-accent: #58a6ff;
    --app-hover-bg: #1f2633;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #1a202b;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 31, 111, 235;
    --bs-link-color: #79c0ff;
    --bs-link-hover-color: #a5d6ff;
}

/* Coffee Crema: cozy light theme in latte tones */
[data-theme="coffee-crema"] {
    color-scheme: light;
    --app-page-bg: #f8f3ee;
    --app-page-background: #f8f3ee;
    --app-surface: #ffffff;
    --app-panel-bg: #fcf8f4;
    --app-control-bg: #ffffff;
    --app-ink: #2d1f16;
    --app-muted: #7a6558;
    --app-border: #ebe0d6;
    --app-primary: #6b4226;
    --app-primary-dark: #4a2c17;
    --app-primary-hover: #4a2c17;
    --app-accent: #a0744d;
    --app-hover-bg: #f3e9df;
    --app-shadow: 0 14px 34px rgba(74, 44, 23, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f6eee6;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 107, 66, 38;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Lime Fresh: fresh light theme with lime-green accents */
[data-theme="lime-fresh"] {
    color-scheme: light;
    --app-page-bg: #f7fbef;
    --app-page-background: #f7fbef;
    --app-surface: #ffffff;
    --app-panel-bg: #fafdf5;
    --app-control-bg: #ffffff;
    --app-ink: #1d2a10;
    --app-muted: #5b6b40;
    --app-border: #e2ecd0;
    --app-primary: #3f6212;
    --app-primary-dark: #365314;
    --app-primary-hover: #365314;
    --app-accent: #a3e635;
    --app-hover-bg: #eef7dc;
    --app-shadow: 0 14px 34px rgba(54, 83, 20, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f2f8e6;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 63, 98, 18;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Peony Pop: bright light theme in peony pink and red */
[data-theme="peony-pop"] {
    color-scheme: light;
    --app-page-bg: #fff4f4;
    --app-page-background: #fff4f4;
    --app-surface: #ffffff;
    --app-panel-bg: #fff9f9;
    --app-control-bg: #ffffff;
    --app-ink: #3f1a22;
    --app-muted: #87585f;
    --app-border: #f8dadf;
    --app-primary: #be123c;
    --app-primary-dark: #9f1239;
    --app-primary-hover: #9f1239;
    --app-accent: #fb7185;
    --app-hover-bg: #fde8ec;
    --app-shadow: 0 14px 34px rgba(159, 18, 57, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fef0f2;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 190, 18, 60;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Oat Milk: neutral, soft light theme in oat and stone */
[data-theme="oat-milk"] {
    color-scheme: light;
    --app-page-bg: #f6f4ef;
    --app-page-background: #f6f4ef;
    --app-surface: #ffffff;
    --app-panel-bg: #faf9f6;
    --app-control-bg: #ffffff;
    --app-ink: #292524;
    --app-muted: #78716c;
    --app-border: #e7e5e4;
    --app-primary: #57534e;
    --app-primary-dark: #3f3b37;
    --app-primary-hover: #3f3b37;
    --app-accent: #a8a29e;
    --app-hover-bg: #efedea;
    --app-shadow: 0 14px 34px rgba(41, 37, 36, .07);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f3f2ef;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 87, 83, 78;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Violet Dawn: light theme with violet accents */
[data-theme="violet-dawn"] {
    color-scheme: light;
    --app-page-bg: #faf5ff;
    --app-page-background: #faf5ff;
    --app-surface: #ffffff;
    --app-panel-bg: #fbf8ff;
    --app-control-bg: #ffffff;
    --app-ink: #2e1065;
    --app-muted: #6b5b8a;
    --app-border: #ece4fb;
    --app-primary: #9333ea;
    --app-primary-dark: #7e22ce;
    --app-primary-hover: #7e22ce;
    --app-accent: #c084fc;
    --app-hover-bg: #f5efff;
    --app-shadow: 0 14px 34px rgba(126, 34, 206, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #f6f1ff;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 147, 51, 234;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Aurora Dark: dark theme with aurora-cyan accents */
[data-theme="aurora-dark"] {
    color-scheme: dark;
    --app-page-bg: #0b1220;
    --app-page-background: #0b1220;
    --app-surface: #101a2e;
    --app-panel-bg: #15213a;
    --app-control-bg: #0d1628;
    --app-ink: #e2f1ff;
    --app-muted: #94a8c4;
    --app-border: #22324f;
    --app-primary: #0e7490;
    --app-primary-dark: #67e8f9;
    --app-primary-hover: #155e75;
    --app-accent: #22d3ee;
    --app-hover-bg: #1a2a45;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #13203a;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 14, 116, 144;
    --bs-link-color: #67e8f9;
    --bs-link-hover-color: #a5f3fc;
}

/* Ink Blue: deep navy dark theme with clear blue accents */
[data-theme="ink-blue"] {
    color-scheme: dark;
    --app-page-bg: #050b18;
    --app-page-background: #050b18;
    --app-surface: #0b1426;
    --app-panel-bg: #111c33;
    --app-control-bg: #08101f;
    --app-ink: #dbe6f7;
    --app-muted: #8093b0;
    --app-border: #1d2b47;
    --app-primary: #1d4ed8;
    --app-primary-dark: #93c5fd;
    --app-primary-hover: #1e40af;
    --app-accent: #3b82f6;
    --app-hover-bg: #15223d;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #0e1930;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #93c5fd;
    --bs-link-hover-color: #bfdbfe;
}

/* Rosewood Night: dark rosewood theme with rose highlights */
[data-theme="rosewood-night"] {
    color-scheme: dark;
    --app-page-bg: #140a0f;
    --app-page-background: #140a0f;
    --app-surface: #1f1119;
    --app-panel-bg: #291621;
    --app-control-bg: #1a0d14;
    --app-ink: #f8e8ef;
    --app-muted: #b8909f;
    --app-border: #3a2231;
    --app-primary: #9f1239;
    --app-primary-dark: #fda4af;
    --app-primary-hover: #881337;
    --app-accent: #fb7185;
    --app-hover-bg: #2e1a26;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #241520;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 159, 18, 57;
    --bs-link-color: #fda4af;
    --bs-link-hover-color: #fecdd3;
}

/* Moss Dark: dark moss-green theme with soft lime accents */
[data-theme="moss-dark"] {
    color-scheme: dark;
    --app-page-bg: #0f140c;
    --app-page-background: #0f140c;
    --app-surface: #161e12;
    --app-panel-bg: #1d2717;
    --app-control-bg: #121809;
    --app-ink: #eef5e4;
    --app-muted: #a3b08f;
    --app-border: #2d3a22;
    --app-primary: #4d7c0f;
    --app-primary-dark: #d9f99d;
    --app-primary-hover: #3f6212;
    --app-accent: #a3e635;
    --app-hover-bg: #22301b;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #1a2415;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 77, 124, 15;
    --bs-link-color: #d9f99d;
    --bs-link-hover-color: #ecfccb;
}

/* Mango Sorbet: sunny light theme in mango and amber */
[data-theme="mango-sorbet"] {
    color-scheme: light;
    --app-page-bg: #fffbeb;
    --app-page-background: #fffbeb;
    --app-surface: #ffffff;
    --app-panel-bg: #fffdf5;
    --app-control-bg: #ffffff;
    --app-ink: #3b2a0a;
    --app-muted: #866b3c;
    --app-border: #f7e8c3;
    --app-primary: #b45309;
    --app-primary-dark: #92400e;
    --app-primary-hover: #92400e;
    --app-accent: #fbbf24;
    --app-hover-bg: #fef3c7;
    --app-shadow: 0 14px 34px rgba(146, 64, 14, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #fef8e2;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 180, 83, 9;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Glacier: crisp, cool light theme with icy teal accents */
[data-theme="glacier"] {
    color-scheme: light;
    --app-page-bg: #f1f8fb;
    --app-page-background: #f1f8fb;
    --app-surface: #ffffff;
    --app-panel-bg: #f7fbfd;
    --app-control-bg: #ffffff;
    --app-ink: #0f2b36;
    --app-muted: #557786;
    --app-border: #d7e9f0;
    --app-primary: #155e75;
    --app-primary-dark: #164e63;
    --app-primary-hover: #164e63;
    --app-accent: #22d3ee;
    --app-hover-bg: #e4f3f8;
    --app-shadow: 0 14px 34px rgba(22, 78, 99, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #ecf6fa;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 21, 94, 117;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Mint Cream: light theme in mint cream with emerald accents */
[data-theme="mint-cream"] {
    color-scheme: light;
    --app-page-bg: #f0fdf8;
    --app-page-background: #f0fdf8;
    --app-surface: #ffffff;
    --app-panel-bg: #f6fdfa;
    --app-control-bg: #ffffff;
    --app-ink: #0f2e24;
    --app-muted: #4f7a6c;
    --app-border: #cdeee3;
    --app-primary: #047857;
    --app-primary-dark: #065f46;
    --app-primary-hover: #065f46;
    --app-accent: #34d399;
    --app-hover-bg: #e0f7ef;
    --app-shadow: 0 14px 34px rgba(6, 95, 70, .08);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #e9f8f2;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 4, 120, 87;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: var(--app-primary);
}

/* Charcoal Gold: dark charcoal theme with gold highlights */
[data-theme="charcoal-gold"] {
    color-scheme: dark;
    --app-page-bg: #121212;
    --app-page-background: #121212;
    --app-surface: #1c1c1c;
    --app-panel-bg: #242424;
    --app-control-bg: #181818;
    --app-ink: #f5f0e1;
    --app-muted: #a8a08a;
    --app-border: #33302a;
    --app-primary: #a16207;
    --app-primary-dark: #fde047;
    --app-primary-hover: #854d0e;
    --app-accent: #facc15;
    --app-hover-bg: #2a2820;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #202020;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 161, 98, 7;
    --bs-link-color: #fde047;
    --bs-link-hover-color: #fef08a;
}

/* Deep Sea: dark deep-sea theme with bright sky accents */
[data-theme="deep-sea"] {
    color-scheme: dark;
    --app-page-bg: #04121c;
    --app-page-background: #04121c;
    --app-surface: #082033;
    --app-panel-bg: #0c2a42;
    --app-control-bg: #061a29;
    --app-ink: #d9efff;
    --app-muted: #7fa6c2;
    --app-border: #17395a;
    --app-primary: #0369a1;
    --app-primary-dark: #7dd3fc;
    --app-primary-hover: #075985;
    --app-accent: #38bdf8;
    --app-hover-bg: #0f2c45;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #0a2338;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 3, 105, 161;
    --bs-link-color: #7dd3fc;
    --bs-link-hover-color: #bae6fd;
}

/* Crimson Night: dark theme in crimson with red accents */
[data-theme="crimson-night"] {
    color-scheme: dark;
    --app-page-bg: #0f0606;
    --app-page-background: #0f0606;
    --app-surface: #1a0c0c;
    --app-panel-bg: #241212;
    --app-control-bg: #140808;
    --app-ink: #fbeaea;
    --app-muted: #b58a8a;
    --app-border: #3a1d1d;
    --app-primary: #991b1b;
    --app-primary-dark: #fca5a5;
    --app-primary-hover: #7f1d1d;
    --app-accent: #ef4444;
    --app-hover-bg: #2a1414;
    --app-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-panel-bg);
    --bs-tertiary-bg: #231010;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 153, 27, 27;
    --bs-link-color: #fca5a5;
    --bs-link-hover-color: #fecaca;
}

[data-theme="high-contrast"] {
    color-scheme: light;
    --app-page-bg: #fff;
    --app-page-background: #fff;
    --app-surface: #fff;
    --app-panel-bg: #f2f2f2;
    --app-control-bg: #fff;
    --app-ink: #000;
    --app-muted: #242424;
    --app-border: #000;
    --app-primary: #005fcc;
    --app-primary-dark: #004794;
    --app-primary-hover: #003b7a;
    --app-accent: #005fcc;
    --app-hover-bg: #dbeafe;
    --app-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    --bs-body-color: #000;
    --bs-body-bg: #fff;
    --bs-secondary-color: #242424;
    --bs-secondary-bg: #f2f2f2;
    --bs-tertiary-bg: #e5e5e5;
    --bs-border-color: #000;
    --bs-primary-rgb: 0, 95, 204;
    --bs-link-color: #004794;
    --bs-link-hover-color: #003b7a;
}

[data-theme="high-contrast"] .btn,
[data-theme="high-contrast"] .form-control,
[data-theme="high-contrast"] .form-select,
[data-theme="high-contrast"] .form-check-input {
    border-width: 2px;
}

[data-theme="glass-dark"] {
    color-scheme: dark;
    --app-page-bg: #101522;
    --app-page-background:
        radial-gradient(ellipse at 12% 12%, rgba(119, 89, 205, .25), transparent 38%),
        radial-gradient(ellipse at 88% 82%, rgba(29, 128, 160, .17), transparent 38%),
        linear-gradient(145deg, #0b1020, #151b2d);
    --app-surface: rgba(25, 32, 49, .78);
    --app-panel-bg: rgba(255, 255, 255, .055);
    --app-control-bg: rgba(11, 16, 32, .55);
    --app-ink: #edf1fa;
    --app-muted: #a7b2c7;
    --app-border: rgba(211, 221, 246, .14);
    --app-primary: #6d52c9;
    --app-primary-dark: #5c43ad;
    --app-primary-hover: #5c43ad;
    --app-accent: #c4b5fd;
    --app-hover-bg: rgba(183, 160, 255, .13);
    --app-shadow: 0 20px 55px rgba(0, 0, 0, .28);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-page-bg);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: #20283a;
    --bs-tertiary-bg: #293247;
    --bs-border-color: var(--app-border);
    --bs-primary-rgb: 109, 82, 201;
    --bs-link-color: var(--app-primary-dark);
    --bs-link-hover-color: #e2d9ff;
}

html {
    min-height: 100%;
}

body {
    color: var(--app-ink);
    background: var(--app-page-background);
    transition: color .2s ease, background-color .2s ease;
}

.dashboard-page,
.login-page {
    color: var(--app-ink);
    background: var(--app-page-background);
}

.admin-sidebar,
.navbar,
.login-card,
.dashboard-card,
.settings-section,
.theme-option-card,
.card,
.modal-content,
.dropdown-menu {
    color: var(--app-ink);
    border-color: var(--app-border);
    background-color: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.navbar,
.bg-white {
    color: var(--app-ink);
    background-color: var(--app-surface) !important;
}

.dropdown-item {
    color: var(--app-ink);
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--app-ink);
    background-color: var(--app-hover-bg);
}

.alert {
    color: var(--app-ink);
    border-color: var(--app-border);
    background-color: var(--app-panel-bg);
}

.admin-sidebar {
    backdrop-filter: blur(18px);
}

.admin-brand,
.dashboard-heading h1,
.settings-heading h1,
.settings-section h2,
.theme-option-card h3,
.profile-details dd {
    color: var(--app-ink);
}

.admin-sidebar-link {
    color: var(--app-muted);
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    color: var(--app-accent);
    background: var(--app-hover-bg);
}

:root {
    --sidebar-background: var(--app-surface);
    --sidebar-ink: var(--app-ink);
    --sidebar-muted: var(--app-muted);
    --sidebar-border: var(--app-border);
    --sidebar-hover: var(--app-hover-bg);
    --sidebar-active-background: var(--app-hover-bg);
    --sidebar-active-ink: var(--app-accent);
    --sidebar-accent: var(--app-primary);
}

[data-sidebar-theme="ocean"] {
    --sidebar-background: #0b2540;
    --sidebar-ink: #edf6ff;
    --sidebar-muted: #a9c2d8;
    --sidebar-border: rgba(209, 229, 245, .16);
    --sidebar-hover: rgba(105, 179, 226, .13);
    --sidebar-active-background: #175b88;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #8bd3ff;
}

[data-sidebar-theme="forest"] {
    --sidebar-background: #17352b;
    --sidebar-ink: #eef8f1;
    --sidebar-muted: #b1cbbd;
    --sidebar-border: rgba(218, 241, 226, .16);
    --sidebar-hover: rgba(100, 190, 132, .13);
    --sidebar-active-background: #286747;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #8de0ac;
}

[data-sidebar-theme="sunset"] {
    --sidebar-background: #352335;
    --sidebar-ink: #fff2f5;
    --sidebar-muted: #d3b9c9;
    --sidebar-border: rgba(255, 224, 231, .16);
    --sidebar-hover: rgba(237, 151, 129, .13);
    --sidebar-active-background: #78445f;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #ffc49b;
}

[data-sidebar-theme="midnight"] {
    --sidebar-background: #191b32;
    --sidebar-ink: #f0efff;
    --sidebar-muted: #b8b8d2;
    --sidebar-border: rgba(222, 220, 255, .16);
    --sidebar-hover: rgba(151, 139, 255, .14);
    --sidebar-active-background: #5146a5;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #c1b8ff;
}

[data-sidebar-theme="rosewood"] {
    --sidebar-background: #4a1d2e;
    --sidebar-ink: #fdf2f6;
    --sidebar-muted: #d9b3c2;
    --sidebar-border: rgba(253, 242, 246, .16);
    --sidebar-hover: rgba(249, 168, 212, .12);
    --sidebar-active-background: #7a2f4b;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #f9a8d4;
}

[data-sidebar-theme="graphite"] {
    --sidebar-background: #22262e;
    --sidebar-ink: #eef0f4;
    --sidebar-muted: #a9b0bd;
    --sidebar-border: rgba(238, 240, 244, .14);
    --sidebar-hover: rgba(148, 163, 184, .14);
    --sidebar-active-background: #3b4352;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #cbd5e1;
}

[data-sidebar-theme="emerald"] {
    --sidebar-background: #053b2f;
    --sidebar-ink: #ecfdf5;
    --sidebar-muted: #a7d9c8;
    --sidebar-border: rgba(236, 253, 245, .16);
    --sidebar-hover: rgba(110, 231, 183, .12);
    --sidebar-active-background: #0b5a48;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #6ee7b7;
}

[data-sidebar-theme="royal-gold"] {
    --sidebar-background: #3b2f0b;
    --sidebar-ink: #fff8e1;
    --sidebar-muted: #d8c98f;
    --sidebar-border: rgba(255, 248, 225, .16);
    --sidebar-hover: rgba(252, 211, 77, .12);
    --sidebar-active-background: #5c4a14;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fcd34d;
}

[data-sidebar-theme="cobalt"] {
    --sidebar-background: #1e3a8a;
    --sidebar-ink: #eff6ff;
    --sidebar-muted: #bfd3f5;
    --sidebar-border: rgba(239, 246, 255, .16);
    --sidebar-hover: rgba(147, 197, 253, .14);
    --sidebar-active-background: #2c4fae;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #93c5fd;
}

/* Sidebar palettes with a graphic. The motif is a small SVG drawn in the bottom-right corner. */
[data-sidebar-theme="blossom"] {
    --sidebar-background: #6d2a4f;
    --sidebar-ink: #fff1f7;
    --sidebar-muted: #e7b8cf;
    --sidebar-border: rgba(255, 241, 247, .16);
    --sidebar-hover: rgba(255, 179, 217, .14);
    --sidebar-active-background: #8f3c69;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #ffb3d9;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff' fill-opacity='.2'%3E%3Ccircle cx='50' cy='28' r='18'/%3E%3Ccircle cx='72' cy='44' r='18'/%3E%3Ccircle cx='64' cy='70' r='18'/%3E%3Ccircle cx='36' cy='70' r='18'/%3E%3Ccircle cx='28' cy='44' r='18'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='11' fill='%23ffffff' fill-opacity='.35'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="ember"] {
    --sidebar-background: #3f1410;
    --sidebar-ink: #fff4ec;
    --sidebar-muted: #f1c4ac;
    --sidebar-border: rgba(255, 244, 236, .16);
    --sidebar-hover: rgba(251, 146, 60, .14);
    --sidebar-active-background: #5e1f16;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fb923c;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23fb923c' fill-opacity='.3' d='M50 4C60 26 82 36 78 62 75 84 60 96 50 96 34 96 22 84 24 66 25 54 33 47 36 34 45 43 47 51 47 58 57 47 52 27 50 4Z'/%3E%3Cpath fill='%23fde68a' fill-opacity='.3' d='M50 44C56 56 66 62 64 74 62 84 56 90 50 90 42 90 36 84 37 75 38 67 44 64 45 56 49 60 50 64 50 66 54 60 52 52 50 44Z'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="ocean-wave"] {
    --sidebar-background: #0c3b5c;
    --sidebar-ink: #e6f6ff;
    --sidebar-muted: #a8d4ea;
    --sidebar-border: rgba(230, 246, 255, .16);
    --sidebar-hover: rgba(125, 211, 252, .12);
    --sidebar-active-background: #164f78;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #7dd3fc;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23ffffff' fill-opacity='.22' d='M0 46Q25 28 50 46T100 46V100H0Z'/%3E%3Cpath fill='%23ffffff' fill-opacity='.14' d='M0 64Q25 46 50 64T100 64V100H0Z'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="starfield"] {
    --sidebar-background: #1a1545;
    --sidebar-ink: #f5f3ff;
    --sidebar-muted: #c4bfe6;
    --sidebar-border: rgba(245, 243, 255, .16);
    --sidebar-hover: rgba(253, 230, 138, .1);
    --sidebar-active-background: #2c2566;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fde68a;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23fde68a' fill-opacity='.3' points='50,4 61,38 96,38 68,58 79,92 50,72 21,92 32,58 4,38 39,38'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="leaf-garden"] {
    --sidebar-background: #1f4d2b;
    --sidebar-ink: #f0fdf4;
    --sidebar-muted: #b5dcc0;
    --sidebar-border: rgba(240, 253, 244, .16);
    --sidebar-hover: rgba(187, 247, 208, .12);
    --sidebar-active-background: #2d6439;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #bbf7d0;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23bbf7d0' fill-opacity='.28' d='M50 4C86 24 86 76 50 96 14 76 14 24 50 4Z'/%3E%3Cpath fill='none' stroke='%23bbf7d0' stroke-opacity='.4' stroke-width='3' d='M50 12V90'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="moonlight"] {
    --sidebar-background: #1e2a4a;
    --sidebar-ink: #eef2ff;
    --sidebar-muted: #b4bfdd;
    --sidebar-border: rgba(238, 242, 255, .16);
    --sidebar-hover: rgba(199, 210, 254, .12);
    --sidebar-active-background: #2d3c66;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #c7d2fe;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23c7d2fe' fill-opacity='.25' d='M60 10A40 40 0 1 0 90 70A32 32 0 1 1 60 10Z'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="sunrise"] {
    --sidebar-background: #7a2e12;
    --sidebar-ink: #fff4ec;
    --sidebar-muted: #f1c09f;
    --sidebar-border: rgba(255, 244, 236, .16);
    --sidebar-hover: rgba(253, 186, 116, .12);
    --sidebar-active-background: #9a3f1c;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fdba74;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23fdba74' fill-opacity='.28'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Ccircle cx='86' cy='50' r='5'/%3E%3Ccircle cx='75.5' cy='75.5' r='5'/%3E%3Ccircle cx='50' cy='86' r='5'/%3E%3Ccircle cx='24.5' cy='75.5' r='5'/%3E%3Ccircle cx='14' cy='50' r='5'/%3E%3Ccircle cx='24.5' cy='24.5' r='5'/%3E%3Ccircle cx='50' cy='14' r='5'/%3E%3Ccircle cx='75.5' cy='24.5' r='5'/%3E%3C/g%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="lavender-field"] {
    --sidebar-background: #4c3a7a;
    --sidebar-ink: #f5f3ff;
    --sidebar-muted: #cfc4ea;
    --sidebar-border: rgba(245, 243, 255, .16);
    --sidebar-hover: rgba(221, 214, 254, .12);
    --sidebar-active-background: #5f4c94;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #ddd6fe;
}

[data-sidebar-theme="mint-breeze"] {
    --sidebar-background: #0f5c52;
    --sidebar-ink: #ecfdf9;
    --sidebar-muted: #a6dcd3;
    --sidebar-border: rgba(236, 253, 249, .16);
    --sidebar-hover: rgba(153, 246, 228, .12);
    --sidebar-active-background: #17766a;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #99f6e4;
}

[data-sidebar-theme="sandstone"] {
    --sidebar-background: #5b4636;
    --sidebar-ink: #faf3e8;
    --sidebar-muted: #d6c4a8;
    --sidebar-border: rgba(250, 243, 232, .16);
    --sidebar-hover: rgba(245, 222, 179, .12);
    --sidebar-active-background: #735a46;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #f5deb3;
}

[data-sidebar-theme="berry-velvet"] {
    --sidebar-background: #5b1038;
    --sidebar-ink: #fdf2f8;
    --sidebar-muted: #e0b0c8;
    --sidebar-border: rgba(253, 242, 248, .16);
    --sidebar-hover: rgba(249, 168, 212, .12);
    --sidebar-active-background: #7a1a4c;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #f9a8d4;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23f9a8d4' fill-opacity='.25' d='M50 88C20 66 8 50 8 32C8 18 19 8 32 8C40 8 46 13 50 20C54 13 60 8 68 8C81 8 92 18 92 32C92 50 80 66 50 88Z'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="steel-blue"] {
    --sidebar-background: #2c3e50;
    --sidebar-ink: #eef4fa;
    --sidebar-muted: #aebfd0;
    --sidebar-border: rgba(238, 244, 250, .16);
    --sidebar-hover: rgba(165, 201, 232, .12);
    --sidebar-active-background: #3a5068;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #a5c9e8;
}

[data-sidebar-theme="sakura-night"] {
    --sidebar-background: #3b1e3f;
    --sidebar-ink: #fdf2fb;
    --sidebar-muted: #d7b3d4;
    --sidebar-border: rgba(253, 242, 251, .16);
    --sidebar-hover: rgba(251, 207, 232, .12);
    --sidebar-active-background: #4f2a54;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fbcfe8;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23fbcfe8' fill-opacity='.25'%3E%3Cellipse cx='30' cy='36' rx='20' ry='16' transform='rotate(-25 30 36)'/%3E%3Cellipse cx='70' cy='36' rx='20' ry='16' transform='rotate(25 70 36)'/%3E%3Cellipse cx='34' cy='68' rx='14' ry='11' transform='rotate(30 34 68)'/%3E%3Cellipse cx='66' cy='68' rx='14' ry='11' transform='rotate(-30 66 68)'/%3E%3C/g%3E%3Crect x='47' y='30' width='6' height='46' rx='3' fill='%23fbcfe8' fill-opacity='.4'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="pine-forest"] {
    --sidebar-background: #1d3b2a;
    --sidebar-ink: #f1f8ee;
    --sidebar-muted: #b3cdb7;
    --sidebar-border: rgba(241, 248, 238, .16);
    --sidebar-hover: rgba(190, 242, 100, .1);
    --sidebar-active-background: #2a5239;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #bef264;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23bef264' fill-opacity='.22' points='50,6 78,50 64,50 86,86 14,86 36,50 22,50'/%3E%3Crect x='44' y='86' width='12' height='10' fill='%23bef264' fill-opacity='.22'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="slate-violet"] {
    --sidebar-background: #2e2a48;
    --sidebar-ink: #f3f1ff;
    --sidebar-muted: #bdb6dc;
    --sidebar-border: rgba(243, 241, 255, .16);
    --sidebar-hover: rgba(196, 181, 253, .12);
    --sidebar-active-background: #3d3862;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #c4b5fd;
}

[data-sidebar-theme="coral-reef"] {
    --sidebar-background: #7f2f3a;
    --sidebar-ink: #fff3f2;
    --sidebar-muted: #e7b4b8;
    --sidebar-border: rgba(255, 243, 242, .16);
    --sidebar-hover: rgba(252, 165, 165, .12);
    --sidebar-active-background: #963c47;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fca5a5;
}

[data-sidebar-theme="teal-lagoon"] {
    --sidebar-background: #0b4f5c;
    --sidebar-ink: #ecfeff;
    --sidebar-muted: #a5dfe8;
    --sidebar-border: rgba(236, 254, 255, .16);
    --sidebar-hover: rgba(103, 232, 249, .12);
    --sidebar-active-background: #13687a;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #67e8f9;
}

[data-sidebar-theme="amethyst"] {
    --sidebar-background: #4a1d6b;
    --sidebar-ink: #faf5ff;
    --sidebar-muted: #d2bde9;
    --sidebar-border: rgba(250, 245, 255, .16);
    --sidebar-hover: rgba(233, 213, 255, .12);
    --sidebar-active-background: #5f2a86;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #e9d5ff;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23e9d5ff' fill-opacity='.25' points='50,8 90,40 50,92 10,40'/%3E%3Cpolygon fill='%23e9d5ff' fill-opacity='.15' points='50,8 70,40 50,92 30,40'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

[data-sidebar-theme="honey-amber"] {
    --sidebar-background: #6b4a0f;
    --sidebar-ink: #fffbeb;
    --sidebar-muted: #e3cd96;
    --sidebar-border: rgba(255, 251, 235, .16);
    --sidebar-hover: rgba(253, 230, 138, .12);
    --sidebar-active-background: #84601a;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fde68a;
}

[data-sidebar-theme="obsidian"] {
    --sidebar-background: #111318;
    --sidebar-ink: #f4f4f5;
    --sidebar-muted: #a1a1aa;
    --sidebar-border: rgba(244, 244, 245, .14);
    --sidebar-hover: rgba(251, 113, 133, .1);
    --sidebar-active-background: #262830;
    --sidebar-active-ink: #fff;
    --sidebar-accent: #fb7185;
    --sidebar-motif-layer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23fb7185' fill-opacity='.25' points='58,6 24,56 48,56 40,94 78,40 54,40 64,6'/%3E%3C/svg%3E") right 16px bottom 96px / 120px no-repeat;
}

.admin-sidebar[data-sidebar-theme] {
    color: var(--sidebar-ink);
    border-right-color: var(--sidebar-border);
    /* --sidebar-motif-layer is an optional graphic (flower, fire, ...) drawn over the color. */
    background: var(--sidebar-motif-layer, none), var(--sidebar-background);
}

.admin-sidebar[data-sidebar-theme] .admin-brand,
.admin-sidebar[data-sidebar-theme] .profile-user-identity strong,
.admin-sidebar[data-sidebar-theme] .profile-avatar-circle {
    color: var(--sidebar-ink);
}

/* Brand name and subtitle follow the sidebar palette, so they stay readable on dark sidebars. */
.admin-sidebar .admin-brand-client {
    color: var(--sidebar-ink);
}

.admin-sidebar .admin-brand-app {
    color: var(--sidebar-muted);
}

.admin-sidebar[data-sidebar-theme] .profile-user-identity span {
    color: var(--sidebar-muted);
}

.admin-sidebar[data-sidebar-theme] .profile-avatar-circle {
    border-color: var(--sidebar-border);
    background: var(--sidebar-hover);
}

.admin-sidebar[data-sidebar-theme] .profile-avatar-camera {
    border-color: var(--sidebar-background);
    background: var(--sidebar-accent);
}

.admin-sidebar[data-sidebar-theme] .admin-sidebar-mini-text strong {
    color: var(--sidebar-ink);
}

.admin-sidebar[data-sidebar-theme] .admin-sidebar-mini-text > span {
    color: var(--sidebar-muted);
}

@media (max-width: 991.98px) {
    /* backdrop-filter makes the sidebar a containing block, which traps the fixed drawer inside the header bar.
       The selector is raised in specificity so it also beats the glass-dark theme rule. */
    .admin-sidebar[data-sidebar-theme].admin-sidebar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .admin-sidebar[data-sidebar-theme] .admin-sidebar-content.offcanvas-lg {
        background: var(--sidebar-background);
    }
}

.admin-sidebar[data-sidebar-theme] .profile-mini-avatar {
    border-color: var(--sidebar-border);
    background: var(--sidebar-hover);
    color: var(--sidebar-ink);
}

.admin-sidebar[data-sidebar-theme] .profile-user-identity .profile-role-badge {
    border-color: var(--sidebar-border);
    background: var(--sidebar-hover);
    color: var(--sidebar-ink);
}

.admin-sidebar[data-sidebar-theme] .admin-sidebar-link {
    color: var(--sidebar-muted);
}

.admin-sidebar[data-sidebar-theme] .admin-sidebar-link:hover,
.admin-sidebar[data-sidebar-theme] .admin-sidebar-link.active {
    color: var(--sidebar-active-ink);
    background: var(--sidebar-active-background);
}

.admin-sidebar[data-sidebar-theme] .admin-sidebar-logout .btn-outline-secondary {
    --bs-btn-color: var(--sidebar-ink);
    --bs-btn-border-color: var(--sidebar-border);
    --bs-btn-hover-color: var(--sidebar-active-ink);
    --bs-btn-hover-bg: var(--sidebar-active-background);
    --bs-btn-hover-border-color: var(--sidebar-active-background);
}

.login-title,
.brand-header,
.brand-name {
    color: var(--app-ink);
}

.eyebrow,
.forgot-link {
    color: var(--app-accent);
}

.forgot-link:hover,
.password-toggle:hover {
    color: var(--app-accent);
}

.dashboard-card,
.login-card {
    background: var(--app-surface);
    border-color: var(--app-border);
}

.text-secondary,
.profile-details dt {
    color: var(--app-muted) !important;
}

.profile-details dt,
.profile-details dd {
    border-color: var(--app-border);
}

.profile-avatar {
    color: var(--app-accent);
    background: var(--app-hover-bg);
}

.form-control,
.form-select,
.input-group-text,
.password-toggle {
    color: var(--app-ink);
    border-color: var(--app-border);
    background-color: var(--app-control-bg);
}

.login-input .form-control,
.login-input .input-group-text,
.login-input .password-toggle {
    color: var(--app-ink);
    border-color: var(--app-border);
    background-color: var(--app-control-bg);
}

.form-control::placeholder {
    color: var(--app-muted);
    opacity: .75;
}

.login-input .form-control::placeholder {
    color: var(--app-muted);
}

.form-control:focus,
.form-select:focus {
    color: var(--app-ink);
    border-color: var(--app-primary);
    background-color: var(--app-control-bg);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--app-primary) 22%, transparent);
}

.form-label,
.form-check-label {
    color: var(--app-ink);
}

.form-check-input {
    border-color: var(--app-border);
    background-color: var(--app-control-bg);
}

.form-check-input:checked {
    border-color: var(--app-primary);
    background-color: var(--app-primary);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-hover);
    --bs-btn-hover-border-color: var(--app-primary-hover);
}

.sign-in-button {
    border-color: var(--app-primary);
    background: var(--app-primary);
    box-shadow: var(--app-shadow);
}

.sign-in-button:hover {
    border-color: var(--app-primary-hover);
    background: var(--app-primary-hover);
}

.btn-outline-secondary {
    --bs-btn-color: var(--app-ink);
    --bs-btn-border-color: var(--app-border);
    --bs-btn-hover-color: var(--app-ink);
    --bs-btn-hover-bg: var(--app-hover-bg);
    --bs-btn-hover-border-color: var(--app-border);
}

.text-bg-light {
    color: var(--app-ink) !important;
    background-color: var(--app-panel-bg) !important;
}

.table {
    --bs-table-color: var(--app-ink);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--app-border);
}

.table > :not(caption) > * > * {
    color: var(--app-ink);
    background-color: transparent;
}

.modal-content,
.dropdown-menu {
    --bs-modal-color: var(--app-ink);
    --bs-modal-bg: var(--app-surface);
    --bs-dropdown-color: var(--app-ink);
    --bs-dropdown-bg: var(--app-surface);
    --bs-dropdown-border-color: var(--app-border);
}

[data-theme="glass-dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: .85;
}

[data-theme="glass-dark"] .btn-close:hover,
[data-theme="glass-dark"] .btn-close:focus-visible {
    opacity: 1;
}

[data-theme="glass-dark"] .btn-close:focus-visible {
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--app-accent) 45%, transparent);
}

[data-theme="glass-dark"] .admin-sidebar,
[data-theme="glass-dark"] .login-card,
[data-theme="glass-dark"] .dashboard-card,
[data-theme="glass-dark"] .settings-section,
[data-theme="glass-dark"] .theme-option-card,
[data-theme="glass-dark"] .card,
[data-theme="glass-dark"] .modal-content,
[data-theme="glass-dark"] .dropdown-menu {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.profile-avatar-button {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.profile-avatar-circle {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--app-border);
    border-radius: 50%;
    color: var(--app-accent);
    background: var(--app-hover-bg);
    font-size: 1.4rem;
}

.profile-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-camera {
    position: absolute;
    right: -1px;
    bottom: -1px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 2px solid var(--app-surface);
    border-radius: 50%;
    color: #fff;
    background: var(--app-primary);
    font-size: .65rem;
}

.profile-avatar-button:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: 3px;
}

.profile-user-identity {
    display: grid;
    justify-items: start;
    min-width: 0;
    flex: 1 1 auto;
    gap: .15rem;
    text-align: left;
}

.profile-user-identity strong {
    overflow: hidden;
    color: var(--app-ink);
    font-size: .9rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-user-identity span {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 400;
    text-transform: capitalize;
}

.profile-avatar-initials {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.profile-user-identity .profile-role-badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: .25rem;
    padding: .12rem .6rem;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-hover-bg);
    color: var(--app-ink);
    font-size: .72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.profile-user-identity .profile-role-badge[data-profile-role="admin"] {
    border-color: var(--app-accent);
}

.profile-photo-crop-stage {
    width: min(100%, 280px);
    aspect-ratio: 1;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    background: var(--app-panel-bg);
    box-shadow: var(--app-shadow);
}

.profile-photo-crop-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    cursor: grab;
    touch-action: none;
}

.profile-photo-crop-stage canvas:active {
    cursor: grabbing;
}

.profile-photo-crop-stage canvas:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: -3px;
}

.profile-photo-status {
    min-height: 1.5rem;
    color: var(--app-muted);
    font-size: .85rem;
}

.profile-photo-status.is-error {
    color: #c2414b;
}

.profile-photo-editor[hidden] {
    display: none !important;
}

.profile-photo-modal .modal-header,
.profile-photo-modal .modal-footer {
    border-color: var(--app-border);
}

[data-theme="glass-dark"] .profile-photo-status.is-error {
    color: #fda4af;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
    }
}
