/* ******************************-={ 03/29/2026 - WB }=-******************************
   FILE: /assets/app.css
   PURPOSE:
   Shared site styling for layout, forms, tables, dashboard cards, modals,
   and helper utilities.
   ********************************************************************************** */

/* ******************************-={ 01. DESIGN TOKENS }=-****************************** */
:root {
    --font-sans: "Segoe UI", Tahoma, Arial, sans-serif;
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.12);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --header-height: 88px;
}

html[data-theme="dark"] {
    --bg: #11161d;
    --bg-elevated: #171d26;
    --bg-panel: #1d2430;
    --bg-input: #121821;
    --bg-subtle: #212a37;
    --text: #eaf1fb;
    --text-soft: #aab6c8;
    --text-faint: #7f8b9f;
    --border: #2f3a4d;
    --accent: #6ea8ff;
    --accent-strong: #4b8ff7;
    --accent-soft: rgba(110, 168, 255, 0.12);
    --success-bg: rgba(54, 179, 126, 0.12);
    --success-text: #88e0af;
    --error-bg: rgba(224, 80, 80, 0.12);
    --error-text: #ff9c9c;
    --chip-road: rgba(244, 164, 96, 0.18);
    --chip-road-text: #f6c087;
    --chip-eq: rgba(79, 174, 110, 0.18);
    --chip-eq-text: #8fe1aa;
    --header-grad-a: #273140;
    --header-grad-b: #1b2230;
    --table-stripe: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] {
    --bg: #f3f5f8;
    --bg-elevated: #ffffff;
    --bg-panel: #ffffff;
    --bg-input: #f8fafc;
    --bg-subtle: #f1f4f8;
    --text: #1f2937;
    --text-soft: #5e6b7d;
    --text-faint: #7b8796;
    --border: #d8dee8;
    --accent: #2f7cf6;
    --accent-strong: #2367d6;
    --accent-soft: rgba(47, 124, 246, 0.08);
    --success-bg: rgba(31, 161, 93, 0.10);
    --success-text: #147245;
    --error-bg: rgba(220, 53, 69, 0.10);
    --error-text: #9b1c27;
    --chip-road: #f7e6d7;
    --chip-road-text: #a45f1a;
    --chip-eq: #dcf4df;
    --chip-eq-text: #28764a;
    --header-grad-a: #ffffff;
    --header-grad-b: #f7f9fc;
    --table-stripe: rgba(31, 41, 55, 0.02);
}

/* ******************************-={ 02. BASE / RESET }=-****************************** */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, black 12%) 100%);
    color: var(--text);
}

/* ******************************-={ 03. TYPOGRAPHY / LINKS }=-****************************** */
a {
    color: var(--accent);
    text-decoration: none;
}

 a:hover {
    text-decoration: underline;
}

label {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

.muted {
    color: var(--text-faint);
    font-size: 13px;
}

.code-note {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.list-clean {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
    font-size: 12px;
}

i.ip {
    color: red;
}

i.done {
    color: green;
}

/* ******************************-={ 04. APP SHELL / HEADER / NAV }=-****************************** */
.app-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 5000;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 82%, transparent 18%);
    border-bottom: 1px solid var(--border);
}

.site-header__inner,
.top-nav,
.page-wrap {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 0 12px 0;
}

.brand-kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.brand-title {
    font-size: 34px;
    line-height: 1;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 14px;
}

.top-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 16px 0;
}

.top-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.top-nav a:hover {
    text-decoration: none;
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 30%);
}

.header-actions {
    display: flex;
    align-items: center;
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    border-radius: 999px;
    min-height: 42px;
    padding: 0 14px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.theme-toggle__sun,
.theme-toggle__moon {
    display: inline-flex;
    align-items: center;
}

.page-wrap {
    padding: 28px 0 48px 0;
}

/* ******************************-={ 05. PAGE HEADERS / CARDS / PANELS }=-****************************** */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    margin: 0 0 8px 0;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-subtitle {
    color: var(--text-soft);
    max-width: 900px;
}

.page-card,
.panel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.page-card {
    padding: 22px;
}

.panel-card {
    padding: 18px;
}

.empty-box {
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    color: var(--text-soft);
    background: color-mix(in srgb, var(--bg-subtle) 64%, transparent 36%);
}

/* ******************************-={ 06. ALERTS / SIMPLE FORM HELPERS }=-****************************** */

.alert {
    margin: 0 0 18px 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}

.alert--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert--error {
    background: var(--error-bg);
    color: var(--error-text);
}

.stack-form {
    display: block;
}

.form-field--full {
    grid-column: 1 / -1;
}

/* ******************************-={ 06-a. LAYOUT GRIDS }=-****************************** */
.grid-two {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.grid-two--spaced {
    margin-top: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 14px;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

/* ******************************-={ 07. DASHBOARD BLOCKS }=-****************************** */
.stat-card {
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-elevated), var(--bg-subtle));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.fuel-reconcile__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fuel-reconcile__status {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #486078);
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-color, #e7eef7);
    font-weight: 700;
}

.fuel-reconcile__status.is-tracking {
    border-color: #2f9e66;
    color: #54d98c;
}

.fuel-reconcile__status.is-review,
.fuel-reconcile__status.is-opening_balance,
.fuel-reconcile__warning,
.fuel-reconcile__negative {
    color: #ffb800;
}

.fuel-reconcile__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.fuel-reconcile__details summary {
    cursor: pointer;
    font-weight: 700;
}

.fuel-reconcile__note {
    margin: 14px 0 0;
    color: var(--muted-color, #8fa4ba);
    font-size: 0.9rem;
}

.fuel-audit__run {
    display: flex;
    align-items: end;
}

.fuel-audit-chart__head,
.fuel-audit-chart__legend,
.fuel-audit-tabs {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fuel-audit-chart__head {
    justify-content: space-between;
    flex-wrap: wrap;
}

.fuel-audit-chart__legend {
    color: var(--text-muted);
    font-size: .82rem;
    flex-wrap: wrap;
}

.fuel-audit-chart__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fuel-audit-chart__legend i {
    width: 22px;
    height: 3px;
    background: var(--legend-color);
}

.fuel-audit-chart {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 14px;
    overflow: hidden;
}

.fuel-audit-chart canvas {
    display: block;
    touch-action: pan-y;
}

.fuel-audit-chart__tooltip {
    position: absolute;
    z-index: 2;
    min-width: 165px;
    padding: 9px 11px;
    border: 1px solid rgba(39, 215, 255, .55);
    background: rgba(4, 15, 25, .94);
    color: var(--text-main);
    pointer-events: none;
    font-size: .78rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.fuel-audit-chart__tooltip strong,
.fuel-audit-chart__tooltip span {
    display: block;
}

.fuel-audit-chart__tooltip strong {
    color: #ffb800;
    margin-bottom: 4px;
}

.fuel-audit-tabs {
    flex-wrap: wrap;
}

.fuel-audit-tab {
    background: transparent;
    color: var(--text-muted);
}

.fuel-audit-tab.is-active {
    background: var(--accent);
    color: var(--button-text, #07111a);
}

.fuel-audit-row--warning {
    box-shadow: inset 4px 0 0 #ffb800;
}

@media (max-width: 720px) {
    .fuel-audit-chart {
        height: 250px;
    }

    .fuel-audit-chart__legend {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .fuel-reconcile__heading {
        display: block;
    }

    .fuel-reconcile__status {
        display: inline-block;
        margin-top: 12px;
    }
}

/* Employee handbook */
.handbook-page {
    max-width: 1240px;
    margin: 0 auto;
}

.handbook-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0 22px;
    border-bottom: 1px solid var(--border);
}

.handbook-hero h1 {
    margin: 5px 0 7px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: 0;
}

.handbook-hero p {
    margin: 0;
    color: var(--text-muted);
}

.handbook-source-note {
    margin: 18px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    font-size: 0.9rem;
}

.handbook-tools {
    display: grid;
    gap: 7px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.handbook-tools label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.handbook-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.handbook-search-row input {
    min-width: 0;
}

.handbook-search-status {
    min-height: 1.15em;
    font-size: 0.82rem;
    color: var(--accent);
}

.handbook-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.handbook-toc {
    position: sticky;
    top: 84px;
    padding: 15px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.handbook-toc > strong {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.78rem;
}

.handbook-toc nav {
    display: grid;
}

.handbook-toc a {
    padding: 8px 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent 35%);
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.25;
}

.handbook-toc a:last-child {
    border-bottom: 0;
}

.handbook-toc a:hover {
    color: var(--accent);
    text-decoration: none;
}

.handbook-content {
    min-width: 0;
}

.handbook-section {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 0 0 28px;
    margin: 0 0 28px;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 90px;
}

.handbook-section[hidden] {
    display: none;
}

.handbook-section__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
}

.handbook-section h2,
.handbook-scans h2 {
    margin: 2px 0 18px;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.handbook-section h3 {
    margin: 22px 0 7px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    font-size: 0.93rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.handbook-section p {
    margin: 0 0 13px;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.72;
}

.handbook-rate-table {
    max-width: 520px;
    margin: 10px 0 18px;
    border: 1px solid var(--border);
}

.handbook-rate-table > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
}

.handbook-rate-table > div:last-child {
    border-bottom: 0;
}

.handbook-rate-table strong {
    color: var(--accent);
}

.handbook-scans {
    scroll-margin-top: 90px;
}

.handbook-scans__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.handbook-scans__heading h2 {
    margin-bottom: 0;
}

.handbook-scans__heading > span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.handbook-scan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.handbook-scan {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.handbook-scan img {
    display: block;
    width: 100%;
    aspect-ratio: 17 / 28;
    object-fit: cover;
    object-position: top;
}

.handbook-scan span {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(6, 13, 22, 0.9);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
}

.handbook-empty {
    padding: 28px;
    border: 1px dashed var(--border);
    text-align: center;
    color: var(--text-muted);
}

.timesheet-attendance-status {
    margin-top: 4px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
}

.timesheet-auto-overtime {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: left;
}

.timesheet-auto-overtime:hover {
    text-decoration: underline;
}

@media (max-width: 880px) {
    .handbook-layout {
        grid-template-columns: 1fr;
    }

    .handbook-toc {
        position: static;
        padding: 10px 12px;
    }

    .handbook-toc nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
    }
}

@media (max-width: 620px) {
    .handbook-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .handbook-print {
        width: 100%;
    }

    .handbook-toc nav {
        display: block;
        max-height: 220px;
        overflow-y: auto;
    }

    .handbook-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .handbook-section__number {
        width: 34px;
        height: 30px;
    }

    .handbook-section p {
        font-size: 0.94rem;
        line-height: 1.62;
    }

    .handbook-rate-table > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .handbook-scan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .site-header,
    .site-footer,
    .handbook-print,
    .handbook-source-note,
    .handbook-tools,
    .handbook-toc,
    .handbook-scans {
        display: none !important;
    }

    .page-wrap,
    .handbook-page {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .handbook-hero {
        color: #000;
        border-color: #777;
    }

    .handbook-layout {
        display: block;
    }

    .handbook-section {
        display: block;
        break-inside: auto;
        border-color: #aaa;
    }

    .handbook-section__number {
        display: none;
    }

    .handbook-section h2,
    .handbook-section h3 {
        break-after: avoid;
        color: #000;
        border-color: #000;
    }

    .handbook-section p,
    .handbook-rate-table,
    .handbook-rate-table strong {
        color: #000;
    }
}

.stat-card--link {
    display: block;
    color: var(--text);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stat-card--link:hover {
    text-decoration: none;
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
    box-shadow: var(--shadow-soft);
}

.stat-label {
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-note {
    color: var(--text-faint);
    margin-top: 8px;
    font-size: 13px;
}

.dashboard-callout {
    margin-top: 18px;
}

.section-title--flush {
    margin-top: 0;
}

.list-clean--spaced {
    margin-top: 14px;
}

.employee-checkin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.employee-checkin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.employee-checkin-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-elevated), var(--bg-subtle));
}

.employee-checkin-card.is-reported {
    border-color: color-mix(in srgb, var(--success-text) 35%, var(--border) 65%);
}

.employee-checkin-card.is-missing {
    border-color: color-mix(in srgb, var(--error-text) 35%, var(--border) 65%);
}

.employee-checkin-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.employee-checkin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, transparent 76%), color-mix(in srgb, var(--accent) 8%, var(--bg-elevated) 92%));
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.employee-checkin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.employee-checkin-avatar--fallback {
    text-transform: uppercase;
}

.employee-checkin-card__status {
    display: grid;
    gap: 6px;
}

.dashboard-notice-card {
    margin-bottom: 20px;
    border: 1px solid rgba(47, 113, 246, 0.24);
    background: linear-gradient(135deg, rgba(47, 113, 246, 0.08), rgba(47, 113, 246, 0.03));
}

.dashboard-notice-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-notice-card__dismiss {
    flex-shrink: 0;
}

.dashboard-invoice-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.dashboard-invoice-list__item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.64);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-invoice-list__item:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 113, 246, 0.25);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.dashboard-invoice-list__item span {
    color: var(--text-soft);
    font-size: 13px;
}

[data-theme="dark"] .dashboard-invoice-list__item {
    background: rgba(15, 23, 42, 0.54);
}

.river-widget {
    margin-bottom: 20px;
}

.river-widget__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.river-widget__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
    align-items: stretch;
}

.river-widget__chart-shell {
    min-height: 320px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 78%, transparent 22%), color-mix(in srgb, var(--bg-panel) 78%, transparent 22%));
    overflow: hidden;
}

.river-widget canvas {
    display: block;
    width: 100%;
    height: 320px;
}

.river-widget__side {
    display: grid;
    gap: 12px;
}

.river-reading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.river-reading {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.river-reading span,
.river-reading small {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.river-reading strong {
    font-size: 1.45rem;
    line-height: 1;
}

.river-thresholds {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.river-thresholds span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    background: color-mix(in srgb, var(--bg-subtle) 72%, transparent 28%);
    font-size: 12px;
}

.river-thresholds strong {
    color: var(--text);
}

.river-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.river-alert-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.river-alert-pill--good {
    border-color: color-mix(in srgb, var(--success-text) 42%, var(--border) 58%);
    background: var(--success-bg);
    color: var(--success-text);
}

.river-alert-pill--watch {
    border-color: color-mix(in srgb, #f5b642 52%, var(--border) 48%);
    background: color-mix(in srgb, #f5b642 16%, transparent 84%);
    color: #f5c76a;
}

.river-alert-pill--warning {
    border-color: color-mix(in srgb, var(--error-text) 54%, var(--border) 46%);
    background: var(--error-bg);
    color: var(--error-text);
}

.river-alert-pill--muted {
    color: var(--text-faint);
}

.weather-dashboard-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    border-color: color-mix(in srgb, var(--accent) 25%, var(--border) 75%);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent 87%), transparent 42%),
        var(--bg-panel);
}

.weather-dashboard-card__main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.weather-dashboard-card h3,
.weather-current-hero h3 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 0.95;
}

.weather-dashboard-card__label,
.weather-current-hero__label {
    margin-top: 6px;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
}

.weather-dashboard-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 10px;
    flex: 1;
}

.weather-dashboard-card__metrics span,
.weather-current-hero__grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-elevated) 82%, transparent 18%);
}

.weather-dashboard-card__metrics strong,
.weather-current-hero__grid strong {
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1;
}

.weather-dashboard-card__metrics small,
.weather-current-hero__grid span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.weather-dashboard-card__actions {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.weather-alerts {
    justify-content: flex-end;
}

.weather-page-card {
    display: grid;
    gap: 16px;
}

.weather-current-hero {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 20px;
    align-items: stretch;
}

.weather-current-hero__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.weather-hourly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.weather-hour-card {
    display: grid;
    gap: 6px;
    min-height: 142px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.weather-hour-card strong,
.weather-hour-card b {
    color: var(--text);
}

.weather-hour-card b {
    font-size: 1.55rem;
    line-height: 1;
}

.weather-hour-card span,
.weather-hour-card small {
    color: var(--text-soft);
    font-weight: 700;
}

.weather-forecast-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.weather-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.weather-day-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 148px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.weather-day-card.is-today {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--border) 52%);
    box-shadow: inset 4px 0 0 var(--accent);
}

.weather-day-card strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
}

.weather-day-card span,
.weather-day-card small {
    color: var(--text-soft);
    font-weight: 700;
}

.weather-day-card__temps {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 4px;
}

.weather-day-card__temps b {
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
}

.weather-day-card__meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}

.weather-day-card__meta span {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-subtle) 74%, transparent 26%);
    font-size: 12px;
}

.radar-page-card {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.radar-page-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.radar-frame-shell {
    min-height: 620px;
    height: min(74vh, 820px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    overflow: hidden;
}

.radar-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--bg-input);
}

body.radar-fullscreen-open {
    overflow: hidden;
}

.radar-page-card.is-radar-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 100000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: var(--bg);
    grid-template-rows: auto minmax(0, 1fr);
}

.radar-page-card.is-radar-fullscreen .radar-frame-shell {
    min-height: 0;
    height: auto;
}

.district-work-log-modal-card {
    width: min(1040px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow-y: auto;
}

.district-log-check-list {
    display: grid;
    align-content: start;
    gap: 3px;
    max-height: 260px;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.district-log-check-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    margin: 0;
    padding: 4px 6px;
    cursor: pointer;
}

.district-log-check-list label:hover {
    background: var(--bg-subtle);
}

.district-log-check-list input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
}

.district-report-cover.print-only {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1000;
    display: block;
    visibility: visible;
    width: 7.9in;
    height: 10.35in;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    background: #ffffff;
    color: #10233d;
}

.district-report-cover__header,
.district-report-cover__brand,
.district-report-cover__footer,
.district-report-cover__map-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.district-report-cover__header {
    padding: 0.18in 0.2in;
    border-bottom: 4px solid #c69214;
    background: #10233d;
    color: #ffffff;
}

.district-report-cover__brand {
    justify-content: flex-start;
    gap: 0.13in;
}

.district-report-cover__mark {
    display: grid;
    width: 0.62in;
    height: 0.62in;
    place-items: center;
    border: 2px solid #ffffff;
    background: #c69214;
    color: #10233d;
    font-size: 14px;
    font-weight: 900;
}

.district-report-cover__agency {
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.district-report-cover__system,
.district-report-cover__type {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.district-report-cover__title-block {
    padding: 0.24in 0.2in 0.18in;
}

.district-report-cover__eyebrow {
    color: #8b650c;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.district-report-cover__title-block h1 {
    margin: 0.05in 0 0;
    color: #10233d;
    font-size: 30px;
    line-height: 1.05;
}

.district-report-cover__scope {
    margin-top: 0.07in;
    color: #42546a;
    font-size: 12px;
    font-weight: 700;
}

.district-report-cover__map-frame {
    margin: 0 0.2in;
    overflow: hidden;
    border: 2px solid #17365d;
    background: #e8edf2;
}

.district-report-cover__map {
    width: 100%;
    height: 5.9in;
    background: #e8edf2;
}

.district-report-cover__map-caption {
    justify-content: flex-start;
    gap: 0.28in;
    padding: 0.08in 0.12in;
    border-top: 1px solid #9ba9b8;
    background: #f5f7f9;
    color: #263b55;
    font-size: 9px;
    font-weight: 800;
}

.district-report-cover__map-caption span::before {
    display: inline-block;
    width: 0.18in;
    height: 0.06in;
    margin-right: 0.06in;
    content: '';
    vertical-align: middle;
    background: #17365d;
}

.district-report-cover__map-caption span:last-child::before {
    background: #c69214;
}

.district-report-cover__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.08in;
    margin: 0.16in 0.2in 0;
}

.district-report-cover__stats--eight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.district-report-cover__stats div {
    padding: 0.09in 0.11in;
    border: 1px solid #aeb9c5;
    border-left: 4px solid #c69214;
    background: #f7f9fb;
}

.district-report-cover__stats span,
.district-report-cover__stats strong {
    display: block;
}

.district-report-cover__stats span {
    color: #52647a;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.district-report-cover__stats strong {
    margin-top: 2px;
    color: #10233d;
    font-size: 16px;
}

.district-report-cover__footer {
    position: absolute;
    right: 0.2in;
    bottom: 0.08in;
    left: 0.2in;
    padding-top: 0.06in;
    border-top: 1px solid #aeb9c5;
    color: #52647a;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.district-report-invoice.print-only {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1000;
    display: block;
    visibility: visible;
    width: 7.9in;
    height: 10.25in;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    background: #ffffff;
    color: #10233d;
}

.district-report-invoice__header,
.district-report-invoice__brand,
.district-report-invoice__meta,
.district-report-invoice__parties,
.district-report-invoice__totals,
.district-report-invoice__signatures,
.district-report-invoice__footer,
.naylor-billing-summary,
.naylor-billing-summary__figures {
    display: flex;
}

.district-report-invoice__header {
    align-items: center;
    justify-content: space-between;
    padding: 0.26in 0.3in;
    border-bottom: 5px solid #c69214;
    background: #10233d;
    color: #ffffff;
}

.district-report-invoice__brand {
    align-items: center;
    gap: 0.14in;
}

.district-report-invoice__mark {
    display: grid;
    width: 0.68in;
    height: 0.68in;
    place-items: center;
    border: 2px solid #ffffff;
    background: #c69214;
    color: #10233d;
    font-size: 15px;
    font-weight: 900;
}

.district-report-invoice__agency {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

.district-report-invoice__location {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.district-report-invoice__title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.district-report-invoice__meta {
    justify-content: flex-end;
    gap: 0.3in;
    padding: 0.24in 0.3in 0.18in;
    border-bottom: 1px solid #c7d0da;
}

.district-report-invoice__meta div,
.district-report-invoice__parties div {
    min-width: 1.5in;
}

.district-report-invoice__meta span,
.district-report-invoice__parties span,
.district-report-invoice__totals span,
.district-report-invoice__signatures span,
.naylor-billing-summary__figures small {
    display: block;
    color: #64758a;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.district-report-invoice__meta strong,
.district-report-invoice__parties strong {
    display: block;
    margin-top: 4px;
    color: #10233d;
    font-size: 12px;
}

.district-report-invoice__parties {
    gap: 0.35in;
    padding: 0.35in 0.3in 0.28in;
}

.district-report-invoice__parties div {
    flex: 1;
    min-height: 0.95in;
    padding: 0.16in;
    border-left: 4px solid #c69214;
    background: #f4f7fa;
}

.district-report-invoice__parties p {
    margin: 5px 0 0;
    color: #42546a;
    font-size: 10px;
}

.district-report-invoice__table {
    width: calc(100% - 0.6in);
    margin: 0.05in 0.3in 0;
    border-collapse: collapse;
}

.district-report-invoice__table th {
    padding: 0.11in 0.12in;
    background: #17365d;
    color: #ffffff;
    font-size: 9px;
    text-align: left;
    text-transform: uppercase;
}

.district-report-invoice__table th:not(:first-child),
.district-report-invoice__table td:not(:first-child) {
    text-align: right;
}

.district-report-invoice__table td {
    padding: 0.18in 0.12in;
    border: 1px solid #bdc8d3;
    color: #10233d;
    font-size: 11px;
    vertical-align: top;
}

.district-report-invoice__table td:first-child {
    width: 48%;
}

.district-report-invoice__table small {
    display: block;
    margin-top: 5px;
    color: #5a6d82;
    font-size: 9px;
    line-height: 1.35;
}

.district-report-invoice__totals {
    flex-direction: column;
    align-items: flex-end;
    margin: 0.18in 0.3in 0;
}

.district-report-invoice__totals div {
    display: flex;
    width: 2.65in;
    justify-content: space-between;
    padding: 0.09in 0.12in;
    border-bottom: 1px solid #c7d0da;
}

.district-report-invoice__totals strong {
    color: #10233d;
    font-size: 13px;
}

.district-report-invoice__totals .district-report-invoice__amount-due {
    align-items: center;
    border: 0;
    background: #c69214;
}

.district-report-invoice__amount-due span,
.district-report-invoice__amount-due strong {
    color: #10233d;
    font-size: 16px;
    font-weight: 900;
}

.district-report-invoice__supporting-note {
    margin: 0.48in 0.3in 0;
    padding: 0.18in;
    border: 1px solid #aeb9c5;
    background: #f7f9fb;
}

.district-report-invoice__supporting-note strong {
    color: #10233d;
    font-size: 11px;
    text-transform: uppercase;
}

.district-report-invoice__supporting-note p {
    margin: 5px 0 0;
    color: #42546a;
    font-size: 10px;
    line-height: 1.4;
}

.district-report-invoice__signatures {
    gap: 0.4in;
    margin: 0.7in 0.3in 0;
}

.district-report-invoice__signatures div {
    position: relative;
    flex: 1;
}

.district-report-invoice__signatures i {
    display: block;
    height: 0.34in;
    border-bottom: 1px solid #10233d;
}

.district-report-invoice__signatures small {
    position: absolute;
    right: 0;
    bottom: -0.16in;
    color: #64758a;
    font-size: 8px;
    text-transform: uppercase;
}

.district-report-invoice__footer {
    position: absolute;
    right: 0.3in;
    bottom: 0.12in;
    left: 0.3in;
    justify-content: space-between;
    padding-top: 0.08in;
    border-top: 1px solid #aeb9c5;
    color: #64758a;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.naylor-billing-summary {
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}

.naylor-billing-summary__figures {
    flex: 0 0 auto;
    gap: 10px;
}

.naylor-billing-summary__figures span {
    min-width: 130px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: var(--bg-subtle);
}

.naylor-billing-summary__figures strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 20px;
}

.district-saved-report-bar,
.district-report-work-toolbar,
.district-report-save-controls,
.district-report-work-totals {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.district-saved-report-bar {
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
}

.district-saved-report-picker {
    display: grid;
    grid-template-columns: auto minmax(260px, 440px);
    align-items: center;
    gap: 10px;
}

.district-saved-report-picker label,
.district-report-save-controls label {
    margin: 0;
}

.district-saved-report-status {
    display: grid;
    gap: 2px;
    color: var(--text-soft);
    font-size: 12px;
}

.district-saved-report-delete {
    margin: 0;
}

.district-saved-report-delete .is-danger {
    border-color: color-mix(in srgb, var(--error-text) 55%, var(--border) 45%);
    background: var(--error-bg);
    color: var(--error-text);
}

.district-saved-report-status strong {
    color: var(--text);
}

.district-report-work-toolbar {
    justify-content: space-between;
    margin-bottom: 10px;
}

.district-report-save-controls {
    flex-wrap: wrap;
}

.district-report-save-controls input {
    width: min(360px, 38vw);
}

.district-report-work-totals {
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.district-report-work-totals span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: 12px;
}

.district-report-work-totals strong {
    color: var(--text);
}

.district-report-metric-cell {
    width: 76px;
}

.district-report-metric-input {
    width: 68px;
    min-height: 34px;
    padding: 5px 7px;
    text-align: right;
}

.district-report-exclude-cell {
    width: 78px;
}

.district-report-exclude-cell label {
    display: grid;
    justify-items: center;
    gap: 3px;
    margin: 0;
    color: var(--text-soft);
    font-size: 10px;
    cursor: pointer;
}

.district-report-exclude-cell input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.district-work-log-row.is-report-excluded td {
    opacity: 0.42;
    text-decoration: line-through;
}

.district-work-log-row.is-report-excluded .district-report-exclude-cell {
    opacity: 1;
    text-decoration: none;
}

@media (max-width: 820px) {
    .district-saved-report-bar,
    .district-report-work-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .district-saved-report-picker {
        grid-template-columns: 1fr;
    }

    .district-report-save-controls {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .district-report-save-controls input {
        width: 100%;
    }
}

.radar-map-shell {
    position: relative;
    min-height: 620px;
    height: min(74vh, 820px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    overflow: hidden;
}

.radar-live-map {
    width: 100%;
    height: 100%;
    min-height: inherit;
    background: var(--bg-input);
}

.radar-map-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 24px);
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.24);
}

.radar-legend-line {
    display: inline-block;
    width: 28px;
    height: 4px;
    margin-right: 6px;
    border-radius: 999px;
    background: #ffea63;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.42);
    vertical-align: middle;
}

.radar-legend-swatch {
    display: inline-block;
    width: 18px;
    height: 12px;
    margin-right: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(43, 111, 255, 0.78), rgba(62, 181, 74, 0.78), rgba(255, 215, 64, 0.78), rgba(215, 48, 39, 0.78));
    vertical-align: middle;
}

.radar-road-label {
    display: none;
    padding: 2px 5px;
    border: 1px solid rgba(255, 234, 99, 0.72);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.84);
    color: #fff7b0;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.is-showing-radar-road-labels .radar-road-label {
    display: block;
}

.maintained-roads-map .leaflet-interactive {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.38));
}

.maintained-map-shell {
    position: relative;
}

.maintained-radar-legend {
    bottom: 12px;
}

.maintained-road-label {
    display: none;
    padding: 2px 5px;
    border: 1px solid rgba(255, 234, 99, 0.72);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.84);
    color: #fff7b0;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.is-showing-maintained-road-labels .maintained-road-label {
    display: block;
}

.district-records-map-shell {
    position: relative;
}

.district-records-map {
    height: min(68vh, 660px);
    min-height: 460px;
}

.district-records-map-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.district-records-map-actions .btn.is-active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, var(--bg-elevated) 82%);
    color: var(--text);
}

.district-records-map-shell.is-map-fullscreen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
}

.district-records-map-shell.is-map-fullscreen .district-records-map {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.leaflet-tooltip.district-records-district-label {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    padding: 0 !important;
    text-align: center;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.9),
        1px -1px 0 rgba(255, 255, 255, 0.9),
        -1px 1px 0 rgba(255, 255, 255, 0.9),
        1px 1px 0 rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    white-space: normal;
}

.leaflet-tooltip.district-records-district-label::before {
    display: none !important;
}

.employee-checkin-light {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
    flex: 0 0 14px;
}

.employee-checkin-light.is-green {
    background: #2ec66d;
    box-shadow: 0 0 0 3px rgba(46, 198, 109, 0.12), 0 0 14px rgba(46, 198, 109, 0.35);
}

.employee-checkin-light.is-red {
    background: #d95a5a;
    box-shadow: 0 0 0 3px rgba(217, 90, 90, 0.12), 0 0 14px rgba(217, 90, 90, 0.28);
}

/* ******************************-={ 08. FORMS / INPUTS / BUTTONS }=-****************************** */
.form-shell {
    max-width: 980px;
}

.form-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent 82%);
}

select[multiple],
.multi-select-box {
    min-height: 150px;
    padding: 10px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.mobile-log-select {
    display: none;
    width: 100%;
    margin-bottom: 10px;
}

.employee-log-choice-select {
    display: block;
    min-height: 210px;
}

.employee-log-choice-select option:checked,
.employee-log-choice-select option.is-selected {
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
    color: color-mix(in srgb, var(--bg) 88%, black 12%);
    font-weight: 800;
}

.employee-log-picker-shell {
    display: none;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0 16px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.button-link:hover {
    background: var(--accent-strong);
    text-decoration: none;
}

.button-link.is-secondary,
button.is-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 4px;
}

.inline-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.field-help {
    color: var(--text-faint);
    font-size: 13px;
    margin-top: 7px;
}

.field-help--spaced {
    margin-top: 12px;
}

.profile-signature-preview,
.timesheet-signature-preview {
    display: block;
    max-width: min(260px, 100%);
    max-height: 72px;
    object-fit: contain;
    object-position: left center;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.timesheet-esign-control {
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.timesheet-esign-control .timesheet-signature-preview {
    margin: 0 0 0 4px;
    max-width: 220px;
    max-height: 54px;
}

.signature-pad-shell {
    width: 100%;
    max-width: 720px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
}

.signature-pad {
    display: block;
    width: 100%;
    height: 220px;
    border: 1px dashed #aab3c2;
    border-radius: 8px;
    background:
        linear-gradient(to bottom, transparent calc(100% - 34px), rgba(31, 41, 55, 0.32) calc(100% - 33px), transparent calc(100% - 32px)),
        #ffffff;
    cursor: crosshair;
    touch-action: none;
}

.signature-pad-actions {
    align-items: center;
}

.signature-pad-status {
    margin-top: 0;
}

.form-hidden {
    display: none;
}

/* ******************************-={ 09. MESSAGES / STATUS }=-****************************** */
.success,
.error {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    font-weight: 700;
}

.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: color-mix(in srgb, var(--success-text) 24%, transparent 76%);
}

.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: color-mix(in srgb, var(--error-text) 24%, transparent 76%);
}

/* ******************************-={ 10. PICKERS / TOKENS }=-****************************** */
.picker-wrap {
    position: relative;
}

.picker-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    max-height: 240px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}

.picker-item {
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text);
}

.picker-item:hover {
    background: var(--accent-soft);
}

.token-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.token {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text);
}

.token button {
    background: transparent;
    border: 0;
    color: inherit;
    min-height: auto;
    padding: 0;
    cursor: pointer;
}

/* ******************************-={ 11. TABLES / CHIPS }=-****************************** */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.table-shell {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-panel);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.2;
}

.data-table th,
.data-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    background: color-mix(in srgb, var(--bg-subtle) 76%, transparent 24%);
}

.data-table tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

.data-table tr.is-muted-row {
    opacity: 0.62;
}

.data-table td:nth-child(5) {
    max-width: 320px;
    font-size: 0.80rem;
    overflow-wrap: break-word;
}

.data-table td:nth-child(2) {
    white-space: nowrap;
}

.data-table td:first-child {
    white-space: nowrap;
    width: 70px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.70rem;
    font-weight: 700;
}

.chip-road {
    background: var(--chip-road);
    color: var(--chip-road-text);
}

.chip-equipment {
    background: var(--chip-eq);
    color: var(--chip-eq-text);
}

.chip-equipment--unique {
    background: hsla(var(--chip-accent-h), 72%, 60%, 0.18);
    color: hsl(var(--chip-accent-h), 84%, 74%);
}

html[data-theme="light"] .chip-equipment--unique {
    background: hsla(var(--chip-accent-h), 82%, 84%, 0.95);
    color: hsl(var(--chip-accent-h), 62%, 28%);
}

.chip-tone-1  { background: rgba(88, 196, 123, 0.18); color: #8de0a7; }
.chip-tone-2  { background: rgba(86, 156, 214, 0.18); color: #98cdfb; }
.chip-tone-3  { background: rgba(236, 201, 75, 0.20); color: #f0d978; }
.chip-tone-4  { background: rgba(224, 112, 85, 0.18); color: #ffae99; }
.chip-tone-5  { background: rgba(165, 120, 255, 0.18); color: #c8a8ff; }
.chip-tone-6  { background: rgba(72, 191, 180, 0.18); color: #86e3da; }
.chip-tone-7  { background: rgba(240, 138, 93, 0.18); color: #ffc09e; }
.chip-tone-8  { background: rgba(110, 215, 89, 0.18); color: #a7ef8b; }
.chip-tone-9  { background: rgba(233, 102, 168, 0.18); color: #ffb0d4; }
.chip-tone-10 { background: rgba(125, 166, 255, 0.18); color: #bad0ff; }
.chip-tone-11 { background: rgba(255, 154, 77, 0.18); color: #ffc48f; }
.chip-tone-12 { background: rgba(108, 130, 214, 0.22); color: #b2c0ff; }

html[data-theme="light"] .chip-tone-1  { background: #dbf3e4; color: #1d7f49; }
html[data-theme="light"] .chip-tone-2  { background: #deecfb; color: #225f98; }
html[data-theme="light"] .chip-tone-3  { background: #f8efc8; color: #8a6a00; }
html[data-theme="light"] .chip-tone-4  { background: #fbe0d8; color: #9b4c2c; }
html[data-theme="light"] .chip-tone-5  { background: #eee3ff; color: #6d42b4; }
html[data-theme="light"] .chip-tone-6  { background: #dbf4f1; color: #1e8078; }
html[data-theme="light"] .chip-tone-7  { background: #fde7d7; color: #9a5f1d; }
html[data-theme="light"] .chip-tone-8  { background: #e3f7d9; color: #477c1c; }
html[data-theme="light"] .chip-tone-9  { background: #fde0ee; color: #9d3567; }
html[data-theme="light"] .chip-tone-10 { background: #e1e9ff; color: #3c57a6; }
html[data-theme="light"] .chip-tone-11 { background: #ffe8d7; color: #9d611f; }
html[data-theme="light"] .chip-tone-12 { background: #e0e6fb; color: #4557a3; }



.expense-toolbar-meta {
    justify-content: flex-end;
    margin-bottom: 0;
}

.expense-table td:nth-child(3),
.expense-table th:nth-child(3) {
    white-space: nowrap;
    width: 110px;
}

.expense-table td:nth-child(4),
.expense-table th:nth-child(4) {
    white-space: nowrap;
    width: 120px;
}

.expense-table td:nth-child(5),
.expense-table td:nth-child(6) {
    max-width: 320px;
    overflow-wrap: break-word;
    vertical-align: top;
}

.expense-amount {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ******************************-={ 12. ROAD LOG MODALS / RECORD VIEW }=-****************************** */
.table-row-clickable {
    cursor: pointer;
}

.table-row-clickable:hover {
    background: color-mix(in srgb, var(--accent-soft) 42%, transparent 58%);
}

.table-row-clickable.is-editing {
    background: color-mix(in srgb, var(--accent-soft) 72%, transparent 28%);
    outline: 1px solid var(--accent);
    outline-offset: -1px;
}

.annual-check {
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.metric-cell {
    width: 82px;
}

.road-log-metric-input {
    width: 72px;
    min-height: 32px;
    padding: 5px 7px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.road-log-metric-display {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    width: 72px;
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.road-log-metric-input.is-saving {
    opacity: 0.65;
}

.road-log-metric-input.is-saved {
    border-color: var(--success-text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--success-text) 55%, transparent 45%);
}

.road-log-metric-input.is-error {
    border-color: var(--error-text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--error-text) 55%, transparent 45%);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 1000;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-card {
    width: min(1080px, 100%);
    max-height: min(88vh, 980px);
    overflow: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 20px;
}

.modal-card--filter {
    width: min(880px, 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.modal-subtitle {
    color: var(--text-soft);
    margin-top: 6px;
}

.modal-close {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.record-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.record-meta .code-note {
    background: var(--bg-subtle);
    color: var(--text-soft);
}

.work-date-hover {
    text-decoration: none;
}

.inline-employee-note {
    display: block;
    margin-top: 6px;
    color: var(--text-soft);
    font-style: italic;
}

.time-exception-inline {
    display: block;
    margin-bottom: 4px;
    color: #ef4444;
    font-weight: 700;
}


/* ******************************-={ 13. RESPONSIVE }=-****************************** */
@media (max-width: 1024px) {
    .river-widget__body {
        grid-template-columns: 1fr;
    }

    .grid-two,
    .grid-three,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .col-12,
    .col-8,
    .col-6,
    .col-4,
    .col-3 {
        grid-column: span 12;
    }

    .page-title {
        font-size: 30px;
    }
}

/* ******************************-={ 14. CONDOM WRAPPER}=-****************************** */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.button-link--secondary {
    opacity: 0.88;
}


/* ******************************-={ 04/07/2026 - WB PHASE 1 }=-******************************
   COMPACT HEADER / NAV / REPORT PAGES
   ********************************************************************************** */
.site-header {
    position: sticky;
    top: 0;
    z-index: 5000;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 88%, transparent 12%);
    border-bottom: 1px solid var(--border);
}

.site-header__inner,
.page-wrap {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

.compact-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px 0;
}

.brand-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    min-width: 0;
}

.brand-inline:hover {
    text-decoration: none;
}

.brand-inline__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, transparent 74%), color-mix(in srgb, var(--accent) 10%, var(--bg-elevated) 90%));
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-inline__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-inline__kicker {
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.brand-inline__title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.compact-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    isolation: isolate;
    overflow: visible;
}

.header-nav-shell {
    display: grid;
    gap: 8px;
}

.nav-collapse-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.nav-collapse-toggle__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.nav-collapse-toggle__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.header-nav-shell--collapsible .compact-nav {
    width: auto;
}

.nav-chip,
.nav-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    box-shadow: none;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-chip:hover,
.nav-menu > summary:hover,
.nav-chip.is-active,
.nav-menu[open] > summary {
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
}

.nav-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: currentColor;
}

.nav-menu {
    position: relative;
    z-index: 5100;
}

.nav-menu[open] {
    z-index: 5300;
}

.nav-menu > summary::-webkit-details-marker {
    display: none;
}

.nav-menu > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    transition: transform 0.16s ease;
    margin-left: 2px;
}

.nav-menu[open] > summary::after {
    transform: rotate(-135deg) translateY(-1px);
}

.nav-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 95%, var(--bg-subtle) 5%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    z-index: 5400;
}

.nav-menu__panel--wide {
    min-width: 260px;
}

.nav-menu__panel--right {
    left: auto;
    right: 0;
}

.nav-menu__panel a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
}

.nav-menu__panel a:hover {
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent);
}

.theme-toggle {
    min-height: 38px;
    min-width: 42px;
    padding: 0 10px;
    border-radius: 999px;
    box-shadow: none;
    gap: 0;
}

.theme-toggle__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.theme-toggle__icon--moon {
    display: none;
}

html[data-theme="light"] .theme-toggle__icon--sun {
    display: none;
}

html[data-theme="light"] .theme-toggle__icon--moon {
    display: inline-flex;
}

.page-wrap {
    padding: 22px 0 42px 0;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 90%, transparent 10%);
}

.site-footer__inner {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 22px 0;
    color: var(--text-faint);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.page-header--compact {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.page-title--tight {
    font-size: 30px;
    margin-bottom: 4px;
}

.page-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.page-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent 78%), color-mix(in srgb, var(--accent) 10%, var(--bg-elevated) 90%));
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.page-title-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.grid-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-list {
    display: grid;
    gap: 10px;
}

.quick-list__item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elevated) 82%, var(--bg-subtle) 18%);
    color: var(--text);
}

.quick-list__item span {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}

.quick-list__item span svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.quick-list__item strong {
    font-size: 14px;
}

.quick-list__item small {
    color: var(--text-soft);
    font-size: 12px;
}

.quick-list__item:hover {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
}

.summary-stack {
    display: grid;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: 0;
}

.soft-note {
    margin: 12px 0 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.notice {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.notice--error {
    background: var(--error-bg);
    color: var(--error-text);
}

.report-shell,
.print-shell {
    max-width: 100%;
}

.report-card {
    padding: 18px;
}

.report-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.report-head__actions {
    justify-content: flex-end;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stats-grid--compact {
    gap: 10px;
}

.compact-stat {
    padding: 14px;
}

.invoice-summary-stats .compact-stat {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    column-gap: 20px;
}

.invoice-summary-stats .stat-label {
    margin: 0;
    color: color-mix(in srgb, var(--text-soft) 82%, var(--text) 18%);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.invoice-summary-stats .stat-value {
    min-width: 0;
}

.stat-value--small {
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.section-block {
    margin-top: 16px;
}

.section-block__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.section-block__head h3,
.section-title--flush {
    margin: 0;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    flex: 0 0 34px;
}

.section-title-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.table-shell--tight {
    border-radius: 12px;
}

.data-table--compact {
    font-size: 0.78rem;
}

.data-table--compact th,
.data-table--compact td {
    padding: 7px 9px;
}

.road-mileage-table input,
.road-mileage-table select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.82rem;
}

.road-mileage-table input[name="mileage"] {
    width: 96px;
}

.road-mileage-table select[name="road_type"] {
    min-width: 110px;
}

.road-mileage-table input[name="notes"] {
    min-width: 160px;
}

.road-mileage-table button {
    min-height: 34px;
    padding: 6px 10px;
}

.roads-combined-table th,
.roads-combined-table td {
    padding: 4px 8px;
    line-height: 1.1;
}

.roads-combined-table .road-district-code {
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--text-soft);
}

.road-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.road-row-actions form {
    margin: 0;
}

.road-icon-button {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 5px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text-soft);
}

.road-icon-button svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: currentColor;
}

.road-icon-button:hover,
.road-icon-button:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.road-icon-button--danger:hover,
.road-icon-button--danger:focus-visible {
    color: var(--error-text);
    border-color: var(--error-text);
    background: var(--error-bg);
}

.report-table td,
.report-table th {
    white-space: nowrap;
}

.report-table td:nth-child(4),
.report-table td:nth-child(6),
.report-table td:nth-child(7) {
    white-space: normal;
}

.invoice-finder-table td,
.invoice-finder-table th {
    white-space: normal;
}

.invoice-finder-table td:last-child,
.invoice-finder-table th:last-child {
    white-space: nowrap;
    width: 92px;
}

.invoice-row--active {
    background: color-mix(in srgb, var(--accent-soft) 52%, transparent 48%);
}

.diff-ok {
    font-weight: 700;
}

.diff-bad {
    font-weight: 800;
    color: var(--error-text);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--border);
}

.status-pill--matched {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill--ticket_not_found,
.status-pill--tons_mismatch {
    background: var(--error-bg);
    color: var(--error-text);
}

.filter-panel {
    margin-top: 14px;
}

.compact-filter-panel {
    padding: 16px;
}

.filter-grid--four {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.filter-actions {
    margin-top: 14px;
}

.top-gap {
    margin-top: 14px;
}

.muted-cell {
    color: var(--text-soft);
    text-align: center;
    padding: 16px !important;
}

.date-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.print-only {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pay-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--success-text) 42%, var(--border) 58%);
    background: color-mix(in srgb, var(--success-bg) 80%, var(--bg-elevated) 20%);
    color: var(--success-text);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.pay-icon-link:hover {
    text-decoration: none;
    border-color: var(--success-text);
    background: color-mix(in srgb, var(--success-text) 18%, var(--bg-elevated) 82%);
}

@media (max-width: 1080px) {
    .header-nav-shell:not(.header-nav-shell--collapsible) .nav-collapse-toggle {
        display: inline-flex;
        justify-self: start;
    }

    .header-nav-shell:not(.header-nav-shell--collapsible) .compact-nav {
        display: none;
        justify-content: flex-start;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 0 0;
    }

    .header-nav-shell:not(.header-nav-shell--collapsible) .compact-nav.is-open {
        display: flex;
    }

    .header-nav-shell:not(.header-nav-shell--collapsible) .compact-nav .nav-chip,
    .header-nav-shell:not(.header-nav-shell--collapsible) .compact-nav .nav-menu > summary {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .grid-four,
    .stats-grid,
    .grid-two {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid,
    .filter-grid--four {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    select,
    textarea,
    .picker-results,
    .nav-menu__panel,
    .user-menu__mobile-links {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    select[multiple],
    .multi-select-box,
    .employee-log-choice-select {
        max-height: min(58vh, 360px);
        overflow-y: auto;
    }

    .river-widget__head {
        display: grid;
    }

    .radar-page-card__head {
        display: grid;
    }

    .weather-dashboard-card,
    .weather-current-hero {
        grid-template-columns: 1fr;
    }

    .weather-dashboard-card__main {
        align-items: flex-start;
        flex-direction: column;
    }

    .weather-dashboard-card__metrics,
    .weather-current-hero__grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weather-dashboard-card__actions,
    .weather-alerts {
        justify-items: start;
        justify-content: flex-start;
    }

    .radar-frame-shell {
        min-height: 540px;
        height: 68vh;
    }

    .radar-map-shell {
        min-height: 540px;
        height: 68vh;
    }

    .radar-map-legend {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

    .river-reading-grid,
    .river-thresholds {
        grid-template-columns: 1fr;
    }

    .river-widget__chart-shell {
        min-height: 260px;
    }

    .river-widget canvas {
        height: 260px;
    }

    .site-header__inner,
    .page-wrap,
    .site-footer__inner {
        width: min(1320px, calc(100% - 20px));
    }

    .grid-four,
    .grid-two,
    .stats-grid,
    .filter-grid,
    .filter-grid--four,
    .date-pair {
        grid-template-columns: 1fr;
    }

    .report-head,
    .page-header--compact {
        flex-direction: column;
    }

    .nav-menu__panel {
        position: static;
        margin-top: 6px;
        min-width: 100%;
    }

    .header-nav-shell {
        width: 100%;
    }

    .compact-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        align-items: start;
        gap: 10px;
        padding: 8px 0;
    }

    .brand-inline {
        grid-area: brand;
    }

    .header-nav-shell {
        grid-area: nav;
    }

    .header-actions {
        grid-area: actions;
    }

    .brand-inline {
        gap: 8px;
    }

    .brand-inline__icon {
        width: 36px;
        height: 36px;
    }

    .brand-inline__kicker {
        font-size: 10px;
    }

    .brand-inline__title {
        font-size: 13px;
    }

    .brand-inline__kicker {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .theme-toggle {
        min-height: 36px;
        padding: 0 12px;
    }

    .mobile-log-select {
        display: block;
    }

    .picker-shell {
        display: none;
    }

    .desktop-employee-login {
        display: none;
    }

    .mobile-login-form {
        display: block;
    }

    .employee-log-choice-select {
        min-height: 150px;
    }

    .header-nav-shell,
    .header-nav-shell--collapsible,
    .header-nav-shell--collapsible .nav-collapse-toggle,
    .header-nav-shell--collapsible .compact-nav {
        display: none;
    }

    .user-menu__mobile-links {
        display: grid;
        gap: 4px;
        padding: 0 0 6px 0;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--border);
    }
}

@media print {
    @page {
        size: Letter portrait;
        margin: 0.3in;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .site-header,
    .site-footer,
    .no-print,
    .button-row,
    .header-actions,
    .compact-nav {
        display: none !important;
    }

    .page-wrap,
    .site-header__inner {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .page-card,
    .panel-card,
    .stat-card,
    .table-shell {
        box-shadow: none !important;
        border-color: #cfcfcf !important;
        background: #ffffff !important;
    }

    .print-only {
        display: block;
    }

    .district-report-cover.print-only {
        position: relative;
        top: auto;
        left: auto;
        z-index: auto;
        display: block !important;
        visibility: visible;
        width: 7.9in;
        height: 10.25in;
        margin: 0;
        opacity: 1;
        pointer-events: auto;
        page-break-after: always;
        break-after: page;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .district-report-cover .leaflet-control-container {
        display: none !important;
    }

    .district-report-invoice.print-only {
        position: relative;
        top: auto;
        left: auto;
        z-index: auto;
        display: block !important;
        visibility: visible;
        width: 7.9in;
        height: 10.25in;
        margin: 0;
        opacity: 1;
        pointer-events: auto;
        page-break-after: always;
        break-after: page;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .district-work-log-row.is-report-excluded {
        display: none !important;
    }

    .district-report-work-form {
        border: 0 !important;
        overflow: visible !important;
    }

    .district-report-work-toolbar {
        display: block;
        margin-bottom: 6px;
    }

    .district-report-work-totals {
        margin-bottom: 7px;
    }

    .district-report-work-totals span {
        border-color: #999999;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 9px;
        font-weight: 800;
    }

    .district-report-work-totals strong {
        color: #000000 !important;
    }

    .district-report-metric-input {
        width: 42px;
        min-height: 0;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        color: #000000 !important;
        font-size: 9px;
        font-weight: 800;
    }

    .timesheet-report-card {
        padding: 0 !important;
        border: 0 !important;
    }

    .timesheet-print-bottom,
    .timesheet-print-signatures,
    .timesheet-print-header__row,
    .timesheet-print-table tr {
        page-break-inside: avoid;
    }

    .print-title-block {
        margin-bottom: 12px;
    }

    .print-title-block h1 {
        margin: 0 0 4px 0;
        font-size: 20px;
    }

    .road-log-page {
        padding: 0 !important;
        border: 0 !important;
    }

    .road-log-page .table-toolbar {
        display: block;
        margin-bottom: 8px;
    }

    .road-log-page .muted,
    .road-log-page .record-meta .code-note {
        color: #000000 !important;
    }

    .road-log-page .record-meta {
        display: flex;
        gap: 5px;
        margin: 0 0 8px 0;
        padding: 0;
    }

    .road-log-page .record-meta .code-note {
        border: 1px solid #999999;
        background: #ffffff !important;
        padding: 3px 6px;
        font-size: 9px;
        font-weight: 800;
    }

    .road-log-page .table-shell {
        border: 0 !important;
        overflow: visible !important;
    }

    .road-log-page .data-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9px;
    }

    .road-log-page .data-table th,
    .road-log-page .data-table td {
        border: 1px solid #aaaaaa !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 4px 5px;
        vertical-align: top;
    }

    .road-log-page .data-table th {
        font-size: 8px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .road-log-page .chip,
    .road-log-page .time-exception-inline,
    .road-log-page .inline-employee-note,
    .road-log-page .road-log-metric-display {
        border: 0 !important;
        background: transparent !important;
        color: #000000 !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .road-log-page .chip {
        display: inline;
        margin-right: 5px;
        font-weight: 800;
    }

    .road-log-page .road-log-metric-input {
        width: 46px;
        min-height: 0;
        border: 0 !important;
        background: transparent !important;
        color: #000000 !important;
        padding: 0 !important;
        font-weight: 800;
    }

    .road-log-page .road-log-metric-display {
        display: inline;
        width: auto;
        font-weight: 800;
    }

    .road-log-page .annual-check {
        display: none;
    }

    .invoice-summary-stats {
        gap: 8px;
        margin-bottom: 10px;
    }

    .invoice-summary-stats .compact-stat {
        padding: 8px 10px;
        column-gap: 18px;
    }

    .invoice-summary-stats .stat-label {
        color: #333333 !important;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.06em;
    }

    .invoice-summary-stats .stat-value {
        color: #000000 !important;
        font-size: 14px;
        font-weight: 900;
        letter-spacing: 0;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 5px 6px;
        color: #000000;
    }

    .diff-bad,
    .status-pill {
        color: #000000 !important;
        background: transparent !important;
        border-color: #999999 !important;
    }
}

.header-actions {
    gap: 10px;
    flex-wrap: wrap;
}

.user-menu > summary {
    min-width: 0;
}

.user-menu__mobile-links {
    display: none;
}

@media (max-width: 720px) {
    .user-menu__mobile-links {
        display: grid;
        gap: 4px;
        padding: 0 0 6px 0;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--border);
    }
}

.user-menu__meta {
    display: grid;
    gap: 3px;
    padding: 2px 12px 10px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.user-menu__meta strong {
    font-size: 13px;
}

.user-menu__identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu__identity small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 11px;
}

.user-menu__meta span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-inline__icon svg,
.nav-chip__icon svg,
.theme-toggle__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.auth-shell {
    display: flex;
    justify-content: center;
    padding: 28px 0 60px 0;
}

.auth-card {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    box-shadow: var(--shadow-soft);
}

.desktop-employee-login {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.mobile-login-form {
    display: none;
}

.employee-login-card {
    min-height: 150px;
    padding: 14px 10px;
    flex-direction: column;
    gap: 10px;
    border-color: var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: none;
}

.employee-login-card:hover,
.employee-login-card.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated) 92%);
}

.employee-login-card__avatar {
    width: 78px;
    height: 78px;
}

.employee-login-card__avatar .profile-avatar__fallback {
    font-size: 22px;
}

.employee-login-card__name {
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

.login-modal[hidden] {
    display: none;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.58);
}

.login-modal__panel {
    position: relative;
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    box-shadow: var(--shadow-soft);
}

.login-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 34px;
    width: 34px;
    min-height: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}

.login-modal__title {
    margin: 4px 0 18px 0;
    font-size: 24px;
}

.login-role-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.login-role-choice__option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    font-weight: 800;
    cursor: pointer;
}

.inline-filter {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.user-avatar,
.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, transparent 74%), color-mix(in srgb, var(--accent) 10%, var(--bg-elevated) 90%));
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    color: var(--accent);
    flex: 0 0 auto;
}

.user-avatar {
    width: 42px;
    height: 42px;
}

.user-avatar--sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
    font-weight: 800;
}

.profile-avatar {
    width: 108px;
    height: 108px;
}

.profile-avatar--xl {
    width: 116px;
    height: 116px;
}

.user-avatar img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar--fallback,
.profile-avatar__fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.user-avatar.user-avatar--fallback {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

.user-avatar.user-avatar--sm.user-avatar--fallback {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.profile-avatar__fallback {
    width: 100%;
    height: 100%;
    font-size: 32px;
}

.default-avatar-icon {
    display: block;
    width: 68%;
    height: 68%;
    color: currentColor;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 30%, transparent 70%));
}

.user-avatar--sm .default-avatar-icon {
    width: 76%;
    height: 76%;
}

.profile-layout {
    align-items: start;
}

.profile-hero-card {
    position: relative;
    overflow: hidden;
}

.profile-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent 82%), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--bg-elevated) 72%, var(--accent-soft) 28%), transparent);
    pointer-events: none;
}

.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.profile-hero__copy {
    display: grid;
    gap: 8px;
}

.profile-hero__tagline {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.5;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.employee-hero-card {
    position: relative;
    overflow: hidden;
}

.employee-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 20%, transparent 80%), transparent 38%),
        linear-gradient(125deg, color-mix(in srgb, var(--bg-elevated) 70%, var(--accent-soft) 30%), transparent);
    pointer-events: none;
}

.employee-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 0.85fr);
    gap: 18px;
    align-items: center;
}

.employee-hero__main,
.employee-hero__side {
    position: relative;
}

.employee-hero__tagline {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.55;
    max-width: 760px;
}

.employee-hero__panel {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-elevated) 84%, var(--bg-subtle) 16%);
}

.employee-hero__panel-label {
    margin-bottom: 8px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.employee-dashboard-stats .stat-card {
    min-height: 152px;
}

.dashboard-activity-list {
    display: grid;
    gap: 10px;
}

.dashboard-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-elevated) 82%, var(--bg-subtle) 18%);
}

.dashboard-activity-item--stacked {
    align-items: flex-start;
}

.team-hub-stats {
    margin-top: 4px;
}

.team-hub-guide div strong {
    font-size: 14px;
}

.team-hub-current-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.team-hub-card {
    border-left: 4px solid color-mix(in srgb, var(--accent) 30%, var(--border) 70%);
}

.team-hub-card--pinned {
    border-left-color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent 76%);
}

.team-hub-card__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.team-hub-card__event {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 82%, var(--accent-soft) 18%);
    color: var(--text-soft);
    font-size: 13px;
}

.team-hub-card__body {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.timesheet-period-picker {
    margin-bottom: 16px;
}

.timesheet-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.72fr);
    align-items: start;
}

.timesheet-records-filters {
    margin-bottom: 18px;
}

.timesheet-records-table td {
    white-space: nowrap;
}

.timesheet-records-table td:nth-child(2),
.timesheet-records-table td:nth-child(3) {
    white-space: normal;
}

.timesheet-records-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timesheet-period-picker__meta {
    display: flex;
    align-items: end;
}

.timesheet-entry-table th,
.timesheet-entry-table td {
    min-width: 110px;
}

.timesheet-entry-table td:first-child,
.timesheet-entry-table th:first-child {
    min-width: 126px;
}

.timesheet-entry-table input {
    min-height: 38px;
    padding: 8px 10px;
}

.timesheet-row--weekend td,
.timesheet-row--weekend input {
    opacity: 1;
}

.timesheet-row--holiday td {
    background: color-mix(in srgb, var(--warning-bg) 62%, transparent 38%);
}

.timesheet-row--holiday input[readonly] {
    color: var(--text-soft);
    background: color-mix(in srgb, var(--bg-subtle) 76%, transparent 24%);
    cursor: default;
}

.timesheet-report-card {
    background: #ffffff;
    color: #111111;
    padding: 14px;
}

.timesheet-print-sheet {
    color: #111111;
}

.timesheet-print-header {
    border: 2px solid #222222;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.timesheet-print-header__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 8px;
}

.timesheet-print-header__row:last-child {
    margin-bottom: 0;
}

.timesheet-line-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timesheet-line-item--wide {
    grid-column: 1 / -1;
}

.timesheet-line-item__label {
    min-width: 145px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timesheet-line-item__value {
    flex: 1 1 auto;
    min-height: 20px;
    border-bottom: 1px solid #222222;
    padding: 2px 3px 1px 3px;
    font-size: 12px;
}

.timesheet-print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 10px;
}

.timesheet-print-table th,
.timesheet-print-table td {
    border: 1px solid #222222;
    padding: 3px 4px;
    font-size: 10px;
    color: #111111;
    background: #ffffff;
    line-height: 1.15;
}

.timesheet-print-table th {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timesheet-print-table td:first-child,
.timesheet-print-table th:first-child {
    width: 115px;
}

.timesheet-print-table td:nth-child(2),
.timesheet-print-table td:nth-child(3),
.timesheet-print-table td:nth-child(4),
.timesheet-print-table td:nth-child(5),
.timesheet-print-table th:nth-child(2),
.timesheet-print-table th:nth-child(3),
.timesheet-print-table th:nth-child(4),
.timesheet-print-table th:nth-child(5) {
    width: 90px;
}

.timesheet-print-table tfoot th {
    font-size: 10px;
}

.timesheet-print-cert {
    margin: 8px 0 10px 0;
    font-size: 10px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.timesheet-print-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    margin-bottom: 10px;
}

.timesheet-signature-line {
    min-height: 28px;
    border-bottom: 1px solid #222222;
    display: flex;
    align-items: end;
    gap: 8px;
    padding-bottom: 2px;
    font-size: 10px;
    text-transform: uppercase;
    position: relative;
}

.timesheet-signature-line--signed {
    min-height: 58px;
}

.timesheet-print-signature-img {
    max-width: 260px;
    max-height: 48px;
    object-fit: contain;
    object-position: left bottom;
    filter: contrast(1.18);
}

.timesheet-signature-line em {
    font-size: 13px;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-style: normal;
    text-transform: none;
    margin-bottom: 4px;
}

.timesheet-print-bottom {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 10px;
}

.timesheet-comments-box,
.timesheet-summary-box {
    border: 2px solid #222222;
    background: #ffffff;
}

.timesheet-comments-box {
    min-height: 110px;
}

.timesheet-comments-box__label,
.timesheet-summary-box__title {
    padding: 6px 8px;
    border-bottom: 1px solid #222222;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timesheet-comments-box__content {
    padding: 8px;
    font-size: 11px;
    line-height: 1.3;
}

.timesheet-comments-box__blank {
    min-height: 68px;
}

.timesheet-comments-box__manager-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #bbbbbb;
}

.timesheet-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 8px;
    border-top: 1px solid #222222;
    font-size: 11px;
}

.timesheet-summary-row:first-of-type {
    border-top: 0;
}

.timesheet-summary-row strong {
    font-variant-numeric: tabular-nums;
}

.stack-list {
    display: grid;
    gap: 16px;
}

.queue-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-subtle) 60%, transparent 40%);
    padding: 18px;
}

.queue-card__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 12px;
}

.queue-card__head h3 {
    margin: 0 0 4px 0;
}

.queue-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.queue-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 13px;
}

.review-note {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

.review-form {
    display: grid;
    gap: 10px;
}

.queue-link-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-subtle) 66%, transparent 34%);
}

.queue-link-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.queue-link-card__label {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.queue-link-card__name {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.queue-link-card__period {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.queue-link-card__meta {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.timesheet-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.timesheet-review-layout .timesheet-entry-table input::placeholder {
    color: transparent;
}

.timesheet-review-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.timesheet-review-meta div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elevated) 82%, var(--bg-subtle) 18%);
}

.timesheet-review-meta span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.timesheet-review-meta strong {
    font-size: 14px;
    line-height: 1.35;
}

.timesheet-review-meta .status-pill {
    justify-self: start;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--border);
}

.status-pill--good {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill--bad {
    background: var(--error-bg);
    color: var(--error-text);
}

.status-pill--warn {
    background: var(--accent-soft);
    color: var(--accent);
}

.mini-kv {
    display: grid;
    gap: 8px;
}

.mini-kv div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.button-danger {
    background: #8a2633;
}

.button-danger:hover {
    background: #71202a;
}

.button-row form {
    margin: 0;
}

@media (max-width: 980px) {
    .queue-grid,
    .grid-two,
    .grid-three,
    .grid-four,
    .timesheet-review-meta {
        grid-template-columns: 1fr;
    }

    .queue-card__head {
        flex-direction: column;
    }

    .header-actions {
        justify-content: flex-end;
    }

    .timesheet-print-header__row,
    .timesheet-print-signatures,
    .timesheet-print-bottom {
        grid-template-columns: 1fr;
    }

    .employee-hero {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .employee-hero__side {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .employee-hero {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-avatar--xl {
        width: 88px;
        height: 88px;
    }

    .employee-hero__main,
    .employee-hero__side {
        grid-column: auto;
    }

    .employee-hero__tagline {
        font-size: 14px;
        line-height: 1.5;
        max-width: none;
    }

    .employee-hero__panel {
        padding: 14px;
    }

    .page-title--tight {
        font-size: 24px;
    }
}

/* ******************************-={ 32. ADMIN THEME PICKER }=-****************************** */
.theme-admin-panel {
    display: block;
}

.theme-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.theme-choice-card {
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 142px;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text);
    text-align: center;
    box-shadow: none;
}

.theme-choice-card:hover,
.theme-choice-card.is-active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated) 92%);
}

.theme-choice-card.is-active::after {
    content: "ACTIVE";
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: color-mix(in srgb, var(--bg) 88%, black 12%);
    font-size: 10px;
    font-weight: 900;
}

.theme-choice-card__swatch {
    display: block;
    width: 72px;
    height: 64px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.theme-choice-card__swatch--dark {
    background: linear-gradient(90deg, #11161d 0 55%, #6ea8ff 55% 70%, #1d2430 70% 100%);
}

.theme-choice-card__swatch--light {
    background: linear-gradient(90deg, #f3f5f8 0 55%, #2f7cf6 55% 70%, #ffffff 70% 100%);
}

.theme-choice-card__swatch--cat {
    background: linear-gradient(135deg, #070707 0 42%, #f7c600 42% 56%, #181818 56% 100%);
}

.theme-choice-card__swatch--shield {
    background:
        radial-gradient(circle at 72% 42%, transparent 0 18px, #5ce7ff 19px 21px, transparent 22px 100%),
        linear-gradient(135deg, #07131f 0 48%, #5ce7ff 48% 52%, #111827 52% 72%, #d72f42 72% 78%, #07131f 78% 100%);
}

.theme-choice-card__swatch--sharp-metal {
    background:
        linear-gradient(135deg, transparent 0 34%, #66d9ff 34% 38%, transparent 38% 100%),
        repeating-linear-gradient(110deg, #f4f7f9 0 4px, #8a96a0 4px 8px, #252b31 8px 12px);
}

.theme-choice-card__swatch--carbon {
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(135deg, #151515 0 8px, #050505 8px 16px);
}

.theme-choice-card__swatch--deere {
    background:
        linear-gradient(135deg, #073f22 0 48%, #ffd21f 48% 58%, #0f5b2c 58% 100%);
}

.theme-choice-card__label {
    display: block;
}

.theme-choice-card__label {
    margin-bottom: 0;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
}

.theme-update-modal[hidden] {
    display: none;
}

.theme-update-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.62);
}

.theme-update-modal__panel {
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.theme-update-modal__copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

/* ******************************-={ 33. CAT EQUIPMENT THEME / DESKTOP }=-****************************** */
@media (min-width: 721px) {
    html[data-theme="cat"] {
        --bg: #060606;
        --bg-elevated: #111111;
        --bg-panel: #171717;
        --bg-input: #080808;
        --bg-subtle: #202020;
        --text: #f5f1de;
        --text-soft: #c7b982;
        --text-faint: #8d8261;
        --border: #4b4128;
        --accent: #f7c600;
        --accent-strong: #ffda28;
        --accent-soft: rgba(247, 198, 0, 0.14);
        --success-bg: rgba(61, 188, 105, 0.13);
        --success-text: #93e6a7;
        --error-bg: rgba(231, 80, 47, 0.13);
        --error-text: #ff9c82;
        --chip-road: rgba(247, 198, 0, 0.16);
        --chip-road-text: #ffe270;
        --chip-eq: rgba(188, 188, 188, 0.16);
        --chip-eq-text: #f2f2f2;
        --header-grad-a: #0b0b0b;
        --header-grad-b: #151515;
        --table-stripe: rgba(247, 198, 0, 0.035);
        --shadow-soft: 0 18px 34px rgba(0, 0, 0, 0.46);
        --radius-lg: 4px;
        --radius-md: 3px;
        --radius-sm: 2px;
    }

    html[data-theme="cat"] body {
        background:
            linear-gradient(180deg, rgba(247, 198, 0, 0.08), transparent 160px),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
            radial-gradient(circle at 22% -10%, rgba(247, 198, 0, 0.12), transparent 280px),
            linear-gradient(180deg, #050505 0%, #111111 100%);
    }

    html[data-theme="cat"] .site-header {
        background:
            linear-gradient(90deg, rgba(247, 198, 0, 0.16), transparent 30%),
            linear-gradient(180deg, rgba(9, 9, 9, 0.96), rgba(18, 18, 18, 0.94));
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 10px 0 rgba(0, 0, 0, 0.28);
    }

    html[data-theme="cat"] .brand-inline__icon,
    html[data-theme="cat"] .page-title-icon,
    html[data-theme="cat"] .section-title-icon {
        border-radius: 2px;
        background: linear-gradient(135deg, var(--accent) 0 72%, #111111 72% 100%);
        color: #080808;
        border-color: #ffd83d;
    }

    html[data-theme="cat"] .brand-inline__title,
    html[data-theme="cat"] .page-title,
    html[data-theme="cat"] .section-title--flush {
        text-transform: uppercase;
        font-weight: 1000;
    }

    html[data-theme="cat"] .nav-chip,
    html[data-theme="cat"] .nav-menu summary,
    html[data-theme="cat"] .theme-toggle,
    html[data-theme="cat"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="cat"] .button-link {
        border-radius: 2px;
    }

    html[data-theme="cat"] .nav-chip,
    html[data-theme="cat"] .nav-menu summary {
        border: 1px solid rgba(247, 198, 0, 0.28);
        background: linear-gradient(180deg, #171717, #0d0d0d);
    }

    html[data-theme="cat"] .nav-chip.is-active,
    html[data-theme="cat"] .nav-menu summary:hover,
    html[data-theme="cat"] .nav-chip:hover {
        background: linear-gradient(90deg, var(--accent) 0 6px, #171717 6px 100%);
        color: var(--accent);
    }

    html[data-theme="cat"] .nav-menu__panel,
    html[data-theme="cat"] .user-menu__meta,
    html[data-theme="cat"] .page-card,
    html[data-theme="cat"] .panel-card,
    html[data-theme="cat"] .stat-card,
    html[data-theme="cat"] .form-card,
    html[data-theme="cat"] .table-shell,
    html[data-theme="cat"] .auth-card,
    html[data-theme="cat"] .login-modal__panel {
        border: 1px solid var(--border);
        background:
            linear-gradient(135deg, rgba(247, 198, 0, 0.045), transparent 120px),
            linear-gradient(180deg, #191919, #111111);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            10px 10px 0 rgba(0, 0, 0, 0.30);
    }

    html[data-theme="cat"] .auth-card {
        width: min(760px, 100%);
        border-top: 5px solid var(--accent);
    }

    html[data-theme="cat"] .desktop-employee-login {
        grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
        gap: 14px;
    }

    html[data-theme="cat"] .employee-login-card {
        position: relative;
        min-height: 178px;
        overflow: hidden;
        padding: 18px 12px 16px 12px;
        clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
        border: 1px solid #5a4a22;
        background:
            linear-gradient(135deg, rgba(247, 198, 0, 0.18) 0 34px, transparent 34px),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 11px),
            linear-gradient(180deg, #1b1b1b, #0b0b0b);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            7px 7px 0 rgba(0, 0, 0, 0.34);
    }

    html[data-theme="cat"] .employee-login-card::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 36px;
        height: 36px;
        background: var(--accent);
        clip-path: polygon(100% 0, 100% 100%, 0 0);
    }

    html[data-theme="cat"] .employee-login-card:hover,
    html[data-theme="cat"] .employee-login-card.is-selected {
        transform: translate(-2px, -2px);
        border-color: var(--accent);
        background:
            linear-gradient(135deg, rgba(247, 198, 0, 0.26) 0 34px, transparent 34px),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 11px),
            linear-gradient(180deg, #222222, #101010);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            10px 10px 0 rgba(247, 198, 0, 0.16),
            12px 12px 0 rgba(0, 0, 0, 0.34);
    }

    html[data-theme="cat"] .employee-login-card__avatar,
    html[data-theme="cat"] .user-avatar,
    html[data-theme="cat"] .profile-avatar {
        border-radius: 4px;
        border: 2px solid var(--accent);
        background: linear-gradient(135deg, #f7c600, #5b4a10);
        color: #080808;
    }

    html[data-theme="cat"] .employee-login-card__name {
        color: #fff5b8;
        text-transform: uppercase;
        font-size: 15px;
    }

    html[data-theme="cat"] input,
    html[data-theme="cat"] select,
    html[data-theme="cat"] textarea {
        border-radius: 2px;
        border-color: #5a4a22;
        background: linear-gradient(180deg, #080808, #111111);
        color: var(--text);
        color-scheme: dark;
    }

    html[data-theme="cat"] select option,
    html[data-theme="cat"] select optgroup {
        background: #111111;
        color: #f5f1de;
    }

    html[data-theme="cat"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="cat"] .button-link {
        border-color: #836b12;
        background: linear-gradient(180deg, var(--accent-strong), var(--accent));
        color: #080808;
        font-weight: 900;
        text-transform: uppercase;
    }

    html[data-theme="cat"] .button-link.is-secondary,
    html[data-theme="cat"] .login-modal__close,
    html[data-theme="cat"] .theme-toggle,
    html[data-theme="cat"] .nav-menu summary,
    html[data-theme="cat"] .nav-chip {
        background: linear-gradient(180deg, #202020, #0e0e0e);
        color: var(--text);
    }

    html[data-theme="cat"] .data-table th {
        background: linear-gradient(90deg, var(--accent) 0 6px, #151515 6px 100%);
        color: #ffe78a;
        text-transform: uppercase;
    }

    html[data-theme="cat"] .theme-choice-card--cat {
        clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
    }

    html[data-theme="shield"] {
        --bg: #050b12;
        --bg-elevated: #0b1724;
        --bg-panel: #0e1b2a;
        --bg-input: #08111c;
        --bg-subtle: #14263a;
        --text: #e9f8ff;
        --text-soft: #9ec5d7;
        --text-faint: #5f8296;
        --border: #24465c;
        --accent: #5ce7ff;
        --accent-strong: #94f3ff;
        --accent-soft: rgba(92, 231, 255, 0.12);
        --success-bg: rgba(76, 213, 159, 0.12);
        --success-text: #8df1ca;
        --error-bg: rgba(215, 47, 66, 0.14);
        --error-text: #ff7b8a;
        --chip-road: rgba(92, 231, 255, 0.13);
        --chip-road-text: #9ff3ff;
        --chip-eq: rgba(215, 47, 66, 0.13);
        --chip-eq-text: #ff9aa5;
        --header-grad-a: #08111c;
        --header-grad-b: #101f31;
        --table-stripe: rgba(92, 231, 255, 0.035);
        --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
        --radius-lg: 8px;
        --radius-md: 6px;
        --radius-sm: 4px;
    }

    html[data-theme="shield"] body {
        background:
            linear-gradient(90deg, rgba(92, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(92, 231, 255, 0.035) 1px, transparent 1px),
            radial-gradient(circle at 78% 8%, rgba(92, 231, 255, 0.15), transparent 300px),
            radial-gradient(circle at 18% 26%, rgba(215, 47, 66, 0.08), transparent 260px),
            linear-gradient(180deg, #04080e 0%, #08111c 100%);
        background-size:
            36px 36px,
            36px 36px,
            auto,
            auto,
            auto;
    }

    html[data-theme="shield"] .site-header {
        background:
            linear-gradient(90deg, rgba(92, 231, 255, 0.18), transparent 32%, rgba(215, 47, 66, 0.10)),
            rgba(5, 11, 18, 0.92);
        border-bottom: 1px solid rgba(92, 231, 255, 0.45);
        box-shadow:
            0 0 24px rgba(92, 231, 255, 0.14),
            inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }

    html[data-theme="shield"] .brand-inline__icon,
    html[data-theme="shield"] .page-title-icon,
    html[data-theme="shield"] .section-title-icon {
        border-radius: 50%;
        border-color: rgba(92, 231, 255, 0.62);
        background:
            radial-gradient(circle, rgba(92, 231, 255, 0.20) 0 42%, transparent 43% 56%, rgba(92, 231, 255, 0.18) 57% 100%),
            linear-gradient(180deg, #0d2133, #06101a);
        color: var(--accent);
        box-shadow:
            inset 0 0 16px rgba(92, 231, 255, 0.16),
            0 0 16px rgba(92, 231, 255, 0.18);
    }

    html[data-theme="shield"] .brand-inline__kicker,
    html[data-theme="shield"] .eyebrow,
    html[data-theme="shield"] .stat-label {
        color: var(--accent);
        letter-spacing: 0.16em;
    }

    html[data-theme="shield"] .page-title,
    html[data-theme="shield"] .brand-inline__title,
    html[data-theme="shield"] .section-title--flush {
        text-transform: uppercase;
        text-shadow: 0 0 16px rgba(92, 231, 255, 0.20);
    }

    html[data-theme="shield"] .nav-chip,
    html[data-theme="shield"] .nav-menu summary,
    html[data-theme="shield"] .theme-toggle,
    html[data-theme="shield"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="shield"] .button-link {
        border-radius: 5px;
    }

    html[data-theme="shield"] .nav-chip,
    html[data-theme="shield"] .nav-menu summary {
        border: 1px solid rgba(92, 231, 255, 0.24);
        background:
            linear-gradient(135deg, rgba(92, 231, 255, 0.10), transparent 48%),
            rgba(8, 17, 28, 0.72);
    }

    html[data-theme="shield"] .nav-chip.is-active,
    html[data-theme="shield"] .nav-menu summary:hover,
    html[data-theme="shield"] .nav-chip:hover {
        border-color: rgba(92, 231, 255, 0.7);
        background:
            linear-gradient(90deg, rgba(92, 231, 255, 0.24), rgba(92, 231, 255, 0.06)),
            #08111c;
        color: var(--accent-strong);
        box-shadow: 0 0 18px rgba(92, 231, 255, 0.12);
    }

    html[data-theme="shield"] .nav-menu__panel,
    html[data-theme="shield"] .user-menu__meta,
    html[data-theme="shield"] .page-card,
    html[data-theme="shield"] .panel-card,
    html[data-theme="shield"] .stat-card,
    html[data-theme="shield"] .form-card,
    html[data-theme="shield"] .table-shell,
    html[data-theme="shield"] .auth-card,
    html[data-theme="shield"] .login-modal__panel {
        position: relative;
        border: 1px solid rgba(92, 231, 255, 0.28);
        background:
            linear-gradient(135deg, rgba(92, 231, 255, 0.09), transparent 140px),
            linear-gradient(180deg, rgba(14, 27, 42, 0.94), rgba(6, 16, 26, 0.96));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            inset 0 0 28px rgba(92, 231, 255, 0.035),
            0 16px 36px rgba(0, 0, 0, 0.34);
    }

    html[data-theme="shield"] .page-card::before,
    html[data-theme="shield"] .panel-card::before,
    html[data-theme="shield"] .auth-card::before,
    html[data-theme="shield"] .login-modal__panel::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        background:
            linear-gradient(90deg, var(--accent) 0 46px, transparent 46px calc(100% - 46px), var(--accent) calc(100% - 46px) 100%) top / 100% 1px no-repeat,
            linear-gradient(90deg, var(--accent) 0 26px, transparent 26px calc(100% - 26px), var(--accent) calc(100% - 26px) 100%) bottom / 100% 1px no-repeat;
        opacity: 0.52;
    }

    html[data-theme="shield"] .auth-card {
        width: min(780px, 100%);
    }

    html[data-theme="shield"] .desktop-employee-login {
        grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
        gap: 14px;
    }

    html[data-theme="shield"] .employee-login-card {
        position: relative;
        min-height: 176px;
        overflow: hidden;
        padding: 18px 12px 16px 12px;
        border: 1px solid rgba(92, 231, 255, 0.34);
        border-radius: 6px;
        background:
            linear-gradient(135deg, rgba(92, 231, 255, 0.16), transparent 42%),
            repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
            linear-gradient(180deg, rgba(12, 27, 43, 0.98), rgba(5, 12, 20, 0.98));
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.035),
            0 0 18px rgba(92, 231, 255, 0.08);
    }

    html[data-theme="shield"] .employee-login-card::before,
    html[data-theme="shield"] .employee-login-card::after {
        content: "";
        position: absolute;
        pointer-events: none;
    }

    html[data-theme="shield"] .employee-login-card::before {
        inset: 8px;
        border: 1px solid rgba(92, 231, 255, 0.20);
        clip-path: polygon(0 0, 38px 0, 38px 1px, 1px 1px, 1px 38px, 0 38px, 0 0, 100% 0, 100% 38px, calc(100% - 1px) 38px, calc(100% - 1px) 1px, calc(100% - 38px) 1px, calc(100% - 38px) 0);
    }

    html[data-theme="shield"] .employee-login-card::after {
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(92, 231, 255, 0.5), transparent);
    }

    html[data-theme="shield"] .employee-login-card:hover,
    html[data-theme="shield"] .employee-login-card.is-selected {
        transform: translateY(-2px);
        border-color: var(--accent);
        background:
            linear-gradient(135deg, rgba(92, 231, 255, 0.24), transparent 46%),
            repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 8px),
            linear-gradient(180deg, #102a42, #07131f);
        box-shadow:
            0 0 0 1px rgba(92, 231, 255, 0.18),
            0 0 26px rgba(92, 231, 255, 0.20);
    }

    html[data-theme="shield"] .employee-login-card__avatar,
    html[data-theme="shield"] .user-avatar,
    html[data-theme="shield"] .profile-avatar {
        border-radius: 50%;
        border: 1px solid rgba(92, 231, 255, 0.72);
        background:
            radial-gradient(circle, rgba(92, 231, 255, 0.18) 0 46%, transparent 47% 56%, rgba(92, 231, 255, 0.16) 57% 100%),
            #06101a;
        color: var(--accent);
        box-shadow: 0 0 18px rgba(92, 231, 255, 0.18);
    }

    html[data-theme="shield"] .employee-login-card__name {
        color: #dffaff;
        text-transform: uppercase;
        font-size: 14px;
        letter-spacing: 0.08em;
    }

    html[data-theme="shield"] input,
    html[data-theme="shield"] select,
    html[data-theme="shield"] textarea {
        border-radius: 5px;
        border-color: rgba(92, 231, 255, 0.30);
        background:
            linear-gradient(180deg, rgba(8, 17, 28, 0.92), rgba(4, 10, 17, 0.96));
        color: var(--text);
        color-scheme: dark;
        box-shadow: inset 0 0 18px rgba(92, 231, 255, 0.035);
    }

    html[data-theme="shield"] select option,
    html[data-theme="shield"] select optgroup {
        background: #08111c;
        color: #e9f8ff;
    }

    html[data-theme="shield"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="shield"] .button-link {
        border-color: rgba(92, 231, 255, 0.48);
        background:
            linear-gradient(90deg, rgba(92, 231, 255, 0.22), rgba(92, 231, 255, 0.08)),
            #08111c;
        color: var(--accent-strong);
        font-weight: 900;
        text-transform: uppercase;
    }

    html[data-theme="shield"] .button-link.is-secondary,
    html[data-theme="shield"] .login-modal__close,
    html[data-theme="shield"] .theme-toggle {
        background:
            linear-gradient(90deg, rgba(215, 47, 66, 0.16), rgba(92, 231, 255, 0.08)),
            #08111c;
        color: var(--text);
    }

    html[data-theme="shield"] .data-table th {
        background:
            linear-gradient(90deg, rgba(92, 231, 255, 0.20), rgba(215, 47, 66, 0.10)),
            #08111c;
        color: var(--accent-strong);
        text-transform: uppercase;
    }

    html[data-theme="shield"] .theme-choice-card--shield {
        border-color: rgba(92, 231, 255, 0.48);
    }

    html[data-theme="sharp-metal"],
    html[data-theme="carbon"],
    html[data-theme="deere"] {
        --success-bg: rgba(61, 188, 105, 0.13);
        --success-text: #93e6a7;
        --error-bg: rgba(231, 80, 47, 0.13);
        --error-text: #ff9c82;
        --radius-lg: 6px;
        --radius-md: 4px;
        --radius-sm: 3px;
    }

    html[data-theme="sharp-metal"] {
        --bg: #0a0d10;
        --bg-elevated: #161b20;
        --bg-panel: #1d2329;
        --bg-input: #0b0f13;
        --bg-subtle: #2a3239;
        --text: #f5f8fb;
        --text-soft: #b8c4cc;
        --text-faint: #7d8a92;
        --border: #66737d;
        --accent: #66d9ff;
        --accent-strong: #a8efff;
        --accent-soft: rgba(102, 217, 255, 0.13);
        --chip-road: rgba(102, 217, 255, 0.13);
        --chip-road-text: #a8efff;
        --chip-eq: rgba(198, 205, 211, 0.16);
        --chip-eq-text: #f5f8fb;
        --header-grad-a: #171c21;
        --header-grad-b: #090c10;
        --table-stripe: rgba(255, 255, 255, 0.035);
        --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.42);
    }

    html[data-theme="carbon"] {
        --bg: #040404;
        --bg-elevated: #101010;
        --bg-panel: #151515;
        --bg-input: #070707;
        --bg-subtle: #202020;
        --text: #f4f4f0;
        --text-soft: #b8b2a8;
        --text-faint: #777067;
        --border: #373737;
        --accent: #ff8a1f;
        --accent-strong: #ffb15a;
        --accent-soft: rgba(255, 138, 31, 0.14);
        --chip-road: rgba(255, 138, 31, 0.14);
        --chip-road-text: #ffbd75;
        --chip-eq: rgba(160, 160, 160, 0.16);
        --chip-eq-text: #efefef;
        --header-grad-a: #111111;
        --header-grad-b: #050505;
        --table-stripe: rgba(255, 138, 31, 0.032);
        --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.48);
    }

    html[data-theme="deere"] {
        --bg: #061b10;
        --bg-elevated: #0b2a18;
        --bg-panel: #0f351f;
        --bg-input: #06170e;
        --bg-subtle: #174627;
        --text: #f6f2ce;
        --text-soft: #cad8a3;
        --text-faint: #8da06f;
        --border: #315f31;
        --accent: #ffd21f;
        --accent-strong: #ffe573;
        --accent-soft: rgba(255, 210, 31, 0.14);
        --chip-road: rgba(255, 210, 31, 0.14);
        --chip-road-text: #ffe573;
        --chip-eq: rgba(59, 166, 83, 0.20);
        --chip-eq-text: #baf0b9;
        --header-grad-a: #0d3a1f;
        --header-grad-b: #061b10;
        --table-stripe: rgba(255, 210, 31, 0.035);
        --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.42);
    }

    html[data-theme="sharp-metal"] body {
        background:
            linear-gradient(125deg, rgba(102, 217, 255, 0.08), transparent 260px),
            repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 18px),
            linear-gradient(180deg, #080b0e, #161b20);
    }

    html[data-theme="carbon"] body {
        background:
            repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 12px),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 8px, transparent 8px 16px),
            linear-gradient(180deg, #030303, #101010);
    }

    html[data-theme="deere"] body {
        background:
            linear-gradient(180deg, rgba(255, 210, 31, 0.07), transparent 180px),
            linear-gradient(135deg, rgba(28, 93, 43, 0.28), transparent 42%),
            linear-gradient(180deg, #04140c, #0b2717);
    }

    html[data-theme="sharp-metal"] .site-header,
    html[data-theme="carbon"] .site-header,
    html[data-theme="deere"] .site-header {
        background: linear-gradient(180deg, color-mix(in srgb, var(--header-grad-a) 88%, white 12%), var(--header-grad-b));
        border-bottom: 2px solid var(--accent);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
    }

    html[data-theme="sharp-metal"] .brand-inline__icon,
    html[data-theme="sharp-metal"] .page-title-icon,
    html[data-theme="sharp-metal"] .section-title-icon,
    html[data-theme="carbon"] .brand-inline__icon,
    html[data-theme="carbon"] .page-title-icon,
    html[data-theme="carbon"] .section-title-icon,
    html[data-theme="deere"] .brand-inline__icon,
    html[data-theme="deere"] .page-title-icon,
    html[data-theme="deere"] .section-title-icon {
        border-radius: 3px;
        background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 42%, var(--bg) 58%));
        color: color-mix(in srgb, var(--bg) 86%, black 14%);
        border-color: var(--accent-strong);
    }

    html[data-theme="sharp-metal"] .nav-chip,
    html[data-theme="sharp-metal"] .nav-menu summary,
    html[data-theme="carbon"] .nav-chip,
    html[data-theme="carbon"] .nav-menu summary,
    html[data-theme="deere"] .nav-chip,
    html[data-theme="deere"] .nav-menu summary {
        border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border) 70%);
        border-radius: 3px;
        background: linear-gradient(180deg, var(--bg-subtle), var(--bg-input));
    }

    html[data-theme="sharp-metal"] .page-card,
    html[data-theme="sharp-metal"] .panel-card,
    html[data-theme="sharp-metal"] .stat-card,
    html[data-theme="sharp-metal"] .form-card,
    html[data-theme="sharp-metal"] .table-shell,
    html[data-theme="sharp-metal"] .auth-card,
    html[data-theme="carbon"] .page-card,
    html[data-theme="carbon"] .panel-card,
    html[data-theme="carbon"] .stat-card,
    html[data-theme="carbon"] .form-card,
    html[data-theme="carbon"] .table-shell,
    html[data-theme="carbon"] .auth-card,
    html[data-theme="deere"] .page-card,
    html[data-theme="deere"] .panel-card,
    html[data-theme="deere"] .stat-card,
    html[data-theme="deere"] .form-card,
    html[data-theme="deere"] .table-shell,
    html[data-theme="deere"] .auth-card {
        border-color: color-mix(in srgb, var(--accent) 22%, var(--border) 78%);
        background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent 92%), transparent 150px),
            linear-gradient(180deg, var(--bg-panel), color-mix(in srgb, var(--bg-panel) 72%, black 28%));
    }

    html[data-theme="sharp-metal"] .employee-login-card,
    html[data-theme="carbon"] .employee-login-card,
    html[data-theme="deere"] .employee-login-card {
        border-radius: 3px;
        border-color: color-mix(in srgb, var(--accent) 36%, var(--border) 64%);
        background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent 85%), transparent 46%),
            linear-gradient(180deg, var(--bg-elevated), var(--bg-input));
    }

    html[data-theme="sharp-metal"] input,
    html[data-theme="sharp-metal"] select,
    html[data-theme="sharp-metal"] textarea,
    html[data-theme="carbon"] input,
    html[data-theme="carbon"] select,
    html[data-theme="carbon"] textarea,
    html[data-theme="deere"] input,
    html[data-theme="deere"] select,
    html[data-theme="deere"] textarea {
        border-color: color-mix(in srgb, var(--accent) 30%, var(--border) 70%);
        background: linear-gradient(180deg, var(--bg-input), color-mix(in srgb, var(--bg-input) 80%, black 20%));
        color: var(--text);
        color-scheme: dark;
    }

    html[data-theme="sharp-metal"] select option,
    html[data-theme="sharp-metal"] select optgroup,
    html[data-theme="carbon"] select option,
    html[data-theme="carbon"] select optgroup,
    html[data-theme="deere"] select option,
    html[data-theme="deere"] select optgroup {
        background: var(--bg-input);
        color: var(--text);
    }

    html[data-theme="sharp-metal"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="sharp-metal"] .button-link,
    html[data-theme="carbon"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="carbon"] .button-link,
    html[data-theme="deere"] button:not(.employee-login-card):not(.theme-choice-card),
    html[data-theme="deere"] .button-link {
        border-color: var(--accent);
        background: linear-gradient(180deg, var(--accent-strong), var(--accent));
        color: color-mix(in srgb, var(--bg) 88%, black 12%);
        font-weight: 900;
        text-transform: uppercase;
    }

    html[data-theme="sharp-metal"] .theme-choice-card--sharp-metal,
    html[data-theme="carbon"] .theme-choice-card--carbon,
    html[data-theme="deere"] .theme-choice-card--deere {
        border-color: var(--accent);
    }
}

.grade-district-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.grade-district-tab {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.88rem;
}

.grade-district-tab:hover,
.grade-district-tab.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}

.grade-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 800;
}

.grade-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.grade-swatch {
    width: 24px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.grade-swatch--0 { background: #303741; }
.grade-swatch--1 { background: #276749; }
.grade-swatch--3 { background: #d69e2e; }
.grade-swatch--5 { background: #c53030; }

.grade-filter-panel {
    padding: 12px 14px;
}

.grade-filter-panel .filter-grid {
    align-items: end;
}

.grade-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.grade-summary-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.grade-summary-strip strong {
    margin-left: 5px;
    color: var(--text);
    font-size: 0.92rem;
}

.grade-map-shell {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel);
    overflow: hidden;
}

.grade-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.grade-map-count {
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.grade-heat-map {
    width: 100%;
    height: min(68vh, 640px);
    min-height: 430px;
    background: var(--bg-input);
}

.rcrd-local-map-base {
    background:
        linear-gradient(0deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        #eef2f7;
    background-size: 42px 42px;
}

.rcrd-local-map-base--fallback {
    background: #eef2f7;
}

.leaflet-tooltip.rcrd-base-place-label,
.leaflet-tooltip.rcrd-base-road-label,
.leaflet-tooltip.rcrd-base-water-label {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
    white-space: nowrap;
}

.leaflet-tooltip.rcrd-base-place-label::before,
.leaflet-tooltip.rcrd-base-road-label::before,
.leaflet-tooltip.rcrd-base-water-label::before {
    display: none !important;
}

.leaflet-tooltip.rcrd-base-place-label {
    color: rgba(15, 23, 42, 0.84);
    font-size: 12px;
    font-weight: 800;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9),
        1px 0 0 rgba(255, 255, 255, 0.85),
        -1px 0 0 rgba(255, 255, 255, 0.85);
}

.leaflet-tooltip.rcrd-base-road-label {
    color: rgba(71, 85, 105, 0.82);
    font-size: 10px;
    font-weight: 700;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.86),
        1px 0 0 rgba(255, 255, 255, 0.82),
        -1px 0 0 rgba(255, 255, 255, 0.82);
}

.leaflet-tooltip.rcrd-base-road-label--major {
    color: rgba(15, 23, 42, 0.94);
    font-size: 11px;
    font-weight: 900;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.94),
        1px 0 0 rgba(255, 255, 255, 0.9),
        -1px 0 0 rgba(255, 255, 255, 0.9),
        0 0 4px rgba(255, 255, 255, 0.72);
}

.leaflet-tooltip.rcrd-base-water-label {
    color: rgba(14, 116, 144, 0.78);
    font-size: 10px;
    font-style: italic;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.84);
}

/* Leaflet core layout rules. Kept local so the map stays intact even if CDN CSS is blocked. */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-container {
    overflow: hidden;
    position: relative;
    outline-offset: 1px;
    font-family: inherit;
    touch-action: pan-x pan-y;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
    user-select: none;
    -webkit-user-drag: none;
}

.leaflet-tile {
    filter: inherit;
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-map-pane {
    z-index: 400;
}

.leaflet-tile-pane {
    z-index: 200;
}

.leaflet-overlay-pane {
    z-index: 400;
}

.leaflet-shadow-pane {
    z-index: 500;
}

.leaflet-marker-pane {
    z-index: 600;
}

.leaflet-tooltip-pane {
    z-index: 650;
}

.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top {
    top: 0;
}

.leaflet-right {
    right: 0;
}

.leaflet-bottom {
    bottom: 0;
}

.leaflet-left {
    left: 0;
}

.leaflet-control {
    float: left;
    clear: both;
}

.leaflet-right .leaflet-control {
    float: right;
}

.leaflet-top .leaflet-control {
    margin-top: 10px;
}

.leaflet-bottom .leaflet-control {
    margin-bottom: 10px;
}

.leaflet-left .leaflet-control {
    margin-left: 10px;
}

.leaflet-right .leaflet-control {
    margin-right: 10px;
}

.leaflet-control-zoom a {
    display: block;
    width: 30px;
    height: 30px;
    border-bottom: 1px solid #ccc;
    background: #fff;
    color: #111;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
}

.leaflet-control-zoom a:last-child {
    border-bottom: 0;
}

.rcrd-map-toggle-control {
    border: 1px solid rgba(15, 23, 42, 0.38);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.22);
}

.rcrd-map-toggle-control__button {
    display: block;
    min-width: 78px;
    height: 30px;
    border: 0;
    border-radius: 3px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    font: 800 12px/30px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
}

.rcrd-map-toggle-control__button.is-active {
    background: #111827;
    color: #ffffff;
}

.rcrd-map-toggle-control__button.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.leaflet-popup {
    position: absolute;
    margin-bottom: 20px;
    text-align: center;
}

.leaflet-popup-content-wrapper {
    padding: 1px;
    border-radius: 6px;
    text-align: left;
}

.leaflet-popup-content {
    min-width: 140px;
    margin: 11px 13px;
    line-height: 1.35;
}

.leaflet-popup-tip-container {
    overflow: hidden;
    position: absolute;
    left: 50%;
    width: 40px;
    height: 20px;
    margin-left: -20px;
}

.leaflet-popup-tip {
    width: 17px;
    height: 17px;
    margin: -10px auto 0;
    transform: rotate(45deg);
}

.leaflet-tooltip {
    position: absolute;
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: color-mix(in srgb, var(--bg-panel) 90%, transparent 10%);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

.leaflet-tooltip-pane {
    pointer-events: none;
}

.leaflet-interactive {
    cursor: pointer;
}

.leaflet-control-attribution {
    padding: 2px 6px;
    font-size: 11px;
}

.split-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.mini-section-title {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 0.9rem;
    letter-spacing: 0;
}

.fringe-calculator input[readonly] {
    color: var(--text);
    background: color-mix(in srgb, var(--bg-panel) 86%, var(--accent) 14%);
    font-weight: 800;
}

.fringe-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fringe-results .summary-tile {
    display: grid;
    gap: 4px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
}

.fringe-results .summary-tile span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.fringe-results .summary-tile strong {
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.1;
}

.compact-table td,
.compact-table th {
    padding-top: 9px;
    padding-bottom: 9px;
}

@media (max-width: 760px) {
    .split-header {
        display: grid;
    }

    .fringe-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .fringe-results {
        grid-template-columns: 1fr;
    }
}

.grade-heat-map .leaflet-popup-content-wrapper,
.grade-heat-map .leaflet-popup-tip {
    background: var(--bg-panel);
    color: var(--text);
    border: 1px solid var(--border);
}

.grade-heat-map .leaflet-control-attribution {
    background: color-mix(in srgb, var(--bg-panel) 88%, transparent 12%);
    color: var(--text-faint);
}

.grade-heat-map .grade-road-label {
    display: none;
    padding: 2px 5px;
    border: 1px solid color-mix(in srgb, var(--text) 32%, transparent 68%);
    border-radius: 3px;
    background: color-mix(in srgb, var(--bg-panel) 76%, transparent 24%);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-shadow: 0 1px 2px var(--bg);
    text-transform: uppercase;
}

.grade-heat-map.is-showing-road-labels .grade-road-label {
    display: block;
}

.grade-heat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 7px;
}

.grade-road-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 7px;
    min-height: 48px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 12px rgba(0, 0, 0, 0.14);
}

.grade-road-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 42%);
    pointer-events: none;
}

.grade-road-card:hover,
.grade-road-card.is-selected {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px var(--accent-soft), 0 14px 26px rgba(0, 0, 0, 0.22);
}

.grade-road-card__name,
.grade-road-card__count,
.grade-road-card__meta {
    position: relative;
    z-index: 1;
}

.grade-road-card__name {
    align-self: start;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.grade-road-card__count {
    align-self: start;
    justify-self: end;
    min-width: 28px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1;
    text-align: center;
}

.grade-road-card__meta {
    grid-column: 1 / -1;
    align-self: end;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.64rem;
    font-weight: 800;
}

.grade-road-modal__card {
    width: min(980px, calc(100vw - 28px));
    max-height: min(86vh, 760px);
    overflow: auto;
}

.grade-modal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.grade-modal-stats span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-soft);
    font-weight: 800;
    font-size: 0.82rem;
}

.grade-modal-stats strong {
    color: var(--text);
}

.grade-modal-table-shell {
    max-height: 390px;
    overflow: auto;
}

.grade-road-card--level-0 {
    background: linear-gradient(145deg, #394150, #242a33);
    color: #e6edf6;
}

.grade-road-card--level-1 {
    background: linear-gradient(145deg, #2f855a, #22543d);
}

.grade-road-card--level-2 {
    background: linear-gradient(145deg, #68a84f, #327340);
}

.grade-road-card--level-3 {
    background: linear-gradient(145deg, #d69e2e, #975a16);
}

.grade-road-card--level-4 {
    background: linear-gradient(145deg, #dd6b20, #9c4221);
}

.grade-road-card--level-5 {
    background: linear-gradient(145deg, #e53e3e, #8b1e1e);
}

@media (max-width: 720px) {
    .grade-heat-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }

    .grade-road-card {
        min-height: 48px;
    }

    .grade-map-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .grade-map-count {
        white-space: normal;
    }

    .grade-heat-map {
        height: 62vh;
        min-height: 340px;
    }

    .user-avatar.user-avatar--fallback {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .user-avatar.user-avatar--sm.user-avatar--fallback {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .user-avatar--fallback .default-avatar-icon {
        width: 68%;
        height: 68%;
        max-width: 68%;
        max-height: 68%;
    }

    html[data-theme="cat"] {
        --bg: #060606;
        --bg-elevated: #111111;
        --bg-panel: #171717;
        --bg-input: #080808;
        --bg-subtle: #202020;
        --text: #f5f1de;
        --text-soft: #c7b982;
        --text-faint: #8d8261;
        --border: #4b4128;
        --accent: #f7c600;
        --accent-strong: #ffda28;
        --accent-soft: rgba(247, 198, 0, 0.14);
        --success-bg: rgba(61, 188, 105, 0.13);
        --success-text: #93e6a7;
        --error-bg: rgba(231, 80, 47, 0.13);
        --error-text: #ff9c82;
        --chip-road: rgba(247, 198, 0, 0.16);
        --chip-road-text: #ffe270;
        --chip-eq: rgba(188, 188, 188, 0.16);
        --chip-eq-text: #f2f2f2;
        --header-grad-a: #0b0b0b;
        --header-grad-b: #151515;
        --table-stripe: rgba(247, 198, 0, 0.035);
    }

    html[data-theme="shield"] {
        --bg: #050b12;
        --bg-elevated: #0b1724;
        --bg-panel: #0e1b2a;
        --bg-input: #08111c;
        --bg-subtle: #14263a;
        --text: #e9f8ff;
        --text-soft: #9ec5d7;
        --text-faint: #5f8296;
        --border: #24465c;
        --accent: #5ce7ff;
        --accent-strong: #94f3ff;
        --accent-soft: rgba(92, 231, 255, 0.12);
        --success-bg: rgba(76, 213, 159, 0.12);
        --success-text: #8df1ca;
        --error-bg: rgba(215, 47, 66, 0.14);
        --error-text: #ff7b8a;
        --chip-road: rgba(92, 231, 255, 0.13);
        --chip-road-text: #9ff3ff;
        --chip-eq: rgba(215, 47, 66, 0.13);
        --chip-eq-text: #ff9aa5;
        --header-grad-a: #08111c;
        --header-grad-b: #101f31;
        --table-stripe: rgba(92, 231, 255, 0.035);
    }

    html[data-theme="sharp-metal"] {
        --bg: #0a0d10;
        --bg-elevated: #161b20;
        --bg-panel: #1d2329;
        --bg-input: #0b0f13;
        --bg-subtle: #2a3239;
        --text: #f5f8fb;
        --text-soft: #b8c4cc;
        --text-faint: #7d8a92;
        --border: #66737d;
        --accent: #66d9ff;
        --accent-strong: #a8efff;
        --accent-soft: rgba(102, 217, 255, 0.13);
        --chip-road: rgba(102, 217, 255, 0.13);
        --chip-road-text: #a8efff;
        --chip-eq: rgba(198, 205, 211, 0.16);
        --chip-eq-text: #f5f8fb;
        --header-grad-a: #171c21;
        --header-grad-b: #090c10;
        --table-stripe: rgba(255, 255, 255, 0.035);
    }

    html[data-theme="carbon"] {
        --bg: #040404;
        --bg-elevated: #101010;
        --bg-panel: #151515;
        --bg-input: #070707;
        --bg-subtle: #202020;
        --text: #f4f4f0;
        --text-soft: #b8b2a8;
        --text-faint: #777067;
        --border: #373737;
        --accent: #ff8a1f;
        --accent-strong: #ffb15a;
        --accent-soft: rgba(255, 138, 31, 0.14);
        --chip-road: rgba(255, 138, 31, 0.14);
        --chip-road-text: #ffbd75;
        --chip-eq: rgba(160, 160, 160, 0.16);
        --chip-eq-text: #efefef;
        --header-grad-a: #111111;
        --header-grad-b: #050505;
        --table-stripe: rgba(255, 138, 31, 0.032);
    }

    html[data-theme="deere"] {
        --bg: #061b10;
        --bg-elevated: #0b2a18;
        --bg-panel: #0f351f;
        --bg-input: #06170e;
        --bg-subtle: #174627;
        --text: #f6f2ce;
        --text-soft: #cad8a3;
        --text-faint: #8da06f;
        --border: #315f31;
        --accent: #ffd21f;
        --accent-strong: #ffe573;
        --accent-soft: rgba(255, 210, 31, 0.14);
        --chip-road: rgba(255, 210, 31, 0.14);
        --chip-road-text: #ffe573;
        --chip-eq: rgba(59, 166, 83, 0.20);
        --chip-eq-text: #baf0b9;
        --header-grad-a: #0d3a1f;
        --header-grad-b: #061b10;
        --table-stripe: rgba(255, 210, 31, 0.035);
    }
}

@media (max-width: 720px) {
    .desktop-employee-login {
        display: none !important;
    }

    .mobile-login-form {
        display: block !important;
    }
}

@media (min-width: 721px) {
    .desktop-employee-login {
        display: grid;
    }

    .mobile-login-form {
        display: none;
    }
}

.employee-nav-card {
    display: grid;
    gap: 18px;
}

.employee-nav-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.employee-nav-card__head .soft-note {
    max-width: 330px;
    margin-top: 0;
    text-align: right;
}

.employee-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.employee-action-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 12px;
    min-height: 86px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    border-radius: 12px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent 86%), transparent 58%),
        color-mix(in srgb, var(--bg-elevated) 84%, var(--bg-subtle) 16%);
    color: var(--text);
}

.employee-action-tile > span {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.employee-action-tile svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.employee-action-tile strong {
    align-self: end;
    font-size: 1rem;
    line-height: 1.12;
}

.employee-action-tile small {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.25;
}

.employee-action-tile:hover {
    text-decoration: none;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.employee-nav-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.employee-nav-group {
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-input) 66%, var(--bg-panel) 34%);
}

.employee-nav-group h4 {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-nav-links {
    display: grid;
    gap: 7px;
}

.employee-nav-links a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text);
    background: color-mix(in srgb, var(--bg-elevated) 56%, transparent 44%);
}

.employee-nav-links a > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.employee-nav-links svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.employee-nav-links span:last-child {
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.15;
}

.employee-nav-links a:hover {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
    background: var(--accent-soft);
    color: var(--accent);
}

@media (max-width: 960px) {
    .employee-nav-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .employee-nav-card {
        gap: 14px;
        padding: 14px;
    }

    .employee-nav-card__head {
        display: grid;
        gap: 4px;
    }

    .employee-nav-card__head .soft-note {
        max-width: none;
        text-align: left;
    }

    .employee-action-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .employee-action-tile {
        min-height: 72px;
        padding: 13px;
        border-radius: 10px;
    }

    .employee-action-tile > span {
        width: 38px;
        height: 38px;
    }

    .employee-nav-groups {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .employee-nav-group {
        padding: 12px;
        border-radius: 10px;
    }

    .employee-nav-links {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .employee-nav-links a {
        min-height: 46px;
        padding: 8px;
    }

    .employee-nav-links span:last-child {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .employee-nav-links {
        grid-template-columns: 1fr;
    }
}

/* Keep header dropdowns as independent scroll panels in every theme. */
.site-header,
.site-header__inner,
.compact-bar,
.header-nav-shell,
.compact-nav,
.header-actions,
.nav-menu {
    overflow: visible;
}

.nav-menu {
    position: relative;
}

.nav-menu[open] {
    z-index: 9000;
}

.nav-menu__panel,
html[data-theme="cat"] .nav-menu__panel,
html[data-theme="shield"] .nav-menu__panel,
html[data-theme="sharp-metal"] .nav-menu__panel,
html[data-theme="carbon"] .nav-menu__panel,
html[data-theme="deere"] .nav-menu__panel {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 9100;
    max-height: min(70vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}

.nav-menu__panel--right,
.header-actions .nav-menu__panel,
html[data-theme="cat"] .nav-menu__panel--right,
html[data-theme="shield"] .nav-menu__panel--right,
html[data-theme="sharp-metal"] .nav-menu__panel--right,
html[data-theme="carbon"] .nav-menu__panel--right,
html[data-theme="deere"] .nav-menu__panel--right {
    left: auto;
    right: 0;
}

.nav-menu__panel .user-menu__mobile-links {
    max-height: none;
    overflow: visible;
}

@media (max-width: 720px) {
    .nav-menu__panel,
    html[data-theme="cat"] .nav-menu__panel,
    html[data-theme="shield"] .nav-menu__panel,
    html[data-theme="sharp-metal"] .nav-menu__panel,
    html[data-theme="carbon"] .nav-menu__panel,
    html[data-theme="deere"] .nav-menu__panel {
        position: absolute !important;
        top: calc(100% + 8px);
        min-width: min(280px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
        max-height: min(72vh, 620px);
        margin-top: 0;
    }

    .header-actions .nav-menu__panel {
        right: 0;
        left: auto;
    }
}
.log-photo-upload {
    border: 1px solid var(--border-color, #334155);
    background: rgba(15, 23, 42, .18);
    padding: 14px;
}

.log-photo-upload input[type="file"] {
    width: 100%;
}

.log-photo-previews,
.log-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 108px));
    gap: 9px;
    margin-top: 10px;
}

.log-photo-preview,
.log-photo-gallery a {
    display: block;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, .35);
    background: rgba(15, 23, 42, .35);
    overflow: hidden;
}

.log-photo-preview img,
.log-photo-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.log-photo-preview span {
    display: block;
    padding: 5px 6px;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-photo-gallery a:hover,
.log-photo-gallery a:focus-visible {
    border-color: var(--accent, #2f80ed);
}
