/* ==========================================================================
   iSpark FMS — 2026 SaaS Enterprise Design System Tokens & Base
   ========================================================================== */

:root {
    /* Neutral Palette (Slate/Zinc Base) */
    --fms-bg: #f8fafc;
    --fms-surface: #ffffff;
    --fms-surface-subtle: #f1f5f9;
    --fms-surface-muted: #e2e8f0;
    --fms-surface-card: #ffffff;
    
    /* Borders */
    --fms-border: #e2e8f0;
    --fms-border-subtle: #f1f5f9;
    --fms-border-strong: #cbd5e1;
    --fms-border-focus: #2563eb;

    /* Text & Typography */
    --fms-text-primary: #0f172a;
    --fms-text-secondary: #475569;
    --fms-text-muted: #64748b;
    --fms-text-subtle: #94a3b8;

    /* Brand Accent (Refined Indigo/Blue) */
    --fms-brand: #2563eb;
    --fms-brand-hover: #1d4ed8;
    --fms-brand-active: #1e40af;
    --fms-brand-subtle: #eff6ff;
    --fms-brand-border: #bfdbfe;

    /* Semantic - Success (Emerald) */
    --fms-success: #059669;
    --fms-success-subtle: #ecfdf5;
    --fms-success-border: #a7f3d0;
    --fms-success-text: #065f46;

    /* Semantic - Warning (Amber) */
    --fms-warning: #d97706;
    --fms-warning-subtle: #fffbeb;
    --fms-warning-border: #fde68a;
    --fms-warning-text: #92400e;

    /* Semantic - Danger (Rose/Ruby) */
    --fms-danger: #e11d48;
    --fms-danger-subtle: #fff1f2;
    --fms-danger-border: #fecdd3;
    --fms-danger-text: #9f1239;

    /* Semantic - Info (Sky) */
    --fms-info: #0284c7;
    --fms-info-subtle: #f0f9ff;
    --fms-info-border: #bae6fd;
    --fms-info-text: #075985;

    /* Sidebar Dark Tokens (Deep Navy / Charcoal) */
    --fms-sidebar-bg: #090e1a;
    --fms-sidebar-surface: #111a2e;
    --fms-sidebar-border: rgba(255, 255, 255, 0.08);
    --fms-sidebar-text: #94a3b8;
    --fms-sidebar-text-hover: #f8fafc;
    --fms-sidebar-active: #ffffff;
    --fms-sidebar-active-bg: rgba(37, 99, 235, 0.16);
    --fms-sidebar-active-border: #3b82f6;

    /* Shadows (Calm, minimal, precision) */
    --fms-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --fms-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --fms-shadow-md: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --fms-shadow-lg: 0 4px 6px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --fms-shadow-xl: 0 8px 12px -3px rgba(15, 23, 42, 0.08);

    /* Radii (Moderate, structured, no giant bubbly containers) */
    --fms-radius-xs: 3px;
    --fms-radius-sm: 5px;
    --fms-radius-md: 6px;
    --fms-radius-lg: 8px;
    --fms-radius-xl: 10px;
    --fms-radius-pill: 9999px;

    /* Typography */
    --fms-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fms-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

    /* Transitions */
    --fms-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --fms-transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --fms-transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Document Reset & Defaults */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--fms-font-sans);
    background-color: var(--fms-bg);
    color: var(--fms-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
