/*
 * HRConnect Design System — foundation tokens.
 * Primitive values are global by design; presentation remains opt-in through
 * body.hrc-design-system-v1 in the theme, component and adapter layers.
 */
@layer reset, tokens, base, components, utilities, legacy-overrides;

@layer tokens {
    :root {
        /* Brand and neutral primitives. */
        --hrc-brand-50: #eff8ff;
        --hrc-brand-100: #dbeeff;
        --hrc-brand-200: #b9ddff;
        --hrc-brand-300: #82c4ff;
        --hrc-brand-400: #45a5ff;
        --hrc-brand-500: #1683ee;
        --hrc-brand-600: #0f6fd8;
        --hrc-brand-700: #0d58ad;
        --hrc-brand-800: #124b8c;
        --hrc-brand-900: #153f70;
        --hrc-blue-50: var(--hrc-brand-50);
        --hrc-blue-100: var(--hrc-brand-100);
        --hrc-blue-500: var(--hrc-brand-500);
        --hrc-blue-600: var(--hrc-brand-600);
        --hrc-blue-700: var(--hrc-brand-700);
        --hrc-blue-900: var(--hrc-brand-900);
        --hrc-violet-50: #f5f3ff;
        --hrc-violet-100: #ede9fe;
        --hrc-violet-500: #8b5cf6;
        --hrc-violet-600: #7c3aed;
        --hrc-violet-700: #6d28d9;
        --hrc-violet-900: #4c1d95;
        --hrc-indigo-700: #5b45c9;
        --hrc-indigo-800: #4c3bb8;
        --hrc-emerald-50: #ecfdf5;
        --hrc-emerald-100: #d1fae5;
        --hrc-emerald-500: #10b981;
        --hrc-emerald-600: #059669;
        --hrc-emerald-700: #0f766e;
        --hrc-emerald-800: #06634d;
        --hrc-emerald-900: #064e3b;
        --hrc-amber-50: #fffbeb;
        --hrc-amber-100: #fef3c7;
        --hrc-amber-500: #f59e0b;
        --hrc-amber-600: #d97706;
        --hrc-amber-700: #b45309;
        --hrc-amber-900: #78350f;
        /* Static foregrounds never follow legacy surface remapping. */
        --hrc-static-white: #ffffff;
        --hrc-neutral-0: #ffffff;
        --hrc-neutral-25: #fbfcfe;
        --hrc-neutral-50: #f7f9fc;
        --hrc-neutral-100: #edf2f7;
        --hrc-neutral-200: #dbe4ef;
        --hrc-neutral-300: #c6d2e1;
        --hrc-neutral-400: #94a3b8;
        --hrc-neutral-500: #64748b;
        --hrc-neutral-600: #475569;
        --hrc-neutral-700: #334155;
        --hrc-neutral-800: #1e293b;
        --hrc-neutral-900: #0f172a;
        --hrc-neutral-950: #08111f;
        --hrc-graphite-600: #46505f;
        --hrc-graphite-700: #343c48;
        --hrc-graphite-800: #242a34;
        --hrc-graphite-850: #1d222b;
        --hrc-graphite-900: #171a21;
        --hrc-graphite-950: #111318;

        /* Status and domain semantics. */
        --hrc-success-50: #ecfdf5;
        --hrc-success-600: #047857;
        --hrc-warning-50: #fffbeb;
        --hrc-warning-600: #b45309;
        --hrc-danger-50: #fff1f2;
        --hrc-danger-600: #be123c;
        --hrc-info-50: #eff6ff;
        --hrc-info-600: #1d4ed8;
        --hrc-finance-income: #047857;
        --hrc-finance-expense: #be123c;
        --hrc-finance-receivable: #1d4ed8;
        --hrc-finance-payable: #b45309;
        --hrc-hr-active: #047857;
        --hrc-hr-onboarding: #1d4ed8;
        --hrc-hr-inactive: #64748b;
        --hrc-attendance-present: #047857;
        --hrc-attendance-late: #b45309;
        --hrc-attendance-absent: #be123c;
        --hrc-attendance-leave: #6d28d9;
        --hrc-attendance-overtime: #0369a1;

        /* Typography. */
        --hrc-font-sans: "Be Vietnam Pro", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        --hrc-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
        --hrc-font-number: var(--hrc-font-sans);
        --hrc-text-xs: .75rem;
        --hrc-text-sm: .8125rem;
        --hrc-text-md: .875rem;
        --hrc-text-lg: 1rem;
        /* Native mobile controls need a 16px floor even with a compact root;
           larger user font settings must remain effective. */
        --hrc-text-input-mobile: max(var(--hrc-text-lg), 16px);
        --hrc-text-xl: 1.25rem;
        --hrc-text-2xl: 1.625rem;
        --hrc-text-3xl: clamp(1.875rem, 3vw, 2.75rem);
        --hrc-leading-tight: 1.2;
        --hrc-leading-normal: 1.5;
        --hrc-leading-relaxed: 1.65;
        --hrc-tracking-eyebrow: .08em;
        --hrc-weight-regular: 400;
        --hrc-weight-medium: 500;
        --hrc-weight-semibold: 600;
        --hrc-weight-bold: 700;

        /* Spacing, layout and controls. */
        --hrc-space-0: 0;
        --hrc-space-1: .25rem;
        --hrc-space-2: .5rem;
        --hrc-space-3: .75rem;
        --hrc-space-4: 1rem;
        --hrc-space-5: 1.25rem;
        --hrc-space-6: 1.5rem;
        --hrc-space-8: 2rem;
        --hrc-space-10: 2.5rem;
        --hrc-space-12: 3rem;
        --hrc-container-sm: 720px;
        --hrc-container-md: 960px;
        --hrc-container-lg: 1280px;
        --hrc-container-xl: 1480px;
        --hrc-container-2xl: 1760px;
        --hrc-container-4k: 1920px;
        --hrc-page-max: var(--hrc-container-xl);
        --hrc-page-gutter: var(--hrc-space-4);
        --hrc-page-gutter-tablet: var(--hrc-space-4);
        --hrc-page-gutter-mobile: var(--hrc-space-3);
        --hrc-page-padding-inline: clamp(14px, 2.2vw, var(--hrc-space-8));
        --hrc-section-gap: clamp(var(--hrc-space-4), 2vw, var(--hrc-space-6));
        --hrc-card-padding: var(--hrc-section-gap);
        --hrc-row-density: var(--hrc-control-height);
        --hrc-table-column-min: 8rem;
        --hrc-layout-detail-min: 18rem;
        --hrc-layout-controls-min: 10rem;
        --hrc-layout-compact-metrics-min: 12rem;
        --hrc-hero-compact-min-height: 6rem;
        --hrc-popover-inline-size: 28rem;
        --hrc-popover-block-size: 24rem;
        --hrc-sheet-block-size: 48rem;
        --hrc-map-block-size: 32.5rem;
        --hrc-map-block-size-tablet: 26.25rem;
        --hrc-map-block-size-mobile: 22.5rem;
        --hrc-media-capture-ratio: 4 / 3;
        --hrc-grid-gap: 1.125rem;
        --hrc-control-height-sm: 44px;
        --hrc-control-height: 44px;
        --hrc-control-height-lg: 48px;
        --hrc-sidebar-width: 252px;
        --hrc-sidebar-collapsed: 72px;
        --hrc-topbar-height: 68px;
        --hrc-breakpoint-mobile: 640px;
        --hrc-breakpoint-tablet: 768px;
        --hrc-breakpoint-laptop: 1024px;
        --hrc-breakpoint-desktop: 1440px;
        --hrc-breakpoint-wide: 1920px;
        --hrc-breakpoint-4k: 3840px;
        --hrc-direction: ltr;

        /* Premium composition is intentionally calm: neutral surfaces carry
           the layout, tint establishes identity and accent stays sparse. */
        --hrc-composition-neutral: 85%;
        --hrc-composition-tint: 10%;
        --hrc-composition-accent: 5%;

        /* Borders, radius, elevation and motion. */
        --hrc-border-width: 1px;
        --hrc-radius-xs: .375rem;
        --hrc-radius-sm: .625rem;
        --hrc-radius-md: .875rem;
        --hrc-radius-lg: 1.125rem;
        --hrc-radius-xl: 1.5rem;
        --hrc-radius-pill: 999px;
        --hrc-shadow-xs: 0 2px 8px rgba(15, 23, 42, .04);
        --hrc-shadow-sm: 0 6px 18px rgba(15, 23, 42, .055);
        --hrc-shadow-md: 0 16px 38px rgba(15, 23, 42, .075);
        --hrc-shadow-lg: 0 24px 64px rgba(15, 23, 42, .12);
        --hrc-opacity-disabled: .52;
        --hrc-opacity-muted: .72;
        --hrc-focus-width: 3px;
        --hrc-focus-offset: 2px;
        --hrc-motion-fast: 140ms;
        --hrc-motion-normal: 180ms;
        --hrc-motion-slow: 260ms;
        --hrc-motion-duration: var(--hrc-motion-normal);
        --hrc-ease-standard: cubic-bezier(.2, 0, 0, 1);
        --hrc-ease-emphasized: cubic-bezier(.2, .8, .2, 1);
        --hrc-ease-decelerate: cubic-bezier(0, 0, .2, 1);
        --hrc-motion-page: 320ms;
        --hrc-motion-overlay: 220ms;

        /* Enterprise v3 opacity, blur, density and media primitives. */
        --hrc-opacity-hidden: 0;
        --hrc-opacity-subtle: .08;
        --hrc-opacity-hover: .12;
        --hrc-opacity-pressed: .18;
        --hrc-opacity-overlay: .62;
        --hrc-blur-sm: 6px;
        --hrc-blur-md: 14px;
        --hrc-blur-lg: 24px;
        --hrc-density-compact: 44px;
        --hrc-density-standard: 44px;
        --hrc-density-comfortable: 48px;
        --hrc-touch-target: 44px;
        --hrc-icon-xs: 14px;
        --hrc-icon-sm: 16px;
        --hrc-icon-md: 20px;
        --hrc-icon-lg: 24px;
        --hrc-icon-xl: 32px;
        --hrc-illustration-sm: 120px;
        --hrc-illustration-md: 240px;
        --hrc-illustration-lg: 420px;
        --hrc-chart-stroke: 2px;
        --hrc-chart-point: 8px;
        --hrc-chart-pattern-size: 10px;
        --hrc-foldable-pane-min: 280px;
        --hrc-editor-min-height: 240px;
        --hrc-command-width: 640px;
        --hrc-calendar-cell: 44px;

        /* One shared stacking scale. */
        --hrc-z-base: 0;
        --hrc-z-sticky: 200;
        --hrc-z-dropdown: 1030;
        --hrc-z-tooltip: 1040;
        --hrc-z-drawer: 1045;
        --hrc-z-modal: 1120;
        --hrc-z-toast: 1140;
        --hrc-z-command: 1160;

        /* Compatibility aliases consumed by the existing ERP facade. */
        --hrc-content-max: var(--hrc-container-xl);
        --hrc-header-height: var(--hrc-topbar-height);
        --hrc-page-gap: var(--hrc-grid-gap);
        --hrc-radius-card: var(--hrc-radius-md);
        --hrc-radius-control: var(--hrc-radius-sm);
    }
}
