/* ===== 13 套主题风格 ===== */

/* 0. 商务蓝（新 UI 设计方案 P1 落地，基于设计令牌系统） */
[data-theme="business-blue"] {
  --primary: var(--brand-600, #2563eb);
  --primary-dark: var(--brand-700, #1d4ed8);
  --primary-rgb: 37, 99, 235;
  --secondary: var(--brand-800, #1e40af);
  --accent: #60a5fa;
  --bg-main: #f1f5f9;
  --bg-sidebar: #0f172a;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --text-main: #0f172a;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;
  --border-color: #e2e8f0;
  --gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #1a3590 100%);
  --sidebar-active-bg: rgba(37, 99, 235, 0.18);
}

/* 1. 极光紫 (默认) */
[data-theme="aurora"] {
  --primary: #667eea;
  --primary-dark: #5568d3; --primary-rgb: 102,126,234;
  --secondary: #764ba2;
  --accent: #f093fb;
  --bg-main: #f0f2f5;
  --bg-sidebar: #1a1d2e;
  --bg-card: #ffffff;
  --bg-input: #f8f9fc;
  --text-main: #1a1d2e;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --text-sidebar: #a0aec0;
  --text-sidebar-active: #ffffff;
  --border-color: #e5e7eb;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hover: linear-gradient(135deg, #5568d3 0%, #653990 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 2. 活力橙 */
[data-theme="vibrant-orange"] {
  --primary: #ff6b35;
  --primary-dark: #e85a2a; --primary-rgb: 255,107,53;
  --secondary: #f7931e;
  --accent: #ffd23f;
  --bg-main: #fff5f0;
  --bg-sidebar: #2d1810;
  --bg-card: #ffffff;
  --bg-input: #fff8f4;
  --text-main: #2d1810;
  --text-secondary: #7a5c4d;
  --text-light: #b09b8e;
  --text-sidebar: #d4b8a8;
  --text-sidebar-active: #ffffff;
  --border-color: #ffe0d0;
  --gradient: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  --gradient-hover: linear-gradient(135deg, #e85a2a 0%, #e0831a 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 3. 翠绿林 */
[data-theme="forest-green"] {
  --primary: #0ba968;
  --primary-dark: #099056; --primary-rgb: 11,169,104;
  --secondary: #0d9e4e;
  --accent: #6bcb77;
  --bg-main: #f0faf3;
  --bg-sidebar: #1a2e1d;
  --bg-card: #ffffff;
  --bg-input: #f0fbf4;
  --text-main: #1a2e1d;
  --text-secondary: #5a7a5d;
  --text-light: #9ab59c;
  --text-sidebar: #a0c0a3;
  --text-sidebar-active: #ffffff;
  --border-color: #d0e8d4;
  --gradient: linear-gradient(135deg, #0ba968 0%, #0d9e4e 100%);
  --gradient-hover: linear-gradient(135deg, #099056 0%, #0b8a44 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 4. 玫瑰红 */
[data-theme="rose-red"] {
  --primary: #e63946;
  --primary-dark: #d02f3c; --primary-rgb: 230,57,70;
  --secondary: #c1121f;
  --accent: #ffb3c1;
  --bg-main: #fff5f5;
  --bg-sidebar: #2e0a0e;
  --bg-card: #ffffff;
  --bg-input: #fff8f8;
  --text-main: #2e0a0e;
  --text-secondary: #7a4a4d;
  --text-light: #b08e90;
  --text-sidebar: #d4a8aa;
  --text-sidebar-active: #ffffff;
  --border-color: #ffd0d4;
  --gradient: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
  --gradient-hover: linear-gradient(135deg, #d02f3c 0%, #ad1019 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 5. 深邃夜 */
[data-theme="deep-night"] {
  --primary: #6366f1;
  --primary-dark: #5558e0; --primary-rgb: 99,102,241;
  --secondary: #8b5cf6;
  --accent: #a78bfa;
  --bg-main: #0f0f23;
  --bg-sidebar: #060617;
  --bg-card: #1a1a35;
  --bg-input: #16162e;
  --text-main: #e0e0f0;
  --text-secondary: #9090b0;
  --text-light: #606080;
  --text-sidebar: #7070a0;
  --text-sidebar-active: #ffffff;
  --border-color: #2a2a4a;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-hover: linear-gradient(135deg, #5558e0 0%, #7c4ef0 100%);
  --sidebar-active-bg: rgba(99,102,241,0.15);
  /* P4：灰阶令牌反转（胶囊筛选/表头/次按钮 hover 等在新组件中引用 gray 令牌） */
  --gray-50: #1e1e3a;
  --gray-100: #16162e;
  --gray-200: #2a2a4a;
  --gray-300: #3d3d63;
}

/* 6. 清晨青 */
[data-theme="morning-cyan"] {
  --primary: #06b6d4;
  --primary-dark: #059db8; --primary-rgb: 6,182,212;
  --secondary: #0891b2;
  --accent: #67e8f9;
  --bg-main: #f0fbff;
  --bg-sidebar: #0a2e35;
  --bg-card: #ffffff;
  --bg-input: #f0fbff;
  --text-main: #0a2e35;
  --text-secondary: #4a7a85;
  --text-light: #8ab5c0;
  --text-sidebar: #a0c8d0;
  --text-sidebar-active: #ffffff;
  --border-color: #c0e8f0;
  --gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --gradient-hover: linear-gradient(135deg, #059db8 0%, #0781a0 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 7. 暖阳金 */
[data-theme="warm-gold"] {
  --primary: #d4a017;
  --primary-dark: #bd9015; --primary-rgb: 212,160,23;
  --secondary: #c09000;
  --accent: #fcd34d;
  --bg-main: #fffbf0;
  --bg-sidebar: #2e2410;
  --bg-card: #ffffff;
  --bg-input: #fffcf4;
  --text-main: #2e2410;
  --text-secondary: #7a6b4d;
  --text-light: #b0a58e;
  --text-sidebar: #d4c8a8;
  --text-sidebar-active: #ffffff;
  --border-color: #f0e0c0;
  --gradient: linear-gradient(135deg, #d4a017 0%, #c09000 100%);
  --gradient-hover: linear-gradient(135deg, #bd9015 0%, #a87e00 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 8. 樱花季 */
[data-theme="sakura"] {
  --primary: #ec4899;
  --primary-dark: #d43e8a; --primary-rgb: 236,72,153;
  --secondary: #db2777;
  --accent: #fbcfe8;
  --bg-main: #fdf2f8;
  --bg-sidebar: #3d0a20;
  --bg-card: #ffffff;
  --bg-input: #fdf4f9;
  --text-main: #3d0a20;
  --text-secondary: #7a4a5d;
  --text-light: #b08e9c;
  --text-sidebar: #d4a8b8;
  --text-sidebar-active: #ffffff;
  --border-color: #f8d0e4;
  --gradient: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  --gradient-hover: linear-gradient(135deg, #d43e8a 0%, #c42368 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 9. 科技黑 */
[data-theme="tech-black"] {
  --primary: #00e5ff;
  --primary-dark: #00c8e0; --primary-rgb: 0,229,255;
  --secondary: #7c4dff;
  --accent: #18ffff;
  --bg-main: #0a0a0a;
  --bg-sidebar: #000000;
  --bg-card: #141414;
  --bg-input: #1a1a1a;
  --text-main: #e0e0e0;
  --text-secondary: #808080;
  --text-light: #505050;
  --text-sidebar: #606060;
  --text-sidebar-active: #00e5ff;
  --border-color: #2a2a2a;
  --gradient: linear-gradient(135deg, #00e5ff 0%, #7c4dff 100%);
  --gradient-hover: linear-gradient(135deg, #00c8e0 0%, #6a3fee 100%);
  --sidebar-active-bg: rgba(0,229,255,0.1);
  /* P4：灰阶令牌反转 */
  --gray-50: #1a1a1a;
  --gray-100: #161616;
  --gray-200: #2a2a2a;
  --gray-300: #3a3a3a;
}

/* 10. 海洋蓝 */
[data-theme="ocean-blue"] {
  --primary: #0284c7;
  --primary-dark: #0274b0; --primary-rgb: 2,132,199;
  --secondary: #0c4a6e;
  --accent: #38bdf8;
  --bg-main: #f0f8ff;
  --bg-sidebar: #0c4a6e;
  --bg-card: #ffffff;
  --bg-input: #f0f8ff;
  --text-main: #0c4a6e;
  --text-secondary: #4a7a95;
  --text-light: #8ab5c8;
  --text-sidebar: #a0c8d8;
  --text-sidebar-active: #ffffff;
  --border-color: #c0e0f0;
  --gradient: linear-gradient(135deg, #0284c7 0%, #0c4a6e 100%);
  --gradient-hover: linear-gradient(135deg, #0274b0 0%, #0a3d5e 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 11. 薄荷冰 */
[data-theme="mint-ice"] {
  --primary: #2dd4bf;
  --primary-dark: #22c5b0; --primary-rgb: 45,212,191;
  --secondary: #14b8a6;
  --accent: #5eead4;
  --bg-main: #f0fdfa;
  --bg-sidebar: #0f2e2a;
  --bg-card: #ffffff;
  --bg-input: #f0fdfa;
  --text-main: #0f2e2a;
  --text-secondary: #4a7a72;
  --text-light: #8ab5ae;
  --text-sidebar: #a0c8c0;
  --text-sidebar-active: #ffffff;
  --border-color: #c0e8e0;
  --gradient: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  --gradient-hover: linear-gradient(135deg, #22c5b0 0%, #0fa596 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 12. 烈焰红 */
[data-theme="flame-red"] {
  --primary: #f97316;
  --primary-dark: #e0640f; --primary-rgb: 249,115,22;
  --secondary: #ef4444;
  --accent: #fbbf24;
  --bg-main: #fff7ed;
  --bg-sidebar: #2e1505;
  --bg-card: #ffffff;
  --bg-input: #fff7ed;
  --text-main: #2e1505;
  --text-secondary: #7a5a3d;
  --text-light: #b09e8e;
  --text-sidebar: #d4b8a8;
  --text-sidebar-active: #ffffff;
  --border-color: #fed7aa;
  --gradient: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --gradient-hover: linear-gradient(135deg, #e0640f 0%, #d93b3b 100%);
  --sidebar-active-bg: rgba(255,255,255,0.1);
}

/* 深色主题特殊处理 */
[data-theme="deep-night"] .card,
[data-theme="tech-black"] .card {
  border: 1px solid var(--border-color);
}

[data-theme="deep-night"] .table th,
[data-theme="tech-black"] .table th {
  background: var(--bg-input);
}

[data-theme="deep-night"] .table td,
[data-theme="tech-black"] .table td {
  border-color: var(--border-color);
}

/* P4：深色主题下徽章文字亮化（小字号需 4.5:1 对比度） */
[data-theme="deep-night"] .badge-info,
[data-theme="tech-black"] .badge-info { color: #93c5fd; }

[data-theme="deep-night"] .badge-primary,
[data-theme="tech-black"] .badge-primary { color: #b1b9fa; }

[data-theme="deep-night"] .badge-success,
[data-theme="tech-black"] .badge-success { color: #4ade80; }

[data-theme="deep-night"] .badge-warning,
[data-theme="tech-black"] .badge-warning { color: #fbbf24; }

[data-theme="deep-night"] .badge-danger,
[data-theme="tech-black"] .badge-danger { color: #f87171; }
