/* H2gO Global Theme Engine v5.1 — expanded palettes, Superadmin command themes, and full-system contrast */
:root {
    --h2go-custom-accent:#2f68bd;
    --theme-accent:#2f68bd;
    --theme-bg:#f4f7fb;
    --theme-surface:#ffffff;
    --theme-surface-2:#f7f9fc;
    --theme-soft:#eaf1fb;
    --theme-text:#1d2a3a;
    --theme-heading:#0d2d62;
    --theme-muted:#6b7788;
    --theme-line:#dfe5ec;
    --theme-primary:#174a9c;
    --theme-primary-2:#2f68bd;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#133f84;
    --theme-sidebar-2:#0b2f68;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:rgba(255,255,255,.82);
    --theme-sidebar-active-bg:rgba(255,255,255,.14);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#18794e;
    --theme-danger:#b42318;
    --theme-warning:#b7791f;
    --theme-radius:16px;
    --theme-shadow:0 10px 30px rgba(26,59,108,.09);
    --theme-glass:rgba(255,255,255,.86);
}

/* Official H2gO Classic: mirrors the original working palette exactly. */
body[data-theme="h2go_classic"] {
    --theme-bg:#f4f7fb;
    --theme-surface:#ffffff;
    --theme-surface-2:#f7f9fc;
    --theme-soft:#eaf1fb;
    --theme-text:#1d2a3a;
    --theme-heading:#0d2d62;
    --theme-muted:#6b7788;
    --theme-line:#dfe5ec;
    --theme-primary:#174a9c;
    --theme-primary-2:#2f68bd;
    --theme-accent:#2f68bd;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#133f84;
    --theme-sidebar-2:#0b2f68;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:rgba(255,255,255,.82);
    --theme-sidebar-active-bg:rgba(255,255,255,.14);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#18794e;
    --theme-danger:#b42318;
    --theme-warning:#b7791f;
    --theme-radius:16px;
    --theme-shadow:0 10px 30px rgba(26,59,108,.09);
}

body[data-theme="h2go_dark"] {
    --theme-bg:#07111f;
    --theme-surface:#0f2035;
    --theme-surface-2:#132a43;
    --theme-soft:#163450;
    --theme-text:#edf7ff;
    --theme-heading:#ffffff;
    --theme-muted:#a9bed1;
    --theme-line:#27415c;
    --theme-primary:#155aa7;
    --theme-primary-2:#38bdf8;
    --theme-accent:#38bdf8;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#0a2340;
    --theme-sidebar-2:#030b15;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#c9dced;
    --theme-sidebar-active-bg:rgba(56,189,248,.18);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#4ade80;
    --theme-danger:#fb7185;
    --theme-warning:#fbbf24;
    --theme-shadow:0 14px 34px rgba(0,0,0,.34);
    --theme-glass:rgba(15,32,53,.92);
}

body[data-theme="h2go_light"] {
    --theme-bg:#f6f9fd;
    --theme-surface:#ffffff;
    --theme-surface-2:#eef4fb;
    --theme-soft:#e3eefb;
    --theme-text:#172033;
    --theme-heading:#12366c;
    --theme-muted:#64748b;
    --theme-line:#d6e0ec;
    --theme-primary:#1e5db8;
    --theme-primary-2:#2f74d8;
    --theme-accent:#2563eb;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#ffffff;
    --theme-sidebar-2:#eaf2fb;
    --theme-sidebar-text:#17325b;
    --theme-sidebar-link:#2e4f78;
    --theme-sidebar-active-bg:#d8e7fa;
    --theme-sidebar-active-text:#0b3a78;
    --theme-success:#168052;
    --theme-danger:#b42318;
    --theme-warning:#a86500;
    --theme-shadow:0 8px 24px rgba(15,23,42,.07);
}

body[data-theme="windows_xp"] {
    --theme-bg:#ece9d8;
    --theme-surface:#fffef6;
    --theme-surface-2:#f1efe4;
    --theme-soft:#e7edfa;
    --theme-text:#1c1c1c;
    --theme-heading:#003399;
    --theme-muted:#565656;
    --theme-line:#8aa6ce;
    --theme-primary:#245edb;
    --theme-primary-2:#3b8ef3;
    --theme-accent:#3c8d0d;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#245edb;
    --theme-sidebar-2:#153d9e;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#ffffff;
    --theme-sidebar-active-bg:linear-gradient(180deg,#6fc52a,#3c8d0d);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#247c0b;
    --theme-danger:#b61b1b;
    --theme-warning:#9b6500;
    --theme-radius:8px;
    --theme-shadow:3px 3px 0 rgba(76,91,120,.18);
}

body[data-theme="macos"] {
    --theme-bg:#f2f2f7;
    --theme-surface:rgba(255,255,255,.86);
    --theme-surface-2:rgba(245,245,247,.9);
    --theme-soft:rgba(226,235,248,.9);
    --theme-text:#1d1d1f;
    --theme-heading:#1d1d1f;
    --theme-muted:#6e6e73;
    --theme-line:rgba(120,130,145,.24);
    --theme-primary:#1769c2;
    --theme-primary-2:#0a84ff;
    --theme-accent:#0a84ff;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:rgba(247,247,250,.96);
    --theme-sidebar-2:rgba(229,232,238,.96);
    --theme-sidebar-text:#1d1d1f;
    --theme-sidebar-link:#3a3a3c;
    --theme-sidebar-active-bg:rgba(10,132,255,.14);
    --theme-sidebar-active-text:#0066cc;
    --theme-success:#248a3d;
    --theme-danger:#d70015;
    --theme-warning:#9f6a00;
    --theme-radius:20px;
    --theme-shadow:0 16px 38px rgba(31,35,46,.13);
    --theme-glass:rgba(255,255,255,.72);
}

body[data-theme="ocean_command"] {
    --theme-bg:#02121f;
    --theme-surface:#06243a;
    --theme-surface-2:#08314c;
    --theme-soft:#0a3d58;
    --theme-text:#e8fbff;
    --theme-heading:#ffffff;
    --theme-muted:#9dcad4;
    --theme-line:#0c5068;
    --theme-primary:#075985;
    --theme-primary-2:#0891b2;
    --theme-accent:#22d3ee;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#031b2e;
    --theme-sidebar-2:#010a12;
    --theme-sidebar-text:#e8fbff;
    --theme-sidebar-link:#b7e3ec;
    --theme-sidebar-active-bg:rgba(34,211,238,.17);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#34d399;
    --theme-danger:#fb7185;
    --theme-warning:#facc15;
    --theme-shadow:0 0 0 1px rgba(34,211,238,.08),0 16px 40px rgba(0,0,0,.35);
    --theme-glass:rgba(4,35,55,.92);
}

body[data-theme="high_contrast"] {
    --theme-bg:#000000;
    --theme-surface:#050505;
    --theme-surface-2:#111111;
    --theme-soft:#1b1b1b;
    --theme-text:#ffffff;
    --theme-heading:#ffffff;
    --theme-muted:#f1f1f1;
    --theme-line:#ffffff;
    --theme-primary:#ffdd00;
    --theme-primary-2:#fff06a;
    --theme-accent:#ffdd00;
    --theme-on-primary:#000000;
    --theme-sidebar-1:#000000;
    --theme-sidebar-2:#000000;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#ffffff;
    --theme-sidebar-active-bg:#ffdd00;
    --theme-sidebar-active-text:#000000;
    --theme-success:#6dff8d;
    --theme-danger:#ff6b6b;
    --theme-warning:#ffdd00;
    --theme-radius:4px;
    --theme-shadow:none;
}

body[data-theme="ironman_command"],
body[data-theme="master_red_gold"] {
    --theme-bg:#100606;
    --theme-surface:#231012;
    --theme-surface-2:#301518;
    --theme-soft:#421b1d;
    --theme-text:#fff8e8;
    --theme-heading:#ffe59a;
    --theme-muted:#d7bea5;
    --theme-line:#71342f;
    --theme-primary:#9f1717;
    --theme-primary-2:#d22d23;
    --theme-accent:#ffc107;
    --theme-on-primary:#fffdf4;
    --theme-sidebar-1:#350909;
    --theme-sidebar-2:#110303;
    --theme-sidebar-text:#fff8e8;
    --theme-sidebar-link:#f3dbc0;
    --theme-sidebar-active-bg:rgba(255,193,7,.18);
    --theme-sidebar-active-text:#ffe59a;
    --theme-success:#68dc91;
    --theme-danger:#ff6d67;
    --theme-warning:#ffc107;
    --theme-shadow:0 12px 36px rgba(83,0,0,.38),0 0 0 1px rgba(255,193,7,.06);
    --theme-glass:rgba(35,16,18,.94);
}

body[data-theme="windows_95"] {
    --theme-bg:#008080;
    --theme-surface:#c0c0c0;
    --theme-surface-2:#d4d0c8;
    --theme-soft:#e6e6e6;
    --theme-text:#000000;
    --theme-heading:#000080;
    --theme-muted:#333333;
    --theme-line:#5f5f5f;
    --theme-primary:#000080;
    --theme-primary-2:#1084d0;
    --theme-accent:#000080;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#c0c0c0;
    --theme-sidebar-2:#a9a9a9;
    --theme-sidebar-text:#000000;
    --theme-sidebar-link:#000000;
    --theme-sidebar-active-bg:#000080;
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#008000;
    --theme-danger:#b00000;
    --theme-warning:#805500;
    --theme-radius:0px;
    --theme-shadow:inset 1px 1px #ffffff,inset -1px -1px #404040;
}

body[data-theme="matrix"] {
    --theme-bg:#000000;
    --theme-surface:#031003;
    --theme-surface-2:#061a06;
    --theme-soft:#0a290a;
    --theme-text:#b8ffbd;
    --theme-heading:#00ff41;
    --theme-muted:#71b778;
    --theme-line:#145c20;
    --theme-primary:#003b00;
    --theme-primary-2:#007a22;
    --theme-accent:#00ff41;
    --theme-on-primary:#eaffec;
    --theme-sidebar-1:#001700;
    --theme-sidebar-2:#000000;
    --theme-sidebar-text:#b8ffbd;
    --theme-sidebar-link:#73db7e;
    --theme-sidebar-active-bg:rgba(0,255,65,.15);
    --theme-sidebar-active-text:#00ff41;
    --theme-success:#00ff41;
    --theme-danger:#ff4d5e;
    --theme-warning:#d8ff3e;
    --theme-radius:4px;
    --theme-shadow:0 0 18px rgba(0,255,65,.10);
}

body[data-theme="xbox"] {
    --theme-bg:#101010;
    --theme-surface:#1a1a1a;
    --theme-surface-2:#242424;
    --theme-soft:#1f371e;
    --theme-text:#f4f4f4;
    --theme-heading:#ffffff;
    --theme-muted:#b8b8b8;
    --theme-line:#393939;
    --theme-primary:#107c10;
    --theme-primary-2:#22a321;
    --theme-accent:#8bf000;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#171717;
    --theme-sidebar-2:#070707;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#d8d8d8;
    --theme-sidebar-active-bg:rgba(139,240,0,.16);
    --theme-sidebar-active-text:#8bf000;
    --theme-success:#8bf000;
    --theme-danger:#ff5b5b;
    --theme-warning:#ffd43b;
    --theme-shadow:0 14px 34px rgba(0,0,0,.40);
}

body[data-theme="galaxy_command"] {
    --theme-bg:#07081e;
    --theme-surface:#111333;
    --theme-surface-2:#191b43;
    --theme-soft:#25285c;
    --theme-text:#f2f0ff;
    --theme-heading:#ffffff;
    --theme-muted:#b9b6dd;
    --theme-line:#373a73;
    --theme-primary:#302b8f;
    --theme-primary-2:#5b4de8;
    --theme-accent:#9f8cff;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#11133c;
    --theme-sidebar-2:#050615;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#d3d0f3;
    --theme-sidebar-active-bg:rgba(159,140,255,.18);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#66e3b4;
    --theme-danger:#ff7893;
    --theme-warning:#ffd166;
    --theme-shadow:0 16px 42px rgba(6,5,35,.50),0 0 24px rgba(91,77,232,.10);
}

body[data-theme="grand_adventure"] {
    --theme-bg:#eaf5ff;
    --theme-surface:#fff3d6;
    --theme-surface-2:#fff9eb;
    --theme-soft:#dbeeff;
    --theme-text:#15324d;
    --theme-heading:#001f3f;
    --theme-muted:#5b6e7d;
    --theme-line:#d8bf88;
    --theme-primary:#0057a8;
    --theme-primary-2:#1678c8;
    --theme-accent:#d62828;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#0057a8;
    --theme-sidebar-2:#001f3f;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#e7f4ff;
    --theme-sidebar-active-bg:rgba(244,196,48,.22);
    --theme-sidebar-active-text:#ffe27a;
    --theme-success:#238b45;
    --theme-danger:#d62828;
    --theme-warning:#b47c00;
    --theme-shadow:0 12px 28px rgba(0,55,100,.14);
}

body[data-theme="hello_kitty"] {
    --theme-bg:#fff4fa;
    --theme-surface:#ffffff;
    --theme-surface-2:#fff0f7;
    --theme-soft:#ffe0ee;
    --theme-text:#4a2436;
    --theme-heading:#8d2454;
    --theme-muted:#8b6074;
    --theme-line:#f3bfd6;
    --theme-primary:#ff6fae;
    --theme-primary-2:#ff9ac7;
    --theme-accent:#e43d84;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#ff8fbd;
    --theme-sidebar-2:#df4f8d;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#fff6fb;
    --theme-sidebar-active-bg:rgba(255,255,255,.24);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#3b9c72;
    --theme-danger:#d62968;
    --theme-warning:#b36b00;
    --theme-radius:20px;
    --theme-shadow:0 12px 28px rgba(222,79,141,.13);
}

body[data-theme="kuromi"] {
    --theme-bg:#15091d;
    --theme-surface:#24102f;
    --theme-surface-2:#30143f;
    --theme-soft:#43205a;
    --theme-text:#fff3fd;
    --theme-heading:#ffffff;
    --theme-muted:#d1acd1;
    --theme-line:#58306d;
    --theme-primary:#6d28b4;
    --theme-primary-2:#8b5cf6;
    --theme-accent:#f472b6;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#24102f;
    --theme-sidebar-2:#0c0511;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#e7cfe9;
    --theme-sidebar-active-bg:rgba(244,114,182,.18);
    --theme-sidebar-active-text:#ffb8da;
    --theme-success:#72e2a6;
    --theme-danger:#ff779e;
    --theme-warning:#ffd166;
    --theme-shadow:0 15px 34px rgba(10,0,20,.42);
}

body[data-theme="aurora_pastel"] {
    --theme-bg:#f5f3ff;
    --theme-surface:rgba(255,255,255,.94);
    --theme-surface-2:#f0f7ff;
    --theme-soft:#ede9fe;
    --theme-text:#26324a;
    --theme-heading:#4c3f83;
    --theme-muted:#68748a;
    --theme-line:#d9d6ee;
    --theme-primary:#7c6bd3;
    --theme-primary-2:#5bc6d6;
    --theme-accent:#8b5cf6;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#4b4f83;
    --theme-sidebar-2:#24324a;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#eef2ff;
    --theme-sidebar-active-bg:linear-gradient(135deg,rgba(167,139,250,.30),rgba(103,232,249,.24));
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#2f9d78;
    --theme-danger:#cf4f68;
    --theme-warning:#9a6b13;
    --theme-radius:20px;
    --theme-shadow:0 14px 34px rgba(83,75,140,.13);
    --theme-glass:rgba(255,255,255,.78);
}

body[data-theme="monochrome"] {
    --theme-bg:#eeeeee;
    --theme-surface:#ffffff;
    --theme-surface-2:#f3f3f3;
    --theme-soft:#dedede;
    --theme-text:#161616;
    --theme-heading:#000000;
    --theme-muted:#5b5b5b;
    --theme-line:#c8c8c8;
    --theme-primary:#111111;
    --theme-primary-2:#4a4a4a;
    --theme-accent:#242424;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#111111;
    --theme-sidebar-2:#000000;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#dddddd;
    --theme-sidebar-active-bg:#ffffff;
    --theme-sidebar-active-text:#000000;
    --theme-success:#303030;
    --theme-danger:#000000;
    --theme-warning:#666666;
    --theme-radius:10px;
    --theme-shadow:0 8px 22px rgba(0,0,0,.12);
}

body[data-theme="sakura_water"] {
    --theme-bg:#fff8fb;
    --theme-surface:#ffffff;
    --theme-surface-2:#fff0f5;
    --theme-soft:#e9f5ff;
    --theme-text:#493845;
    --theme-heading:#8e4167;
    --theme-muted:#806d79;
    --theme-line:#edc7d8;
    --theme-primary:#d979a4;
    --theme-primary-2:#90caf9;
    --theme-accent:#4c9bd5;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#d979a4;
    --theme-sidebar-2:#6ba6d5;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#fff8fc;
    --theme-sidebar-active-bg:rgba(255,255,255,.24);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#3f9a70;
    --theme-danger:#cb4b75;
    --theme-warning:#a16d00;
    --theme-radius:22px;
    --theme-shadow:0 13px 30px rgba(183,108,149,.13);
}

body[data-theme="coffee_workspace"] {
    --theme-bg:#f5ede5;
    --theme-surface:#fffaf4;
    --theme-surface-2:#efe1d3;
    --theme-soft:#e5d2bf;
    --theme-text:#3b2b25;
    --theme-heading:#4e342e;
    --theme-muted:#78655b;
    --theme-line:#d4bca8;
    --theme-primary:#6d4737;
    --theme-primary-2:#a06a42;
    --theme-accent:#b66b32;
    --theme-on-primary:#fffaf4;
    --theme-sidebar-1:#4e342e;
    --theme-sidebar-2:#281913;
    --theme-sidebar-text:#fff4e6;
    --theme-sidebar-link:#ead9c8;
    --theme-sidebar-active-bg:rgba(255,244,230,.16);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#4f875d;
    --theme-danger:#b5433e;
    --theme-warning:#a26a14;
    --theme-shadow:0 12px 28px rgba(71,44,30,.16);
}

body[data-theme="calm_nature"] {
    --theme-bg:#edf6ef;
    --theme-surface:#ffffff;
    --theme-surface-2:#e1f0e4;
    --theme-soft:#d7ebdc;
    --theme-text:#203b2b;
    --theme-heading:#225c35;
    --theme-muted:#607869;
    --theme-line:#b9d4bf;
    --theme-primary:#2e7d32;
    --theme-primary-2:#4f9e5e;
    --theme-accent:#42a5f5;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#2e7d32;
    --theme-sidebar-2:#17471f;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#e6f7e9;
    --theme-sidebar-active-bg:rgba(66,165,245,.20);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#2b8b4b;
    --theme-danger:#bf4141;
    --theme-warning:#9a6c00;
    --theme-shadow:0 12px 30px rgba(45,105,58,.13);
}

body[data-theme="rainbow"] {
    --theme-bg:#f7f8ff;
    --theme-surface:#ffffff;
    --theme-surface-2:#f4f0ff;
    --theme-soft:#eaf5ff;
    --theme-text:#2f3350;
    --theme-heading:#443a83;
    --theme-muted:#6e7290;
    --theme-line:#d8d5eb;
    --theme-primary:#5b64d8;
    --theme-primary-2:#42a5f5;
    --theme-accent:#ab47bc;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#5b64d8;
    --theme-sidebar-2:#7b3fa0;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#f7f2ff;
    --theme-sidebar-active-bg:rgba(255,255,255,.22);
    --theme-sidebar-active-text:#ffffff;
    --theme-success:#45a95d;
    --theme-danger:#e24f5a;
    --theme-warning:#bc7900;
    --theme-shadow:0 12px 30px rgba(87,77,160,.13);
}

body[data-theme="superman_legacy"] {
    --theme-bg:#eef6ff;
    --theme-surface:#ffffff;
    --theme-surface-2:#e4effc;
    --theme-soft:#d8e9fb;
    --theme-text:#16324f;
    --theme-heading:#0d47a1;
    --theme-muted:#5f7288;
    --theme-line:#b8cee8;
    --theme-primary:#1565c0;
    --theme-primary-2:#0d47a1;
    --theme-accent:#d32f2f;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#1565c0;
    --theme-sidebar-2:#082d70;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#eef6ff;
    --theme-sidebar-active-bg:rgba(255,215,0,.23);
    --theme-sidebar-active-text:#ffe56b;
    --theme-success:#2f9a59;
    --theme-danger:#d32f2f;
    --theme-warning:#a97800;
    --theme-shadow:0 12px 30px rgba(16,70,135,.17);
}

body[data-theme="spider_command"] {
    --theme-bg:#050505;
    --theme-surface:#101216;
    --theme-surface-2:#181b21;
    --theme-soft:#232832;
    --theme-text:#f5f7fa;
    --theme-heading:#ffffff;
    --theme-muted:#aab2bd;
    --theme-line:#363b44;
    --theme-primary:#171b24;
    --theme-primary-2:#263448;
    --theme-accent:#e53935;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#0a0a0c;
    --theme-sidebar-2:#000000;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#dce2e9;
    --theme-sidebar-active-bg:rgba(229,57,53,.20);
    --theme-sidebar-active-text:#ff7875;
    --theme-success:#57d58b;
    --theme-danger:#ff5c59;
    --theme-warning:#ffc44d;
    --theme-shadow:0 16px 40px rgba(0,0,0,.52);
}

body[data-theme="hulk_power"] {
    --theme-bg:#0d150d;
    --theme-surface:#172417;
    --theme-surface-2:#203120;
    --theme-soft:#294329;
    --theme-text:#f1fff0;
    --theme-heading:#a7f59c;
    --theme-muted:#b3c9b0;
    --theme-line:#3e5c3b;
    --theme-primary:#2e7d32;
    --theme-primary-2:#54a74e;
    --theme-accent:#a855d5;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#1c4c20;
    --theme-sidebar-2:#081008;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#dbf4d7;
    --theme-sidebar-active-bg:rgba(168,85,213,.20);
    --theme-sidebar-active-text:#df9cff;
    --theme-success:#73e06f;
    --theme-danger:#ff6f76;
    --theme-warning:#ffd25c;
    --theme-shadow:0 15px 38px rgba(0,0,0,.42);
}

body[data-theme="ferrari_racing"] {
    --theme-bg:#080808;
    --theme-surface:#151515;
    --theme-surface-2:#202020;
    --theme-soft:#311315;
    --theme-text:#f7f7f7;
    --theme-heading:#ffffff;
    --theme-muted:#b9b9b9;
    --theme-line:#3b3b3b;
    --theme-primary:#c00000;
    --theme-primary-2:#ff2800;
    --theme-accent:#ffd700;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#c00000;
    --theme-sidebar-2:#200000;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#ffe8e3;
    --theme-sidebar-active-bg:rgba(255,215,0,.19);
    --theme-sidebar-active-text:#ffe36a;
    --theme-success:#5ad47a;
    --theme-danger:#ff5757;
    --theme-warning:#ffd700;
    --theme-shadow:0 16px 40px rgba(0,0,0,.48),0 0 0 1px rgba(255,40,0,.08);
}

body[data-theme="vibranium_panther"] {
    --theme-bg:#05060a;
    --theme-surface:#101119;
    --theme-surface-2:#191725;
    --theme-soft:#251d3d;
    --theme-text:#f4f1ff;
    --theme-heading:#ffffff;
    --theme-muted:#b9b1ca;
    --theme-line:#3e3357;
    --theme-primary:#35106f;
    --theme-primary-2:#6d28d9;
    --theme-accent:#a855f7;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:#16101f;
    --theme-sidebar-2:#050509;
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#ded6ee;
    --theme-sidebar-active-bg:rgba(168,85,247,.20);
    --theme-sidebar-active-text:#d8b4fe;
    --theme-success:#69e0ad;
    --theme-danger:#ff6f91;
    --theme-warning:#f2c85b;
    --theme-radius:15px;
    --theme-shadow:0 16px 42px rgba(0,0,0,.54),0 0 0 1px rgba(168,85,247,.08);
    --theme-glass:rgba(16,17,25,.92);
}

body[data-theme="cyber_hacker"] {
    --theme-bg:#020403;
    --theme-surface:#07100d;
    --theme-surface-2:#0b1915;
    --theme-soft:#102820;
    --theme-text:#c9ffe7;
    --theme-heading:#00e676;
    --theme-muted:#76ba99;
    --theme-line:#174b38;
    --theme-primary:#064a30;
    --theme-primary-2:#008f5a;
    --theme-accent:#00e5ff;
    --theme-on-primary:#ecfff9;
    --theme-sidebar-1:#06120e;
    --theme-sidebar-2:#010202;
    --theme-sidebar-text:#d7ffec;
    --theme-sidebar-link:#87d8b1;
    --theme-sidebar-active-bg:rgba(0,230,118,.16);
    --theme-sidebar-active-text:#00e676;
    --theme-success:#00e676;
    --theme-danger:#ff496c;
    --theme-warning:#ffb300;
    --theme-radius:7px;
    --theme-shadow:0 0 24px rgba(0,230,118,.10),0 18px 42px rgba(0,0,0,.52);
    --theme-glass:rgba(7,16,13,.94);
}

body[data-theme="crystal_glass"] {
    --theme-bg:#081226;
    --theme-surface:rgba(255,255,255,.12);
    --theme-surface-2:rgba(255,255,255,.08);
    --theme-soft:rgba(56,189,248,.15);
    --theme-text:#f8fbff;
    --theme-heading:#ffffff;
    --theme-muted:#c2d7ea;
    --theme-line:rgba(255,255,255,.24);
    --theme-primary:#155e9b;
    --theme-primary-2:#38bdf8;
    --theme-accent:#a5f3fc;
    --theme-on-primary:#ffffff;
    --theme-sidebar-1:rgba(15,23,42,.88);
    --theme-sidebar-2:rgba(30,41,59,.78);
    --theme-sidebar-text:#ffffff;
    --theme-sidebar-link:#dceeff;
    --theme-sidebar-active-bg:rgba(165,243,252,.18);
    --theme-sidebar-active-text:#e6fdff;
    --theme-success:#6ee7b7;
    --theme-danger:#fda4af;
    --theme-warning:#fde68a;
    --theme-radius:22px;
    --theme-shadow:0 18px 46px rgba(1,8,24,.42),inset 0 1px 0 rgba(255,255,255,.13);
    --theme-glass:rgba(255,255,255,.10);
}

/* The theme's intended accent is used by default. Custom accent is opt-in. */
body[data-theme][data-custom-accent="1"] { --theme-accent:var(--h2go-custom-accent); }

/* Synchronize legacy variables used by the existing application styles. */
body[data-theme] {
    --blue:var(--theme-primary);
    --blue-2:var(--theme-primary-2);
    --blue-soft:var(--theme-soft);
    --navy:var(--theme-heading);
    --text:var(--theme-text);
    --muted:var(--theme-muted);
    --line:var(--theme-line);
    --bg:var(--theme-bg);
    --white:var(--theme-surface);
    --success:var(--theme-success);
    --danger:var(--theme-danger);
    --shadow:var(--theme-shadow);
    color:var(--theme-text);
    background:var(--theme-bg);
}

body[data-theme] .app-shell,
body[data-theme] .main,
body[data-theme] .content { background:var(--theme-bg); color:var(--theme-text); }

/* Sidebar: explicit contrast prevents global link colors from darkening labels. */
body[data-theme] .sidebar {
    background:linear-gradient(180deg,var(--theme-sidebar-1),var(--theme-sidebar-2));
    color:var(--theme-sidebar-text);
    border-right:1px solid color-mix(in srgb,var(--theme-line) 55%,transparent);
}
body[data-theme] .sidebar .brand,
body[data-theme] .sidebar .brand span { color:var(--theme-sidebar-text)!important; }
body[data-theme] .sidebar .nav a { color:var(--theme-sidebar-link)!important; }
body[data-theme] .sidebar .nav a:hover,
body[data-theme] .sidebar .nav a.active {
    color:var(--theme-sidebar-active-text)!important;
    background:var(--theme-sidebar-active-bg);
}
body[data-theme] .sidebar-user { border-color:color-mix(in srgb,var(--theme-sidebar-text) 18%,transparent); color:var(--theme-sidebar-text); }
body[data-theme] .sidebar-user strong,
body[data-theme] .sidebar-user a { color:var(--theme-sidebar-text)!important; }
body[data-theme] .sidebar-user span { color:color-mix(in srgb,var(--theme-sidebar-text) 70%,transparent)!important; }
body[data-theme] .superadmin-system-card,
body[data-theme] .sidebar-performance {
    color:var(--theme-sidebar-text);
    border-color:color-mix(in srgb,var(--theme-sidebar-text) 20%,transparent);
    background:color-mix(in srgb,var(--theme-sidebar-text) 9%,transparent);
}
body[data-theme] .system-card-grid>div,
body[data-theme] .system-card-actions a,
body[data-theme] .performance-metric {
    color:var(--theme-sidebar-text)!important;
    background:color-mix(in srgb,var(--theme-sidebar-text) 10%,transparent)!important;
    border-color:color-mix(in srgb,var(--theme-sidebar-text) 14%,transparent)!important;
}
body[data-theme] .system-card-actions a { opacity:1!important; }

/* Main surfaces and typography. */
body[data-theme] .topbar,
body[data-theme] .app-footer {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-muted);
}
body[data-theme] .topbar h1,
body[data-theme] .panel-header h2,
body[data-theme] .stat-card strong,
body[data-theme] .auth-card h1,
body[data-theme] .install-card h1,
body[data-theme] .section-label,
body[data-theme] td strong { color:var(--theme-heading); }
body[data-theme] .topbar p,
body[data-theme] .panel-header p,
body[data-theme] .stat-card span,
body[data-theme] .muted,
body[data-theme] td small,
body[data-theme] .field small { color:var(--theme-muted); }
body[data-theme] .content a:not(.btn):not(.brand),
body[data-theme] .panel a:not(.btn),
body[data-theme] .form-card a:not(.btn) { color:var(--theme-accent); }

body[data-theme] .panel,
body[data-theme] .form-card,
body[data-theme] .stat-card,
body[data-theme] .auth-card,
body[data-theme] .install-card,
body[data-theme] .control-card,
body[data-theme] .backup-summary-grid>div {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-text);
    border-radius:var(--theme-radius);
    box-shadow:var(--theme-shadow);
}
body[data-theme] .panel-header,
body[data-theme] th,
body[data-theme] td,
body[data-theme] .filter-bar { border-color:var(--theme-line); }
body[data-theme] th,
body[data-theme] .filter-bar { background:var(--theme-surface-2); color:var(--theme-muted); }
body[data-theme] tbody tr:hover { background:color-mix(in srgb,var(--theme-accent) 7%,var(--theme-surface)); }

body[data-theme] input,
body[data-theme] textarea,
body[data-theme] select {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-text);
}
body[data-theme] input::placeholder,
body[data-theme] textarea::placeholder { color:var(--theme-muted); }
body[data-theme] input:focus,
body[data-theme] textarea:focus,
body[data-theme] select:focus {
    border-color:var(--theme-accent);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 22%,transparent);
}
body[data-theme] .btn-primary { background:var(--theme-accent); color:var(--theme-on-primary); }
body[data-theme] .btn-primary:hover { filter:brightness(.92); }
body[data-theme] .btn-outline { background:var(--theme-surface); border-color:var(--theme-accent); color:var(--theme-accent); }
body[data-theme] .btn-ghost { color:var(--theme-muted); }
body[data-theme] .inline-form button { color:var(--theme-accent); }
body[data-theme] .inline-form .danger-link { color:var(--theme-danger); }

body[data-theme] .hero-stat,
body[data-theme] .control-center-hero {
    background:linear-gradient(120deg,var(--theme-primary),var(--theme-primary-2));
    color:var(--theme-on-primary);
    box-shadow:var(--theme-shadow);
}
body[data-theme] .hero-stat strong,
body[data-theme] .hero-stat span,
body[data-theme] .control-center-hero h1,
body[data-theme] .control-center-hero p { color:var(--theme-on-primary); }
body[data-theme] .note-box,
body[data-theme] .theme-preset,
body[data-theme] .control-switch,
body[data-theme] .feature-toggle,
body[data-theme] .system-message-time {
    background:var(--theme-surface-2);
    border-color:var(--theme-line);
    color:var(--theme-text);
}
body[data-theme] code { color:var(--theme-accent); }
body[data-theme] .tag-list span { background:var(--theme-soft); color:var(--theme-accent); }
body[data-theme] .badge-success { background:color-mix(in srgb,var(--theme-success) 15%,var(--theme-surface)); color:var(--theme-success); }
body[data-theme] .badge-muted { background:var(--theme-surface-2); color:var(--theme-muted); }
body[data-theme] .alert-info { background:color-mix(in srgb,var(--theme-primary-2) 12%,var(--theme-surface)); color:var(--theme-heading); border-color:color-mix(in srgb,var(--theme-primary-2) 35%,var(--theme-line)); }
body[data-theme] .alert-success { background:color-mix(in srgb,var(--theme-success) 13%,var(--theme-surface)); color:var(--theme-success); border-color:color-mix(in srgb,var(--theme-success) 34%,var(--theme-line)); }
body[data-theme] .alert-error { background:color-mix(in srgb,var(--theme-danger) 13%,var(--theme-surface)); color:var(--theme-danger); border-color:color-mix(in srgb,var(--theme-danger) 34%,var(--theme-line)); }

/* Shared header modules. H2gO Classic remains faithful to the original blue cards. */
body[data-theme] .h2go-now-bar,
body[data-theme] .h2go-header-total-kpi,
body[data-theme] .h2go-clock-card {
    background:linear-gradient(135deg,var(--theme-primary),var(--theme-primary-2))!important;
    color:var(--theme-on-primary)!important;
    border-color:color-mix(in srgb,var(--theme-primary-2) 52%,transparent)!important;
}
body[data-theme] .h2go-now-bar *,
body[data-theme] .h2go-header-total-kpi *,
body[data-theme] .h2go-clock-card * { color:inherit; }
body[data-theme] .now-news-box {
    background:linear-gradient(135deg,var(--theme-primary),var(--theme-primary-2))!important;
    color:var(--theme-on-primary)!important;
    border-color:color-mix(in srgb,var(--theme-primary-2) 58%,transparent)!important;
}
body[data-theme] .now-news-box p,
body[data-theme] .now-news-box span,
body[data-theme] .now-news-box small,
body[data-theme] .now-news-box a { color:var(--theme-on-primary)!important; }
body[data-theme] .h2go-announcement-box {
    background:var(--theme-surface)!important;
    color:var(--theme-text)!important;
    border-color:var(--theme-line)!important;
}
body[data-theme] .h2go-announcement-box .announcement-title { color:var(--theme-heading)!important; }
body[data-theme] .h2go-announcement-box .announcement-text { color:var(--theme-muted)!important; }
body[data-theme] .h2go-announcement-box .announcement-meta { color:var(--theme-muted)!important; }

/* Exact header palette from the established H2gO Classic interface. */
body[data-theme="h2go_classic"] .h2go-now-bar {
    background:linear-gradient(135deg,#0b4fa8 0%,#1568bd 52%,#147bd1 100%)!important;
    border-color:rgba(111,194,255,.28)!important;
    box-shadow:0 8px 22px rgba(13,71,161,.22),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
body[data-theme="h2go_classic"] .h2go-header-total-kpi {
    background:linear-gradient(135deg,#1554a6,#2878d8)!important;
    box-shadow:0 8px 20px rgba(0,70,160,.18)!important;
}
body[data-theme="h2go_classic"] .now-news-box {
    background:linear-gradient(135deg,#0f4f9e 0%,#1769c2 55%,#237fd1 100%)!important;
    border-color:rgba(90,183,245,.58)!important;
    box-shadow:0 8px 20px rgba(15,79,158,.22),inset 0 1px 0 rgba(255,255,255,.10)!important;
}
body[data-theme="h2go_classic"] .h2go-clock-card {
    background:linear-gradient(145deg,#0d4a91,#1769c8)!important;
    border-color:rgba(255,255,255,.22)!important;
    box-shadow:0 8px 24px rgba(15,61,122,.28)!important;
}

/* Preserve special announcement state while adapting it to each palette. */
body[data-theme] .h2go-announcement-box.announcement-welcome {
    background:linear-gradient(135deg,color-mix(in srgb,var(--theme-accent) 10%,var(--theme-surface)),var(--theme-surface),var(--theme-surface-2))!important;
    border-color:color-mix(in srgb,var(--theme-accent) 38%,var(--theme-line))!important;
}
body[data-theme] .h2go-announcement-box.announcement-legendary {
    background:linear-gradient(135deg,color-mix(in srgb,var(--theme-warning) 18%,var(--theme-surface)),var(--theme-surface),color-mix(in srgb,var(--theme-accent) 10%,var(--theme-surface)))!important;
    border-color:var(--theme-warning)!important;
}

/* Theme the extended application modules that previously retained white/blue hard-coded colors. */
body[data-theme] .achievement-tile,
body[data-theme] .announcement-form-card,
body[data-theme] .announcement-list-card,
body[data-theme] .award-form-card,
body[data-theme] .award-guide-card,
body[data-theme] .spc-card:not(.spc-journey-card),
body[data-theme] .target-admin-card,
body[data-theme] .activity-log-card,
body[data-theme] .live-news-source-card {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-text);
    box-shadow:var(--theme-shadow);
}
body[data-theme] .achievement-tile h3,
body[data-theme] .announcement-form-card label,
body[data-theme] .award-form-card label,
body[data-theme] .spc-card:not(.spc-journey-card) .spc-card-title h3,
body[data-theme] .target-admin-heading h3,
body[data-theme] .target-user-identity strong,
body[data-theme] .spc-target-meta strong,
body[data-theme] .spc-chart-day>strong,
body[data-theme] .spc-mini-stats strong,
body[data-theme] .spc-quality-stats strong,
body[data-theme] .spc-badge strong,
body[data-theme] .spc-activity-item div strong { color:var(--theme-heading); }
body[data-theme] .achievement-tile p,
body[data-theme] .announcement-row span,
body[data-theme] .announcement-row small,
body[data-theme] .award-definition small,
body[data-theme] .spc-card:not(.spc-journey-card) .spc-card-title p,
body[data-theme] .spc-target-meta span,
body[data-theme] .spc-target-foot,
body[data-theme] .spc-mini-stats span,
body[data-theme] .spc-mini-stats small,
body[data-theme] .spc-quality-stats span,
body[data-theme] .spc-activity-item div span,
body[data-theme] .spc-activity-item time,
body[data-theme] .target-admin-heading p,
body[data-theme] .target-user-identity small { color:var(--theme-muted); }
body[data-theme] .spc-next-badges>div,
body[data-theme] .spc-target-row,
body[data-theme] .spc-chart-track,
body[data-theme] .spc-mini-stats>div,
body[data-theme] .spc-quality-stats>div,
body[data-theme] .spc-badge,
body[data-theme] .spc-activity-icon,
body[data-theme] .spc-empty,
body[data-theme] .target-user-row,
body[data-theme] .award-definition,
body[data-theme] .target-global-card {
    background:var(--theme-surface-2);
    border-color:var(--theme-line);
    color:var(--theme-text);
}
body[data-theme] .spc-progress { background:var(--theme-soft); }
body[data-theme] .spc-progress span,
body[data-theme] .spc-chart-track span { background:linear-gradient(90deg,var(--theme-primary),var(--theme-accent)); }
body[data-theme] .achievement-filter { background:var(--theme-surface); border-color:var(--theme-line); color:var(--theme-heading); }
body[data-theme] .achievement-filter.active,
body[data-theme] .achievement-counter { background:var(--theme-accent); color:var(--theme-on-primary); border-color:var(--theme-accent); }
body[data-theme] .announcement-source-pill { background:var(--theme-soft); color:var(--theme-accent); }

/* Login, maintenance, and translucent themes. */
body[data-theme].auth-page,
body[data-theme].system-message-page { background:radial-gradient(circle at top,var(--theme-surface-2),var(--theme-bg) 58%); }
body[data-theme="macos"] .topbar,
body[data-theme="macos"] .sidebar,
body[data-theme="macos"] .panel,
body[data-theme="macos"] .form-card,
body[data-theme="macos"] .stat-card,
body[data-theme="macos"] .control-card { backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px); }

/* Distinct theme character. */
body[data-theme="windows_xp"] .topbar,
body[data-theme="windows_xp"] .control-center-hero { border-radius:0; }
body[data-theme="windows_xp"] .h2go-now-bar,
body[data-theme="windows_xp"] .h2go-header-total-kpi,
body[data-theme="windows_xp"] .h2go-announcement-box,
body[data-theme="windows_xp"] .now-news-box,
body[data-theme="windows_xp"] .h2go-clock-card {
    border-radius:8px!important;
    box-shadow:inset 1px 1px rgba(255,255,255,.65),2px 2px 0 rgba(59,76,115,.2)!important;
}
body[data-theme="macos"] .h2go-now-bar,
body[data-theme="macos"] .h2go-header-total-kpi,
body[data-theme="macos"] .h2go-announcement-box,
body[data-theme="macos"] .now-news-box,
body[data-theme="macos"] .h2go-clock-card { border-radius:22px!important; }
body[data-theme="ironman_command"] .h2go-now-bar,
body[data-theme="ironman_command"] .h2go-header-total-kpi,
body[data-theme="ironman_command"] .now-news-box,
body[data-theme="ironman_command"] .h2go-clock-card,
body[data-theme="master_red_gold"] .h2go-now-bar,
body[data-theme="master_red_gold"] .h2go-header-total-kpi,
body[data-theme="master_red_gold"] .now-news-box,
body[data-theme="master_red_gold"] .h2go-clock-card {
    background:linear-gradient(135deg,#6b0b0b,#9f1717 62%,#b8860b)!important;
    box-shadow:0 0 18px rgba(244,197,66,.16),0 12px 28px rgba(0,0,0,.28)!important;
}
body[data-theme="high_contrast"] *:focus-visible { outline:4px solid #ffdd00!important; outline-offset:3px; }
body[data-theme="high_contrast"] .hero-stat,
body[data-theme="high_contrast"] .control-center-hero,
body[data-theme="high_contrast"] .h2go-now-bar,
body[data-theme="high_contrast"] .h2go-header-total-kpi,
body[data-theme="high_contrast"] .now-news-box,
body[data-theme="high_contrast"] .h2go-clock-card { color:#000!important; }



/* Theme-specific finish details. These are accents only; layout remains consistent. */
body[data-theme="matrix"] { font-family:"Courier New",ui-monospace,monospace; }
body[data-theme="matrix"] .control-center-hero,
body[data-theme="matrix"] .hero-stat { box-shadow:0 0 26px rgba(0,255,65,.18); }
body[data-theme="windows_95"] .control-card,
body[data-theme="windows_95"] .panel,
body[data-theme="windows_95"] .stat-card,
body[data-theme="windows_95"] .form-card,
body[data-theme="windows_95"] button,
body[data-theme="windows_95"] input,
body[data-theme="windows_95"] select { border-radius:0!important; }
body[data-theme="rainbow"] .control-center-hero,
body[data-theme="rainbow"] .hero-stat,
body[data-theme="rainbow"] .h2go-now-bar,
body[data-theme="rainbow"] .h2go-header-total-kpi,
body[data-theme="rainbow"] .now-news-box,
body[data-theme="rainbow"] .h2go-clock-card {
    background:linear-gradient(120deg,#ef5350,#ff9800,#66bb6a,#42a5f5,#ab47bc)!important;
}
body[data-theme="grand_adventure"] .control-center-hero,
body[data-theme="grand_adventure"] .hero-stat { background:linear-gradient(120deg,#0057a8 0%,#0057a8 58%,#d62828 100%); }
body[data-theme="ironman_command"] .control-center-hero,
body[data-theme="ironman_command"] .hero-stat { background:linear-gradient(120deg,#7d0d0d,#d22d23 68%,#b98500); }
body[data-theme="superman_legacy"] .control-center-hero,
body[data-theme="superman_legacy"] .hero-stat { background:linear-gradient(120deg,#0d47a1,#1565c0 70%,#d32f2f); }
body[data-theme="spider_command"] .control-center-hero,
body[data-theme="spider_command"] .hero-stat { background:linear-gradient(120deg,#090909,#202b3d 72%,#b71c1c); }
body[data-theme="hulk_power"] .control-center-hero,
body[data-theme="hulk_power"] .hero-stat { background:linear-gradient(120deg,#1b5e20,#3d8d3d 70%,#6a1b9a); }
body[data-theme="ferrari_racing"] .control-center-hero,
body[data-theme="ferrari_racing"] .hero-stat { background:linear-gradient(120deg,#690000,#ff2800 74%,#8b0000); }

/* Density and motion */
body[data-density="compact"] .content { padding:18px 20px; }
body[data-density="compact"] .topbar { padding:12px 20px; }
body[data-density="compact"] .nav a { padding:9px 12px; }
body[data-density="compact"] th,
body[data-density="compact"] td { padding:10px 12px; }
body[data-density="compact"] .stat-card { padding:15px; }
body[data-animation="reduced"] *,
body[data-animation="reduced"] *::before,
body[data-animation="reduced"] *::after { animation-duration:.15s!important; transition-duration:.15s!important; }
body[data-animation="none"] *,
body[data-animation="none"] *::before,
body[data-animation="none"] *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }

/* System Control Center */
.control-center-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:26px 28px; margin-bottom:20px; border-radius:20px; color:#fff; background:linear-gradient(125deg,var(--theme-primary),var(--theme-primary-2)); box-shadow:var(--theme-shadow); }
.control-center-hero h1 { margin:6px 0 7px; font-size:30px; }
.control-center-hero p { max-width:800px; margin:0; opacity:.88; line-height:1.5; }
.control-kicker { display:inline-flex; padding:5px 9px; border-radius:999px; background:rgba(255,255,255,.16); font-size:10px; font-weight:900; letter-spacing:.13em; }
.control-status { min-width:210px; padding:14px 18px; border:1px solid rgba(255,255,255,.25); border-radius:14px; background:rgba(0,0,0,.12); text-align:right; }
.control-status strong,.control-status span { display:block; }.control-status span{margin-top:4px;font-size:11px;opacity:.75}
.control-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.control-card { position:relative; padding:24px; border:1px solid var(--theme-line); border-radius:var(--theme-radius); background:var(--theme-surface); box-shadow:var(--theme-shadow); color:var(--theme-text); }
.control-card-wide { grid-column:1/-1; }
.control-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.control-card-heading h2 { margin:0; font-size:21px; color:var(--theme-text); }.control-card-heading p{margin:6px 0 0;color:var(--theme-muted);line-height:1.45;font-size:13px}
.control-section-title { margin:0 0 12px; font-size:14px; color:var(--theme-text); }
.theme-preset-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.theme-preset { position:relative; display:grid; gap:7px; padding:12px; border:2px solid var(--theme-line); border-radius:14px; background:var(--theme-surface-2); cursor:pointer; }
.theme-preset:hover,.theme-preset.selected,.theme-preset:has(input:checked){border-color:var(--theme-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 14%,transparent)}
.master-theme-button{width:100%;text-align:left;font:inherit;color:inherit}.theme-preset input { position:absolute; opacity:0; pointer-events:none; }.theme-preset strong{font-size:13px;color:var(--theme-text)}.theme-preset small{color:var(--theme-muted);font-size:10.5px;line-height:1.35}
.theme-preview { height:64px; border-radius:9px; overflow:hidden; display:grid; grid-template-columns:28% 1fr; grid-template-rows:20px 1fr; border:1px solid rgba(0,0,0,.15); background:#f4f7fb; }
.theme-preview i{grid-row:1/-1;background:#133f84}.theme-preview b{background:#fff}.theme-preview em{margin:7px;border-radius:5px;background:#2f68bd}
.theme-preview-h2go_dark{background:#07111f}.theme-preview-h2go_dark i{background:linear-gradient(#0a2340,#030b15)}.theme-preview-h2go_dark b{background:#0f2035}.theme-preview-h2go_dark em{background:#38bdf8}
.theme-preview-h2go_light{background:#f6f9fd}.theme-preview-h2go_light i{background:linear-gradient(#fff,#eaf2fb)}.theme-preview-h2go_light b{background:#fff}.theme-preview-h2go_light em{background:#2563eb}
.theme-preview-windows_xp{background:#ece9d8}.theme-preview-windows_xp i{background:linear-gradient(#245edb,#153d9e)}.theme-preview-windows_xp b{background:#245edb}.theme-preview-windows_xp em{background:linear-gradient(#6fc52a,#3c8d0d)}
.theme-preview-macos{background:#f2f2f7}.theme-preview-macos i{background:linear-gradient(#f7f7fa,#e5e8ee)}.theme-preview-macos b{background:rgba(255,255,255,.9)}.theme-preview-macos em{background:#0a84ff;border-radius:10px}
.theme-preview-ocean_command{background:#02121f}.theme-preview-ocean_command i{background:linear-gradient(#031b2e,#010a12)}.theme-preview-ocean_command b{background:#06243a}.theme-preview-ocean_command em{background:#22d3ee}
.theme-preview-high_contrast{background:#000}.theme-preview-high_contrast i{background:#000;border-right:1px solid #fff}.theme-preview-high_contrast b{background:#050505;border-bottom:1px solid #fff}.theme-preview-high_contrast em{background:#ffdd00}
.theme-preview-ironman_command,.theme-preview-master_red_gold{background:#100606}.theme-preview-ironman_command i,.theme-preview-master_red_gold i{background:linear-gradient(#350909,#110303)}.theme-preview-ironman_command b,.theme-preview-master_red_gold b{background:#231012}.theme-preview-ironman_command em,.theme-preview-master_red_gold em{background:linear-gradient(90deg,#b71c1c,#ffc107,#00e5ff)}
.theme-preview-windows_95{background:#008080}.theme-preview-windows_95 i{background:#c0c0c0}.theme-preview-windows_95 b{background:#000080}.theme-preview-windows_95 em{background:#d4d0c8;border:2px outset #fff}
.theme-preview-matrix{background:#000}.theme-preview-matrix i{background:#001700}.theme-preview-matrix b{background:#031003}.theme-preview-matrix em{background:#00ff41;box-shadow:0 0 9px #00ff41}
.theme-preview-xbox{background:#101010}.theme-preview-xbox i{background:#171717}.theme-preview-xbox b{background:#1a1a1a}.theme-preview-xbox em{background:linear-gradient(90deg,#107c10,#8bf000)}
.theme-preview-galaxy_command{background:#07081e}.theme-preview-galaxy_command i{background:#11133c}.theme-preview-galaxy_command b{background:#111333}.theme-preview-galaxy_command em{background:linear-gradient(90deg,#4834d4,#9f8cff)}
.theme-preview-grand_adventure{background:#eaf5ff}.theme-preview-grand_adventure i{background:#0057a8}.theme-preview-grand_adventure b{background:#fff3d6}.theme-preview-grand_adventure em{background:linear-gradient(90deg,#d62828,#f4c430)}
.theme-preview-hello_kitty{background:#fff4fa}.theme-preview-hello_kitty i{background:linear-gradient(#ff8fbd,#df4f8d)}.theme-preview-hello_kitty b{background:#fff}.theme-preview-hello_kitty em{background:#ff6fae}
.theme-preview-kuromi{background:#15091d}.theme-preview-kuromi i{background:#24102f}.theme-preview-kuromi b{background:#30143f}.theme-preview-kuromi em{background:linear-gradient(90deg,#8b5cf6,#f472b6)}
.theme-preview-aurora_pastel{background:#f5f3ff}.theme-preview-aurora_pastel i{background:linear-gradient(#4b4f83,#24324a)}.theme-preview-aurora_pastel b{background:rgba(255,255,255,.94)}.theme-preview-aurora_pastel em{background:linear-gradient(90deg,#a78bfa,#67e8f9,#f9a8d4,#86efac)}
.theme-preview-monochrome{background:#ededed}.theme-preview-monochrome i{background:linear-gradient(#111,#000)}.theme-preview-monochrome b{background:#fff}.theme-preview-monochrome em{background:linear-gradient(90deg,#000,#777,#fff);border:1px solid #777}
.theme-preview-sakura_water{background:#fff8fb}.theme-preview-sakura_water i{background:linear-gradient(#d979a4,#6ba6d5)}.theme-preview-sakura_water b{background:#fff}.theme-preview-sakura_water em{background:linear-gradient(90deg,#f8bbd0,#90caf9)}
.theme-preview-coffee_workspace{background:#f5ede5}.theme-preview-coffee_workspace i{background:#4e342e}.theme-preview-coffee_workspace b{background:#fffaf4}.theme-preview-coffee_workspace em{background:#a06a42}
.theme-preview-calm_nature{background:#edf6ef}.theme-preview-calm_nature i{background:linear-gradient(#2e7d32,#17471f)}.theme-preview-calm_nature b{background:#fff}.theme-preview-calm_nature em{background:linear-gradient(90deg,#66bb6a,#42a5f5)}
.theme-preview-rainbow{background:#f7f8ff}.theme-preview-rainbow i{background:linear-gradient(#ef5350,#ab47bc)}.theme-preview-rainbow b{background:#fff}.theme-preview-rainbow em{background:linear-gradient(90deg,#ef5350,#ff9800,#ffd54f,#66bb6a,#42a5f5,#ab47bc)}
.theme-preview-superman_legacy{background:#eef6ff}.theme-preview-superman_legacy i{background:#1565c0}.theme-preview-superman_legacy b{background:#fff}.theme-preview-superman_legacy em{background:linear-gradient(90deg,#d32f2f,#ffd700)}
.theme-preview-spider_command{background:#050505}.theme-preview-spider_command i{background:#090909}.theme-preview-spider_command b{background:#101216}.theme-preview-spider_command em{background:linear-gradient(90deg,#e53935,#2196f3)}
.theme-preview-hulk_power{background:#0d150d}.theme-preview-hulk_power i{background:#1c4c20}.theme-preview-hulk_power b{background:#172417}.theme-preview-hulk_power em{background:linear-gradient(90deg,#66bb6a,#6a1b9a)}
.theme-preview-ferrari_racing{background:#080808}.theme-preview-ferrari_racing i{background:linear-gradient(#c00000,#200000)}.theme-preview-ferrari_racing b{background:#151515}.theme-preview-ferrari_racing em{background:linear-gradient(90deg,#ff2800,#ffd700)}
.theme-preview-vibranium_panther{background:#05060a}.theme-preview-vibranium_panther i{background:linear-gradient(#16101f,#050509)}.theme-preview-vibranium_panther b{background:#101119}.theme-preview-vibranium_panther em{background:linear-gradient(90deg,#6d28d9,#a855f7,#cbd5e1)}
.theme-preview-cyber_hacker{background:#020403}.theme-preview-cyber_hacker i{background:#06120e}.theme-preview-cyber_hacker b{background:#07100d}.theme-preview-cyber_hacker em{background:linear-gradient(90deg,#00e676,#00e5ff,#ffb300);box-shadow:0 0 9px rgba(0,230,118,.7)}
.theme-preview-crystal_glass{background:linear-gradient(135deg,#0f172a,#155e9b)}.theme-preview-crystal_glass i{background:rgba(255,255,255,.15);backdrop-filter:blur(4px)}.theme-preview-crystal_glass b{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25)}.theme-preview-crystal_glass em{background:linear-gradient(90deg,#38bdf8,#a5f3fc,#8b5cf6)}
.theme-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}.theme-filter{border:1px solid var(--theme-line);background:var(--theme-surface-2);color:var(--theme-text);padding:8px 11px;border-radius:999px;font-size:11px;font-weight:800;cursor:pointer}.theme-filter.active{background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-primary)}.theme-search{margin-left:auto;max-width:250px;padding:8px 11px!important}.theme-category-title{grid-column:1/-1;margin:8px 0 0;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--theme-muted)}.theme-preset[hidden]{display:none!important}.theme-preset-badge{position:absolute;right:8px;top:8px;padding:3px 6px;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font-size:8px;font-weight:900;letter-spacing:.04em}.theme-preset-icon{font-size:15px;margin-right:4px}.theme-preview-notice{display:none;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:10px 12px;border:1px solid var(--theme-accent);border-radius:10px;background:color-mix(in srgb,var(--theme-accent) 10%,var(--theme-surface));color:var(--theme-text);font-size:12px}.theme-preview-notice.visible{display:flex}.theme-history-list{display:grid;gap:8px}.theme-history-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(200px,2fr) auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--theme-line);border-radius:10px;background:var(--theme-surface-2);font-size:11px}.theme-history-row strong{color:var(--theme-heading)}.theme-history-row small{color:var(--theme-muted)}
.control-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.control-stack{display:grid;gap:15px}.control-actions{margin-top:18px}.inline-reset-form{margin-top:10px}.control-form-submit{display:flex;align-items:end}
.accent-option{display:inline-flex!important;align-items:center;gap:8px;margin-top:8px;font-size:12px;font-weight:750;color:var(--theme-text)}.accent-option input{width:auto!important;margin:0}.accent-option span{line-height:1.25}
.control-switch { position:relative; display:grid; grid-template-columns:48px 1fr; grid-template-rows:auto auto; gap:3px 10px; align-items:center; padding:12px; border:1px solid var(--theme-line); border-radius:12px; background:var(--theme-surface-2); cursor:pointer; }
.control-switch input{position:absolute;opacity:0}.control-switch span{grid-row:1/3;width:46px;height:25px;border-radius:999px;background:#a9b4c0;position:relative}.control-switch span:after{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}.control-switch input:checked+span{background:var(--theme-accent)}.control-switch input:checked+span:after{transform:translateX(21px)}.control-switch b{font-size:13px}.control-switch small{color:var(--theme-muted);font-size:10px;line-height:1.35}
.feature-toggle-list { display:grid; gap:9px; }.feature-toggle{display:grid;grid-template-columns:30px 1fr 44px;align-items:center;gap:8px;padding:11px 12px;border:1px solid var(--theme-line);border-radius:11px;background:var(--theme-surface-2);cursor:pointer}.feature-toggle input{display:none}.feature-toggle i{height:23px;border-radius:999px;background:#a9b4c0;position:relative}.feature-toggle i:after{content:"";position:absolute;left:3px;top:3px;width:17px;height:17px;border-radius:50%;background:#fff;transition:.2s}.feature-toggle input:checked+i{background:#20a36a}.feature-toggle input:checked+i:after{transform:translateX(21px)}.feature-icon{font-size:18px}.feature-toggle b{font-size:13px}
.maintenance-card{border-left:5px solid #9ba8b5}.maintenance-card.maintenance-active{border-left-color:#e23c34;box-shadow:0 0 0 3px rgba(226,60,52,.08),var(--theme-shadow)}.maintenance-state{padding:5px 9px;border-radius:999px;background:var(--theme-surface-2);color:var(--theme-muted);font-size:10px;font-weight:900}.maintenance-active .maintenance-state{background:#ffe5e2;color:#a11b15}

/* Backup Center */
.backup-hero form{flex:0 0 auto}.backup-create-button{background:#fff;color:var(--theme-primary);border:0;padding:13px 18px;border-radius:11px;font-weight:900}.backup-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}.backup-summary-grid>div{padding:19px;border:1px solid var(--theme-line);border-radius:var(--theme-radius);background:var(--theme-surface);box-shadow:var(--theme-shadow)}.backup-summary-grid strong,.backup-summary-grid span{display:block}.backup-summary-grid strong{font-size:25px;color:var(--theme-text)}.backup-summary-grid span{margin-top:4px;color:var(--theme-muted);font-size:12px}.backup-note{margin-top:16px;line-height:1.55}

/* Maintenance and disabled pages */
.system-message-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top,var(--theme-surface-2),var(--theme-bg) 60%)}.system-message-card{width:min(560px,100%);padding:34px;text-align:center;border:1px solid var(--theme-line);border-radius:24px;background:var(--theme-surface);box-shadow:var(--theme-shadow);color:var(--theme-text)}.system-message-card img{width:72px;height:72px;object-fit:contain;border-radius:15px}.system-message-icon{display:block;font-size:42px;margin:18px 0 4px}.system-message-card h1{margin:8px 0;color:var(--theme-text)}.system-message-card p{color:var(--theme-muted);line-height:1.6}.system-message-time{margin:18px 0;padding:12px;border-radius:10px;background:var(--theme-surface-2);font-weight:800}.system-inline-message{max-width:700px;margin:40px auto;padding:36px;text-align:center;border:1px solid var(--theme-line);border-radius:var(--theme-radius);background:var(--theme-surface);box-shadow:var(--theme-shadow)}.system-inline-message>span{font-size:45px}.system-inline-message h1{color:var(--theme-text)}.system-inline-message p{color:var(--theme-muted);line-height:1.6}


/* v5.1 theme-specific finish details. */
body[data-theme="aurora_pastel"] .control-center-hero,
body[data-theme="aurora_pastel"] .hero-stat,
body[data-theme="aurora_pastel"] .h2go-now-bar,
body[data-theme="aurora_pastel"] .h2go-header-total-kpi,
body[data-theme="aurora_pastel"] .now-news-box,
body[data-theme="aurora_pastel"] .h2go-clock-card {
    background:linear-gradient(125deg,#6f62b5,#68c9d6 55%,#d58eb9)!important;
}
body[data-theme="monochrome"] img:not(.brand img) { filter:grayscale(1); }
body[data-theme="monochrome"] .control-center-hero,
body[data-theme="monochrome"] .hero-stat,
body[data-theme="monochrome"] .h2go-now-bar,
body[data-theme="monochrome"] .h2go-header-total-kpi,
body[data-theme="monochrome"] .now-news-box,
body[data-theme="monochrome"] .h2go-clock-card {
    background:linear-gradient(135deg,#0a0a0a,#4b4b4b)!important;
}
body[data-theme="vibranium_panther"] .control-center-hero,
body[data-theme="vibranium_panther"] .hero-stat,
body[data-theme="vibranium_panther"] .h2go-now-bar,
body[data-theme="vibranium_panther"] .h2go-header-total-kpi,
body[data-theme="vibranium_panther"] .now-news-box,
body[data-theme="vibranium_panther"] .h2go-clock-card {
    background:linear-gradient(135deg,#09080d,#35106f 58%,#6d28d9)!important;
    box-shadow:0 0 20px rgba(168,85,247,.14),0 14px 32px rgba(0,0,0,.36)!important;
}
body[data-theme="cyber_hacker"] { font-family:"Courier New",ui-monospace,monospace; }
body[data-theme="cyber_hacker"] .control-center-hero,
body[data-theme="cyber_hacker"] .hero-stat,
body[data-theme="cyber_hacker"] .h2go-now-bar,
body[data-theme="cyber_hacker"] .h2go-header-total-kpi,
body[data-theme="cyber_hacker"] .now-news-box,
body[data-theme="cyber_hacker"] .h2go-clock-card {
    background:linear-gradient(135deg,#03120c,#064a30 62%,#007d68)!important;
    box-shadow:0 0 22px rgba(0,230,118,.12),0 14px 32px rgba(0,0,0,.38)!important;
}
body[data-theme="crystal_glass"] {
    background:
        radial-gradient(circle at 15% 10%,rgba(56,189,248,.24),transparent 34%),
        radial-gradient(circle at 88% 18%,rgba(139,92,246,.22),transparent 32%),
        linear-gradient(145deg,#081226,#0f2444 52%,#101a35);
    background-attachment:fixed;
}
body[data-theme="crystal_glass"] .panel,
body[data-theme="crystal_glass"] .form-card,
body[data-theme="crystal_glass"] .stat-card,
body[data-theme="crystal_glass"] .control-card,
body[data-theme="crystal_glass"] .h2go-announcement-box,
body[data-theme="crystal_glass"] .topbar {
    backdrop-filter:blur(16px) saturate(135%);
    -webkit-backdrop-filter:blur(16px) saturate(135%);
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
    body[data-theme="crystal_glass"] {
        --theme-surface:#16243d;
        --theme-surface-2:#1b2d4b;
        --theme-sidebar-1:#0f172a;
        --theme-sidebar-2:#18243a;
    }
}

@media (max-width:1100px){.theme-preset-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:820px){.theme-history-row{grid-template-columns:1fr}.theme-search{margin-left:0;max-width:none;width:100%}.control-grid{grid-template-columns:1fr}.control-card-wide{grid-column:auto}.control-center-hero{align-items:flex-start;flex-direction:column}.control-status{width:100%;text-align:left}.control-form-grid{grid-template-columns:1fr}.theme-preset-grid{grid-template-columns:1fr 1fr}.backup-summary-grid{grid-template-columns:1fr}}
@media (max-width:520px){.theme-preset-grid{grid-template-columns:1fr}.control-card{padding:18px}.control-center-hero{padding:22px}.control-center-hero h1{font-size:25px}}


/* v5.2 — Leaderboard Journey historical layout restoration.
   The original performance module used a highlighted journey card. The theme
   engine's generic .spc-card rule overrode it, while CSS Grid stretched it to
   the full height of the longer Target Progress card. Keep the two cards
   independent and preserve the journey card's visual hierarchy in every theme. */
body[data-theme] .spc-primary-grid {
    align-items:start;
}
body[data-theme] .spc-primary-grid > .spc-card {
    height:auto;
    min-height:0;
    align-self:start;
}
body[data-theme] .spc-journey-card {
    background:linear-gradient(145deg,var(--theme-primary) 0%,var(--theme-primary-2) 100%)!important;
    color:var(--theme-on-primary)!important;
    border:1px solid color-mix(in srgb,var(--theme-primary-2) 58%,transparent)!important;
    box-shadow:0 14px 32px color-mix(in srgb,var(--theme-primary) 24%,transparent)!important;
    overflow:hidden;
}
body[data-theme] .spc-journey-card .spc-card-title h3,
body[data-theme] .spc-journey-card .spc-card-title p,
body[data-theme] .spc-journey-card .spc-rank-display,
body[data-theme] .spc-journey-card .spc-rank-display span,
body[data-theme] .spc-journey-card .spc-rank-display strong,
body[data-theme] .spc-journey-card .spc-rank-display small,
body[data-theme] .spc-journey-card .spc-journey-facts span,
body[data-theme] .spc-journey-card .spc-journey-facts strong,
body[data-theme] .spc-journey-card .spc-rank-message,
body[data-theme] .spc-journey-card .spc-rank-message strong {
    color:var(--theme-on-primary)!important;
}
body[data-theme] .spc-journey-card .spc-card-title p,
body[data-theme] .spc-journey-card .spc-rank-display span,
body[data-theme] .spc-journey-card .spc-rank-display small,
body[data-theme] .spc-journey-card .spc-journey-facts span {
    opacity:.82;
}
body[data-theme] .spc-journey-card .spc-rank-display {
    padding:2px 0 14px;
}
body[data-theme] .spc-journey-card .spc-rank-display strong {
    font-size:clamp(48px,5vw,64px);
}
body[data-theme] .spc-journey-card .spc-journey-facts > div {
    background:color-mix(in srgb,var(--theme-on-primary) 12%,transparent)!important;
    border-color:color-mix(in srgb,var(--theme-on-primary) 22%,transparent)!important;
}
body[data-theme] .spc-journey-card .spc-rank-message {
    background:color-mix(in srgb,var(--theme-on-primary) 13%,transparent)!important;
    border:1px solid color-mix(in srgb,var(--theme-on-primary) 18%,transparent)!important;
}
body[data-theme] .spc-journey-card .spc-rank-message.champion {
    background:color-mix(in srgb,var(--theme-warning) 24%,transparent)!important;
    border-color:color-mix(in srgb,var(--theme-warning) 48%,transparent)!important;
}
@media (max-width:1100px) {
    body[data-theme] .spc-primary-grid {
        grid-template-columns:1fr;
        align-items:start;
    }
    body[data-theme] .spc-journey-card,
    body[data-theme] .spc-target-card {
        width:100%;
    }
}

/* v5.3 — Performance Center visual balance and rank-aware journey card.
   Overrides the v5.2 solid primary block with a lighter theme-aware surface,
   keeps the top row compact, and preserves special rank accents. */
body[data-theme] .spc-primary-grid{
    grid-template-columns:minmax(360px,.92fr) minmax(520px,1.18fr);
    gap:16px;
    align-items:stretch;
}
body[data-theme] .spc-primary-grid>.spc-card{
    min-height:316px;
    height:auto;
    align-self:stretch;
}
body[data-theme] .spc-secondary-grid{
    grid-template-columns:minmax(420px,1.16fr) minmax(280px,.78fr) minmax(330px,.96fr);
    gap:16px;
    align-items:stretch;
}
body[data-theme] .spc-secondary-grid>.spc-card{
    min-height:332px;
}
body[data-theme] .spc-journey-card{
    --spc-rank-accent:var(--theme-primary);
    --spc-rank-accent-2:var(--theme-accent);
    background:linear-gradient(150deg,var(--theme-surface) 0%,var(--theme-surface-2) 100%)!important;
    color:var(--theme-text)!important;
    border:1px solid var(--theme-border)!important;
    box-shadow:0 10px 26px color-mix(in srgb,var(--spc-rank-accent) 14%,transparent)!important;
}
body[data-theme] .spc-journey-card:before{
    background:linear-gradient(90deg,var(--spc-rank-accent),var(--spc-rank-accent-2));
}
body[data-theme] .spc-journey-card.spc-rank-position-1{
    --spc-rank-accent:#d4a514;
    --spc-rank-accent-2:#ffe17a;
}
body[data-theme] .spc-journey-card.spc-rank-position-2{
    --spc-rank-accent:#8b98a8;
    --spc-rank-accent-2:#dce4ec;
}
body[data-theme] .spc-journey-card.spc-rank-position-3{
    --spc-rank-accent:#b86f32;
    --spc-rank-accent-2:#f0b37e;
}
body[data-theme] .spc-journey-card .spc-card-title h3,
body[data-theme] .spc-journey-card .spc-rank-display,
body[data-theme] .spc-journey-card .spc-rank-display strong,
body[data-theme] .spc-journey-card .spc-journey-facts strong,
body[data-theme] .spc-journey-card .spc-rank-message,
body[data-theme] .spc-journey-card .spc-rank-message strong{
    color:var(--theme-heading)!important;
}
body[data-theme] .spc-journey-card .spc-card-title p,
body[data-theme] .spc-journey-card .spc-rank-display span,
body[data-theme] .spc-journey-card .spc-rank-display small,
body[data-theme] .spc-journey-card .spc-journey-facts span{
    color:var(--theme-muted)!important;
    opacity:1;
}
body[data-theme] .spc-journey-card .spc-rank-display strong{
    color:var(--spc-rank-accent)!important;
    text-shadow:0 4px 18px color-mix(in srgb,var(--spc-rank-accent) 20%,transparent);
}
body[data-theme] .spc-journey-card .spc-journey-facts>div{
    background:color-mix(in srgb,var(--theme-primary) 5%,var(--theme-surface))!important;
    border-color:var(--theme-border)!important;
}
body[data-theme] .spc-journey-card .spc-rank-message{
    background:color-mix(in srgb,var(--spc-rank-accent) 7%,var(--theme-surface))!important;
    border:1px solid color-mix(in srgb,var(--spc-rank-accent) 26%,var(--theme-border))!important;
    border-left:4px solid var(--spc-rank-accent)!important;
}
body[data-theme] .spc-journey-card .spc-rank-message.champion{
    background:color-mix(in srgb,#f5c542 12%,var(--theme-surface))!important;
    border-color:color-mix(in srgb,#d4a514 42%,var(--theme-border))!important;
}
body[data-theme] .spc-target-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
body[data-theme] .spc-target-row{
    background:color-mix(in srgb,var(--theme-primary) 3%,var(--theme-surface-2))!important;
    border:1px solid var(--theme-border)!important;
    border-radius:13px;
    padding:12px;
}
body[data-theme] .spc-target-row:last-child{
    border-bottom:1px solid var(--theme-border)!important;
    padding-bottom:12px;
}
body[data-theme] .spc-target-row.is-complete{
    background:color-mix(in srgb,var(--theme-success) 8%,var(--theme-surface))!important;
    border-color:color-mix(in srgb,var(--theme-success) 45%,var(--theme-border))!important;
}
body[data-theme] .spc-target-card,
body[data-theme] .spc-secondary-grid>.spc-card{
    overflow:hidden;
}

@media(max-width:1280px){
    body[data-theme] .spc-primary-grid{
        grid-template-columns:minmax(330px,.9fr) minmax(450px,1.1fr);
    }
    body[data-theme] .spc-secondary-grid{
        grid-template-columns:minmax(390px,1.1fr) minmax(250px,.8fr) minmax(300px,.9fr);
    }
}
@media(max-width:1100px){
    body[data-theme] .spc-primary-grid,
    body[data-theme] .spc-secondary-grid{
        grid-template-columns:1fr;
    }
    body[data-theme] .spc-primary-grid>.spc-card,
    body[data-theme] .spc-secondary-grid>.spc-card{
        min-height:0;
    }
}
@media(max-width:720px){
    body[data-theme] .spc-target-list{
        grid-template-columns:1fr;
    }
}

/* v5.4 — Performance Center clean card correction.
   Removes the decorative rank strip and side marker that appeared as excess
   color behind the Leaderboard Journey card in several themes. */
body[data-theme] .spc-journey-card::before,
body[data-theme] .spc-journey-card:before {
    content:none !important;
    display:none !important;
    width:0 !important;
    height:0 !important;
    background:none !important;
}
body[data-theme] .spc-journey-card {
    padding-top:20px !important;
    overflow:hidden !important;
    border-radius:18px !important;
    box-shadow:0 8px 22px color-mix(in srgb,var(--theme-heading) 9%,transparent) !important;
}
body[data-theme] .spc-journey-card .spc-rank-message {
    display:block !important;
    border:1px solid var(--theme-border) !important;
    border-left:1px solid var(--theme-border) !important;
    border-radius:12px !important;
    padding:11px 14px !important;
    background:color-mix(in srgb,var(--theme-primary) 4%,var(--theme-surface-2)) !important;
    box-shadow:none !important;
}
body[data-theme] .spc-journey-card .spc-rank-message strong {
    display:inline !important;
    margin-inline:.22em !important;
}
body[data-theme] .spc-journey-card .spc-rank-message.champion {
    border:1px solid color-mix(in srgb,var(--theme-warning) 34%,var(--theme-border)) !important;
    background:color-mix(in srgb,var(--theme-warning) 8%,var(--theme-surface)) !important;
}
body[data-theme] .spc-primary-grid,
body[data-theme] .spc-secondary-grid {
    margin-top:0 !important;
}
body[data-theme] .spc-primary-grid > .spc-card,
body[data-theme] .spc-secondary-grid > .spc-card {
    border-radius:18px !important;
}

/* H2gO v6.25 theme collection changes */
body[data-theme="f1_racing"]{
    --theme-bg:#090909;--theme-surface:#171717;--theme-surface-2:#222222;--theme-soft:#321416;
    --theme-text:#f7f7f7;--theme-heading:#ffffff;--theme-muted:#c2c2c2;--theme-line:#3d3d3d;
    --theme-primary:#b80000;--theme-primary-2:#e10600;--theme-accent:#ffd700;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#b80000;--theme-sidebar-2:#1d0505;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#ffeceb;
    --theme-sidebar-active-bg:rgba(255,215,0,.18);--theme-sidebar-active-text:#ffe26b;
    --theme-success:#55cf77;--theme-danger:#ff5b5b;--theme-warning:#ffd700;
    --theme-shadow:0 16px 40px rgba(0,0,0,.48),0 0 0 1px rgba(225,6,0,.08);
}
body[data-theme="spiderman_inspired"]{
    --theme-bg:#edf4fb;--theme-surface:#ffffff;--theme-surface-2:#e7eef7;--theme-soft:#dce8f5;
    --theme-text:#17283d;--theme-heading:#0d2b55;--theme-muted:#64768a;--theme-line:#bfd0e4;
    --theme-primary:#b71c1c;--theme-primary-2:#d32f2f;--theme-accent:#1976d2;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#0d2b55;--theme-sidebar-2:#06182f;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#eef6ff;
    --theme-sidebar-active-bg:rgba(211,47,47,.24);--theme-sidebar-active-text:#ffffff;
    --theme-success:#2d9859;--theme-danger:#c62828;--theme-warning:#c18200;--theme-shadow:0 12px 30px rgba(13,43,85,.14);
}
body[data-theme="pikachu_inspired"]{
    --theme-bg:#fff9db;--theme-surface:#fffef7;--theme-surface-2:#fff4b7;--theme-soft:#fbe98b;
    --theme-text:#242424;--theme-heading:#1d1d1d;--theme-muted:#6b6250;--theme-line:#e7cf61;
    --theme-primary:#262626;--theme-primary-2:#3b3b3b;--theme-accent:#f7d51d;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#202124;--theme-sidebar-2:#0f1011;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#fff7bf;
    --theme-sidebar-active-bg:rgba(247,213,29,.24);--theme-sidebar-active-text:#ffe95a;
    --theme-success:#2f9652;--theme-danger:#d73732;--theme-warning:#b67b00;--theme-shadow:0 12px 28px rgba(120,95,0,.14);
}
body[data-theme="doctor_doom"]{
    --theme-bg:#080d0a;--theme-surface:#121916;--theme-surface-2:#1b2420;--theme-soft:#23352a;
    --theme-text:#eef4ef;--theme-heading:#d9e3dc;--theme-muted:#9ead9f;--theme-line:#39483d;
    --theme-primary:#214a32;--theme-primary-2:#356447;--theme-accent:#c5a24a;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#17271d;--theme-sidebar-2:#050806;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#d4dfd6;
    --theme-sidebar-active-bg:rgba(197,162,74,.18);--theme-sidebar-active-text:#e9cc78;
    --theme-success:#63cf82;--theme-danger:#dd6666;--theme-warning:#d4ad4c;--theme-shadow:0 18px 46px rgba(0,0,0,.55);
}
body[data-theme="roronoa_zoro_light"]{
    --theme-bg:#edf6ec;--theme-surface:#fffef8;--theme-surface-2:#f3f8ef;--theme-soft:#e1eedc;
    --theme-text:#213126;--theme-heading:#123c24;--theme-muted:#617366;--theme-line:#bfd2bf;
    --theme-primary:#245c35;--theme-primary-2:#2e7d32;--theme-accent:#9abf52;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#1b4332;--theme-sidebar-2:#0d291d;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#e7f6e8;
    --theme-sidebar-active-bg:rgba(201,219,107,.25);--theme-sidebar-active-text:#efffa8;
    --theme-success:#2e8b57;--theme-danger:#c24a4a;--theme-warning:#b48a2b;--theme-shadow:0 14px 34px rgba(27,67,50,.16);
}

body[data-theme="f1_racing"] .control-center-hero,body[data-theme="f1_racing"] .hero-stat{background:linear-gradient(120deg,#1b1b1b,#e10600 72%,#6a0000)}
body[data-theme="spiderman_inspired"] .control-center-hero,body[data-theme="spiderman_inspired"] .hero-stat{background:linear-gradient(120deg,#0d2b55,#1976d2 62%,#c62828)}
body[data-theme="pikachu_inspired"] .control-center-hero,body[data-theme="pikachu_inspired"] .hero-stat{background:linear-gradient(120deg,#202124,#3a3b3c 63%,#f7d51d);color:#fff}
body[data-theme="doctor_doom"] .control-center-hero,body[data-theme="doctor_doom"] .hero-stat{background:linear-gradient(120deg,#101712,#214a32 68%,#5b6168)}
body[data-theme="roronoa_zoro_light"] .control-center-hero,body[data-theme="roronoa_zoro_light"] .hero-stat{background:linear-gradient(120deg,#1b4332,#2e7d32 62%,#91b84b);color:#fff}

.theme-preview-f1_racing{background:#090909}.theme-preview-f1_racing i{background:linear-gradient(#b80000,#250000)}.theme-preview-f1_racing b{background:#171717}.theme-preview-f1_racing em{background:linear-gradient(90deg,#e10600,#fff,#ffd700)}
.theme-preview-spiderman_inspired{background:#edf4fb}.theme-preview-spiderman_inspired i{background:linear-gradient(#0d2b55,#06182f)}.theme-preview-spiderman_inspired b{background:#fff}.theme-preview-spiderman_inspired em{background:linear-gradient(90deg,#c62828,#1976d2)}
.theme-preview-pikachu_inspired{background:#fff9db}.theme-preview-pikachu_inspired i{background:#202124}.theme-preview-pikachu_inspired b{background:#fffef7}.theme-preview-pikachu_inspired em{background:linear-gradient(90deg,#f7d51d,#e53935,#42a5f5)}
.theme-preview-doctor_doom{background:#080d0a}.theme-preview-doctor_doom i{background:linear-gradient(#214a32,#07100a)}.theme-preview-doctor_doom b{background:#171e1a}.theme-preview-doctor_doom em{background:linear-gradient(90deg,#356447,#8d9699,#c5a24a)}
.theme-preview-roronoa_zoro_light{background:#edf6ec}.theme-preview-roronoa_zoro_light i{background:linear-gradient(#1b4332,#0d291d)}.theme-preview-roronoa_zoro_light b{background:#fffef8}.theme-preview-roronoa_zoro_light em{background:linear-gradient(90deg,#2e7d32,#9abf52,#e9e4cf)}

/* H2gO v6.26 Superadmin exclusive command themes */
body[data-theme="cyber_emperor"]{
    --theme-bg:#05070c;--theme-surface:#0c1119;--theme-surface-2:#111a27;--theme-soft:#10243a;
    --theme-text:#eef9ff;--theme-heading:#ffffff;--theme-muted:#91a8bd;--theme-line:#22384e;
    --theme-primary:#0848b8;--theme-primary-2:#0b5cff;--theme-accent:#00e5ff;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#061426;--theme-sidebar-2:#020509;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#d9f7ff;
    --theme-sidebar-active-bg:rgba(0,229,255,.16);--theme-sidebar-active-text:#7ff5ff;
    --theme-success:#45d483;--theme-danger:#ff5c6c;--theme-warning:#ffd166;--theme-shadow:0 18px 48px rgba(0,0,0,.58),0 0 26px rgba(0,229,255,.07);
}
body[data-theme="royal_black_gold"]{
    --theme-bg:#070707;--theme-surface:#111111;--theme-surface-2:#1a1a1a;--theme-soft:#221d12;
    --theme-text:#f7f2e8;--theme-heading:#fffaf0;--theme-muted:#bdb3a1;--theme-line:#3c3528;
    --theme-primary:#332600;--theme-primary-2:#6b5000;--theme-accent:#d4af37;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#15120a;--theme-sidebar-2:#030303;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#e9dfc6;
    --theme-sidebar-active-bg:rgba(212,175,55,.18);--theme-sidebar-active-text:#f5d975;
    --theme-success:#6fcf86;--theme-danger:#dd6a6a;--theme-warning:#d4af37;--theme-shadow:0 20px 52px rgba(0,0,0,.62),0 0 0 1px rgba(212,175,55,.05);
}
body[data-theme="phantom_command"]{
    --theme-bg:#08090d;--theme-surface:#11131a;--theme-surface-2:#191b24;--theme-soft:#20182d;
    --theme-text:#eff3fb;--theme-heading:#ffffff;--theme-muted:#a1a9b8;--theme-line:#35394a;
    --theme-primary:#25163d;--theme-primary-2:#422463;--theme-accent:#8ab4f8;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#171021;--theme-sidebar-2:#050507;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#e9e3f4;
    --theme-sidebar-active-bg:rgba(138,180,248,.16);--theme-sidebar-active-text:#b8d4ff;
    --theme-success:#62c993;--theme-danger:#df6674;--theme-warning:#d2a95f;--theme-shadow:0 20px 54px rgba(0,0,0,.62),0 0 26px rgba(97,63,145,.10);
}
body[data-theme="titanium_war_room"]{
    --theme-bg:#11161c;--theme-surface:#1a212a;--theme-surface-2:#242d38;--theme-soft:#2d3742;
    --theme-text:#edf2f7;--theme-heading:#ffffff;--theme-muted:#a9b4c0;--theme-line:#425160;
    --theme-primary:#24364b;--theme-primary-2:#365b7e;--theme-accent:#f0a500;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#1c2b3b;--theme-sidebar-2:#0c1116;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#dce6ef;
    --theme-sidebar-active-bg:rgba(240,165,0,.17);--theme-sidebar-active-text:#ffc247;
    --theme-success:#68c587;--theme-danger:#df6a6a;--theme-warning:#f0a500;--theme-shadow:0 16px 42px rgba(0,0,0,.48);
}
body[data-theme="luffy_light"]{
    --theme-bg:#fff8ea;--theme-surface:#ffffff;--theme-surface-2:#fff4dc;--theme-soft:#f7e8bd;
    --theme-text:#2b3340;--theme-heading:#123d70;--theme-muted:#6d7180;--theme-line:#e8d5aa;
    --theme-primary:#b71c1c;--theme-primary-2:#d32f2f;--theme-accent:#f2c94c;--theme-on-primary:#ffffff;
    --theme-sidebar-1:#145da0;--theme-sidebar-2:#0b3c72;--theme-sidebar-text:#ffffff;--theme-sidebar-link:#f4f8ff;
    --theme-sidebar-active-bg:rgba(242,201,76,.28);--theme-sidebar-active-text:#fff3a4;
    --theme-success:#2f9858;--theme-danger:#c62828;--theme-warning:#d69d00;--theme-shadow:0 14px 34px rgba(20,93,160,.15);
}

body[data-theme="cyber_emperor"] .control-center-hero,body[data-theme="cyber_emperor"] .hero-stat{background:linear-gradient(120deg,#05070c,#0848b8 66%,#00a9c5)}
body[data-theme="royal_black_gold"] .control-center-hero,body[data-theme="royal_black_gold"] .hero-stat{background:linear-gradient(120deg,#070707,#211b0d 66%,#8a6900)}
body[data-theme="phantom_command"] .control-center-hero,body[data-theme="phantom_command"] .hero-stat{background:linear-gradient(120deg,#08090d,#25163d 66%,#42305e)}
body[data-theme="titanium_war_room"] .control-center-hero,body[data-theme="titanium_war_room"] .hero-stat{background:linear-gradient(120deg,#11161c,#24364b 66%,#6e4d00)}
body[data-theme="luffy_light"] .control-center-hero,body[data-theme="luffy_light"] .hero-stat{background:linear-gradient(120deg,#145da0,#1976d2 54%,#c62828 84%,#e3aa24);color:#fff}

.theme-preview-cyber_emperor{background:#05070c}.theme-preview-cyber_emperor i{background:linear-gradient(#0848b8,#020711)}.theme-preview-cyber_emperor b{background:#0c1119}.theme-preview-cyber_emperor em{background:linear-gradient(90deg,#0b5cff,#00e5ff,#c7d4df)}
.theme-preview-royal_black_gold{background:#070707}.theme-preview-royal_black_gold i{background:linear-gradient(#17130a,#030303)}.theme-preview-royal_black_gold b{background:#111}.theme-preview-royal_black_gold em{background:linear-gradient(90deg,#6b5000,#d4af37,#f4e6bd)}
.theme-preview-phantom_command{background:#08090d}.theme-preview-phantom_command i{background:linear-gradient(#25163d,#08090d)}.theme-preview-phantom_command b{background:#11131a}.theme-preview-phantom_command em{background:linear-gradient(90deg,#422463,#8ab4f8,#c6d9f5)}
.theme-preview-titanium_war_room{background:#11161c}.theme-preview-titanium_war_room i{background:linear-gradient(#24364b,#0c1116)}.theme-preview-titanium_war_room b{background:#1a212a}.theme-preview-titanium_war_room em{background:linear-gradient(90deg,#365b7e,#8996a3,#f0a500)}
.theme-preview-luffy_light{background:#fff8ea}.theme-preview-luffy_light i{background:linear-gradient(#145da0,#0b3c72)}.theme-preview-luffy_light b{background:#ffffff}.theme-preview-luffy_light em{background:linear-gradient(90deg,#c62828,#f2c94c,#1976d2)}
