/* =========================================================
   SLI-Dubai HRMS — Design Tokens (UI modernization)
   Visual foundation only. No functional behavior.
   ========================================================= */

:root {
    /* Brand — modern HRM deep teal (replaces legacy burgundy) */
    --brand-primary: #0F766E;
    --brand-primary-hover: #115E59;
    --brand-primary-active: #134E4A;
    --brand-primary-rgb: 15, 118, 110;
    --brand-primary-soft: rgba(var(--brand-primary-rgb), 0.10);
    --brand-primary-muted: rgba(var(--brand-primary-rgb), 0.16);
    --brand-dark: #211E1E;

    /* Surfaces */
    --surface-page: #F7F6F4;
    --surface: #FFFFFF;
    --surface-subtle: #F1EFED;
    --surface-sidebar: #211E1E;
    --surface-sidebar-elevated: #2A2727;

    /* Borders */
    --border: #E5E1DE;
    --border-strong: #D7D1CC;
    --border-focus: rgba(var(--brand-primary-rgb), 0.45);

    /* Text */
    --text-primary: #211E1E;
    --text-secondary: #625C59;
    --text-muted: #8A8380;
    --text-on-primary: #FFFFFF;
    --text-on-dark: #F5F3F1;
    --text-on-dark-muted: #C8C2BE;

    /* Status */
    --success: #2E7D52;
    --success-soft: rgba(46, 125, 82, 0.12);
    --warning: #B7791F;
    --warning-soft: rgba(183, 121, 31, 0.14);
    --error: #C0392B;
    --error-soft: rgba(192, 57, 43, 0.12);
    --info: #3B6EA5;
    --info-soft: rgba(59, 110, 165, 0.12);

    /* Typography */
    --font-sans: "Segoe UI", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-md: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.75rem;   /* 28px */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --letter-spacing-tight: -0.01em;

    /* Spacing scale */
    --space-1: 0.25rem;  /* 4 */
    --space-2: 0.5rem;   /* 8 */
    --space-3: 0.75rem;  /* 12 */
    --space-4: 1rem;     /* 16 */
    --space-5: 1.5rem;   /* 24 */
    --space-6: 2rem;     /* 32 */
    --space-7: 2.5rem;   /* 40 */
    --space-8: 3rem;     /* 48 */

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Density (Checkpoint 1) — additive only; not yet wired to global component rules.
       Future Leave-scoped / shared control styling should consume these rather than magic pixels.
       Existing brand/surface/border/text/space/radius values above are intentionally unchanged
       to avoid unexpected visual shifts across common.css, site.css, Syncfusion overrides,
       MainLayout, TopBar, NavMenu, login.css consumers. */
    --control-height: 36px;
    --control-height-lg: 40px;
    --section-gap: 1.5rem;   /* aligns with --space-5; named for section rhythm */
    --field-gap: 1rem;       /* vertical stack between form field rows (16px) */
    --label-gap: 0.5rem;     /* space between label and its control (8px) */

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(33, 30, 30, 0.04);
    --shadow-sm: 0 1px 3px rgba(33, 30, 30, 0.06), 0 1px 2px rgba(33, 30, 30, 0.04);
    --shadow-md: 0 4px 12px rgba(33, 30, 30, 0.08);
    --shadow-lg: 0 8px 24px rgba(33, 30, 30, 0.10);

    /* Layout */
    --sidebar-width: 268px;
    --sidebar-collapsed-width: 68px;
    --topbar-height: 3.75rem;
    --content-max-width: 1600px;
    --icon-sm: 1rem;
    --icon-md: 1.125rem;
    --icon-lg: 1.5rem;

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-base: 180ms ease;

    /* Breakpoints (documentation only — use in media queries) */
    /* --bp-mobile: 640.98px; --bp-tablet: 768px; --bp-desktop: 1280px; */
}

/* Base application surface */
html {
    font-size: 16px;
}

html, body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--surface-page);
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-3);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5, h6 { font-size: var(--font-size-md); }

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-primary-hover);
}

/* Focus ring — consistent, accessible */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.15rem var(--surface), 0 0 0 0.3rem var(--border-focus);
}

/* Icon sizing helpers */
.icon-sm { font-size: var(--icon-sm); }
.icon-md { font-size: var(--icon-md); }
.icon-lg { font-size: var(--icon-lg); }
