/* ============================================================
   GHZ THEME VARIABLES — extracted từ theme-engine.js để INLINE
   ngay trong <head> của index.html, đảm bảo CSS variables có
   sẵn TRƯỚC khi theme-engine.js load. Fix lỗi: sau logout/reload,
   theme mất do theme-engine.js chạy chậm → variables chưa có →
   UI fallback 'classic'.

   File này chỉ chứa CSS variables + derived tokens + brand colors.
   Phần styling (card glass, button glow, v.v.) vẫn load từ
   theme-engine.js injectCss() — không trùng lặp, không xung đột.

   Đồng bộ 100% với theme-engine.js. Khi sửa variables ở đây,
   phải sửa tương ứng ở theme-engine.js.
   ============================================================ */

/* ===== CSS variables cho từng theme (apply ở :root hoặc html[data-theme]) ===== */
html[data-theme="mint-fresh"] {
    --ghz-bg: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(168,230,207,0.48) 100%);
    --ghz-card-border: rgba(168,230,207,0.6);
    --ghz-text-primary: #1a202c;
    --ghz-text-secondary: #2d3748;
    --ghz-text-muted: #374151;
    --ghz-grad-1: #a8e6cf;
    --ghz-grad-2: #dcedc1;
    --ghz-button-bg: #38b2ac;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(168,230,207,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(168,230,207,0.45));
    --ghz-tabbar-text: #2d3748;
    --ghz-tabbar-active: #38b2ac;
    --ghz-scrollbar-thumb: rgba(168,230,207,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #1a202c;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(168,230,207,0.5) 0%, rgba(220,237,193,0.5) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="peach-cream"] {
    --ghz-bg: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(252,182,159,0.48) 100%);
    --ghz-card-border: rgba(252,182,159,0.6);
    --ghz-text-primary: #2d2418;
    --ghz-text-secondary: #4a3f33;
    --ghz-text-muted: #4a3f33;
    --ghz-grad-1: #ffecd2;
    --ghz-grad-2: #fcb69f;
    --ghz-button-bg: #ed8936;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(252,182,159,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(252,182,159,0.45));
    --ghz-tabbar-text: #2d2418;
    --ghz-tabbar-active: #ed8936;
    --ghz-scrollbar-thumb: rgba(252,182,159,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #2d2418;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(255,236,210,0.55) 0%, rgba(255,255,255,0.55) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="lavender-mist"] {
    --ghz-bg: linear-gradient(135deg, #c2e9fb 0%, #d4baf7 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(212,186,247,0.48) 100%);
    --ghz-card-border: rgba(212,186,247,0.6);
    --ghz-text-primary: #1a202c;
    --ghz-text-secondary: #2d3748;
    --ghz-text-muted: #374151;
    --ghz-grad-1: #c2e9fb;
    --ghz-grad-2: #d4baf7;
    --ghz-button-bg: #805ad5;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(212,186,247,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(212,186,247,0.45));
    --ghz-tabbar-text: #2d3748;
    --ghz-tabbar-active: #805ad5;
    --ghz-scrollbar-thumb: rgba(212,186,247,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #1a202c;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(212,186,247,0.5) 0%, rgba(194,233,251,0.5) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="sky-blue"] {
    --ghz-bg: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(102,166,255,0.48) 100%);
    --ghz-card-border: rgba(102,166,255,0.6);
    --ghz-text-primary: #1a202c;
    --ghz-text-secondary: #2d3748;
    --ghz-text-muted: #374151;
    --ghz-grad-1: #89f7fe;
    --ghz-grad-2: #66a6ff;
    --ghz-button-bg: #3182ce;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(102,166,255,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(102,166,255,0.45));
    --ghz-tabbar-text: #2d3748;
    --ghz-tabbar-active: #3182ce;
    --ghz-scrollbar-thumb: rgba(102,166,255,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #1a202c;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(137,247,254,0.5) 0%, rgba(102,166,255,0.45) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="sunset"] {
    --ghz-bg: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(253,160,133,0.48) 100%);
    --ghz-card-border: rgba(253,160,133,0.6);
    --ghz-text-primary: #2d2418;
    --ghz-text-secondary: #4a3f33;
    --ghz-text-muted: #4a3f33;
    --ghz-grad-1: #f6d365;
    --ghz-grad-2: #fda085;
    --ghz-button-bg: #dd6b20;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(253,160,133,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(253,160,133,0.45));
    --ghz-tabbar-text: #2d2418;
    --ghz-tabbar-active: #dd6b20;
    --ghz-scrollbar-thumb: rgba(253,160,133,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #2d2418;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(246,211,101,0.55) 0%, rgba(253,160,133,0.5) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="midnight"] {
    --ghz-bg: linear-gradient(135deg, #0f2027 0%, #2c5364 100%);
    --ghz-card-bg: rgba(15,32,39,0.55);
    --ghz-card-border: rgba(255,255,255,0.1);
    --ghz-text-primary: #f7fafc;
    --ghz-text-secondary: #e2e8f0;
    --ghz-text-muted: #aab7c7;
    --ghz-grad-1: #0f2027;
    --ghz-grad-2: #2c5364;
    --ghz-button-bg: #2c5364;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(15,32,39,0.65);
    --ghz-input-border: rgba(255,255,255,0.15);
    --ghz-tabbar-bg: rgba(15,32,39,0.92);
    --ghz-tabbar-text: #cbd5e0;
    --ghz-tabbar-active: #4fd1c5;
    --ghz-scrollbar-thumb: #2c5364;
    --ghz-scrollbar-track: #0f2027;
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(20,25,40,0.45) 0%, rgba(30,35,55,0.35) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.18);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.25) inset,
        0 8px 32px rgba(0,0,0,0.35),
        0 2px 8px rgba(0,0,0,0.2);
}
html[data-theme="deep-space"] {
    --ghz-bg: linear-gradient(135deg, #000000 0%, #434343 100%);
    --ghz-card-bg: rgba(20,20,20,0.6);
    --ghz-card-border: rgba(255,255,255,0.08);
    --ghz-text-primary: #f7fafc;
    --ghz-text-secondary: #e2e8f0;
    --ghz-text-muted: #a7b4c4;
    --ghz-grad-1: #000000;
    --ghz-grad-2: #434343;
    --ghz-button-bg: #4a5568;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(30,30,30,0.7);
    --ghz-input-border: rgba(255,255,255,0.1);
    --ghz-tabbar-bg: rgba(10,10,10,0.92);
    --ghz-tabbar-text: #cbd5e0;
    --ghz-tabbar-active: #a0aec0;
    --ghz-scrollbar-thumb: #4a5568;
    --ghz-scrollbar-track: #1a1a1a;
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(30,30,30,0.55) 0%, rgba(50,50,50,0.4) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.12);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.18) inset,
        0 8px 32px rgba(0,0,0,0.45),
        0 2px 8px rgba(0,0,0,0.25);
}
html[data-theme="charcoal"] {
    --ghz-bg: linear-gradient(135deg, #37474f 0%, #263238 100%);
    --ghz-card-bg: rgba(55,71,79,0.45);
    --ghz-card-border: rgba(255,255,255,0.1);
    --ghz-text-primary: #f7fafc;
    --ghz-text-secondary: #e2e8f0;
    --ghz-text-muted: #b5c0ce;
    --ghz-grad-1: #37474f;
    --ghz-grad-2: #263238;
    --ghz-button-bg: #607d8b;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(55,71,79,0.65);
    --ghz-input-border: rgba(255,255,255,0.12);
    --ghz-tabbar-bg: rgba(38,50,56,0.92);
    --ghz-tabbar-text: #b0bec5;
    --ghz-tabbar-active: #90a4ae;
    --ghz-scrollbar-thumb: #607d8b;
    --ghz-scrollbar-track: #263238;
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(45,55,65,0.55) 0%, rgba(60,70,80,0.45) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.15);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.2) inset,
        0 8px 32px rgba(0,0,0,0.4),
        0 2px 8px rgba(0,0,0,0.22);
}
html[data-theme="purple-haze"] {
    --ghz-bg: linear-gradient(135deg, #f0ebf8 0%, #e8f4f8 100%);  /* ⚡ ĐỔI: Nền sáng thay vì tối */
    --ghz-card-bg: rgba(255,255,255,0.85);  /* ⚡ ĐỔI: Card sáng */
    --ghz-card-border: rgba(109,78,198,0.25);
    --ghz-text-primary: #1a202c;  /* ⚡ ĐỔI: Text tối cho contrast */
    --ghz-text-secondary: #2d3748;
    --ghz-text-muted: #4a5568;
    --ghz-grad-1: #6d4ec6;
    --ghz-grad-2: #4a3a8a;
    --ghz-button-bg: #6d4ec6;  /* ⚡ ĐỔI: Button purple tối */
    --ghz-button-text: #ffffff;  /* ⚡ ĐỔI: Text trắng trên button */
    --ghz-input-bg: rgba(255,255,255,0.9);  /* ⚡ ĐỔI: Input sáng */
    --ghz-input-border: rgba(109,78,198,0.3);
    --ghz-tabbar-bg: rgba(255,255,255,0.95);  /* ⚡ ĐỔI: Tabbar sáng */
    --ghz-tabbar-text: #2d3748;  /* ⚡ ĐỔI: Text tối */
    --ghz-tabbar-active: #6d4ec6;
    --ghz-scrollbar-thumb: #b794f4;
    --ghz-scrollbar-track: rgba(109,78,198,0.1);  /* ⚡ ĐỔI: Track sáng */
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #047857;  /* ⚡ ĐỔI: Success tối cho contrast — #10b981 chỉ đạt 2.40:1 trên nền sáng (FAIL WCAG AA), đồng bộ #047857 như 15 theme sáng còn lại */
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;  /* ⚡ ĐỔI: Danger tối (WCAG AA trên nền sáng) */
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;  /* ⚡ ĐỔI: Warning tối — #f59e0b chỉ đạt 1.96:1 trên nền sáng */
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;  /* ⚡ ĐỔI: Info tối (WCAG AA trên nền sáng) */
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(255,255,255,0.75) 0%, rgba(240,235,248,0.85) 100%);  /* ⚡ ĐỔI: Glass sáng */
    --ghz-card-glass-border: rgba(109,78,198,0.25);
    --ghz-card-glass-blur: blur(28px) saturate(1.3);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.60) inset,
        0 -1px 0 0 rgba(0,0,0,0.08) inset,
        0 8px 32px rgba(109,78,198,0.2),
        0 2px 8px rgba(0,0,0,0.12);
}
html[data-theme="pink-bloom"] {
    --ghz-bg: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(255,154,158,0.48) 100%);
    --ghz-card-border: rgba(255,154,158,0.6);
    --ghz-text-primary: #2d1f1f;
    --ghz-text-secondary: #4a3f3f;
    --ghz-text-muted: #4a3f3f;
    --ghz-grad-1: #ff9a9e;
    --ghz-grad-2: #fad0c4;
    --ghz-button-bg: #ed64a6;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(255,154,158,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(255,154,158,0.45));
    --ghz-tabbar-text: #2d1f1f;
    --ghz-tabbar-active: #ed64a6;
    --ghz-scrollbar-thumb: rgba(255,154,158,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #2d1f1f;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(255,154,158,0.55) 0%, rgba(250,208,196,0.5) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}

/* ============================================================
   6 THEME PASTEL MỚI (thêm vào production 2026-09-27)
   - cherry-blossom, coffee-cream, forest-pastel, rose-pastel,
     aurora-pastel, sunset-pastel
   - Không đụng 13 theme cũ, chỉ chèn thêm vào cuối nhóm theme.
   ============================================================ */
html[data-theme="cherry-blossom"] {
    --ghz-bg: linear-gradient(135deg, #ffe4ec 0%, #f9a8d4 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(249,168,212,0.48) 100%);
    --ghz-card-border: rgba(249,168,212,0.6);
    --ghz-text-primary: #2d1f1f;
    --ghz-text-secondary: #4a3f3f;
    --ghz-text-muted: #4a3f3f;
    --ghz-grad-1: #ffe4ec;
    --ghz-grad-2: #f9a8d4;
    --ghz-button-bg: #ec4899;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(249,168,212,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(249,168,212,0.45));
    --ghz-tabbar-text: #2d1f1f;
    --ghz-tabbar-active: #ec4899;
    --ghz-scrollbar-thumb: rgba(249,168,212,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #2d1f1f;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(255,228,236,0.55) 0%, rgba(249,168,212,0.5) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="coffee-cream"] {
    --ghz-bg: linear-gradient(135deg, #fef9f3 0%, #f5dcc4 100%);  /* ⚡ ĐỔI: Gradient sáng hơn, không còn #d97e3a tối */
    --ghz-card-bg: linear-gradient(135deg, rgba(255,254,252,0.98) 0%, rgba(245,220,196,0.45) 100%);  /* ⚡ ĐỔI: Card sáng hơn */
    --ghz-card-border: rgba(217,126,58,0.3);  /* ⚡ ĐỔI: Border nhạt hơn */
    --ghz-text-primary: #0d0805;  /* ⚡ ĐỔI: Text tối hơn (từ #1a140e) */
    --ghz-text-secondary: #2d1f14;  /* ⚡ ĐỔI: Tối hơn */
    --ghz-text-muted: #4a3424;  /* ⚡ ĐỔI: Tối hơn */
    --ghz-grad-1: #fef9f3;  /* ⚡ ĐỔI: Sáng */
    --ghz-grad-2: #f5dcc4;  /* ⚡ ĐỔI: Sáng */
    --ghz-button-bg: #b45309;  /* ⚡ ĐỔI: Button tối hơn cho contrast với nền sáng */
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,254,252,0.95);  /* ⚡ ĐỔI: Input rất sáng */
    --ghz-input-border: rgba(180,83,9,0.4);  /* ⚡ ĐỔI: Border tối hơn */
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,254,252,0.98), rgba(245,220,196,0.40));  /* ⚡ ĐỔI: Tabbar sáng hơn */
    --ghz-tabbar-text: #0d0805;  /* ⚡ ĐỔI: Text tối */
    --ghz-tabbar-active: #b45309;  /* ⚡ ĐỔI: Active tối hơn */
    --ghz-scrollbar-thumb: rgba(180,83,9,0.6);  /* ⚡ ĐỔI: Thumb tối hơn */
    --ghz-scrollbar-track: rgba(255,252,248,0.6);
    --ghz-text-on-grad: #0d0805;  /* ⚡ ĐỔI: Text tối */
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(255,254,252,0.80) 0%, rgba(245,220,196,0.40) 100%);  /* ⚡ ĐỔI: Glass sáng */
    --ghz-card-glass-border: rgba(255,255,255,0.8);
    --ghz-card-glass-blur: blur(28px) saturate(1.5);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.95) inset,
        0 -1px 0 0 rgba(0,0,0,0.02) inset,
        0 8px 32px rgba(180,83,9,0.10),
        0 2px 8px rgba(0,0,0,0.04);
}
html[data-theme="rose-pastel"] {
    --ghz-bg: linear-gradient(135deg, #fbcfe8 0%, #ec4899 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(236,72,153,0.45) 100%);
    --ghz-card-border: rgba(236,72,153,0.5);
    --ghz-text-primary: #2d1f1f;
    --ghz-text-secondary: #4a3f3f;
    --ghz-text-muted: #4a3f3f;
    --ghz-grad-1: #fbcfe8;
    --ghz-grad-2: #ec4899;
    --ghz-button-bg: #ec4899;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(236,72,153,0.5);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(236,72,153,0.40));
    --ghz-tabbar-text: #2d1f1f;
    --ghz-tabbar-active: #ec4899;
    --ghz-scrollbar-thumb: rgba(236,72,153,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #2d1f1f;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(251,207,232,0.55) 0%, rgba(236,72,153,0.45) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="aurora-pastel"] {
    --ghz-bg: linear-gradient(135deg, #a5f3fc 0%, #c4b5fd 50%, #fbcfe8 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(196,181,253,0.40) 100%);
    --ghz-card-border: rgba(196,181,253,0.55);
    --ghz-text-primary: #1e1b4b;
    --ghz-text-secondary: #312e81;
    --ghz-text-muted: #4c1d95;
    --ghz-grad-1: #a5f3fc;
    --ghz-grad-2: #c4b5fd;
    --ghz-button-bg: #7c3aed;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.70);
    --ghz-input-border: rgba(196,181,253,0.55);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(196,181,253,0.45));
    --ghz-tabbar-text: #1e1b4b;
    --ghz-tabbar-active: #7c3aed;
    --ghz-scrollbar-thumb: rgba(196,181,253,0.55);
    --ghz-scrollbar-track: rgba(255,255,255,0.4);
    --ghz-text-on-grad: #1e1b4b;
    --ghz-success: #047857;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #b91c1c;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #b45309;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #1e40af;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(165,243,252,0.55) 0%, rgba(196,181,253,0.50) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.6);
    --ghz-card-glass-blur: blur(28px) saturate(1.8);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 0 rgba(0,0,0,0.04) inset,
        0 8px 32px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.06);
}

/* ===== PASTEL THEMES: define tokens before the theme engine runs ===== */
html[data-theme="cherry-blossom"] {
    --ghz-bg: linear-gradient(135deg, #ffe4ec 0%, #f9a8d4 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(249,168,212,0.48) 100%);
    --ghz-card-border: rgba(249,168,212,0.6);
    --ghz-text-primary: #2d1f1f;
    --ghz-text-secondary: #4a3f3f;
    --ghz-text-muted: #4a3f3f;
    --ghz-grad-1: #ffe4ec;
    --ghz-grad-2: #f9a8d4;
    --ghz-button-bg: #ec4899;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(249,168,212,0.6);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(249,168,212,0.45));
    --ghz-tabbar-text: #2d1f1f;
    --ghz-tabbar-active: #ec4899;
    --ghz-text-on-grad: #2d1f1f;
    --ghz-success: #047857;
    --ghz-danger: #b91c1c;
    --ghz-warning: #b45309;
    --ghz-info: #1e40af;
}
html[data-theme="rose-pastel"] {
    --ghz-bg: linear-gradient(135deg, #fbcfe8 0%, #ec4899 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(236,72,153,0.45) 100%);
    --ghz-card-border: rgba(236,72,153,0.5);
    --ghz-text-primary: #2d1f1f;
    --ghz-text-secondary: #4a3f3f;
    --ghz-text-muted: #4a3f3f;
    --ghz-grad-1: #fbcfe8;
    --ghz-grad-2: #ec4899;
    --ghz-button-bg: #ec4899;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.7);
    --ghz-input-border: rgba(236,72,153,0.5);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(236,72,153,0.40));
    --ghz-tabbar-text: #2d1f1f;
    --ghz-tabbar-active: #ec4899;
    --ghz-text-on-grad: #2d1f1f;
    --ghz-success: #047857;
    --ghz-danger: #b91c1c;
    --ghz-warning: #b45309;
    --ghz-info: #1e40af;
}
html[data-theme="aurora-pastel"] {
    --ghz-bg: linear-gradient(135deg, #a5f3fc 0%, #c4b5fd 50%, #fbcfe8 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(196,181,253,0.40) 100%);
    --ghz-card-border: rgba(196,181,253,0.55);
    --ghz-text-primary: #1e1b4b;
    --ghz-text-secondary: #312e81;
    --ghz-text-muted: #4c1d95;
    --ghz-grad-1: #a5f3fc;
    --ghz-grad-2: #c4b5fd;
    --ghz-button-bg: #7c3aed;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(255,255,255,0.70);
    --ghz-input-border: rgba(196,181,253,0.55);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(196,181,253,0.45));
    --ghz-tabbar-text: #1e1b4b;
    --ghz-tabbar-active: #7c3aed;
    --ghz-text-on-grad: #1e1b4b;
    --ghz-success: #047857;
    --ghz-danger: #b91c1c;
    --ghz-warning: #b45309;
    --ghz-info: #1e40af;
}

/* ============================================================
   6 THEME MARVEL — CINEMATIC TỐI (thêm vào production 2026-10-10)
   - mcu-iron, mcu-cap, mcu-thanos, mcu-panther, mcu-shield, mcu-asgard
   - Tông tối (chữ sáng trên nền tối) → color-scheme: dark, dùng chung
     nhóm skeleton token với các theme tối khác (khối SKELETON LOADING
     phía dưới đã liệt kê 6 id này vào nhóm dark).
   - Không đụng 19 theme cũ, chỉ chèn thêm vào cuối nhóm pastel.
   ============================================================ */
html[data-theme="mcu-iron"] {
    --ghz-bg:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245,165,36,0.16) 0%, transparent 60%),
        linear-gradient(160deg, #0b0b0d 0%, #1a0d08 55%, #120806 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(28,20,16,0.72) 0%, rgba(18,13,10,0.55) 100%);
    --ghz-card-border: rgba(245,165,36,0.22);
    --ghz-text-primary: #fdf6ec;
    --ghz-text-secondary: #e8d5bd;
    --ghz-text-muted: #cec5b7;
    --ghz-grad-1: #f5a524;
    --ghz-grad-2: #dc2626;
    --ghz-button-bg: #f5a524;
    --ghz-button-text: #1a0d08;
    --ghz-input-bg: rgba(20,15,12,0.72);
    --ghz-input-border: rgba(245,165,36,0.28);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(24,16,12,0.94), rgba(14,10,8,0.88));
    --ghz-tabbar-text: #c9b69a;
    --ghz-tabbar-active: #f5a524;
    --ghz-scrollbar-thumb: rgba(245,165,36,0.45);
    --ghz-scrollbar-track: rgba(245,165,36,0.08);
    --ghz-text-on-grad: #1a0d08;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(245,165,36,0.10) 0%, rgba(220,38,38,0.08) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.10);
    --ghz-card-glass-blur: blur(24px) saturate(1.4);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.14) inset,
        0 10px 34px rgba(0,0,0,0.55),
        0 2px 8px rgba(0,0,0,0.35);
}
html[data-theme="mcu-cap"] {
    --ghz-bg:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(47,111,208,0.18) 0%, transparent 62%),
        linear-gradient(160deg, #0a1428 0%, #101b3d 55%, #070d1c 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(18,29,58,0.72) 0%, rgba(10,16,34,0.58) 100%);
    --ghz-card-border: rgba(120,160,235,0.24);
    --ghz-text-primary: #f2f6ff;
    --ghz-text-secondary: #cdd9f2;
    --ghz-text-muted: #bfc9dc;
    --ghz-grad-1: #2f6fd0;
    --ghz-grad-2: #d62828;
    --ghz-button-bg: #2f6fd0;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(10,18,36,0.72);
    --ghz-input-border: rgba(120,160,235,0.28);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(14,24,48,0.94), rgba(8,13,28,0.88));
    --ghz-tabbar-text: #a8b8d8;
    --ghz-tabbar-active: #2f6fd0;
    --ghz-scrollbar-thumb: rgba(47,111,208,0.5);
    --ghz-scrollbar-track: rgba(47,111,208,0.10);
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #ef4444;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(47,111,208,0.12) 0%, rgba(214,40,40,0.08) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.10);
    --ghz-card-glass-blur: blur(24px) saturate(1.4);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.14) inset,
        0 10px 34px rgba(0,0,0,0.55),
        0 2px 8px rgba(0,0,0,0.35);
}
html[data-theme="mcu-thanos"] {
    --ghz-bg:
        radial-gradient(ellipse 75% 60% at 50% 5%, rgba(139,92,246,0.20) 0%, transparent 62%),
        radial-gradient(ellipse 50% 40% at 85% 90%, rgba(217,70,239,0.12) 0%, transparent 60%),
        linear-gradient(160deg, #0d0a1a 0%, #1c1030 55%, #090613 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(32,20,54,0.70) 0%, rgba(16,10,30,0.58) 100%);
    --ghz-card-border: rgba(167,139,250,0.26);
    --ghz-text-primary: #f5f0ff;
    --ghz-text-secondary: #ddd0f5;
    --ghz-text-muted: #ccc5df;
    --ghz-grad-1: #8b5cf6;
    --ghz-grad-2: #d946ef;
    --ghz-button-bg: #8b5cf6;
    --ghz-button-text: #ffffff;
    --ghz-input-bg: rgba(18,12,34,0.72);
    --ghz-input-border: rgba(167,139,250,0.30);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(28,18,50,0.94), rgba(13,8,26,0.88));
    --ghz-tabbar-text: #b9a8dd;
    --ghz-tabbar-active: #a78bfa;
    --ghz-scrollbar-thumb: rgba(139,92,246,0.50);
    --ghz-scrollbar-track: rgba(139,92,246,0.10);
    --ghz-text-on-grad: #ffffff;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #818cf8;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(139,92,246,0.13) 0%, rgba(217,70,239,0.09) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.10);
    --ghz-card-glass-blur: blur(24px) saturate(1.5);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.14) inset,
        0 10px 34px rgba(0,0,0,0.58),
        0 2px 8px rgba(0,0,0,0.35);
}
html[data-theme="mcu-panther"] {
    --ghz-bg:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(192,200,208,0.10) 0%, transparent 60%),
        linear-gradient(160deg, #05080a 0%, #0d1418 55%, #030607 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(18,26,30,0.74) 0%, rgba(8,12,14,0.60) 100%);
    --ghz-card-border: rgba(192,200,208,0.20);
    --ghz-text-primary: #f2f5f7;
    --ghz-text-secondary: #ccd4da;
    --ghz-text-muted: #c3c8cc;
    --ghz-grad-1: #c0c8d0;
    --ghz-grad-2: #5b6770;
    --ghz-button-bg: #c0c8d0;
    --ghz-button-text: #05080a;
    --ghz-input-bg: rgba(8,12,14,0.74);
    --ghz-input-border: rgba(192,200,208,0.24);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(14,20,24,0.94), rgba(5,8,10,0.88));
    --ghz-tabbar-text: #a5aeb6;
    --ghz-tabbar-active: #c0c8d0;
    --ghz-scrollbar-thumb: rgba(192,200,208,0.42);
    --ghz-scrollbar-track: rgba(192,200,208,0.08);
    --ghz-text-on-grad: #05080a;
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #7dd3fc;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(192,200,208,0.09) 0%, rgba(91,103,112,0.08) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.09);
    --ghz-card-glass-blur: blur(24px) saturate(1.2);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.12) inset,
        0 10px 34px rgba(0,0,0,0.62),
        0 2px 8px rgba(0,0,0,0.38);
}
html[data-theme="mcu-shield"] {
    --ghz-bg:
        repeating-linear-gradient(0deg, rgba(34,211,238,0.05) 0px, rgba(34,211,238,0.05) 1px, transparent 1px, transparent 4px),
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(34,211,238,0.16) 0%, transparent 62%),
        linear-gradient(160deg, #061018 0%, #0b2030 55%, #040b12 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(10,28,42,0.72) 0%, rgba(5,14,22,0.58) 100%);
    --ghz-card-border: rgba(34,211,238,0.26);
    --ghz-text-primary: #e8fbff;
    --ghz-text-secondary: #b6e8f4;
    --ghz-text-muted: #b4d3db;
    --ghz-grad-1: #22d3ee;
    --ghz-grad-2: #0ea5e9;
    --ghz-button-bg: #22d3ee;
    --ghz-button-text: #04121a;
    --ghz-input-bg: rgba(5,16,24,0.74);
    --ghz-input-border: rgba(34,211,238,0.30);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(8,24,36,0.94), rgba(4,11,18,0.88));
    --ghz-tabbar-text: #93cbd8;
    --ghz-tabbar-active: #22d3ee;
    --ghz-scrollbar-thumb: rgba(34,211,238,0.48);
    --ghz-scrollbar-track: rgba(34,211,238,0.10);
    --ghz-text-on-grad: #04121a;
    --ghz-success: #4ade80;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #fb7185;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #22d3ee;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(34,211,238,0.11) 0%, rgba(14,165,233,0.08) 100%);
    --ghz-card-glass-border: rgba(34,211,238,0.18);
    --ghz-card-glass-blur: blur(24px) saturate(1.5);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.12) inset,
        0 10px 34px rgba(0,0,0,0.55),
        0 0 0 1px rgba(34,211,238,0.08),
        0 2px 8px rgba(0,0,0,0.35);
}
html[data-theme="mcu-asgard"] {
    --ghz-bg:
        radial-gradient(ellipse 75% 60% at 50% 0%, rgba(251,191,36,0.14) 0%, transparent 60%),
        radial-gradient(ellipse 60% 45% at 20% 85%, rgba(56,189,248,0.14) 0%, transparent 60%),
        linear-gradient(160deg, #06121f 0%, #0a2a3a 55%, #030a12 100%);
    --ghz-card-bg: linear-gradient(135deg, rgba(10,32,48,0.72) 0%, rgba(5,16,26,0.58) 100%);
    --ghz-card-border: rgba(251,191,36,0.22);
    --ghz-text-primary: #f7fbfd;
    --ghz-text-secondary: #d3e4ec;
    --ghz-text-muted: #c7d3da;
    --ghz-grad-1: #fbbf24;
    --ghz-grad-2: #38bdf8;
    --ghz-button-bg: #fbbf24;
    --ghz-button-text: #06121f;
    --ghz-input-bg: rgba(6,18,28,0.74);
    --ghz-input-border: rgba(251,191,36,0.26);
    --ghz-tabbar-bg: linear-gradient(135deg, rgba(9,28,42,0.94), rgba(4,13,21,0.88));
    --ghz-tabbar-text: #a8c2d0;
    --ghz-tabbar-active: #fbbf24;
    --ghz-scrollbar-thumb: rgba(251,191,36,0.42);
    --ghz-scrollbar-track: rgba(251,191,36,0.08);
    --ghz-text-on-grad: #06121f;
    --ghz-success: #4ade80;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #38bdf8;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-card-glass-bg: linear-gradient(135deg, rgba(251,191,36,0.09) 0%, rgba(56,189,248,0.09) 100%);
    --ghz-card-glass-border: rgba(255,255,255,0.10);
    --ghz-card-glass-blur: blur(24px) saturate(1.4);
    --ghz-card-glass-shadow:
        0 1px 0 0 rgba(255,255,255,0.14) inset,
        0 10px 34px rgba(0,0,0,0.55),
        0 2px 8px rgba(0,0,0,0.35);
}

/* ============================================================
   THEME 22 — NEUMORPHISM WELLNESS (2026-10-21)
   Đồng bộ 100% với App/js/theme/theme-engine.js block cùng tên
   ============================================================ */
html[data-theme="neumorphism-wellness"] {
    --ghz-neu-bg:        #e8e6e1;
    --ghz-neu-surface:   #e8e6e1;
    --ghz-neu-shadow-d:  12px 12px 26px rgba(163,156,144,.48);
    --ghz-neu-shadow-l: -12px -12px 26px rgba(255,255,255,.88);
    --ghz-neu-shadow-in: inset 5px 5px 10px rgba(163,156,144,.30),
                         inset -5px -5px 10px rgba(255,255,255,.88);
    --ghz-neu-radius:    18px;

    --ghz-bg:                       #e8e6e1;
    --ghz-card-bg:                  #e8e6e1;
    --ghz-card-border:              rgba(63,107,76,.22);
    --ghz-text-primary:             #3a3833;
    --ghz-text-secondary:           #55514a;
    --ghz-text-muted:               #5a564e;
    --ghz-grad-1:                   #eae7e2;
    --ghz-grad-2:                   #e0dcd4;
    --ghz-button-bg:                #e8e6e1;
    --ghz-button-text:              #3a3833;
    --ghz-input-bg:                 #e8e6e1;
    --ghz-input-border:             rgba(163,156,144,.35);
    --ghz-tabbar-bg:                #e8e6e1;
    --ghz-tabbar-text:              #686359;
    --ghz-tabbar-active:            #3f6b4c;
    --ghz-scrollbar-thumb:          rgba(163,156,144,.45);
    --ghz-scrollbar-track:          rgba(255,255,255,.40);
    --ghz-text-on-grad:             #3a3833;
    --ghz-success:                  #3f6b4c;
    --ghz-success-bg:               color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-success-border:           rgba(63,107,76,.32);
    --ghz-danger:                   #a8433a;
    --ghz-danger-bg:                color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger-border:            rgba(168,67,58,.30);
    --ghz-warning:                  #7a5c17;
    --ghz-warning-bg:               color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning-border:           rgba(122,92,23,.30);
    --ghz-info:                     #3d5a80;
    --ghz-info-bg:                  color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info-border:              rgba(61,90,128,.30);
    --ghz-card-glass-bg:            #e8e6e1;
    --ghz-card-glass-border:        rgba(63,107,76,.18);
    --ghz-card-glass-blur:          none;
    --ghz-card-glass-shadow:
        12px 12px 26px rgba(163,156,144,.48),
        -12px -12px 26px rgba(255,255,255,.88);
}

/* ============================================================
   CHỮ "solid brand" + token brand color cho THEME 22
   ============================================================ */
html[data-theme="neumorphism-wellness"] {
    /* === SHADOW BỘ — 4 mức nổi (đồng bộ 100% với theme-engine.js) ===
       Trước đây chỉ có trong engine ⇒ giai đoạn pre-paint (theme-vars.css
       load trước) bị thiếu 4 token này. */
    --sh-float:  -12px -12px 26px rgba(255,255,255,.88),
                  12px  12px 26px rgba(163,156,144,.48);
    --sh-raised: -7px  -7px  15px rgba(255,255,255,.88),
                  7px   7px  15px rgba(163,156,144,.48);
    --sh-soft:   -4px  -4px  9px  rgba(255,255,255,.88),
                  4px   4px  9px  rgba(163,156,144,.30);
    --sh-inset:  inset -5px -5px 10px rgba(255,255,255,.88),
                  inset  5px  5px 10px rgba(163,156,144,.30);

    --ghz-text-on-brand-strong: #3b5a44;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #c8d0c6;
    --ghz-brand-chip-text: #3e5d47;
    --ghz-brand-chip-bg-hover: #c8d0c6;
    --ghz-warning-text: #785a17;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #ffffff;
    --ghz-brand-active: #3f6b4c;
    --ghz-brand-active-bg: rgba(63,107,76,.22);
    --ghz-brand-active-border: rgba(63,107,76,.55);
    --ghz-tab-btn-glow-alpha: 22%;
    --ghz-tab-btn-glow-soft: 14%;
    --ghz-tab-btn-glow-strong: 36%;
    --ghz-tab-btn-glow-hover: 30%;
    --ghz-brand-color: #3f6b4c;
    --ghz-brand-hover: #558a64;
    --ghz-brand-soft-06: rgba(63,107,76,0.06);
    --ghz-brand-soft-08: rgba(63,107,76,0.08);
    --ghz-brand-soft-12: rgba(63,107,76,0.12);
    --ghz-brand-soft-18: rgba(63,107,76,0.18);
    --ghz-brand-soft-25: rgba(63,107,76,0.25);
    --ghz-brand-soft-30: rgba(63,107,76,0.30);
    --ghz-brand-soft-45: rgba(63,107,76,0.45);
    --ghz-brand-soft-55: rgba(63,107,76,0.55);
    --ghz-brand-soft-70: rgba(63,107,76,0.70);
    --ghz-brand-glow-35: rgba(63,107,76,0.35);
    /* Theme 22 = light (skeleton shimmer dùng direction sáng). */
    color-scheme: light;
    --ghz-skel-base: rgba(0, 0, 0, 0.08);
    --ghz-skel-hi:   rgba(0, 0, 0, 0.18);
}

/* ===== SKELETON LOADING — token riêng cho hiệu ứng shimmer =====
   Vì sao không dùng --ghz-text-primary/--ghz-text-muted:
   Ở theme sáng, cả hai token đều là màu TỐI, nên gradient shimmer sẽ
   chạy ngược (tối đi thay vì sáng đi) — đo được delta -0.15~-0.18
   luminance trên mint-fresh / peach-cream / coffee-cream.
   Token dưới đây chỉ định nghĩa "điểm sáng nhất" của shimmer theo
   hướng sáng/tối của nền, đảm bảo highlight luôn sáng hơn nền. */
:root, html[data-theme="classic"],
html[data-theme="midnight"], html[data-theme="deep-space"],
/* 6 theme Marvel cinematic tối (2026-10-10) */
html[data-theme="mcu-iron"], html[data-theme="mcu-cap"],
html[data-theme="mcu-thanos"], html[data-theme="mcu-panther"],
html[data-theme="mcu-shield"], html[data-theme="mcu-asgard"] {
    color-scheme: dark;
    --ghz-skel-base: rgba(255, 255, 255, 0.07);
    --ghz-skel-hi:   rgba(255, 255, 255, 0.20);
}
html[data-theme="mint-fresh"], html[data-theme="peach-cream"],
html[data-theme="lavender-mist"], html[data-theme="sky-blue"],
html[data-theme="sunset"],
html[data-theme="pink-bloom"], html[data-theme="cherry-blossom"],
html[data-theme="coffee-cream"],
html[data-theme="rose-pastel"], html[data-theme="aurora-pastel"],
/* FIX Oct 24, 2026: purple-haze ĐÃ đổi sang nền SÁNG
   (--ghz-bg: linear-gradient(#f0ebf8→#e8f4f8)) nhưng vẫn nằm trong nhóm
   dark ở trên → --ghz-skel-base = rgba(255,255,255,0.07) trên nền sáng
   ⇒ skeleton gần như vô hình. Chuyển sang nhóm light.
   FIX Oct 24, 2026 (gộp 2 nguồn token): giá trị skeleton đồng bộ 100% với
   theme-engine.js (0.08 / 0.18) — theme-engine.js inject <style> SAU <link>
   nên nó thắng runtime, nên giá trị đúng là 0.08/0.18. Trước đây file này
   ghi 0.07/0.17 ⇒ lệch với runtime của MỌI theme sáng, không riêng
   purple-haze. */
html[data-theme="purple-haze"] {
    color-scheme: light;
    --ghz-skel-base: rgba(0, 0, 0, 0.08);
    --ghz-skel-hi:   rgba(0, 0, 0, 0.18);
}

/* ===== DERIVED TOKENS CHO GLASS BUTTONS ===== */
:root, html[data-theme] {
    --ghz-btn-primary-bg: color-mix(in srgb, var(--ghz-grad-1, #00c37a) 95%, transparent);
    --ghz-btn-primary-bg-hover: color-mix(in srgb, var(--ghz-grad-1, #00c37a) 100%, white 8%);
    --ghz-btn-primary-border: color-mix(in srgb, white 35%, transparent);
    --ghz-btn-primary-border-hover: color-mix(in srgb, white 55%, transparent);
    --ghz-btn-primary-shadow:
        0 4px 14px color-mix(in srgb, var(--ghz-grad-1, #00c37a) 45%, transparent),
        0 1px 2px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -1px 0 rgba(0,0,0,0.18);
    --ghz-btn-primary-shadow-hover:
        0 8px 22px color-mix(in srgb, var(--ghz-grad-1, #00c37a) 55%, transparent),
        0 2px 4px rgba(0,0,0,0.22),
        inset 0 1px 0 rgba(255,255,255,0.45),
        inset 0 -1px 0 rgba(0,0,0,0.15);

    /* Secondary button — dẫn xuất từ --ghz-text-primary để TỰ nhạy theo
       sáng/tối. Trước đây dùng `white 8%` cố định ⇒ trên theme sáng
       (nền #f0ebf8, #e8e6e1…) nền nút gần như trong suốt, viền trắng 20%
       cũng mờ ⇒ nút trông như ô nhập liệu, không phải nút.
       - Theme tối: text-primary = #fff ⇒ white 10%/16%/24%/38% (đúng như cũ).
       - Theme sáng: text-primary = #1a202c ⇒ đen 10%/16%/24%/38% ⇒ nền/viền
         nổi rõ trên nền sáng.
       - Theme classic không có --ghz-text-primary ⇒ fallback #d1d5db (nền tối). */
    --ghz-btn-secondary-bg: color-mix(in srgb, var(--ghz-text-primary, #d1d5db) 10%, transparent);
    --ghz-btn-secondary-bg-hover: color-mix(in srgb, var(--ghz-text-primary, #d1d5db) 16%, transparent);
    --ghz-btn-secondary-border: color-mix(in srgb, var(--ghz-text-primary, #d1d5db) 24%, transparent);
    --ghz-btn-secondary-border-hover: color-mix(in srgb, var(--ghz-text-primary, #d1d5db) 38%, transparent);

    --ghz-btn-danger-bg: color-mix(in srgb, var(--ghz-danger, #f87171) 18%, transparent);
    --ghz-btn-danger-bg-hover: color-mix(in srgb, var(--ghz-danger, #f87171) 28%, transparent);
    --ghz-btn-danger-border: color-mix(in srgb, var(--ghz-danger, #f87171) 45%, transparent);
    --ghz-btn-danger-border-hover: color-mix(in srgb, var(--ghz-danger, #f87171) 70%, transparent);
    --ghz-btn-danger-text: color-mix(in srgb, var(--ghz-danger, #f87171) 70%, white 30%);

    --ghz-btn-warning-bg: color-mix(in srgb, var(--ghz-warning, #fbbf24) 18%, transparent);
    --ghz-btn-warning-bg-hover: color-mix(in srgb, var(--ghz-warning, #fbbf24) 28%, transparent);
    --ghz-btn-warning-border: color-mix(in srgb, var(--ghz-warning, #fbbf24) 45%, transparent);
    --ghz-btn-warning-border-hover: color-mix(in srgb, var(--ghz-warning, #fbbf24) 70%, transparent);
    --ghz-btn-warning-text: color-mix(in srgb, var(--ghz-warning, #fbbf24) 70%, black 10%);

    --ghz-btn-icon-bg: color-mix(in srgb, white 6%, transparent);
    --ghz-btn-icon-bg-hover: color-mix(in srgb, white 12%, transparent);
    --ghz-btn-icon-border: color-mix(in srgb, white 14%, transparent);
    --ghz-btn-icon-border-hover: color-mix(in srgb, white 28%, transparent);

    --ghz-btn-icon-primary-bg: var(--ghz-brand-active-bg, rgba(0,195,122,0.18));
    --ghz-btn-icon-primary-bg-hover: color-mix(in srgb, var(--ghz-grad-1, #00c37a) 22%, transparent);
    --ghz-btn-icon-primary-border: color-mix(in srgb, var(--ghz-grad-1, #00c37a) 30%, transparent);
    --ghz-btn-icon-primary-border-hover: color-mix(in srgb, var(--ghz-grad-1, #00c37a) 55%, transparent);
    --ghz-btn-icon-primary-text: var(--ghz-grad-1, #00c37a);

    --ghz-btn-icon-secondary-bg: var(--ghz-info-bg, rgba(96,165,250,0.18));
    --ghz-btn-icon-secondary-bg-hover: color-mix(in srgb, var(--ghz-info, #60a5fa) 22%, transparent);
    --ghz-btn-icon-secondary-border: color-mix(in srgb, var(--ghz-info, #60a5fa) 30%, transparent);
    --ghz-btn-icon-secondary-border-hover: color-mix(in srgb, var(--ghz-info, #60a5fa) 55%, transparent);
    --ghz-btn-icon-secondary-text: color-mix(in srgb, var(--ghz-info, #60a5fa) 70%, white 30%);

    --ghz-btn-icon-danger-bg: var(--ghz-danger-bg, rgba(239,68,68,0.18));
    --ghz-btn-icon-danger-bg-hover: color-mix(in srgb, var(--ghz-danger, #f87171) 22%, transparent);
    --ghz-btn-icon-danger-border: color-mix(in srgb, var(--ghz-danger, #f87171) 30%, transparent);
    --ghz-btn-icon-danger-border-hover: color-mix(in srgb, var(--ghz-danger, #f87171) 55%, transparent);
    --ghz-btn-icon-danger-text: color-mix(in srgb, var(--ghz-danger, #f87171) 70%, white 30%);

    --ghz-btn-icon-warning-bg: var(--ghz-warning-bg, rgba(251,191,36,0.18));
    --ghz-btn-icon-warning-bg-hover: color-mix(in srgb, var(--ghz-warning, #fbbf24) 22%, transparent);
    --ghz-btn-icon-warning-border: color-mix(in srgb, var(--ghz-warning, #fbbf24) 30%, transparent);
    --ghz-btn-icon-warning-border-hover: color-mix(in srgb, var(--ghz-warning, #fbbf24) 55%, transparent);
    --ghz-btn-icon-warning-text: color-mix(in srgb, var(--ghz-warning, #fbbf24) 70%, black 10%);

    --ghz-glass-4-blur: blur(20px) saturate(1.4);
}

/* ===== CHIP "solid brand" — text + bg theo theme ===== */
:root, html[data-theme="classic"] {
    --ghz-text-on-brand-strong: #ffffff;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #0d6749;
    --ghz-brand-chip-text: #ffffff;
    --ghz-brand-chip-bg-hover: #0c6044;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #00c37a;
    --ghz-brand-active-bg: rgba(0,195,122,0.45);
    --ghz-brand-active-border: rgba(0,195,122,0.80);
    --ghz-tab-btn-glow-alpha: 45%;
    --ghz-tab-btn-glow-strong: 65%;
    --ghz-tab-btn-glow-soft: 27%;
    --ghz-tab-btn-glow-hover: 55%;
    /* FIX (2026-11-05, WCAG AA): theme classic là theme TỐI (nền #0a0e1a)
       nhưng THIẾU 3 token semantic ⇒ --ghz-danger/warning/info rơi về
       giá trị mặc định của theme SÁNG (#b91c1c/#b45309/#1e40af) ⇒ banner
       trên nền tối chỉ đạt 1.93:1–3.29:1 (dưới chuẩn 4.5:1).
       Nay khai báo bản SÁNG tương ứng với nền tối (giống midnight/
       deep-space/charcoal) ⇒ ≥ 9:1 trên nền tối. */
    --ghz-success: #34d399;
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger: #f87171;
    --ghz-danger-bg: color-mix(in srgb, var(--ghz-danger, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning: #fbbf24;
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info: #60a5fa;
    --ghz-info-bg: color-mix(in srgb, var(--ghz-info, #34d399) 6%, var(--ghz-tint-base, #ffffff));
}
html[data-theme="mint-fresh"] {
    --ghz-text-on-brand-strong: #285e61;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #bfe6e4;
    --ghz-brand-chip-text: #285e61;
    --ghz-brand-chip-bg-hover: #b4d9d7;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #258579;
    --ghz-brand-active-bg: rgba(56,178,172,0.32);
    --ghz-brand-active-border: rgba(56,178,172,0.60);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="peach-cream"] {
    --ghz-text-on-brand-strong: #7c2d12;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #fdd2b4;
    --ghz-brand-chip-text: #7c2d12;
    --ghz-brand-chip-bg-hover: #eec6aa;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #c2410c;
    --ghz-brand-active-bg: rgba(249,115,22,0.32);
    --ghz-brand-active-border: rgba(249,115,22,0.60);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="lavender-mist"] {
    --ghz-text-on-brand-strong: #44337a;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #d9cef2;
    --ghz-brand-chip-text: #44337a;
    --ghz-brand-chip-bg-hover: #ccc1e4;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #ffffff;
    --ghz-brand-active: #553c9a;
    --ghz-brand-active-bg: rgba(128,90,213,0.30);
    --ghz-brand-active-border: rgba(128,90,213,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 42%;
    --ghz-tab-btn-glow-hover: 40%;
}
html[data-theme="sky-blue"] {
    --ghz-text-on-brand-strong: #2c5282;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #c1daf0;
    --ghz-brand-chip-text: #2c5282;
    --ghz-brand-chip-bg-hover: #b6cce2;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #2a4365;
    --ghz-brand-active-bg: rgba(49,130,206,0.30);
    --ghz-brand-active-border: rgba(49,130,206,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 42%;
    --ghz-tab-btn-glow-hover: 40%;
}
html[data-theme="sunset"] {
    --ghz-text-on-brand-strong: #7b341e;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #f4d0b8;
    --ghz-brand-chip-text: #7b341e;
    --ghz-brand-chip-bg-hover: #e5c3ad;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #9c4221;
    --ghz-brand-active-bg: rgba(221,107,32,0.32);
    --ghz-brand-active-border: rgba(221,107,32,0.60);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="midnight"] {
    --ghz-text-on-brand-strong: #4fd1c5;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #284b4e;
    --ghz-brand-chip-text: #4fd1c5;
    --ghz-brand-chip-bg-hover: #264749;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #267e76;
    --ghz-brand-active-bg: rgba(79,209,197,0.18);
    --ghz-brand-active-border: rgba(79,209,197,0.45);
    --ghz-tab-btn-glow-alpha: 25%;
    --ghz-tab-btn-glow-soft: 15%;
    --ghz-tab-btn-glow-strong: 38%;
    --ghz-tab-btn-glow-hover: 37%;
}
html[data-theme="deep-space"] {
    --ghz-text-on-brand-strong: #4fd1c5;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #414347;
    --ghz-brand-chip-text: #4fd1c5;
    --ghz-brand-chip-bg-hover: #3d3f42;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #2c7a7b;
    --ghz-brand-active-bg: rgba(160,174,192,0.18);
    --ghz-brand-active-border: rgba(160,174,192,0.45);
    --ghz-tab-btn-glow-alpha: 22%;
    --ghz-tab-btn-glow-soft: 13%;
    --ghz-tab-btn-glow-strong: 33%;
    --ghz-tab-btn-glow-hover: 34%;
}
html[data-theme="charcoal"] {
    --ghz-text-on-brand-strong: #cfd8dc;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #3a4247;
    --ghz-brand-chip-text: #cfd8dc;
    --ghz-brand-chip-bg-hover: #363e42;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #455a64;
    --ghz-brand-active-bg: rgba(144,164,174,0.18);
    --ghz-brand-active-border: rgba(144,164,174,0.42);
    --ghz-tab-btn-glow-alpha: 24%;
    --ghz-tab-btn-glow-soft: 14%;
    --ghz-tab-btn-glow-strong: 36%;
    --ghz-tab-btn-glow-hover: 36%;
}
html[data-theme="purple-haze"] {
    --ghz-text-on-brand-strong: #662dc9;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #d0c6ed;
    --ghz-brand-chip-text: #662dc9;
    --ghz-brand-chip-bg-hover: #d0c6ed;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #805ad5;
    --ghz-brand-active-bg: rgba(109,78,198,0.32);
    --ghz-brand-active-border: rgba(183,148,244,0.55);
    --ghz-tab-btn-glow-alpha: 25%;
    --ghz-tab-btn-glow-soft: 15%;
    --ghz-tab-btn-glow-strong: 38%;
    --ghz-tab-btn-glow-hover: 37%;
}
html[data-theme="pink-bloom"] {
    --ghz-text-on-brand-strong: #831843;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #fad1e4;
    --ghz-brand-chip-text: #831843;
    --ghz-brand-chip-bg-hover: #ebc4d7;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #b83280;
    --ghz-brand-active-bg: rgba(237,100,166,0.30);
    --ghz-brand-active-border: rgba(237,100,166,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 42%;
    --ghz-tab-btn-glow-hover: 40%;
}
/* ===== 6 THEME MARVEL — CHIP "SOLID BRAND" (2026-10-10) ===== */
html[data-theme="mcu-iron"] {
    --ghz-text-on-brand-strong: #ffe9c2;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #473419;
    --ghz-brand-chip-text: #ffe9c2;
    --ghz-brand-chip-bg-hover: #433117;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #f5a524;
    --ghz-brand-active-bg: rgba(245,165,36,0.20);
    --ghz-brand-active-border: rgba(245,165,36,0.55);
    --ghz-tab-btn-glow-alpha: 34%;
    --ghz-tab-btn-glow-soft: 20%;
    --ghz-tab-btn-glow-strong: 50%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="mcu-cap"] {
    --ghz-text-on-brand-strong: #dbe8ff;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #172848;
    --ghz-brand-chip-text: #dbe8ff;
    --ghz-brand-chip-bg-hover: #152643;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #2f6fd0;
    --ghz-brand-active-bg: rgba(47,111,208,0.22);
    --ghz-brand-active-border: rgba(47,111,208,0.58);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 38%;
}
html[data-theme="mcu-thanos"] {
    --ghz-text-on-brand-strong: #ede4ff;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #37285b;
    --ghz-brand-chip-text: #ede4ff;
    --ghz-brand-chip-bg-hover: #342556;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #8b5cf6;
    --ghz-brand-active-bg: rgba(139,92,246,0.24);
    --ghz-brand-active-border: rgba(139,92,246,0.58);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 46%;
    --ghz-tab-btn-glow-hover: 38%;
}
html[data-theme="mcu-panther"] {
    --ghz-text-on-brand-strong: #c0c8d0;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #313639;
    --ghz-brand-chip-text: #c0c8d0;
    --ghz-brand-chip-bg-hover: #2e3335;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #aab3bc;
    --ghz-brand-active-bg: rgba(192,200,208,0.16);
    --ghz-brand-active-border: rgba(192,200,208,0.48);
    --ghz-tab-btn-glow-alpha: 24%;
    --ghz-tab-btn-glow-soft: 14%;
    --ghz-tab-btn-glow-strong: 38%;
    --ghz-tab-btn-glow-hover: 32%;
}
html[data-theme="mcu-shield"] {
    --ghz-text-on-brand-strong: #d6f7ff;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #143f4b;
    --ghz-brand-chip-text: #d6f7ff;
    --ghz-brand-chip-bg-hover: #133b46;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #22d3ee;
    --ghz-brand-active-bg: rgba(34,211,238,0.20);
    --ghz-brand-active-border: rgba(34,211,238,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 44%;
    --ghz-tab-btn-glow-hover: 37%;
}
html[data-theme="mcu-asgard"] {
    --ghz-text-on-brand-strong: #fcd34d;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #403d26;
    --ghz-brand-chip-text: #fcd34d;
    --ghz-brand-chip-bg-hover: #3c3a23;
    --ghz-warning-text: #fbbf24;
    --ghz-text-on-brand-solid: #000000;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #fbbf24;
    --ghz-brand-active-bg: rgba(251,191,36,0.20);
    --ghz-brand-active-border: rgba(251,191,36,0.55);
    --ghz-tab-btn-glow-alpha: 32%;
    --ghz-tab-btn-glow-soft: 19%;
    --ghz-tab-btn-glow-strong: 48%;
    --ghz-tab-btn-glow-hover: 40%;
}

/* FIX Oct 22, 2026: Thêm 7 chip token cho 4 theme pastel bị thiếu (cherry-blossom, coffee-cream, rose-pastel, aurora-pastel) */
html[data-theme="cherry-blossom"] {
    --ghz-text-on-brand-strong: #831843;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #f9c4de;
    --ghz-brand-chip-text: #831843;
    --ghz-brand-chip-bg-hover: #eab9d1;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #ec4899;
    --ghz-brand-active-bg: rgba(236,72,153,0.32);
    --ghz-brand-active-border: rgba(236,72,153,0.60);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="coffee-cream"] {
    --ghz-text-on-brand-strong: #7c2d12;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #e9cbb5;
    --ghz-brand-chip-text: #7c2d12;
    --ghz-brand-chip-bg-hover: #dbbfaa;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #ffffff;
    --ghz-brand-active: #b45309;
    --ghz-brand-active-bg: rgba(180,83,9,0.30);
    --ghz-brand-active-border: rgba(180,83,9,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 42%;
    --ghz-tab-btn-glow-hover: 40%;
}
html[data-theme="rose-pastel"] {
    --ghz-text-on-brand-strong: #831843;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #f9c4de;
    --ghz-brand-chip-text: #831843;
    --ghz-brand-chip-bg-hover: #eab9d1;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #000000;
    --ghz-brand-active: #ec4899;
    --ghz-brand-active-bg: rgba(236,72,153,0.32);
    --ghz-brand-active-border: rgba(236,72,153,0.55);
    --ghz-tab-btn-glow-alpha: 30%;
    --ghz-tab-btn-glow-soft: 18%;
    --ghz-tab-btn-glow-strong: 45%;
    --ghz-tab-btn-glow-hover: 42%;
}
html[data-theme="aurora-pastel"] {
    --ghz-text-on-brand-strong: #44337a;
    /* ===== CHIP nền ĐỤC (WCAG AA) — tất định, không phụ thuộc vị trí ===== */
    --ghz-brand-chip-bg: #d9cef2;
    --ghz-brand-chip-text: #44337a;
    --ghz-brand-chip-bg-hover: #ccc1e4;
    --ghz-warning-text: #92400e;
    --ghz-text-on-brand-solid: #ffffff;
    --ghz-text-on-brand-color: #ffffff;
    --ghz-brand-active: #553c9a;
    --ghz-brand-active-bg: rgba(128,90,213,0.30);
    --ghz-brand-active-border: rgba(128,90,213,0.55);
    --ghz-tab-btn-glow-alpha: 28%;
    --ghz-tab-btn-glow-soft: 17%;
    --ghz-tab-btn-glow-strong: 42%;
    --ghz-tab-btn-glow-hover: 40%;
}

/* ============================================================
   THEME-AWARE BRAND COLOR — cho text/icon accent
   ============================================================ */
html[data-theme="mint-fresh"]     { --ghz-brand-color: #00c37a; --ghz-brand-hover: #2d9d8f; --ghz-brand-active: #258579; --ghz-brand-soft-06: rgba(168,230,207,0.06); --ghz-brand-soft-08: rgba(168,230,207,0.08); --ghz-brand-soft-12: rgba(168,230,207,0.12); --ghz-brand-soft-18: rgba(168,230,207,0.18); --ghz-brand-soft-25: rgba(168,230,207,0.25); --ghz-brand-soft-30: rgba(168,230,207,0.30); --ghz-brand-soft-45: rgba(168,230,207,0.45); --ghz-brand-soft-55: rgba(168,230,207,0.55); --ghz-brand-soft-70: rgba(168,230,207,0.70); --ghz-brand-glow-35: rgba(168,230,207,0.35); }
html[data-theme="peach-cream"]    { --ghz-brand-color: #f97316; --ghz-brand-hover: #ea580c; --ghz-brand-active: #c2410c; --ghz-brand-soft-06: rgba(254,215,170,0.06); --ghz-brand-soft-08: rgba(254,215,170,0.08); --ghz-brand-soft-12: rgba(254,215,170,0.12); --ghz-brand-soft-18: rgba(254,215,170,0.18); --ghz-brand-soft-25: rgba(254,215,170,0.25); --ghz-brand-soft-30: rgba(254,215,170,0.30); --ghz-brand-soft-45: rgba(254,215,170,0.45); --ghz-brand-soft-55: rgba(254,215,170,0.55); --ghz-brand-soft-70: rgba(254,215,170,0.70); --ghz-brand-glow-35: rgba(254,215,170,0.35); }
html[data-theme="lavender-mist"]  { --ghz-brand-color: #805ad5; --ghz-brand-hover: #6b46c1; --ghz-brand-active: #553c9a; --ghz-brand-soft-06: rgba(196,181,253,0.06); --ghz-brand-soft-08: rgba(196,181,253,0.08); --ghz-brand-soft-12: rgba(196,181,253,0.12); --ghz-brand-soft-18: rgba(196,181,253,0.18); --ghz-brand-soft-25: rgba(196,181,253,0.25); --ghz-brand-soft-30: rgba(196,181,253,0.30); --ghz-brand-soft-45: rgba(196,181,253,0.45); --ghz-brand-soft-55: rgba(196,181,253,0.55); --ghz-brand-soft-70: rgba(196,181,253,0.70); --ghz-brand-glow-35: rgba(196,181,253,0.35); }
html[data-theme="sky-blue"]       { --ghz-brand-color: #3182ce; --ghz-brand-hover: #2c5282; --ghz-brand-active: #2a4365; --ghz-brand-soft-06: rgba(168,206,234,0.06); --ghz-brand-soft-08: rgba(168,206,234,0.08); --ghz-brand-soft-12: rgba(168,206,234,0.12); --ghz-brand-soft-18: rgba(168,206,234,0.18); --ghz-brand-soft-25: rgba(168,206,234,0.25); --ghz-brand-soft-30: rgba(168,206,234,0.30); --ghz-brand-soft-45: rgba(168,206,234,0.45); --ghz-brand-soft-55: rgba(168,206,234,0.55); --ghz-brand-soft-70: rgba(168,206,234,0.70); --ghz-brand-glow-35: rgba(168,206,234,0.35); }
html[data-theme="sunset"]         { --ghz-brand-color: #dd6b20; --ghz-brand-hover: #c05621; --ghz-brand-active: #9c4221; --ghz-brand-soft-06: rgba(251,191,130,0.06); --ghz-brand-soft-08: rgba(251,191,130,0.08); --ghz-brand-soft-12: rgba(251,191,130,0.12); --ghz-brand-soft-18: rgba(251,191,130,0.18); --ghz-brand-soft-25: rgba(251,191,130,0.25); --ghz-brand-soft-30: rgba(251,191,130,0.30); --ghz-brand-soft-45: rgba(251,191,130,0.45); --ghz-brand-soft-55: rgba(251,191,130,0.55); --ghz-brand-soft-70: rgba(251,191,130,0.70); --ghz-brand-glow-35: rgba(251,191,130,0.35); }
html[data-theme="pink-bloom"]     { --ghz-brand-color: #ed64a6; --ghz-brand-hover: #d53f8c; --ghz-brand-active: #b83280; --ghz-brand-soft-06: rgba(252,207,221,0.06); --ghz-brand-soft-08: rgba(252,207,221,0.08); --ghz-brand-soft-12: rgba(252,207,221,0.12); --ghz-brand-soft-18: rgba(252,207,221,0.18); --ghz-brand-soft-25: rgba(252,207,221,0.25); --ghz-brand-soft-30: rgba(252,207,221,0.30); --ghz-brand-soft-45: rgba(252,207,221,0.45); --ghz-brand-soft-55: rgba(252,207,221,0.55); --ghz-brand-soft-70: rgba(252,207,221,0.70); --ghz-brand-glow-35: rgba(252,207,221,0.35); }
html[data-theme="cherry-blossom"] { --ghz-brand-color: #ec4899; --ghz-brand-hover: #db2777; --ghz-brand-active: #be185d; --ghz-brand-soft-06: rgba(252,207,221,0.06); --ghz-brand-soft-08: rgba(252,207,221,0.08); --ghz-brand-soft-12: rgba(252,207,221,0.12); --ghz-brand-soft-18: rgba(252,207,221,0.18); --ghz-brand-soft-25: rgba(252,207,221,0.25); --ghz-brand-soft-30: rgba(252,207,221,0.30); --ghz-brand-soft-45: rgba(252,207,221,0.45); --ghz-brand-soft-55: rgba(252,207,221,0.55); --ghz-brand-soft-70: rgba(252,207,221,0.70); --ghz-brand-glow-35: rgba(252,207,221,0.35); }
html[data-theme="coffee-cream"]   { --ghz-brand-color: #92400e; --ghz-brand-hover: #78350f; --ghz-brand-active: #b45309; --ghz-brand-soft-06: rgba(245,230,211,0.06); --ghz-brand-soft-08: rgba(245,230,211,0.08); --ghz-brand-soft-12: rgba(245,230,211,0.12); --ghz-brand-soft-18: rgba(245,230,211,0.18); --ghz-brand-soft-25: rgba(245,230,211,0.25); --ghz-brand-soft-30: rgba(245,230,211,0.30); --ghz-brand-soft-45: rgba(245,230,211,0.45); --ghz-brand-soft-55: rgba(245,230,211,0.55); --ghz-brand-soft-70: rgba(245,230,211,0.70); --ghz-brand-glow-35: rgba(245,230,211,0.35); }
html[data-theme="rose-pastel"]    { --ghz-brand-color: #ec4899; --ghz-brand-hover: #db2777; --ghz-brand-active: #be185d; --ghz-brand-soft-06: rgba(252,207,221,0.06); --ghz-brand-soft-08: rgba(252,207,221,0.08); --ghz-brand-soft-12: rgba(252,207,221,0.12); --ghz-brand-soft-18: rgba(252,207,221,0.18); --ghz-brand-soft-25: rgba(252,207,221,0.25); --ghz-brand-soft-30: rgba(252,207,221,0.30); --ghz-brand-soft-45: rgba(252,207,221,0.45); --ghz-brand-soft-55: rgba(252,207,221,0.55); --ghz-brand-soft-70: rgba(252,207,221,0.70); --ghz-brand-glow-35: rgba(252,207,221,0.35); }
html[data-theme="aurora-pastel"]  { --ghz-brand-color: #7c3aed; --ghz-brand-hover: #6d28d9; --ghz-brand-active: #553c9a; --ghz-brand-soft-06: rgba(196,181,253,0.06); --ghz-brand-soft-08: rgba(196,181,253,0.08); --ghz-brand-soft-12: rgba(196,181,253,0.12); --ghz-brand-soft-18: rgba(196,181,253,0.18); --ghz-brand-soft-25: rgba(196,181,253,0.25); --ghz-brand-soft-30: rgba(196,181,253,0.30); --ghz-brand-soft-45: rgba(196,181,253,0.45); --ghz-brand-soft-55: rgba(196,181,253,0.55); --ghz-brand-soft-70: rgba(196,181,253,0.70); --ghz-brand-glow-35: rgba(196,181,253,0.35); }
html[data-theme="midnight"]       { --ghz-brand-color: #38b2ac; --ghz-brand-hover: #2d9d8f; --ghz-brand-active: #267e76; --ghz-brand-soft-06: rgba(56,178,172,0.10); --ghz-brand-soft-08: rgba(56,178,172,0.12); --ghz-brand-soft-12: rgba(56,178,172,0.20); --ghz-brand-soft-18: rgba(56,178,172,0.25); --ghz-brand-soft-25: rgba(56,178,172,0.30); --ghz-brand-soft-30: rgba(56,178,172,0.40); --ghz-brand-soft-45: rgba(56,178,172,0.55); --ghz-brand-soft-55: rgba(56,178,172,0.65); --ghz-brand-soft-70: rgba(56,178,172,0.75); --ghz-brand-glow-35: rgba(56,178,172,0.40); }
html[data-theme="deep-space"]     { --ghz-brand-color: #4fd1c5; --ghz-brand-hover: #38b2ac; --ghz-brand-active: #2c7a7b; --ghz-brand-soft-06: rgba(79,209,197,0.10); --ghz-brand-soft-08: rgba(79,209,197,0.12); --ghz-brand-soft-12: rgba(79,209,197,0.20); --ghz-brand-soft-18: rgba(79,209,197,0.25); --ghz-brand-soft-25: rgba(79,209,197,0.30); --ghz-brand-soft-30: rgba(79,209,197,0.40); --ghz-brand-soft-45: rgba(79,209,197,0.55); --ghz-brand-soft-55: rgba(79,209,197,0.65); --ghz-brand-soft-70: rgba(79,209,197,0.75); --ghz-brand-glow-35: rgba(79,209,197,0.40); }
html[data-theme="charcoal"]       { --ghz-brand-color: #90a4ae; --ghz-brand-hover: #607d8b; --ghz-brand-active: #455a64; --ghz-brand-soft-06: rgba(144,164,174,0.06); --ghz-brand-soft-08: rgba(144,164,174,0.08); --ghz-brand-soft-12: rgba(144,164,174,0.12); --ghz-brand-soft-18: rgba(144,164,174,0.18); --ghz-brand-soft-25: rgba(144,164,174,0.25); --ghz-brand-soft-30: rgba(144,164,174,0.30); --ghz-brand-soft-45: rgba(144,164,174,0.45); --ghz-brand-soft-55: rgba(144,164,174,0.55); --ghz-brand-soft-70: rgba(144,164,174,0.70); --ghz-brand-glow-35: rgba(144,164,174,0.35); }
html[data-theme="purple-haze"]    { --ghz-brand-color: #b794f4; --ghz-brand-hover: #9f7aea; --ghz-brand-active: #805ad5; --ghz-brand-soft-06: rgba(183,148,244,0.10); --ghz-brand-soft-08: rgba(183,148,244,0.12); --ghz-brand-soft-12: rgba(183,148,244,0.20); --ghz-brand-soft-18: rgba(183,148,244,0.25); --ghz-brand-soft-25: rgba(183,148,244,0.30); --ghz-brand-soft-30: rgba(183,148,244,0.40); --ghz-brand-soft-45: rgba(183,148,244,0.55); --ghz-brand-soft-55: rgba(183,148,244,0.65); --ghz-brand-soft-70: rgba(183,148,244,0.75); --ghz-brand-glow-35: rgba(183,148,244,0.40); }
/* FIX (2026-11-05): theme CLASSIC là theme TỐI mặc định nhưng THIẾU
   --ghz-brand-color / --ghz-brand-hover ⇒ mọi rule dùng
   `var(--ghz-brand-color)` KHÔNG có fallback (app-search icon, brand dot,
   mkt-stat-card.sem-brand, rank-card border…) rơi về "invalid at computed
   value time" ⇒ mất màu accent hoàn toàn (đo thật: color = #d1d5db thay
   vì #00c37a, background = transparent). Nay khai báo brand xanh lá #00c37a
   + brand-soft-* tương ứng (đồng bộ 100% với theme-engine.js). */
html[data-theme="classic"]        { --ghz-brand-color: #00c37a; --ghz-brand-hover: #2d9d8f; --ghz-brand-active: #00c37a; --ghz-brand-soft-06: rgba(0,195,122,0.06); --ghz-brand-soft-08: rgba(0,195,122,0.08); --ghz-brand-soft-12: rgba(0,195,122,0.12); --ghz-brand-soft-18: rgba(0,195,122,0.18); --ghz-brand-soft-25: rgba(0,195,122,0.25); --ghz-brand-soft-30: rgba(0,195,122,0.30); --ghz-brand-soft-45: rgba(0,195,122,0.45); --ghz-brand-soft-55: rgba(0,195,122,0.55); --ghz-brand-soft-70: rgba(0,195,122,0.70); --ghz-brand-glow-35: rgba(0,195,122,0.35); }
/* ===== 6 THEME MARVEL — THEME-AWARE BRAND COLOR (2026-10-10) =====
   Cùng pattern với nhóm trên: brand-color (accent sáng) + brand-hover
   + brand-soft-* (độ đục dần) lấy theo màu nhấn chính của theme. */
html[data-theme="mcu-iron"]      { --ghz-brand-color: #f5a524; --ghz-brand-hover: #fbbf24; --ghz-brand-active: #f5a524; --ghz-brand-soft-06: rgba(245,165,36,0.06); --ghz-brand-soft-08: rgba(245,165,36,0.08); --ghz-brand-soft-12: rgba(245,165,36,0.12); --ghz-brand-soft-18: rgba(245,165,36,0.18); --ghz-brand-soft-25: rgba(245,165,36,0.25); --ghz-brand-soft-30: rgba(245,165,36,0.30); --ghz-brand-soft-45: rgba(245,165,36,0.45); --ghz-brand-soft-55: rgba(245,165,36,0.55); --ghz-brand-soft-70: rgba(245,165,36,0.70); --ghz-brand-glow-35: rgba(245,165,36,0.35); }
html[data-theme="mcu-cap"]       { --ghz-brand-color: #6ea8fe; --ghz-brand-hover: #93c5fd; --ghz-brand-active: #2f6fd0; --ghz-brand-soft-06: rgba(47,111,208,0.06); --ghz-brand-soft-08: rgba(47,111,208,0.08); --ghz-brand-soft-12: rgba(47,111,208,0.12); --ghz-brand-soft-18: rgba(47,111,208,0.18); --ghz-brand-soft-25: rgba(47,111,208,0.25); --ghz-brand-soft-30: rgba(47,111,208,0.30); --ghz-brand-soft-45: rgba(47,111,208,0.45); --ghz-brand-soft-55: rgba(47,111,208,0.55); --ghz-brand-soft-70: rgba(47,111,208,0.70); --ghz-brand-glow-35: rgba(47,111,208,0.35); }
html[data-theme="mcu-thanos"]    { --ghz-brand-color: #c4b5fd; --ghz-brand-hover: #ddd6fe; --ghz-brand-active: #8b5cf6; --ghz-brand-soft-06: rgba(139,92,246,0.06); --ghz-brand-soft-08: rgba(139,92,246,0.08); --ghz-brand-soft-12: rgba(139,92,246,0.12); --ghz-brand-soft-18: rgba(139,92,246,0.18); --ghz-brand-soft-25: rgba(139,92,246,0.25); --ghz-brand-soft-30: rgba(139,92,246,0.30); --ghz-brand-soft-45: rgba(139,92,246,0.45); --ghz-brand-soft-55: rgba(139,92,246,0.55); --ghz-brand-soft-70: rgba(139,92,246,0.70); --ghz-brand-glow-35: rgba(139,92,246,0.35); }
html[data-theme="mcu-panther"]   { --ghz-brand-color: #c0c8d0; --ghz-brand-hover: #d7dde3; --ghz-brand-active: #aab3bc; --ghz-brand-soft-06: rgba(192,200,208,0.06); --ghz-brand-soft-08: rgba(192,200,208,0.08); --ghz-brand-soft-12: rgba(192,200,208,0.12); --ghz-brand-soft-18: rgba(192,200,208,0.18); --ghz-brand-soft-25: rgba(192,200,208,0.25); --ghz-brand-soft-30: rgba(192,200,208,0.30); --ghz-brand-soft-45: rgba(192,200,208,0.45); --ghz-brand-soft-55: rgba(192,200,208,0.55); --ghz-brand-soft-70: rgba(192,200,208,0.70); --ghz-brand-glow-35: rgba(192,200,208,0.35); }
html[data-theme="mcu-shield"]    { --ghz-brand-color: #67e8f9; --ghz-brand-hover: #a5f3fc; --ghz-brand-active: #22d3ee; --ghz-brand-soft-06: rgba(34,211,238,0.06); --ghz-brand-soft-08: rgba(34,211,238,0.08); --ghz-brand-soft-12: rgba(34,211,238,0.12); --ghz-brand-soft-18: rgba(34,211,238,0.18); --ghz-brand-soft-25: rgba(34,211,238,0.25); --ghz-brand-soft-30: rgba(34,211,238,0.30); --ghz-brand-soft-45: rgba(34,211,238,0.45); --ghz-brand-soft-55: rgba(34,211,238,0.55); --ghz-brand-soft-70: rgba(34,211,238,0.70); --ghz-brand-glow-35: rgba(34,211,238,0.35); }
html[data-theme="mcu-asgard"]    { --ghz-brand-color: #fcd34d; --ghz-brand-hover: #fde68a; --ghz-brand-active: #fbbf24; --ghz-brand-soft-06: rgba(251,191,36,0.06); --ghz-brand-soft-08: rgba(251,191,36,0.08); --ghz-brand-soft-12: rgba(251,191,36,0.12); --ghz-brand-soft-18: rgba(251,191,36,0.18); --ghz-brand-soft-25: rgba(251,191,36,0.25); --ghz-brand-soft-30: rgba(251,191,36,0.30); --ghz-brand-soft-45: rgba(251,191,36,0.45); --ghz-brand-soft-55: rgba(251,191,36,0.55); --ghz-brand-soft-70: rgba(251,191,36,0.70); --ghz-brand-glow-35: rgba(251,191,36,0.35); }

/* ============================================================
   TOKEN: --ghz-brand-text (2026-11-05)
   ------------------------------------------------------------
   Màu brand ĐỂ ĐỌC (dùng cho chữ / icon accent), tách khỏi
   --ghz-brand-color (dùng cho nền/viền accent).

   VÌ SAO CẦN (BUG ĐÃ SỬA 2026-11-05):
   --ghz-brand-color trên theme SÁNG là màu sáng (mint #00c37a,
   peach #f97316, sky #3182ce…) ⇒ dùng làm màu CHỮ trên nền trắng
   chỉ đạt contrast 2.31:1 – 4.03:1, dưới chuẩn WCAG AA (4.5:1)
   ⇒ chip "đang chọn", tổng tiền, icon bị mờ/khó đọc.
   --ghz-brand-active có contrast tốt hơn trên nền sáng
   (mint #258579 = 4.46:1, sky #2a4365 = 10.05:1) nhưng lại quá tối
   trên nền tối (mcu-asgard #fbbf24 trên nền #06121f thì tốt, nhưng
   midnight #267e76 trên nền #0f2027 thì chìm).

   ⇒ --ghz-brand-text = brand-active cho theme SÁNG, brand-color cho
   theme TỐI. Đo thật WCAG trên nền card của từng theme (2026-11-05).

   Dùng cho: chip .is-active, .inv-pay-total-value, icon label ô tiền.
   ============================================================ */
:root, html[data-theme] {
    /* Mặc định (theme tối): brand-color là màu sáng ⇒ đọc tốt. */
    --ghz-brand-text: var(--ghz-brand-color, #00c37a);
}
/* --- NHÓM THEME SÁNG: dùng brand-active (biến thể đậm hơn) --- */
html[data-theme="mint-fresh"]     { --ghz-brand-text: #1f7d63; }
html[data-theme="peach-cream"]    { --ghz-brand-text: #c2410c; }
html[data-theme="lavender-mist"]  { --ghz-brand-text: #553c9a; }
html[data-theme="sky-blue"]       { --ghz-brand-text: #2a4365; }
html[data-theme="sunset"]         { --ghz-brand-text: #9c4221; }
html[data-theme="pink-bloom"]     { --ghz-brand-text: #b83280; }
html[data-theme="cherry-blossom"] { --ghz-brand-text: #be185d; }
html[data-theme="coffee-cream"]   { --ghz-brand-text: #92400e; }
html[data-theme="rose-pastel"]    { --ghz-brand-text: #be185d; }
html[data-theme="aurora-pastel"]  { --ghz-brand-text: #5b21b6; }
html[data-theme="purple-haze"]    { --ghz-brand-text: #6d4ec6; }
html[data-theme="neumorphism-wellness"] { --ghz-brand-text: #3f6b4c; }

/* ============================================================
   TOKEN: --ghz-login-accent / --ghz-login-logo-text (2026-11-05)
   ------------------------------------------------------------
   Màu chữ ở MÀN ĐĂNG NHẬP (trước đây hardcode #2cabe6 trong index.html).

   VÌ SAO CẦN (BUG ĐÃ SỬA 2026-11-05, đo pixel thật trên Chrome):
   - Logo "GHz QUẢN LÝ" nằm trong ô TRẮNG (.bg-white) ở MỌI theme
     ⇒ #2cabe6 chỉ 2.60:1 ⇒ FAIL WCAG AA (cần 4.5:1) ở 22/22 theme.
   - "GHz Quản lý" (h2 span) nằm trong card theme ⇒ theme sáng chỉ
     1.95:1 – 2.42:1 ⇒ FAIL ở 12/22 theme.

   ⇒ --ghz-login-logo-text = brand pha 50% đen (nền trắng cố định)
     → MIN 5.31:1 (mcu-asgard) trên 22 theme ⇒ PASS.
   ⇒ --ghz-login-accent = --ghz-brand-text (biến thể đậm cho theme sáng,
     brand-color sáng cho theme tối) → MIN 3.99:1 (rose-pastel) trên card
     ⇒ PASS (large text 24px bold, cần 3:1).

   Đồng bộ 100% với theme-engine.js.
   ============================================================ */
:root, html[data-theme] {
    --ghz-login-logo-text: color-mix(in srgb, var(--ghz-brand-color, #00c37a) 50%, #000000);
    --ghz-login-accent: var(--ghz-brand-text, var(--ghz-brand-color, #00c37a));
}

/* ============================================================
   TOKEN: --ghz-tint-base (2026-11-05)
   ------------------------------------------------------------
   Nền OPAQUE dùng làm "base" cho các lớp tint màu (chip đang
   chọn, ô tổng tiền, banner định tuyến thanh toán).

   VÌ SAO CẦN (BUG ĐÃ SỬA 2026-11-05, đo pixel thật trên Chrome):
   Nền card của app là GRADIENT Bán trong suốt
   (--ghz-card-bg: linear-gradient(rgba(255,255,255,.88), rgba(...,.45)))
   ⇒ tại vị trí chip, màu nền thực tế có thể rất bão hoà
   (rose-pastel #f072b0, sunset #fdb6a1, sky-blue #89bafe…).
   Nếu tint 6% trộn với "transparent" (tức lấy nền card bên dưới),
   chữ accent chỉ đạt 1.71:1 – 4.43:1 ⇒ KHÔNG đạt WCAG AA 4.5:1.

   ⇒ --ghz-tint-base là một màu OPAQUE đã tính sẵn cho từng theme,
   sao cho khi trộn 6% accent lên nó thì chữ luôn ≥ 4.63:1.
   Giá trị = nền card thực tế đã "làm nhạt/ làm tối" vừa đủ để đạt AA.

   Dùng cho: color-mix(in srgb, <accent> 6%, var(--ghz-tint-base)).
   ============================================================ */
:root, html[data-theme] {
    /* Mặc định (theme tối): nền tối ⇒ base đen. */
    --ghz-tint-base: #000000;
}
/* --- NHÓM THEME SÁNG: base gần trắng (nền chip luôn sáng) --- */
html[data-theme="mint-fresh"]        { --ghz-tint-base: #ffffff; }
html[data-theme="peach-cream"]       { --ghz-tint-base: #ffffff; }
html[data-theme="lavender-mist"]     { --ghz-tint-base: #ffffff; }
html[data-theme="sky-blue"]          { --ghz-tint-base: #ffffff; }
html[data-theme="sunset"]            { --ghz-tint-base: #ffffff; }
html[data-theme="purple-haze"]       { --ghz-tint-base: #ffffff; }
html[data-theme="pink-bloom"]        { --ghz-tint-base: #ffffff; }
html[data-theme="cherry-blossom"]    { --ghz-tint-base: #ffffff; }
html[data-theme="coffee-cream"]      { --ghz-tint-base: #ffffff; }
html[data-theme="rose-pastel"]       { --ghz-tint-base: #ffffff; }
html[data-theme="aurora-pastel"]     { --ghz-tint-base: #ffffff; }
html[data-theme="neumorphism-wellness"] { --ghz-tint-base: #eeece9; }
/* --- NHÓM THEME TỐI: base gần đen (nền chip luôn tối) --- */
html[data-theme="classic"]           { --ghz-tint-base: #181b20; }
html[data-theme="midnight"]          { --ghz-tint-base: #202e34; }
html[data-theme="deep-space"]        { --ghz-tint-base: #2c2c2c; }
html[data-theme="charcoal"]          { --ghz-tint-base: #272d30; }
html[data-theme="mcu-iron"]          { --ghz-tint-base: #1c1816; }
html[data-theme="mcu-cap"]           { --ghz-tint-base: #101421; }
html[data-theme="mcu-thanos"]        { --ghz-tint-base: #1d172a; }
html[data-theme="mcu-panther"]       { --ghz-tint-base: #161a1c; }
html[data-theme="mcu-shield"]        { --ghz-tint-base: #111a22; }
html[data-theme="mcu-asgard"]        { --ghz-tint-base: #111d26; }

/* ============================================================
   GLOBAL ANIMATION & TRANSITION TOKENS
   ============================================================ */
:root {
    /* Transition durations — WCAG 2.1 Animation 2.3.3 */
    --ghz-transition-fast: 150ms;
    --ghz-transition-base: 200ms;
    --ghz-transition-slow: 250ms;
    
    /* Easing functions */
    --ghz-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ghz-ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --ghz-ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   TOKEN NỀN TRẠNG THÁI (2026-11-05) — công thức OPAQUE
   ------------------------------------------------------------
   --ghz-<status>-bg = color-mix(accent 6%, --ghz-tint-base)

   VÌ SAO (đo pixel thật trên Chrome, đủ 22 theme):
   Trước đây --ghz-<status>-bg là rgba bán trong suốt trộn trên nền
   card GRADIENT. Ở theme sáng pastel (rose-pastel, sunset, sky-blue…)
   nền thực tế rất bão hoà ⇒ chữ trạng thái chỉ đạt 1.54:1 – 4.44:1
   (FAIL WCAG 2.1 AA 4.5:1).
   Công thức mới trộn trên --ghz-tint-base (nền OPAQUE) ⇒ tương phản
   xác định trước ⇒ mọi theme ≥ 4.64:1.

   --ghz-<status>-glow: bản ALPHA, dùng cho text-shadow / box-shadow
   ring (cần alpha để glow mềm — bản opaque không glow được).
   ============================================================ */
:root, html[data-theme] {
    --ghz-success-bg: color-mix(in srgb, var(--ghz-success, #34d399) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-danger-bg:  color-mix(in srgb, var(--ghz-danger, #f87171) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-warning-bg: color-mix(in srgb, var(--ghz-warning, #fbbf24) 6%, var(--ghz-tint-base, #ffffff));
    --ghz-info-bg:    color-mix(in srgb, var(--ghz-info, #60a5fa) 6%, var(--ghz-tint-base, #ffffff));

    --ghz-success-glow: rgba(52, 211, 153, 0.18);
    --ghz-danger-glow:  rgba(248, 113, 113, 0.18);
    --ghz-warning-glow: rgba(251, 191, 36, 0.18);
    --ghz-info-glow:    rgba(96, 165, 250, 0.18);
}
