/**
 * HR named theme packs (chat-aligned IDs).
 * Applied when html[data-theme-id] is set. Loads after hr-tokens.css.
 * UI must keep using var(--hr-*); packs only retint the token map.
 */
html[data-theme-id="classic"] {
  color-scheme: light;
  --hr-canvas: #e8eef6;
  --hr-bg: #eef2f8;
  --hr-surface: #ffffff;
  --hr-surface-muted: #f5f8fc;
  --hr-surface-nested: #e8eef6;
  --hr-input: #f5f8fc;
  --hr-border: #dbe4f0;
  --hr-text: #0f172a;
  --hr-text-secondary: #334155;
  --hr-text-muted: #64748b;
  --hr-primary: #2563eb;
  --hr-primary-hover: #1d4ed8;
  --hr-primary-light: #3b82f6;
  --hr-primary-soft: rgba(37, 99, 235, 0.10);
  --hr-primary-dark: #1e40af;
  --hr-muted-bg: #f5f8fc;
  --hr-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  --hr-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --hr-sidebar-bg: #ffffff;
  --hr-sidebar-border: #dbe4f0;
  --hr-sidebar-text: #334155;
  --hr-sidebar-text-hover: #0f172a;
  --hr-sidebar-caption: #94a3b8;
  --hr-sidebar-active-bg: #2563eb;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #f5f8fc;
  --hr-row-hover: #f5f8fc;
  --hr-track: #e8eef6;
  --hr-grid: #eef2f8;
}

html[data-theme-id="midnight"] {
  color-scheme: dark;
  --hr-canvas: #0c111a;
  --hr-bg: #0b1018;
  --hr-surface: #121a28;
  --hr-surface-muted: #0b1018;
  --hr-surface-nested: #182235;
  --hr-input: #182235;
  --hr-border: rgba(120, 155, 210, 0.22);
  --hr-text: #e2e8f0;
  --hr-text-secondary: #b6c2d4;
  --hr-text-muted: #8fa0b8;
  --hr-primary: #5b8fd4;
  --hr-primary-hover: #74a3e0;
  --hr-primary-light: #93c5fd;
  --hr-primary-soft: rgba(91, 143, 212, 0.14);
  --hr-primary-dark: #3d5f8f;
  --hr-muted-bg: #182235;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.28);
  --hr-sidebar-bg: #121a28;
  --hr-sidebar-border: rgba(120, 155, 210, 0.18);
  --hr-sidebar-text: #8fa0b8;
  --hr-sidebar-text-hover: #e2e8f0;
  --hr-sidebar-caption: #9aaac0;
  --hr-sidebar-active-bg: #5b8fd4;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #182235;
  --hr-row-hover: #182235;
  --hr-track: #182235;
  --hr-grid: #121a28;
}

html[data-theme-id="teams"] {
  color-scheme: dark;
  --hr-canvas: #292929;
  --hr-bg: #1f1f1f;
  --hr-surface: #252423;
  --hr-surface-muted: #1f1f1f;
  --hr-surface-nested: #2d2c2c;
  --hr-input: #2d2c2c;
  --hr-border: rgba(255, 255, 255, 0.10);
  --hr-text: #ffffff;
  --hr-text-secondary: #d2d0ce;
  --hr-text-muted: #a19f9d;
  --hr-primary: #6264a7;
  --hr-primary-hover: #7a7cb8;
  --hr-primary-light: #8b8dc0;
  --hr-primary-soft: rgba(98, 100, 167, 0.18);
  --hr-primary-dark: #464775;
  --hr-muted-bg: #2d2c2c;
  --hr-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.32);
  --hr-sidebar-bg: #252423;
  --hr-sidebar-border: rgba(255, 255, 255, 0.08);
  --hr-sidebar-text: #a19f9d;
  --hr-sidebar-text-hover: #ffffff;
  --hr-sidebar-caption: #8a8886;
  --hr-sidebar-active-bg: #6264a7;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #2d2c2c;
  --hr-row-hover: #2d2c2c;
  --hr-track: #2d2c2c;
  --hr-grid: #252423;
}

html[data-theme-id="slate"] {
  color-scheme: dark;
  --hr-canvas: #101318;
  --hr-bg: #0d0f13;
  --hr-surface: #171b22;
  --hr-surface-muted: #0d0f13;
  --hr-surface-nested: #1f2430;
  --hr-input: #1f2430;
  --hr-border: rgba(148, 163, 184, 0.20);
  --hr-text: #e5e7eb;
  --hr-text-secondary: #c4cad4;
  --hr-text-muted: #9ca3af;
  --hr-primary: #94a3b8;
  --hr-primary-hover: #cbd5e1;
  --hr-primary-light: #e2e8f0;
  --hr-primary-soft: rgba(148, 163, 184, 0.12);
  --hr-primary-dark: #64748b;
  --hr-muted-bg: #1f2430;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --hr-sidebar-bg: #171b22;
  --hr-sidebar-border: rgba(148, 163, 184, 0.16);
  --hr-sidebar-text: #9ca3af;
  --hr-sidebar-text-hover: #e5e7eb;
  --hr-sidebar-caption: #a8b0bd;
  --hr-sidebar-active-bg: #64748b;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #1f2430;
  --hr-row-hover: #1f2430;
  --hr-track: #1f2430;
  --hr-grid: #171b22;
}

html[data-theme-id="plum"] {
  color-scheme: dark;
  --hr-canvas: #120d18;
  --hr-bg: #0f0a15;
  --hr-surface: #1a1424;
  --hr-surface-muted: #0f0a15;
  --hr-surface-nested: #231a30;
  --hr-input: #231a30;
  --hr-border: rgba(167, 139, 250, 0.22);
  --hr-text: #ede9fe;
  --hr-text-secondary: #cfc0f0;
  --hr-text-muted: #a89bc4;
  --hr-primary: #a78bfa;
  --hr-primary-hover: #c4b5fd;
  --hr-primary-light: #ddd6fe;
  --hr-primary-soft: rgba(167, 139, 250, 0.12);
  --hr-primary-dark: #6d4f9e;
  --hr-muted-bg: #231a30;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.28);
  --hr-sidebar-bg: #1a1424;
  --hr-sidebar-border: rgba(167, 139, 250, 0.18);
  --hr-sidebar-text: #a89bc4;
  --hr-sidebar-text-hover: #ede9fe;
  --hr-sidebar-caption: #b6a8d4;
  --hr-sidebar-active-bg: #a78bfa;
  --hr-sidebar-active-text: #1a1424;
  --hr-sidebar-hover-bg: #231a30;
  --hr-row-hover: #231a30;
  --hr-track: #231a30;
  --hr-grid: #1a1424;
}

html[data-theme-id="rose"] {
  color-scheme: light;
  --hr-canvas: #f6eef2;
  --hr-bg: #f8f1f4;
  --hr-surface: #ffffff;
  --hr-surface-muted: #fdf8fa;
  --hr-surface-nested: #f3e4eb;
  --hr-input: #fdf8fa;
  --hr-border: #ecdce4;
  --hr-text: #3b1228;
  --hr-text-secondary: #5c2a42;
  --hr-text-muted: #9d6b82;
  --hr-primary: #db2777;
  --hr-primary-hover: #be185d;
  --hr-primary-light: #ec4899;
  --hr-primary-soft: rgba(219, 39, 119, 0.10);
  --hr-primary-dark: #9d174d;
  --hr-muted-bg: #fdf8fa;
  --hr-shadow: 0 10px 28px rgba(59, 18, 40, 0.08);
  --hr-shadow-sm: 0 2px 8px rgba(59, 18, 40, 0.05);
  --hr-sidebar-bg: #ffffff;
  --hr-sidebar-border: #ecdce4;
  --hr-sidebar-text: #5c2a42;
  --hr-sidebar-text-hover: #3b1228;
  --hr-sidebar-caption: #b8899c;
  --hr-sidebar-active-bg: #db2777;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #fdf8fa;
  --hr-row-hover: #fdf8fa;
  --hr-track: #f3e4eb;
  --hr-grid: #f8f1f4;
}

/* Warm golden / "yellow" feel */
html[data-theme-id="sunrise"],
html[data-theme-id="yellow"] {
  color-scheme: light;
  --hr-canvas: #faf3e8;
  --hr-bg: #fbf5ec;
  --hr-surface: #fffdf9;
  --hr-surface-muted: #fff8ef;
  --hr-surface-nested: #f0e4d4;
  --hr-input: #fff8ef;
  --hr-border: #ead9c4;
  --hr-text: #3d2814;
  --hr-text-secondary: #5c3d22;
  --hr-text-muted: #9a7348;
  --hr-primary: #ea580c;
  --hr-primary-hover: #c2410c;
  --hr-primary-light: #f97316;
  --hr-primary-soft: rgba(234, 88, 12, 0.10);
  --hr-primary-dark: #9a3412;
  --hr-muted-bg: #fff8ef;
  --hr-shadow: 0 10px 28px rgba(61, 40, 20, 0.08);
  --hr-shadow-sm: 0 2px 8px rgba(61, 40, 20, 0.05);
  --hr-sidebar-bg: #fffdf9;
  --hr-sidebar-border: #ead9c4;
  --hr-sidebar-text: #5c3d22;
  --hr-sidebar-text-hover: #3d2814;
  --hr-sidebar-caption: #b8956a;
  --hr-sidebar-active-bg: #ea580c;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #fff8ef;
  --hr-row-hover: #fff8ef;
  --hr-track: #f0e4d4;
  --hr-grid: #fbf5ec;
}

html[data-theme-id="forest"] {
  color-scheme: dark;
  --hr-canvas: #081210;
  --hr-bg: #0a1210;
  --hr-surface: #101c18;
  --hr-surface-muted: #0a1210;
  --hr-surface-nested: #152620;
  --hr-input: #152620;
  --hr-border: rgba(52, 211, 153, 0.20);
  --hr-text: #d8f5e9;
  --hr-text-secondary: #a7e3c8;
  --hr-text-muted: #7cb89a;
  --hr-primary: #34d399;
  --hr-primary-hover: #6ee7b7;
  --hr-primary-light: #a7f3d0;
  --hr-primary-soft: rgba(52, 211, 153, 0.12);
  --hr-primary-dark: #059669;
  --hr-muted-bg: #152620;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.28);
  --hr-sidebar-bg: #101c18;
  --hr-sidebar-border: rgba(52, 211, 153, 0.16);
  --hr-sidebar-text: #7cb89a;
  --hr-sidebar-text-hover: #d8f5e9;
  --hr-sidebar-caption: #8ec9ad;
  --hr-sidebar-active-bg: #059669;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #152620;
  --hr-row-hover: #152620;
  --hr-track: #152620;
  --hr-grid: #101c18;
}

html[data-theme-id="amber"] {
  color-scheme: dark;
  --hr-canvas: #120e08;
  --hr-bg: #100c08;
  --hr-surface: #1c1610;
  --hr-surface-muted: #100c08;
  --hr-surface-nested: #241e16;
  --hr-input: #241e16;
  --hr-border: rgba(245, 158, 11, 0.22);
  --hr-text: #fef3c7;
  --hr-text-secondary: #e8d4a8;
  --hr-text-muted: #c4a574;
  --hr-primary: #f59e0b;
  --hr-primary-hover: #fbbf24;
  --hr-primary-light: #fcd34d;
  --hr-primary-soft: rgba(245, 158, 11, 0.12);
  --hr-primary-dark: #b45309;
  --hr-muted-bg: #241e16;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --hr-sidebar-bg: #1c1610;
  --hr-sidebar-border: rgba(245, 158, 11, 0.18);
  --hr-sidebar-text: #c4a574;
  --hr-sidebar-text-hover: #fef3c7;
  --hr-sidebar-caption: #d4b888;
  --hr-sidebar-active-bg: #f59e0b;
  --hr-sidebar-active-text: #1c1610;
  --hr-sidebar-hover-bg: #241e16;
  --hr-row-hover: #241e16;
  --hr-track: #241e16;
  --hr-grid: #1c1610;
}

html[data-theme-id="whatsapp"] {
  color-scheme: dark;
  --hr-canvas: #0b141a;
  --hr-bg: #0a1014;
  --hr-surface: #111b21;
  --hr-surface-muted: #0a1014;
  --hr-surface-nested: #1a2328;
  --hr-input: #1a2328;
  --hr-border: rgba(134, 150, 160, 0.18);
  --hr-text: #e9edef;
  --hr-text-secondary: #d1d7db;
  --hr-text-muted: #8696a0;
  --hr-primary: #008069;
  --hr-primary-hover: #00a884;
  --hr-primary-light: #25d366;
  --hr-primary-soft: rgba(0, 128, 105, 0.16);
  --hr-primary-dark: #005c4b;
  --hr-muted-bg: #1a2328;
  --hr-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  --hr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.28);
  --hr-sidebar-bg: #111b21;
  --hr-sidebar-border: rgba(134, 150, 160, 0.14);
  --hr-sidebar-text: #8696a0;
  --hr-sidebar-text-hover: #e9edef;
  --hr-sidebar-caption: #667781;
  --hr-sidebar-active-bg: #008069;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #1a2328;
  --hr-row-hover: #1a2328;
  --hr-track: #1a2328;
  --hr-grid: #111b21;
}

/* Default Tezway HR burgundy — explicit id so packs can clear back to brand */
html[data-theme-id="tezway"][data-theme-mode="light"],
html[data-theme-id="tezway"][data-theme="light"] {
  color-scheme: light;
  --hr-canvas: #f0f1f4;
  --hr-bg: #f0f1f4;
  --hr-surface: #ffffff;
  --hr-surface-muted: #f4f4f5;
  --hr-surface-nested: #e4e4e7;
  --hr-input: #f4f4f5;
  --hr-border: #e4e4e7;
  --hr-text: #09090b;
  --hr-text-secondary: #52525b;
  --hr-text-muted: #71717a;
  --hr-primary: #a20943;
  --hr-primary-hover: #830736;
  --hr-primary-light: #c41e5a;
  --hr-primary-soft: rgba(162, 9, 67, 0.1);
  --hr-primary-dark: #830736;
  --hr-sidebar-bg: #ffffff;
  --hr-sidebar-border: #e4e4e7;
  --hr-sidebar-text: #52525b;
  --hr-sidebar-text-hover: #09090b;
  --hr-sidebar-caption: #a1a1aa;
  --hr-sidebar-active-bg: #a20943;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #f4f4f5;
  --hr-row-hover: #f4f4f5;
  --hr-track: #e4e4e7;
  --hr-grid: #f0f1f4;
}

html[data-theme-id="tezway"][data-theme-mode="dark"],
html[data-theme-id="tezway"][data-theme="dark"] {
  color-scheme: dark;
  --hr-canvas: #04060c;
  --hr-bg: #04060c;
  --hr-surface: #1f1f1f;
  --hr-surface-muted: #04060c;
  --hr-surface-nested: #3c3c3e;
  --hr-input: #262627;
  --hr-border: #2e2e30;
  --hr-text: #ffffff;
  --hr-text-secondary: #a1a1aa;
  --hr-text-muted: #71717a;
  --hr-primary: #a20943;
  --hr-primary-hover: #830736;
  --hr-primary-light: #d42d6a;
  --hr-primary-soft: rgba(162, 9, 67, 0.22);
  --hr-primary-dark: #830736;
  --hr-sidebar-bg: #1f1f1f;
  --hr-sidebar-border: #2e2e30;
  --hr-sidebar-text: #a1a1aa;
  --hr-sidebar-text-hover: #ffffff;
  --hr-sidebar-caption: #71717a;
  --hr-sidebar-active-bg: #a20943;
  --hr-sidebar-active-text: #ffffff;
  --hr-sidebar-hover-bg: #3c3c3e;
  --hr-row-hover: #262627;
  --hr-track: #2e2e30;
  --hr-grid: #262627;
}
