/* FMS Design System — Core */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --fms-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --fms-bg: #f5f6f8;
    --fms-bg-card: #ffffff;
    --fms-bg-sidebar: #f1f3f5;
    --fms-bg-topbar: #ffffff;
    --fms-text: #1a1a1a;
    --fms-text-secondary: #6b7280;
    --fms-text-inverse: #ffffff;
    --fms-border: #e5e7eb;
    --fms-border-light: #f3f4f6;
    --fms-primary: #000000;
    --fms-primary-hover: #1a1a1a;
    --fms-accent: #2563eb;
    --fms-accent-hover: #1d4ed8;
    --fms-success: #059669;
    --fms-danger: #dc2626;
    --fms-warning: #d97706;
    --fms-info: #0284c7;
    --fms-th-bg: #000000;
    --fms-th-color: #ffffff;
    --fms-th-border: #333333;
    --fms-tr-hover: #f8fafc;
    --fms-tr-stripe: #f2f2f2;
    --fms-tr-total: #e0f2fe;
    --fms-tr-section: #fef9c3;
    --fms-tr-highlight: #064e3b;
    --fms-tr-highlight-text: #ffffff;
    --fms-tr-orphan: #f9fafb;
    --fms-tr-mismatch: #fef2f2;
    --fms-space-xs: 4px;
    --fms-space-sm: 8px;
    --fms-space-md: 16px;
    --fms-space-lg: 24px;
    --fms-space-xl: 32px;
    --fms-text-xs: 0.7rem;
    --fms-text-sm: 0.775rem;
    --fms-text-md: 0.85rem;
    --fms-text-lg: 0.95rem;
    --fms-text-xl: 1.1rem;
    --fms-text-2xl: 1.35rem;
    --fms-sidebar-width: 250px;
    --fms-sidebar-collapsed: 60px;
    --fms-topbar-height: 56px;
    --fms-radius: 6px;
    --fms-radius-lg: 10px;
    --fms-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --fms-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --fms-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --fms-transition: 0.2s ease;
}

[data-theme="dark"] {
    --fms-bg: #111111;
    --fms-bg-card: #1a1a1a;
    --fms-bg-sidebar: #1e2533;
    --fms-bg-topbar: #1a1a1a;
    --fms-text: #e5e7eb;
    --fms-text-secondary: #9ca3af;
    --fms-border: #2a2a2a;
    --fms-border-light: #222222;
    --fms-th-bg: #000000;
    --fms-th-border: #333333;
    --fms-tr-hover: #1f1f1f;
    --fms-tr-stripe: #161616;
    --fms-tr-total: #0c2d48;
    --fms-tr-section: #3d3200;
    --fms-tr-orphan: #1a1a1a;
    --fms-tr-mismatch: #2d1111;
    --fms-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --fms-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --fms-shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--fms-font);
    font-size: var(--fms-text-md);
    color: var(--fms-text);
    background: var(--fms-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #444; }

::selection { background: var(--fms-accent); color: white; }
a { color: var(--fms-accent); text-decoration: none; transition: color var(--fms-transition); }
a:hover { color: var(--fms-accent-hover); }
