/* ============================================================================
   Magic Tilt Team Portal — shared ENTERPRISE theme (single source of truth)
   ----------------------------------------------------------------------------
   Research-backed ERP palette (IBM Carbon / Fluent 2 / SAP Fiori, WCAG AA).
   Cures "too gray" structurally: bright near-white canvas + layered white
   surfaces + subtle elevation, one hero action color (brand blue), a sparing
   warm accent, a 3-tier border ramp, and solid high-contrast status colors.

   HOW IT APPLIES: this file is linked LAST (right before </head>) on every
   team-portal page, so its :root overrides each page's inline token values
   (same specificity, later source wins). Pages already drive their colors
   through these custom properties, so re-defining the VALUES here re-skins the
   whole portal from one place.

   SCOPE: only color, radius, and shadow tokens are overridden here. Spacing,
   font, and transition tokens are intentionally left to each page so layout
   and type rhythm don't shift. Change a color once here → it changes portal-wide.
   All foreground/background pairs validated to WCAG 2.1 AA.
   ============================================================================ */

:root {
    /* ---- Brand: navy chrome ramp ---------------------------------------- */
    --navy:        #0e1d30;   /* headers, section bars, primary headings */
    --navy-mid:    #16273c;
    --navy-light:  #1f3149;
    --navy-2:      #16273c;

    /* ---- Brand: action blue (the ONE hero color) ------------------------ */
    --primary:        #0a6ebd;   /* buttons, links, icons, active (white text 5.3:1) */
    --primary-dark:   #085a98;   /* hover (white text 7.2:1) */
    --primary-hover:  #085a98;
    --primary-blue:   #0a6ebd;
    --primary-light:  #e8f1fa;   /* light blue wash for selected/hover fills */
    --primary-subtle: #e8f1fa;
    --primary-tint:   #e8f1fa;

    /* ---- Warm secondary accent (used sparingly) ------------------------- */
    --accent:        #0a6ebd;   /* kept blue: legacy "accent" usage on data pages was a blue */
    --accent-bright: #fbbf24;   /* amber chip fill (navy text 10:1) */

    /* ---- Surfaces: bright near-white, layered for depth ----------------- */
    --bg:          #f7f9fc;   /* app canvas — bright, faint cool tint (not flat gray) */
    --white:       #ffffff;
    --panel:       #ffffff;   /* cards / panels */
    --surface:     #ffffff;
    --surface-2:   #f3f6fb;   /* subtle alternate surface */
    --surface-alt: #f3f6fb;
    --light-gray:  #eef2f7;

    /* ---- Text ----------------------------------------------------------- */
    --ink:         #0e1d30;   /* strongest headings (17:1 on white) */
    --text:        #1f2a3a;   /* body (14.5:1) */
    --text-muted:  #5a6573;   /* secondary (5.9:1) */
    --muted:       #5a6573;
    --text-subtle: #8a93a1;   /* tertiary / placeholders (use on white only at large sizes) */
    --gray:        #8a93a1;
    --gray-dark:   #4a5568;

    /* ---- Borders: 3-tier ramp ------------------------------------------- */
    --border-subtle: #e6eaf1; /* hairline dividers */
    --border:        #d7dde5; /* default panel/card border (pairs with elevation) */
    --border-strong: #828d9c; /* functional control edges (3.4:1) */
    --row-divider:   #eef1f6; /* table row separators */

    /* ---- Semantic status (IBM Carbon current set) ----------------------- */
    --success: #24a148;
    --warning: #f1c21b;
    --danger:  #da1e28;
    --info:    #0043ce;
    --pdf:     #c8102e;       /* document-type tag (white text 5.9:1) */

    /* ---- Corners (squared-ish, professional) ---------------------------- */
    --radius:    8px;
    --radius-sm: 6px;
    --radius-lg: 10px;

    /* ---- Elevation: subtle, navy-tinted (depth, not neumorphism) -------- */
    --shadow-sm: 0 1px 2px rgba(14,29,48,.07);
    --shadow:    0 1px 2px rgba(14,29,48,.06), 0 4px 12px rgba(14,29,48,.08);
    --shadow-md: 0 1px 2px rgba(14,29,48,.06), 0 6px 16px rgba(14,29,48,.10);
    --shadow-lg: 0 8px 28px rgba(14,29,48,.16);
}

/* ---- Role badges: solid high-contrast chips (replace pastel pills) -------
   Loaded after each page's inline .role-badge rules, so these win. Page
   markup sets class="role-badge <role>". */
.role-badge {
    background: var(--navy) !important;
    color: #fff !important;
    border-radius: var(--radius-sm) !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
}
.role-badge.admin         { background: #a31221 !important; color: #fff !important; }
.role-badge.management    { background: #9a5800 !important; color: #fff !important; }
.role-badge.engineering   { background: #4c2a86 !important; color: #fff !important; }
.role-badge.sales         { background: var(--primary) !important; color: #fff !important; }
.role-badge.warranty      { background: #0f766e !important; color: #fff !important; }
.role-badge.parts_manager { background: #1f3149 !important; color: #fff !important; }
.role-badge.parts_team    { background: #334155 !important; color: #fff !important; }
.role-badge.scheduling    { background: #155e75 !important; color: #fff !important; }
.role-badge.dealer        { background: #4a5568 !important; color: #fff !important; }
