/* ============================================================
   WORKFORCE DIRECT — DESIGN SYSTEM
   Direction: Industrial-Clean / Light
   Fonts: Barlow Condensed (display) + DM Sans (body)
   Palette: Deep Navy + Safety Orange + Clean White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Brand Colors */
    --navy:        #0f1f3d;
    --navy-mid:    #1a3460;
    --navy-light:  #2a4a80;
    --orange:      #EAB308;
    --orange-dark: #ca9a04;
    --orange-light:#fefce8;

    /* Neutrals */
    --white:       #ffffff;
    --off-white:   #f8f9fb;
    --gray-50:     #f1f3f7;
    --gray-100:    #e4e8f0;
    --gray-200:    #c8d0df;
    --gray-400:    #8b97b0;
    --gray-600:    #4a5568;
    --gray-800:    #1e2535;

    /* Semantic */
    --bg-page:     var(--off-white);
    --bg-card:     var(--white);
    --bg-dark:     var(--navy);
    --text-primary:   var(--gray-800);
    --text-secondary: var(--gray-600);
    --text-tertiary:  var(--gray-400);
    --text-inverse:   var(--white);
    --border:      var(--gray-100);
    --border-focus: var(--orange);

    /* Status */
    --success:     #16a34a;
    --success-bg:  #f0fdf4;
    --warning:     #d97706;
    --warning-bg:  #fffbeb;
    --error:       #dc2626;
    --error-bg:    #fef2f2;
    --info:        #2563eb;
    --info-bg:     #eff6ff;

    /* Typography */
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;
    --text-6xl:  3.75rem;

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Keep old names as aliases so existing HTML inline styles still work */
    --space-xs: var(--space-2);
    --space-sm: var(--space-4);
    --space-md: var(--space-6);
    --space-lg: var(--space-8);
    --space-xl: var(--space-12);
    --space-2xl: var(--space-16);

    /* Also keep old font-size names */
    --font-size-xs:   var(--text-xs);
    --font-size-sm:   var(--text-sm);
    --font-size-base: var(--text-base);
    --font-size-lg:   var(--text-lg);
    --font-size-xl:   var(--text-xl);
    --font-size-2xl:  var(--text-2xl);
    --font-size-3xl:  var(--text-3xl);
    --font-size-4xl:  var(--text-4xl);
    --font-size-5xl:  var(--text-5xl);

    /* Old color aliases */
    --primary-color:  var(--orange);
    --primary-dark:   var(--orange-dark);
    --primary-light:  var(--orange);
    --secondary-color: var(--navy-mid);
    --bg-primary:     var(--bg-page);
    --bg-secondary:   var(--gray-50);
    --bg-tertiary:    var(--gray-100);
    --surface:        var(--white);
    --surface-hover:  var(--gray-50);

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(15,31,61,0.08), 0 1px 2px rgba(15,31,61,0.04);
    --shadow-md:  0 4px 12px rgba(15,31,61,0.10), 0 2px 4px rgba(15,31,61,0.06);
    --shadow-lg:  0 10px 30px rgba(15,31,61,0.12), 0 4px 8px rgba(15,31,61,0.08);
    --shadow-glow: 0 0 0 3px rgba(234,179,8,0.25);

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 350ms ease;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--orange) 0%, #ca9a04 100%);
    --gradient-surface: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    --gradient-hero: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, #1e3a6e 100%);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy);
    letter-spacing: 0.01em;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
}
h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); color: var(--text-secondary); line-height: 1.65; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange); transition: color var(--transition-fast); }
a:hover { color: var(--orange-dark); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}
.container-sm { max-width: 720px; }
.container-md { max-width: 960px; }

.section { padding: var(--space-16) 0; }

.section-hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}
.section-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(234,179,8,0.15) 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.flex { display: flex; gap: var(--space-4); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { flex-direction: column; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: var(--navy);
    padding: 0 var(--space-6);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(15,31,61,0.25);
}
.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-brand {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--white) !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    -webkit-text-fill-color: unset;
    background: none;
}
.navbar-brand span.brand-accent { color: var(--orange); }

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    list-style: none;
}
.navbar-link {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.7) !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    -webkit-text-fill-color: unset;
}
.navbar-link:hover {
    color: var(--white) !important;
    background: rgba(255,255,255,0.08);
}
.navbar-link.active {
    color: var(--orange) !important;
    background: rgba(234,179,8,0.15);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    padding: var(--space-2);
    line-height: 1;
}

@media (max-width: 768px) {
    .navbar-toggle { display: flex; align-items: center; }
    .navbar-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0; right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-4) var(--space-5);
        gap: var(--space-2);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .navbar-menu.active { display: flex; }
    .navbar-menu li { width: 100%; }
    .navbar-link {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-base);
        display: block;
        width: 100%;
        border-radius: var(--radius-md);
    }
    /* Ghost buttons in mobile menu — full width, properly spaced */
    .navbar-menu .btn-navbar-ghost {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
        margin-top: var(--space-1);
    }
    .navbar-menu .btn-primary {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
        margin-top: var(--space-1);
    }
    /* User name pill in mobile nav */
    .navbar-menu li > span[style*="cursor:default"] {
        display: inline-flex !important;
        width: auto !important;
        align-self: flex-start;
    }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--orange);
    color: var(--navy) !important;
    border-color: var(--orange);
    box-shadow: 0 2px 8px rgba(234,179,8,0.35);
}
.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    box-shadow: 0 4px 16px rgba(234,179,8,0.45);
    transform: translateY(-1px);
    color: var(--navy) !important;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--white);
    color: var(--navy) !important;
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--navy) !important;
}

.btn-outline {
    background: transparent;
    color: var(--white) !important;
    border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white) !important;
}
/* Outline on light bg */
.btn-outline-navy {
    background: transparent;
    color: var(--navy) !important;
    border-color: var(--navy);
}
.btn-outline-navy:hover {
    background: var(--navy);
    color: var(--white) !important;
}

.btn-success {
    background: var(--success);
    color: var(--white) !important;
    border-color: var(--success);
}
.btn-danger {
    background: var(--error);
    color: var(--white) !important;
    border-color: var(--error);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: var(--text-xs);
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 2px solid var(--gray-50);
}
.card-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-1);
}
.card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.card-body { }
.card-footer {
    padding-top: var(--space-4);
    margin-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* Glass variant (dark sections) */
.card-glass {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
}
.card-glass .card-title { color: var(--white); }
.card-glass p { color: rgba(255,255,255,0.7); }
.card-glass h3, .card-glass h4 { color: var(--white); }

/* Accent top bar card — subtle, less generic than left border */
.card-accent {
    border-top: 3px solid var(--orange);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: var(--space-5); }

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navy);
    margin-bottom: var(--space-2);
    letter-spacing: 0.02em;
}
.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: var(--font-body);
    line-height: 1.5;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: var(--shadow-glow);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-textarea { resize: vertical; min-height: 110px; }

/* Custom select arrow */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b97b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
}

/* File upload */
.form-file { display: none; }
.form-file-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.6rem 1rem;
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}
.form-file-label:hover {
    border-color: var(--orange);
    background: var(--orange-light);
    color: var(--orange-dark);
}

.form-error {
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.form-help {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.table thead {
    background: var(--navy);
}
.table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: none;
}
.table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-50);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:nth-child(even) { background: var(--gray-50); }
.table tbody tr:hover { background: rgba(234,179,8,0.08); }
.table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   FILTERS
   ============================================================ */
.filters {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: var(--space-5);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}
.filter-group {
    flex: 1;
    min-width: 180px;
}
.filter-group .form-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-2);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    font-size: var(--text-sm);
    line-height: 1.5;
}
.alert-success { background: var(--success-bg); border-color: rgba(22,163,74,0.25); color: #15803d; }
.alert-error   { background: var(--error-bg);   border-color: rgba(220,38,38,0.25); color: #b91c1c; }
.alert-warning { background: var(--warning-bg); border-color: rgba(217,119,6,0.25); color: #92400e; }
.alert-info    { background: var(--info-bg);    border-color: rgba(37,99,235,0.25); color: #1d4ed8; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-display);
}
.badge-primary { background: rgba(234,179,8,0.15); color: var(--orange-dark); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg); color: var(--info); }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-6);
}
.modal.active { display: flex; }
.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--gray-100);
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--gray-200); color: var(--navy); }

/* ============================================================
   DATE PICKER
   ============================================================ */
.date-picker-header {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.date-picker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}
.date-picker-day:hover { background: var(--orange-light); color: var(--orange-dark); }
.date-picker-day.selected { background: var(--orange); color: var(--navy); font-weight: 700; }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mt-sm { margin-top: var(--space-4); }
.mt-md { margin-top: var(--space-6); }
.mt-lg { margin-top: var(--space-8); }
.mt-xl { margin-top: var(--space-12); }
.mb-sm { margin-bottom: var(--space-4); }
.mb-md { margin-bottom: var(--space-6); }
.mb-lg { margin-bottom: var(--space-8); }
.mb-xl { margin-bottom: var(--space-12); }

.hidden { display: none !important; }

.fade-in { animation: fadeIn var(--transition-slow) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Section divider accent */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: var(--space-4);
}
.section-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--orange);
    border-radius: 1px;
}

/* Stat number style */
.stat-number {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    display: block;
}

/* Hero text on dark */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1.0;
    letter-spacing: 0.01em;
}
.hero-title span { color: var(--orange); }
.hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.72);
    max-width: 560px;
    line-height: 1.6;
    font-weight: 400;
}

/* Step indicator for CV form */
.step-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--space-8);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-6);
    box-shadow: var(--shadow-sm);
}
.step-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}
.step-item + .step-item::before {
    content: '';
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gray-100);
    flex: 1;
    margin: 0 var(--space-3);
}
.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--text-tertiary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}
.step-item.active .step-number {
    background: var(--orange);
    color: var(--white);
}
.step-item.done .step-number {
    background: var(--success);
    color: var(--white);
}
.step-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.step-item.active .step-label { color: var(--navy); }

/* Plan cards (upgrade UI) */
.plan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--white);
}
.plan-card:hover { border-color: var(--orange); box-shadow: var(--shadow-md); }
.plan-card.selected { border-color: var(--orange); background: var(--orange-light); box-shadow: 0 0 0 3px rgba(234,179,8,0.20); }
.plan-card.selected-pro { border-color: var(--success); background: var(--success-bg); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }

/* Upgrade banner */
.upgrade-banner {
    background: var(--navy);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.upgrade-banner h3 { color: var(--white); margin-bottom: var(--space-1); }
.upgrade-banner p { color: rgba(255,255,255,0.65); margin: 0; }

/* Feature list in cards */
.feature-list {
    list-style: none;
    margin: var(--space-4) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.feature-list li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   PRINT/PDF — preserved exactly
   ============================================================ */
#cv-print-template-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2999;
    background: white;
    overflow-y: auto;
    padding: 0;
    display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }
    .section { padding: var(--space-10) 0; }
    .container { padding: 0 var(--space-4); }
    .filters { flex-direction: column; }
    .filter-group { min-width: 100%; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .modal-content { padding: var(--space-6); }
    .upgrade-banner { flex-direction: column; text-align: center; }
    .step-bar { display: none; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    * { color: black !important; background: white !important; }
    #cv-print-template-container { display: block !important; position: relative; z-index: auto; height: auto; overflow: visible; }
}

/* btn-outline on light backgrounds — fixes ghost/floating text bug */
.btn-outline {
    background: transparent;
    color: var(--navy) !important;
    border-color: var(--gray-200);
}
.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--navy);
    color: var(--navy) !important;
}
/* Only use btn-outline-inverse on dark/navy backgrounds */
.btn-outline-inverse {
    background: transparent;
    color: var(--white) !important;
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-inverse:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white) !important;
}

/* ============================================================
   LUCIDE ICONS — sizing helpers
   ============================================================ */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.icon-sm  [data-lucide], [data-lucide].icon-sm  { width: 16px; height: 16px; }
.icon-md  [data-lucide], [data-lucide].icon-md  { width: 20px; height: 20px; }
.icon-lg  [data-lucide], [data-lucide].icon-lg  { width: 24px; height: 24px; }
.icon-xl  [data-lucide], [data-lucide].icon-xl  { width: 32px; height: 32px; }
.icon-2xl [data-lucide], [data-lucide].icon-2xl { width: 48px; height: 48px; }

/* Icon inside a coloured circle */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.icon-circle-orange { background: var(--orange-light); color: var(--orange-dark); }
.icon-circle-navy   { background: var(--gray-50);      color: var(--navy); }
.icon-circle-white  { background: rgba(255,255,255,0.12); color: var(--white); }

/* Navbar hamburger Lucide override */
.navbar-toggle [data-lucide] { width: 24px; height: 24px; color: var(--white); }

/* ============================================================
   TARGETED FIXES — spacing, colour & alignment corrections
   ============================================================ */

/* Card-glass dark background: force white text for headings and body */
.card-glass h1, .card-glass h2, .card-glass h3,
.card-glass h4, .card-glass h5, .card-glass h6 {
    color: var(--white);
}
.card-glass p { color: rgba(255,255,255,0.65); }
.card-glass .card-title { color: var(--white); }
.card-glass .card-subtitle { color: rgba(255,255,255,0.5); }

/* Navbar: ensure all direct text nodes and spans are white */
.navbar-menu .navbar-link { color: rgba(255,255,255,0.7) !important; }
.navbar-menu .navbar-link:hover { color: var(--white) !important; }
.navbar-menu .navbar-link.active { color: var(--orange) !important; }

/* Badge inside navbar stays readable */
.navbar-menu .badge { vertical-align: middle; margin-left: 4px; }

/* Form select — don't stretch full viewport width unnecessarily */
.form-select { max-width: 100%; }

/* Form group inside grid — inputs stay proportionate */
.grid .form-group { margin-bottom: var(--space-4); }

/* Certificate entry row alignment */
.certificate-entry .form-file-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.75rem;
    font-size: var(--text-sm);
}

/* Button icon alignment — consistent across all btn sizes */
.btn i, .btn [data-lucide] {
    flex-shrink: 0;
    pointer-events: none;
}

/* Grid action buttons — text left-aligned looks cleaner */
.btn.btn-primary, .btn.btn-secondary {
    text-align: left;
}

/* Alert text colour fix — alerts on light bg */
.alert p { color: inherit; margin: 0; }
.alert strong { color: inherit; }

/* Table — tighter on mobile */
@media (max-width: 768px) {
    .table th, .table td {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
        white-space: normal;
        word-break: break-word;
    }
    /* Badge inside table cells: allow wrapping, smaller */
    .table .badge {
        font-size: 9px;
        padding: 2px 5px;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    /* Hide less important columns on mobile for business table */
    .table .col-hide-mobile { display: none; }
    .table-container {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-lg);
    }
}

/* Work experience entry section divider */
.work-experience-entry {
    margin-bottom: var(--space-6) !important;
    padding-bottom: var(--space-6) !important;
    border-bottom: 1px solid var(--gray-100) !important;
}
.work-experience-entry:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.work-experience-entry h4 {
    font-size: var(--text-base) !important;
    color: var(--orange) !important;
    margin-bottom: var(--space-4) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Page title on CV/dashboard - constrain heading size */
.section h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-2);
}
.section .mb-xl > p {
    margin-bottom: 0;
    font-size: var(--text-base);
}

/* Section header area spacing */
.mb-xl { margin-bottom: var(--space-8) !important; }

/* Card body default padding cleanup */
.card-body > *:last-child { margin-bottom: 0; }

/* Btn inside card-footer full width fix */
.card-footer .btn { width: 100%; justify-content: center; }

/* Select width constraint for yes/no type dropdowns */
select.form-select[id="hasGrade12"],
select.form-select[id="sex"],
select.form-select[id="userType"] {
    max-width: 260px;
}

/* Upgrade banner on database page */
.upgrade-banner h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

/* Free lock row in database table */
.table td a {
    font-size: var(--text-xs);
    font-weight: 600;
}

/* Navbar ghost buttons — Login / Logout / Register outline style on dark navbar */
.btn-navbar-ghost {
    color: rgba(255,255,255,0.85) !important;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.9rem;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-navbar-ghost:hover {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.7) !important;
    color: var(--white) !important;
}

/* Card lift — only on homepage feature cards */
.card-lift:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(234,179,8,0.30);
}

/* Save CV button — prevent clipping on mobile */
#submitBtn, #saveDraftBtn {
    white-space: nowrap;
    min-width: 120px;
}
@media (max-width: 480px) {
    #submitBtn, #saveDraftBtn, #downloadPdfBtn {
        flex: 1;
        min-width: 0;
        font-size: var(--text-sm);
        padding: 0.65rem 1rem;
    }
    /* Button row wraps nicely on small screens */
    .flex[style*="justify-content: flex-end"] {
        flex-wrap: wrap;
    }
    /* Login/Register card — reduce padding on mobile */
    .card[style*="max-width:480px"],
    .card[style*="max-width: 480px"] {
        padding: var(--space-5) !important;
    }
    /* Section vertical padding */
    section[style*="padding:var(--space-8) 0"] {
        padding: var(--space-4) 0 !important;
    }
    /* Test accounts — stack instead of row */
    .card [style*="justify-content:space-between"][style*="font-size:var(--text-xs)"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
