/* Yggdrasil Design Tokens */

:root {
    /* Colors - Background */
    --bg-page: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-subtle: #F8F9FB;
    --bg-muted: #F1F3F5;
    --bg-overlay: rgba(0, 0, 0, 0.4);

    /* Colors - Text */
    --text-strong: #1A1D23;
    --text-body: #374151;
    --text-muted: #6B7280;
    --text-faint: #9BA2B0;
    --text-inverse: #FFFFFF;

    /* Colors - Brand */
    --brand: #3B82F6;
    --brand-hover: #2563EB;
    --brand-light: #EBF5FF;
    --brand-dark: #1D4ED8;

    /* Colors - Borders */
    --border-default: #E8ECEF;
    --border-strong: #D1D5DB;
    --border-subtle: #F1F3F5;

    /* Colors - Semantic */
    --success: #22C55E;
    --success-light: #DCFCE7;
    --success-text: #166534;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-text: #92400E;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-text: #991B1B;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --info-text: #1E40AF;

    /* Colors - AI Gradient */
    --ai-blue: #3B82F6;
    --ai-purple: #8B5CF6;
    --ai-cyan: #06B6D4;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

    --text-xs: 11px;
    --text-sm: 12px;
    --text-base: 14px;
    --text-md: 15px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 20px;
    --text-3xl: 24px;

    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;

    /* Spacing (4px grid) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-9: 36px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.15);
    --shadow-focus-danger: 0 0 0 3px rgba(239, 68, 68, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* Legacy aliases (backwards compat with inline styles in views) */
    --primary: var(--brand);
    --primary-dark: var(--brand-hover);
    --primary-light: var(--brand-light);
    --text: var(--text-body);
    --text-light: var(--text-muted);
    --border: var(--border-default);
    --content-bg: var(--bg-page);
    --card-bg: var(--bg-card);
    --sidebar-bg: #1b2a4a;
    --sidebar-text: #8899b4;
    --sidebar-active: #ffffff;
    --sidebar-hover: #253a5e;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-drawer: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-body);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* AI Gradient animation property */
@property --ai-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes ai-rotate {
    to { --ai-angle: 360deg; }
}
