/* ====================
   ZhiwoSoul Client Theme - Teal
   ====================

   青色系主题：
   - theme-teal-light: 青绿晨光（浅色）
   - theme-teal-dark: 青夜深幽（深色）
   ==================== */

/* Teal Light Theme - v0.1 Admin Style */
body.theme-teal-light {
    /* ====================
       Primary Colors - Teal Theme
       ==================== */
    --primary: #14b8a6;
    --primary-hover: #0d9488;
    --primary-active: #0f766e;
    --primary-light: #ccfbf1;
    --primary-lighter: #f0fdfa;
    --primary-disabled: #5eead4;

    /* ====================
       Secondary Colors (补全：使用 Indigo/Blue 作为对比色)
       ==================== */
    --secondary: #6366f1;
    --secondary-hover: #4f46e5;
    --secondary-light: #e0e7ff;
    --secondary-lighter: #eef2ff;
    --secondary-faint: #f5f3ff;

    /* ====================
       Text Colors (WCAG AA Compliant)
       ==================== */
    --foreground: rgb(0 0 0 / 88%);
    --foreground-secondary: rgb(0 0 0 / 65%);
    --foreground-muted: rgb(0 0 0 / 45%);
    --foreground-disabled: rgb(0 0 0 / 25%);

    /* Chat Text Colors (补全缺失) */
    --chat-text-darkest: #134e4a;
    --chat-text-darker: #115e59;
    --chat-text-dark: #0f766e;
    --chat-text: #14b8a6;
    --chat-text-light: #2dd4bf;
    --chat-text-lighter: #5eead4;
    --chat-text-lightest: #ccfbf1;

    /* ====================
       Background Colors
       ==================== */
    --background: #efefef;
    --background-hover: #e5e9ed;
    --background-active: #e2e8f0;
    --background-muted: #ebf1f3;
    --background-elevated: #fff;

    /* ====================
       Border Colors
       ==================== */
    --border-subtle: rgb(0 0 0 / 6%);
    --border: #e2e8f0;
    --border-medium: #e2e8f0;
    --border-heavy: #99f6e4;
    --border-hover: #ccfbf1;
    --border-focus: #14b8a6;
    --border-disabled: #f1f5f9;
    --card-border: #e2e8f0;

    /* ====================
       Code Block
       ==================== */
    --code-bg: #f5f5f5;
    --code-font: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', menlo, consolas, monospace;

    /* ====================
       Component-Specific Colors
       ==================== */
    --card-static-bg: #f1f5f9;
    --chip-bg: #f1f5f9;
    --chip-border: var(--border);
    --chip-text: var(--foreground);
    --btn-disabled-bg: var(--background-hover);
    --btn-disabled-text: var(--foreground-disabled);
    --input-text: #475569;
    --input-placeholder: var(--foreground-disabled);
    --input-bg: rgb(0 0 0 / 5%);
    --input-bg-focus: rgb(0 0 0 / 3%);
    --user-message-bg: #cbd5e1;
    --user-message-text: #1e293b;

    /* ====================
       Scrollbar Colors
       ==================== */
    --scrollbar-thumb: rgb(0 0 0 / 40%);
    --scrollbar-thumb-hover: rgb(0 0 0 / 60%);
    --scrollbar-track: transparent;

    /* ====================
       Glassmorphism Backgrounds
       ==================== */
    --glass-light: rgb(0 0 0 / 3%);
    --glass-medium: rgb(0 0 0 / 5%);
    --glass-dark: rgb(0 0 0 / 8%);
    --glass-blur: 16px; /* 统一为16px */
    --glass-opacity: 0.35; /* 补全 */
    --backdrop-blur: blur(16px); /* 补全 */

    /* ====================
       Modal Colors
       ==================== */
    --modal-glass-bg: rgb(255 255 255 / 65%);
    --modal-glass-border: rgb(0 0 0 / 8%);

    /* ====================
       Alpha Colors
       ==================== */
    --primary-alpha-8: rgb(20 184 166 / 8%);
    --primary-alpha-20: rgb(20 184 166 / 20%);
    --primary-alpha-25: rgb(20 184 166 / 25%);
    --secondary-alpha-8: rgb(99 102 241 / 8%);

    /* ====================
       Semantic Colors (补全完整定义)
       ==================== */
    --danger: #dc2626;
    --danger-hover: #f87171;
    --danger-active: #b91c1c;
    --danger-light: #fecaca;
    --danger-lighter: #fee2e2;
    --danger-faint: #fef2f2;

    /* Destructive */
    --destructive: #dc2626;
    --destructive-hover: #f87171;
    --destructive-active: #b91c1c;
    --destructive-light: #fecaca;
    --destructive-lighter: #fee2e2;
    --destructive-faint: #fef2f2;

    /* Success */
    --success: #16a34a;
    --success-light: #4ade80;
    --success-bg: #f0fdf4;
    --success-bg-light: #dcfce7;

    /* Warning */
    --warning: #d97706;
    --warning-light: #fbbf24;
    --warning-bg: #fffbeb;
    --warning-bg-light: #fef3c7;

    /* Error */
    --error: #dc2626;
    --error-light: #f87171;
    --error-bg: #fef2f2;
    --error-bg-light: #fee2e2;

    /* Info */
    --info: #0ea5e9;
    --info-light: #38bdf8;
    --info-bg: #f0f9ff;
    --info-bg-light: #e0f2fe;

    /* ====================
       Shadows
       ==================== */
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 5%);
    --shadow-sm: 0 2px 4px rgb(0 0 0 / 5%);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 5%), 0 2px 4px -1px rgb(0 0 0 / 3%);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -2px rgb(0 0 0 / 5%);
    --shadow-lg: 0 20px 25px -5px rgb(20 184 166 / 10%), 0 10px 10px -5px rgb(20 184 166 / 5%);
    --shadow-xl: 0 25px 50px -12px rgb(20 184 166 / 15%);

    /* ====================
       Gradients
       ==================== */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-active));
    --gradient-primary-light: linear-gradient(135deg, var(--primary-light), var(--primary));
    --gradient-primary-hover: linear-gradient(135deg, var(--primary-light), var(--primary));
    --gradient-bg: #fafafa;
    --gradient-footer: linear-gradient(135deg, rgb(240 253 250 / 80%), rgb(236 254 255 / 60%)); /* 补全 */
    --gradient-card-selected: linear-gradient(135deg, #f0fdfa, #ccfbf1);
    --gradient-chip-active: linear-gradient(135deg, var(--primary-lighter), var(--primary-light));
    --font-primary: -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, sans-serif;
    --font-serif: 'SimSun', 'Songti SC', serif;
}

/* Teal Dark Theme - v0.1 Client Style */
body.theme-teal-dark {
    /* ====================
       Primary Colors
       ==================== */
    --primary: #0d9488;
    --primary-hover: #14b8a6;
    --primary-active: #0f766e;
    --primary-light: #5eead4;
    --primary-lighter: #ccfbf1;
    --primary-disabled: rgb(13 148 136 / 25%);

    /* ====================
       Secondary Colors (补全)
       ==================== */
    --secondary: #6366f1;
    --secondary-hover: #818cf8;
    --secondary-light: #a5b4fc;
    --secondary-lighter: #e0e7ff;
    --secondary-faint: #eef2ff;

    /* ====================
       Text Colors (WCAG AA Compliant)
       ==================== */
    --foreground: rgb(255 255 255 / 85%);
    --foreground-secondary: rgb(255 255 255 / 65%);
    --foreground-muted: rgb(255 255 255 / 45%);
    --foreground-disabled: rgb(255 255 255 / 25%);

    /* Chat Text Colors */
    --chat-text-darkest: #f0fdfa;
    --chat-text-darker: #ccfbf1;
    --chat-text-dark: #99f6e4;
    --chat-text: #5eead4;
    --chat-text-light: #2dd4bf;
    --chat-text-lighter: #14b8a6;
    --chat-text-lightest: #0d9488;

    /* ====================
       Background Colors
       ==================== */
    --background: #0f172a;
    --background-hover: rgb(30 41 59 / 80%);
    --background-active: rgb(20 184 166 / 15%);
    --background-muted: #0b0d0f;
    --background-elevated: #1e293b;

    /* Design Token - Background Tertiary (用于表格表头) */
    --dt-color-bg-tertiary: #1e293b;

    /* ====================
       Border Colors
       ==================== */
    --border-subtle: rgb(255 255 255 / 8%);
    --border: rgb(255 255 255 / 15%);
    --border-medium: rgb(255 255 255 / 10%);
    --border-heavy: rgb(255 255 255 / 25%);
    --border-hover: rgb(94 234 212 / 30%);
    --border-focus: #14b8a6;
    --border-disabled: rgb(255 255 255 / 5%);
    --card-border: rgb(255 255 255 / 10%);

    /* ====================
       Code Block
       ==================== */
    --code-bg: #f5f5f5;
    --code-font: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', menlo, consolas, monospace;

    /* ====================
       Component-Specific Colors
       ==================== */
    --card-static-bg: #1e293b;
    --chip-bg: #1e293b;
    --chip-border: rgb(94 234 212 / 50%);
    --chip-text: #f1f5f9;
    --btn-disabled-bg: rgb(255 255 255 / 5%);
    --btn-disabled-text: var(--foreground-muted);
    --input-text: #e2e8f0;
    --input-placeholder: var(--foreground-muted);
    --input-bg: rgb(255 255 255 / 8%);
    --input-bg-focus: rgb(255 255 255 / 5%);
    --user-message-bg: #64748b;
    --user-message-text: #fff;

    /* ====================
       Scrollbar Colors
       ==================== */
    --scrollbar-thumb: rgb(255 255 255 / 40%);
    --scrollbar-thumb-hover: rgb(255 255 255 / 60%);
    --scrollbar-track: transparent;

    /* ====================
       Glassmorphism Backgrounds
       ==================== */
    --glass-light: rgb(30 41 59 / 30%);
    --glass-medium: rgb(30 41 59 / 40%);
    --glass-dark: rgb(30 41 59 / 50%);
    --glass-blur: 20px; /* 统一为20px */
    --glass-opacity: 0.45; /* 补全 */
    --backdrop-blur: blur(20px); /* 补全 */

    /* ====================
       Modal Colors
       ==================== */
    --modal-glass-bg: rgb(30 30 30 / 45%); /* 优化：避免死黑 */
    --modal-glass-border: rgb(255 255 255 / 10%);

    /* ====================
       Alpha Colors
       ==================== */
    --primary-alpha-8: rgb(20 184 166 / 8%);
    --primary-alpha-20: rgb(20 184 166 / 20%);
    --primary-alpha-25: rgb(20 184 166 / 25%);
    --secondary-alpha-8: rgb(99 102 241 / 8%);

    /* ====================
       Semantic Colors (补全完整定义)
       ==================== */
    --danger: #ef4444;
    --danger-hover: #f87171;
    --danger-active: #dc2626;
    --danger-light: rgb(127 29 29 / 40%);
    --danger-lighter: rgb(127 29 29 / 20%);
    --danger-faint: rgb(127 29 29 / 10%);

    /* Destructive */
    --destructive: #ef4444;
    --destructive-hover: #f87171;
    --destructive-active: #dc2626;
    --destructive-light: rgb(127 29 29 / 40%);
    --destructive-lighter: rgb(127 29 29 / 20%);
    --destructive-faint: rgb(127 29 29 / 10%);

    /* Success */
    --success: #22c55e;
    --success-light: #4ade80;
    --success-bg: #14532d;
    --success-bg-light: #052e16;

    /* Warning */
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: #78350f;
    --warning-bg-light: #451a03;

    /* Error */
    --error: #ef4444;
    --error-light: #f87171;
    --error-bg: #450a0a;
    --error-bg-light: #450a0a;

    /* Info */
    --info: #38bdf8;
    --info-light: #7dd3fc;
    --info-bg: #0c4a6e;
    --info-bg-light: #082f49;

    /* ====================
       Shadows
       ==================== */
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-sm: 0 2px 4px rgb(0 0 0 / 30%);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 30%), 0 2px 4px -1px rgb(0 0 0 / 20%);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 40%), 0 4px 6px -2px rgb(0 0 0 / 30%);
    --shadow-lg: 0 20px 25px -5px rgb(20 184 166 / 15%), 0 10px 10px -5px rgb(20 184 166 / 10%);
    --shadow-xl: 0 25px 50px -12px rgb(20 184 166 / 30%);

    /* ====================
       Gradients
       ==================== */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-active));
    --gradient-primary-light: linear-gradient(135deg, var(--primary-lighter), var(--primary-light));
    --gradient-primary-hover: linear-gradient(135deg, var(--primary-light), var(--primary));
    --gradient-bg: #0f172a;
    --gradient-footer: linear-gradient(135deg, rgb(15 23 42 / 80%), rgb(30 41 59 / 60%)); /* 补全 */
    --gradient-card-selected: linear-gradient(135deg, rgb(20 184 166 / 10%), rgb(20 184 166 / 5%));
    --gradient-chip-active: linear-gradient(135deg, var(--primary-lighter), var(--primary-light));
    --font-primary: -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, sans-serif;
    --font-serif: 'SimSun', 'Songti SC', serif;
}