/*
 * YouVibe Design Assets - Token Layer
 * --------------------------------------
 * Single source of truth for:
 *   - Theme palettes (light / dark)
 *   - Typography tokens and font families
 *   - Spacing / radius / shadow / motion scales
 *   - Layout constants (sidebar / header widths)
 *   - Legacy aliases kept for vanilla selectors from the previous
 *     style.css and redesign.css so older markup keeps working.
 * --------------------------------------
 * White gallery canvas, coral action path.
 */
:root,
[data-theme="light"] {
    --background: #fefefe;
    --bg: var(--background);
    --surface1: #fefefe;
    --surface2: #F7F9FC;
    --surface3: #EEF2F7;
    --border: #EEF2F7;
    --border-visible: #E1E7F0;
    --text1: #171D2B;
    --text2: #697386;
    --text3: #8D97AA;
    --text4: #B7C0CF;
    --accent: #f37058;
    --accent-hover: #EF4E3C;
    --accent-subtle: #FFF1EE;
    --success: #36A852;
    --success-bg: #EEFAF0;
    --warning: #E6A23C;
    --warning-bg: #FFF8E8;
    --error: #E5484D;
    --error-bg: #FFF1F1;

    --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-logo: "Nabla", cursive;

    --text-display: 32px;
    --text-heading: 24px;
    --text-subheading: 16px;
    --text-body: 14px;
    --text-body-sm: 13px;
    --text-caption: 12px;
    --text-label: 13px;

    --space-2xs: 2px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    --layout-page-gutter: 48px;
    --layout-section-gap: 28px;
    --layout-card-gap: 16px;
    --control-height: 44px;
    --control-height-lg: 52px;
    --control-padding-x: 22px;
    --control-padding-x-lg: 30px;

    --radius-element: 6px;
    --radius-control: 12px;
    --radius-component: 16px;
    --radius-container: 20px;
    --radius-pill: 999px;

    --shadow-1: 0 10px 30px rgba(23, 29, 43, 0.04);
    --shadow-2: 0 18px 48px rgba(23, 29, 43, 0.08);
    --shadow-3: 0 28px 80px rgba(23, 29, 43, 0.14);
    --ease-fast: cubic-bezier(.2, .8, .2, 1);
    --ease-medium: cubic-bezier(.22, 1, .36, 1);
    --ease-slow: cubic-bezier(.16, 1, .3, 1);
    --duration-fast: 140ms;
    --duration-medium: 220ms;
    --duration-slow: 420ms;

    /* Legacy aliases used by the current vanilla CSS. */
    --primary-color: var(--accent);
    --primary-hover: var(--accent-hover);
    --bg-color: var(--background);
    --card-bg: var(--surface1);
    --text-primary: var(--text1);
    --text-secondary: var(--text2);
    --border-color: var(--border-visible);
    --progress-color: var(--accent);
    --success-color: var(--success);
    --error-color: var(--error);
    --warning-color: var(--warning);
    --surface-main: var(--background);
    --surface-card: var(--surface1);
    --line-subtle: var(--border);
    --text-main: var(--text1);
    --text-muted: var(--text2);
    --text-soft: var(--text3);
    --accent-orange: var(--accent);
    --accent-orange-soft: var(--accent-subtle);
    --accent-cream: var(--surface2);

    /* Legacy shadow aliases (still referenced by stats cards, modals, etc.). */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Layout constants for the home shell. */
    --sidebar-width: 224px;
    --right-panel-width: 332px;
    --header-h: 88px;
}

/* Responsive layout overrides for legacy home shell. */
@media (max-width: 1320px) {
    :root {
        --sidebar-width: 200px;
        --right-panel-width: 300px;
        --layout-page-gutter: 32px;
        --layout-section-gap: 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --text-display: 28px;
        --text-heading: 22px;
        --text-subheading: 15px;
        --text-body: 13px;
        --text-body-sm: 12px;
        --text-label: 12px;
        --space-sm: 6px;
        --space-md: 14px;
        --space-lg: 20px;
        --space-xl: 24px;
        --space-2xl: 36px;
        --space-3xl: 48px;
        --space-4xl: 72px;
        --layout-page-gutter: 20px;
        --layout-section-gap: 20px;
        --layout-card-gap: 12px;
        --control-height: 40px;
        --control-height-lg: 46px;
        --control-padding-x: 18px;
        --control-padding-x-lg: 22px;
    }
}

@media (max-width: 560px) {
    :root {
        --text-display: 24px;
        --text-heading: 20px;
        --text-subheading: 14px;
        --text-body: 13px;
        --text-body-sm: 12px;
        --text-caption: 11px;
        --text-label: 12px;
        --space-xs: 3px;
        --space-sm: 6px;
        --space-md: 12px;
        --space-lg: 16px;
        --space-xl: 20px;
        --space-2xl: 28px;
        --space-3xl: 40px;
        --space-4xl: 56px;
        --layout-page-gutter: 12px;
        --layout-section-gap: 16px;
        --layout-card-gap: 10px;
        --control-height: 38px;
        --control-height-lg: 42px;
        --control-padding-x: 14px;
        --control-padding-x-lg: 18px;
    }
}

/* Dark mode is intentionally not supported. YouVibe ships light-only. */

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: 1.65;
    letter-spacing: 0;
    color: var(--text1);
    background: var(--background);
}

button,
input,
textarea,
select {
    font: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
