:root {
    --brand-1: #E36414;
    --brand-1-dark: #b84f0f;
    --brand-1-light: #ff7d2b;
    
    --brand-2: #FB8B24;
    --brand-2-dark: #e0771a;
    --brand-2-light: #ffa04d;
    
    --brand-3: #729EA1;
    --brand-3-dark: #5a8487;
    --brand-3-light: #8fb8bb;
    
    --brand-4: #0F4C5C;
    --brand-4-dark: #0a3540;
    --brand-4-light: #166273;
    
    --primary-color: var(--brand-1);
    --primary-dark: var(--brand-1-dark);
    --primary-light: var(--brand-1-light);
    
    --secondary-color: var(--brand-2);
    --secondary-dark: var(--brand-2-dark);
    --secondary-light: var(--brand-2-light);
    
    --accent-color: var(--brand-3);
    --accent-dark: var(--brand-3-dark);
    --accent-light: var(--brand-3-light);
    
    --highlight-color: var(--brand-4);
    --highlight-dark: var(--brand-4-dark);
    --highlight-light: var(--brand-4-light);
    
    --success-color: #26b050;
    --error-color: #b32121;
    --warning-color: #FB8B24;
    --info-color: var(--brand-3);
    
    /* Priority Colors (for tasks) */
    --priority-none: #9ca3af;
    --priority-low: #60a5fa;
    --priority-medium: #fbbf24;
    --priority-high: #fb923c;
    --priority-urgent: #ef4444;
    
    /* Calendar Color Palette (10 colors) */
    --calendar-red: #ef4444;
    --calendar-orange: #f97316;
    --calendar-amber: #f59e0b;
    --calendar-yellow: #eab308;
    --calendar-lime: #84cc16;
    --calendar-green: #22c55e;
    --calendar-teal: #14b8a6;
    --calendar-blue: #3b82f6;
    --calendar-indigo: #6366f1;
    --calendar-purple: #a855f7;
    
    --background-color: #ffffff;
    --surface-color: #f7f7f7;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-code: #c02d76;
    --border-color: #d6d5d5;
    
    --nav-item-color: var(--text-secondary);
    --nav-item-active-bg: var(--brand-4);
    --nav-item-active-color: #ffffff;
    --nav-item-hover-bg: rgba(0, 0, 0, 0.05);
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    --font-family: 'Roboto Mono', monospace;
    --font-size-base: 1rem;
    --font-size-sm: 0.9rem;
    --font-size-lg: 1.1rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --topnav-height: 3.5rem;
    --sidebar-width: 240px;
    --chat-panel-width: 360px;
    --chat-panel-min-width: 320px;
    --border-radius-sm: 2px;
    --border-radius: 4px;
    --border-radius-lg: 8px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.2);
    --focus-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--accent-color);
    
    --transition-fast: 0.05s ease-in-out;
    --transition-base: 0.3s ease-in-out;
    --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --chat-bg: var(--surface-color);
    --chat-input-bg: var(--background-color);
    --chat-message-user-bg: var(--brand-1);
    --chat-message-ai-bg: var(--surface-color);
    
    --loading-progress-size: 8rem;
    --loading-progress-stroke: 0.6rem;
}

/* Light theme (default) */
[data-theme="light"] {
    color-scheme: light;
    --background-color: #ffffff;
    --surface-color: #f7f7f7;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-code: #c02d76;
    --border-color: #d6d5d5;
    
    --nav-item-color: var(--text-secondary);
    --nav-item-active-bg: var(--brand-4);
    --nav-item-active-color: #ffffff;
    --nav-item-hover-bg: rgba(0, 0, 0, 0.05);
    
    --chat-bg: var(--surface-color);
    --chat-input-bg: var(--background-color);
    --chat-message-user-bg: var(--brand-1);
    --chat-message-ai-bg: var(--surface-color);
}

/* Dark theme */
[data-theme="dark"] {
    color-scheme: dark;
    --background-color: #1a1a1a;
    --surface-color: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-code: #ff6ab3;
    --border-color: #404040;
    
    --nav-item-color: var(--text-secondary);
    --nav-item-hover-bg: rgba(255, 255, 255, 0.08);
    --nav-item-active-bg: var(--brand-3);
    --nav-item-active-color: #1a1a1a;
    
    --chat-bg: #252525;
    --chat-input-bg: #1a1a1a;
    --chat-message-user-bg: var(--brand-1);
    --chat-message-ai-bg: #2d2d2d;
}

/* System preference fallback (for users who haven't chosen a theme) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;
        --background-color: #1a1a1a;
        --surface-color: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #888888;
        --text-code: #ff6ab3;
        --border-color: #404040;
        
        --nav-item-hover-bg: rgba(255, 255, 255, 0.08);
        --nav-item-active-bg: var(--brand-3);
        --nav-item-active-color: #1a1a1a;
        
        --chat-bg: #252525;
        --chat-input-bg: #1a1a1a;
        --chat-message-ai-bg: #2d2d2d;
    }
}

