/* ============================================
   OFFICE LIBATIONS - DESIGN TOKENS
   Premium Design System v2.0
   ============================================ */

:root {
    /* -------------------------
       BRAND COLORS
       ------------------------- */
    --ol-pink: #ED2282;
    --ol-pink-dark: #C91B6B;
    --ol-pink-light: #FEDAE8;
    --ol-pink-glow: rgba(237, 34, 130, 0.12);
    --ol-pink-subtle: rgba(237, 34, 130, 0.06);
    
    --ol-purple: #2D1345;
    --ol-purple-light: #CCB0E6;
    --ol-purple-glow: rgba(45, 19, 69, 0.08);
    
    --ol-indigo: #667eea;
    --ol-indigo-light: rgba(102, 126, 234, 0.1);
    
    --ol-black: #0F0E11;
    --ol-gray: #6B7280;
    --ol-gray-light: #F8FAFC;
    --ol-gray-medium: #E2E8F0;
    --ol-white: #FFFFFF;
    
    /* -------------------------
       SEMANTIC COLORS
       ------------------------- */
    --color-primary: var(--ol-pink);
    --color-primary-hover: var(--ol-pink-dark);
    --color-primary-light: var(--ol-pink-light);
    
    --color-accent: var(--ol-purple);
    --color-accent-light: var(--ol-purple-light);
    
    --color-success: #10B981;
    --color-success-light: rgba(16, 185, 129, 0.12);
    --color-success-glow: rgba(16, 185, 129, 0.25);
    --color-warning: #F59E0B;
    --color-warning-light: rgba(245, 158, 11, 0.12);
    --color-danger: #EF4444;
    --color-danger-light: rgba(239, 68, 68, 0.12);
    /* A SOLID danger fill that carries white (--text-inverse) text at AA —
       the bare hue does not (3.76:1). The board's unread count badge. */
    --color-danger-strong: #C81E1E;
    /* Danger AS TEXT (cpr-d-contrast): AA on --bg-card and on the
       --color-danger-light tint, in both themes. */
    --color-danger-text: #C81E1E;
    --color-info: #3B82F6;
    --color-info-light: rgba(59, 130, 246, 0.12);
    
    /* -------------------------
       BACKGROUNDS
       ------------------------- */
    --bg-body: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    --bg-body-solid: #F8FAFC;
    --bg-elevated: var(--ol-white);
    --bg-card: var(--ol-white);
    --bg-hover: rgba(237, 34, 130, 0.04);
    --bg-muted: #F1F5F9;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-dark: rgba(15, 14, 17, 0.92);
    /* The dimmed page behind a native <dialog> opened over a panel. */
    --overlay-scrim: rgba(0, 0, 0, 0.4);
    /* "A model wrote this, not a person": the soft purple surface Armond's
       notes sit on in the CS ticket panel (its précis of a message, why it
       classified a ticket), its hairline, and the ink of its "ARMOND" label. */
    --ai-surface: #FBF8FC;
    --ai-border: #E8DFEE;
    --ai-ink: #6A3D7A;
    
    /* -------------------------
       TEXT COLORS
       ------------------------- */
    --text-primary: var(--ol-black);
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-inverse: var(--ol-white);
    --text-accent: var(--ol-pink);
    
    /* -------------------------
       BORDERS
       ------------------------- */
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-strong: rgba(0, 0, 0, 0.1);
    --border-hover: var(--ol-purple-light);
    --border-focus: var(--ol-pink);
    --border-radius-xs: 6px;
    --border-radius-sm: 10px;
    --border-radius: 14px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --border-radius-full: 9999px;
    
    /* -------------------------
       TYPOGRAPHY
       ------------------------- */
    --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Type Scale - Refined & Compact */
    --text-2xs: 0.6875rem;   /* 11px */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.8125rem;    /* 13px */
    --text-base: 0.875rem;   /* 14px - body */
    --text-md: 0.9375rem;    /* 15px */
    --text-lg: 1rem;         /* 16px */
    --text-xl: 1.125rem;     /* 18px */
    --text-2xl: 1.375rem;    /* 22px - h3 */
    --text-3xl: 1.75rem;     /* 28px - h2 */
    --text-4xl: 2.25rem;     /* 36px - h1 */
    --text-5xl: 3rem;        /* 48px */
    
    --line-height: 1.65;
    --line-height-heading: 1.2;
    --letter-spacing-tight: -0.02em;
    --letter-spacing-wide: 0.02em;
    
    /* -------------------------
       SPACING
       ------------------------- */
    --space-px: 1px;
    --space-0-5: 0.125rem; /* 2px */
    --space-1: 0.25rem;    /* 4px */
    --space-1-5: 0.375rem; /* 6px */
    --space-2: 0.5rem;     /* 8px */
    --space-2-5: 0.625rem; /* 10px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    
    /* -------------------------
       SHADOWS - Premium
       ------------------------- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 60px var(--ol-pink-glow), 0 0 20px var(--ol-pink-subtle);
    --shadow-glow-sm: 0 0 20px var(--ol-pink-glow);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    
    /* Colored shadows */
    --shadow-pink: 0 8px 24px rgba(237, 34, 130, 0.2);
    --shadow-success: 0 8px 24px rgba(16, 185, 129, 0.2);
    --shadow-purple: 0 8px 24px rgba(45, 19, 69, 0.15);
    
    /* -------------------------
       TRANSITIONS - Smooth
       ------------------------- */
    --transition-fast: 0.12s ease-out;
    --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* -------------------------
       EFFECTS
       ------------------------- */
    --blur-sm: blur(4px);
    --blur-md: blur(12px);
    --blur-lg: blur(24px);
    --backdrop-blur: blur(16px) saturate(180%);
    
    /* -------------------------
       COMPONENT TOKENS
       ------------------------- */
    /* Buttons */
    --btn-padding-y: 8px;
    --btn-padding-x: 16px;
    --btn-font-size: 13px;
    --btn-font-weight: 600;
    --btn-border-radius: var(--border-radius-sm);
    --btn-height: 36px;
    --btn-height-sm: 30px;
    --btn-height-lg: 44px;
    
    /* Inputs */
    --input-height: 36px;
    --input-padding: 8px 12px;
    --input-border-radius: var(--border-radius-sm);
    --input-border: 1.5px solid var(--border-color-strong);
    --input-bg: var(--ol-white);
    
    /* Cards */
    --card-padding: var(--space-6);
    --card-border-radius: var(--border-radius);
    --card-shadow: var(--shadow-md);
    --card-border: 1px solid var(--border-color);
    
    /* Tables */
    --table-header-bg: var(--bg-muted);
    --table-row-height: 42px;
    --table-border-radius: var(--border-radius-sm);
    
    /* Menu */
    --menu-width: 200px;
    --menu-bg: var(--ol-white);
    --menu-shadow: var(--shadow-lg);
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* ============================================
   DARK MODE - Token Overrides
   ============================================ */
[data-theme="dark"] {
    /* Brand color adjustments for dark backgrounds */
    --ol-pink-light: rgba(237, 34, 130, 0.25);
    --ol-pink-glow: rgba(237, 34, 130, 0.2);
    --ol-pink-subtle: rgba(237, 34, 130, 0.1);
    --ol-purple-light: #9B7BC0;
    --ol-purple-glow: rgba(155, 123, 192, 0.15);
    --ol-indigo: #818cf8;
    --ol-indigo-light: rgba(129, 140, 248, 0.15);

    --ol-black: #F1F5F9;
    --ol-gray: #94A3B8;
    --ol-gray-light: #1E293B;
    --ol-gray-medium: #475569;
    --ol-white: #1E293B;

    /* Semantic colors */
    --color-primary-light: rgba(237, 34, 130, 0.22);
    --color-accent-light: #9B7BC0;
    --color-success-light: rgba(16, 185, 129, 0.18);
    --color-success-glow: rgba(16, 185, 129, 0.3);
    --color-warning-light: rgba(245, 158, 11, 0.18);
    --color-danger-light: rgba(239, 68, 68, 0.18);
    --color-danger-strong: #DC2626;
    --color-danger-text: #FCA5A5;
    --color-info-light: rgba(59, 130, 246, 0.18);

    /* Backgrounds */
    --bg-body: linear-gradient(135deg, #0F172A 0%, #131B2E 100%);
    --bg-body-solid: #0F172A;
    --bg-elevated: #1E293B;
    --bg-card: #1E293B;
    --bg-hover: rgba(237, 34, 130, 0.08);
    --bg-muted: #283548;
    --bg-glass: rgba(30, 41, 59, 0.92);
    --bg-glass-dark: rgba(15, 23, 42, 0.95);
    --ai-surface: rgba(155, 123, 192, 0.1);
    --ai-border: rgba(155, 123, 192, 0.3);
    --ai-ink: #C9B2E4;

    /* Text */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-inverse: #FFFFFF;
    --text-accent: #F472B6;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.15);
    --border-hover: #9B7BC0;

    /* Shadows - deeper for dark backgrounds */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-pink: 0 8px 24px rgba(237, 34, 130, 0.3);
    --shadow-success: 0 8px 24px rgba(16, 185, 129, 0.3);
    --shadow-purple: 0 8px 24px rgba(155, 123, 192, 0.25);

    /* Component tokens */
    --input-bg: #1E293B;
    --input-border: 1.5px solid rgba(255, 255, 255, 0.15);
    --menu-bg: #1E293B;
    --table-header-bg: #283548;
}

/* FONTS: DM Sans and Inter are linked by v4.pug's <head>. An @import of
   them stood here, after the :root rules, where CSS ignores every @import,
   so it never loaded anything; removed (STK-P004). */

/* ============================================
   PREMIUM ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--ol-pink-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--ol-pink-glow), 0 0 60px var(--ol-pink-subtle);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes spin-smooth {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-scale-in {
    animation: scaleIn 0.25s ease-out;
}
