/**
 * Harlos ERP — Design Tokens v3 (Orange Brand)
 * Reference: inventory dashboard UI — #E85002 primary, soft gray canvas
 *
 * Icon policy (shell chrome):
 * - Prefer Feather (`fe-*` / `data-feather`) for app bar, sidebar hubs, profile, help, empty states.
 * - Remix (`ri-*`) allowed only for theme toggle legacy icon until migrated.
 * - Avoid new Material Design Icons (`mdi-*`) / Font Awesome in shell chrome;
 *   page toolbars may keep existing mdi until a dedicated content-icon sweep.
 * - Charts: use --color-chart-* + --color-primary via ErpDashboardCharts.
 */
:root {
    /* Brand orange */
    --color-primary: #E85002;
    --color-primary-hover: #C94502;
    --color-primary-light: #FF6E47;
    --color-primary-subtle: #FFF0E8;
    --color-primary-muted: rgba(232, 80, 2, 0.12);

    /* Neutrals */
    --color-secondary: #131313;
    --color-accent: #FF6E47;
    --color-accent-subtle: #FFF5F0;

    /* Surfaces */
    --color-bg: #F4F7FE;
    --color-surface: #FFFFFF;
    --color-surface-muted: #F0F1F4;
    --color-surface-elevated: #FFFFFF;

    /* Text */
    --color-text-primary: #131313;
    --color-text-secondary: #4A4A4A;
    --color-text-muted: #868686;
    --color-border: #E8EAED;
    --color-border-strong: #D1D5DB;

    /* Semantic */
    --color-success: #16A34A;
    --color-success-subtle: #DCFCE7;
    --color-warning: #E85002;
    --color-warning-subtle: #FFF0E8;
    --color-danger: #DC2626;
    --color-danger-subtle: #FEE2E2;
    --color-info: #2563EB;
    --color-info-subtle: #DBEAFE;

    /* Chart accents */
    --color-chart-purple: #7C3AED;
    --color-chart-blue: #2563EB;
    --color-chart-green: #16A34A;
    --color-chart-amber: #F59E0B;
    --color-chart-red: #EF4444;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #E85002 0%, #FF6E47 100%);
    --gradient-brand-hover: linear-gradient(135deg, #C94502 0%, #E85002 100%);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --text-page-title: 1.625rem;
    --text-section-title: 1.125rem;
    --text-body: 0.875rem;
    --text-small: 0.8125rem;
    --text-kpi: 1.875rem;

    /* Spacing */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Radius — pill / soft UI */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* Shadows */
    --elevation-1: 0 2px 8px rgba(19, 19, 19, 0.04);
    --elevation-2: 0 8px 24px rgba(19, 19, 19, 0.08);
    --shadow-card: 0 4px 20px rgba(19, 19, 19, 0.06);

    --transition-base: 200ms ease;

    --bs-primary: var(--color-primary);
    --bs-primary-rgb: 232, 80, 2;

    /* Global UI density — 80% default; users can still browser-zoom */
    --erp-ui-scale: 0.8;
}

[data-bs-theme="dark"] {
    --color-bg: #0F0F0F;
    --color-surface: #1A1A1A;
    --color-surface-muted: #242424;
    --color-surface-elevated: #2A2A2A;
    --color-text-primary: #F5F5F5;
    --color-text-secondary: #C4C4C4;
    --color-text-muted: #A3A3A3;
    --color-border: #333333;
    --color-border-strong: #444444;
    --color-primary: #FF6E47;
    --color-primary-hover: #E85002;
    --color-primary-subtle: #2A1810;
    --color-success-subtle: #14532D;
    --color-danger-subtle: #450A0A;
    --color-info-subtle: #1E3A5F;
    --color-warning-subtle: #2A1810;
    --elevation-1: 0 2px 8px rgba(0, 0, 0, 0.35);
    --elevation-2: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
