:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #059669;
    --warning: #d97706;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    font-weight: 800;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.brand strong {
    display: block;
    font-size: 18px;
}

.brand span,
.sidebar-footer small {
    color: #94a3b8;
    font-size: 13px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 36px;
}

.sidebar-nav a {
    padding: 13px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    transition: 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
}

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

.topbar {
    min-height: 96px;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(245, 247, 251, 0.82);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar h1,
.panel h2,
.auth-card h1,
.auth-hero h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.topbar-user,
.user-pill,
.action-row,
.table-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    padding: 8px 12px 8px 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.user-pill span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e0ecff;
    color: var(--primary);
    font-weight: 800;
}

.page-content {
    padding: 0 30px 40px;
}

.alert {
    margin: 0 30px 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.alert-success { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.alert-danger { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.alert-info { border-color: #bfdbfe; color: #1e40af; background: #eff6ff; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

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

.stat-card {
    padding: 22px;
}

.stat-card span,
.stat-card small,
.muted,
table small,
.load-card small {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin: 10px 0 4px;
    font-size: 34px;
    letter-spacing: -0.04em;
}

.stat-card.highlight {
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    border: none;
}

.stat-card.highlight span,
.stat-card.highlight small {
    color: rgba(255,255,255,0.78);
}

.content-grid {
    display: grid;
    gap: 18px;
}

.two-col {
    grid-template-columns: 1.7fr 1fr;
}

.panel {
    padding: 22px;
}

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

.dark-panel {
    background: #0f172a;
    color: #fff;
    border: none;
}

.timeline {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.timeline div {
    position: relative;
    padding-left: 30px;
}

.timeline span {
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #38bdf8;
}

.timeline p {
    margin: 4px 0 0;
    color: #94a3b8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn-sm {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-light {
    background: #f3f4f6;
    color: #111827;
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-block {
    width: 100%;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    background: #f9fafb;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: 0;
}

.text-right {
    text-align: right;
}

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

.table-actions form {
    margin: 0;
}

.empty,
.empty-card {
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #e0ecff; color: #1d4ed8; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-dark { background: #e5e7eb; color: #111827; }
.badge-muted { background: #f3f4f6; color: #6b7280; }

.form-panel {
    max-width: 980px;
}

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

.form-stack {
    display: grid;
    gap: 14px;
}

label span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 13px;
    padding: 12px 13px;
    outline: none;
    transition: 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.span-2 {
    grid-column: span 2;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    min-width: 240px;
}

.quick-links {
    margin: -4px 0 16px;
}

.quick-links a,
.edit-link {
    color: var(--primary);
    font-weight: 800;
}

.kanban-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 310px;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-column {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}

.kanban-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kanban-title span {
    font-weight: 900;
}

.kanban-title strong {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 9px;
}

.kanban-list {
    display: grid;
    gap: 12px;
}

.load-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.load-card-top,
.load-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.load-card-top span {
    color: var(--success);
    font-weight: 900;
}

.load-card p {
    margin: 12px 0 2px;
    font-weight: 800;
}

.load-meta {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.status-form {
    margin-top: 12px;
}

.status-form select {
    padding: 9px 10px;
    border-radius: 10px;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.18), transparent 32%),
        #f8fafc;
}

.auth-wrapper {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 22px;
}

.auth-card,
.auth-hero {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.auth-card {
    padding: 34px;
}

.brand-auth {
    margin-bottom: 36px;
}

.auth-card h1 {
    font-size: 36px;
}

.auth-card .muted {
    margin-bottom: 24px;
    line-height: 1.6;
}

.demo-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.demo-box strong,
.demo-box span {
    display: block;
}

.demo-box span {
    color: var(--muted);
    margin-top: 4px;
}

.auth-hero {
    min-height: 560px;
    padding: 28px;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.15), rgba(37, 99, 235, 0.15)),
        linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0891b2);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.auth-hero::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 70px solid rgba(255,255,255,0.08);
    top: -90px;
    right: -90px;
}

.hero-panel {
    position: relative;
    width: 100%;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.22);
}

.hero-panel .eyebrow {
    color: #bae6fd;
}

.hero-panel h2 {
    max-width: 520px;
    font-size: 42px;
}

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

.hero-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
}

.hero-grid strong,
.hero-grid span {
    display: block;
}

.hero-grid span {
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    margin-top: 3px;
}

.mobile-menu {
    display: none;
    border: 0;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .stats-grid,
    .two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 360px;
    }
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-105%);
        transition: 0.2s ease;
        width: 280px;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .mobile-menu {
        display: inline-flex;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 18px;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .page-content {
        padding: 0 18px 28px;
    }

    .alert {
        margin: 0 18px 18px;
    }

    .stats-grid,
    .two-col,
    .form-grid,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .panel-header,
    .page-actions,
    .action-row,
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input {
        min-width: auto;
    }

    .auth-card {
        padding: 24px;
    }

    .auth-hero {
        display: none;
    }
}

.compact-stats .stat-card strong { font-size: 26px; }
.section-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 8px 0 12px; }
.section-title-row h3 { margin:0; letter-spacing:-.02em; }
.line-items { padding: 16px; border: 1px dashed var(--border); border-radius: 18px; background: #fafafa; }
.line-item-row { display:grid; grid-template-columns: 1fr 170px auto; gap:10px; margin-bottom:10px; }
.stop-row { display:grid; grid-template-columns: 130px 1.4fr 190px 1fr 1fr auto; gap:10px; margin-bottom:10px; }
.linked-documents { margin-top: 18px; }
.mini-list { display:grid; gap:10px; }
.two-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-card { display:block; padding:14px; border:1px solid var(--border); border-radius:16px; background:#fff; }
.mini-card strong, .mini-card span { display:block; }
.mini-card span { margin-top:4px; color:var(--muted); font-size:13px; line-height:1.5; }
.danger-left { border-left: 5px solid var(--danger); }
.warning-left { border-left: 5px solid var(--warning); }
.driver-load-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px; }
.driver-load-card { display:block; padding:18px; border:1px solid var(--border); border-radius:18px; background:#fff; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.driver-load-card p { font-weight:800; line-height:1.45; }
.detail-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; margin-bottom:18px; }
.detail-grid div { padding:14px; border:1px solid var(--border); border-radius:16px; background:#f8fafc; }
.detail-grid small, .detail-grid strong, .detail-grid span { display:block; }
.detail-grid small { color:var(--muted); margin-bottom:6px; }
.detail-grid span { color:var(--muted); margin-top:5px; }
.invoice-head { display:flex; justify-content:space-between; gap:18px; border-bottom:1px solid var(--border); padding-bottom:22px; margin-bottom:22px; }
.invoice-head h2, .invoice-head h3 { margin:0; }
.invoice-meta-grid { display:grid; grid-template-columns: 1.4fr 1.4fr 1fr; gap:14px; margin-bottom:22px; }
.invoice-meta-grid div { padding:16px; border:1px solid var(--border); border-radius:16px; background:#f8fafc; }
.invoice-meta-grid small, .invoice-meta-grid strong { display:block; }
.invoice-meta-grid small { color:var(--muted); margin-bottom:6px; }
.invoice-table { min-width: auto; }
.invoice-table tfoot td { border-bottom:0; }
.auth-card .demo-box span + strong { margin-top:8px; }

@media print {
    body { background:#fff; }
    .sidebar, .topbar, .no-print, .alert, .content-grid > .content-grid { display:none !important; }
    .app-shell { display:block; }
    .page-content { padding:0; }
    .panel { box-shadow:none; border:0; border-radius:0; }
    .invoice-preview { padding:0; }
}

@media (max-width: 1180px) {
    .driver-load-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stop-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .line-item-row, .stop-row, .detail-grid, .invoice-meta-grid, .two-mini, .driver-load-grid { grid-template-columns: 1fr; }
    .invoice-head { flex-direction:column; }
}

/* Driver mobile workflow, location, and image upload UX */
hr.soft-separator { border:0; border-top:1px solid var(--border); margin:18px 0; }
.driver-mobile-toolbar { display:flex; gap:10px; margin-bottom:16px; }
.driver-load-page .panel { overflow:hidden; }
.driver-hero-card { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.route-card { display:grid; grid-template-columns: 1fr auto 1fr; gap:14px; align-items:center; padding:16px; border:1px solid var(--border); border-radius:18px; background:#fff; margin-bottom:16px; }
.route-card small, .route-card strong, .route-card span { display:block; }
.route-card small { color:var(--muted); margin-bottom:5px; font-weight:800; }
.route-card strong { line-height:1.35; }
.route-card span { color:var(--muted); margin-top:5px; font-size:13px; }
.route-arrow { width:34px; height:34px; display:grid; place-items:center; border-radius:999px; color:#1d4ed8; background:#e0ecff; font-weight:900; }
.driver-stops-list { display:grid; gap:12px; }
.driver-stop-card { display:grid; gap:12px; padding:14px; border:1px solid var(--border); border-radius:18px; background:#fff; }
.driver-stop-card.completed { background:#f0fdf4; border-color:#bbf7d0; }
.stop-main { display:flex; gap:12px; align-items:flex-start; }
.stop-number { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:999px; background:#e0ecff; color:#1d4ed8; font-weight:900; }
.driver-stop-card.completed .stop-number { background:#dcfce7; color:#166534; }
.stop-main strong, .stop-main p, .stop-main small { display:block; }
.stop-main p { margin:4px 0 0; color:var(--muted); }
.stop-main small { margin-top:4px; color:#166534; font-weight:800; }
.stop-actions { display:flex; flex-wrap:wrap; gap:8px; }
.inline-form { margin:0; }
.doc-gallery { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.doc-tile { display:block; padding:14px; border:1px solid var(--border); border-radius:16px; background:#fff; min-height:105px; }
.doc-tile strong, .doc-tile span, .doc-tile small { display:block; }
.doc-tile span { color:var(--muted); margin-top:6px; font-size:13px; word-break:break-word; }
.doc-tile small { color:var(--muted); margin-top:5px; line-height:1.4; }
.selected-stop-note { padding:10px 12px; border-radius:12px; background:#f8fafc; border:1px dashed #cbd5e1; color:var(--muted); font-size:13px; font-weight:700; }
.compact-timeline { max-height:360px; overflow:auto; padding-right:6px; }
.compact-timeline div { padding-bottom:4px; }
.location-card { display:grid; gap:10px; padding:16px; border-radius:18px; border:1px solid var(--border); background:#f8fafc; }
.location-card strong, .location-card span, .location-card small { display:block; }
.location-card span, .location-card small { color:var(--muted); }
.location-history { margin-top:12px; }
.load-admin-edit { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); align-items:start; }
.sticky-mobile-card { position:sticky; top:118px; }

@media (max-width: 1180px) {
    .load-admin-edit { grid-template-columns:1fr; }
    .sticky-mobile-card { position:static; }
}

@media (max-width: 860px) {
    body { background:#f8fafc; }
    .topbar { position:sticky; top:0; min-height:auto; border-bottom:1px solid var(--border); }
    .topbar h1 { font-size:24px; }
    .user-pill div:not(.avatar) { display:none; }
    .topbar-user form .btn { padding:9px 11px; }
    .panel { padding:16px; border-radius:18px; box-shadow:0 10px 28px rgba(15,23,42,.06); }
    .panel-header { flex-direction:column; align-items:stretch; gap:10px; }
    .panel-header .btn { width:100%; }
    .btn { min-height:44px; }
    .btn-sm { min-height:38px; }
    input, select, textarea { min-height:46px; font-size:16px; }
    .driver-mobile-toolbar { position:sticky; top:82px; z-index:12; background:rgba(248,250,252,.92); backdrop-filter:blur(12px); padding:10px 0; }
    .driver-mobile-toolbar .btn { flex:1; }
    .driver-load-page { gap:14px; }
    .route-card { grid-template-columns:1fr; }
    .route-arrow { transform:rotate(90deg); margin:auto; }
    .mobile-detail-grid { grid-template-columns:1fr; }
    .driver-stop-card { padding:13px; }
    .stop-actions { display:grid; grid-template-columns:1fr; }
    .stop-actions .btn, .stop-actions form { width:100%; }
    .doc-gallery { grid-template-columns:1fr; }
    .driver-action-panel { gap:14px; }
    .form-actions { display:grid; grid-template-columns:1fr; width:100%; }
    .form-actions .btn { width:100%; }
    .table-actions { display:grid; grid-template-columns:1fr; align-items:stretch; }
    .table-actions .btn, .table-actions form, .table-actions button { width:100%; }
    .kanban-board { grid-auto-columns:86vw; }
    .sidebar { box-shadow: 30px 0 60px rgba(15,23,42,.25); }
    body.sidebar-open::after { content:''; position:fixed; inset:0; background:rgba(15,23,42,.42); z-index:90; }
    body.sidebar-open .sidebar { z-index:101; }
}

@media (max-width: 520px) {
    .page-content { padding:0 12px 24px; }
    .alert { margin:0 12px 14px; }
    .topbar { padding:14px 12px; }
    .stats-grid { gap:12px; }
    .stat-card strong { font-size:28px; }
    .driver-load-card { padding:15px; }
    .load-card-top { flex-direction:column; }
    .auth-body { padding:14px; }
    .auth-card { border-radius:22px; padding:20px; }
}

/* Complete operations portals */
.nav-group { display:block; margin:22px 12px 7px; color:#94a3b8; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin:0 0 18px; }
.page-heading h1 { margin:2px 0 6px; font-size:30px; letter-spacing:-.035em; }
.page-heading p { margin:0; color:var(--muted); max-width:720px; line-height:1.55; }
.page-actions,.button-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.form-stack { display:grid; gap:15px; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.form-stack label,.form-grid label { display:grid; gap:7px; }
.form-stack label>span,.form-grid label>span,.field-title { font-size:13px; font-weight:800; color:#334155; }
.permission-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:9px; }
.permission-option { display:flex !important; align-items:center; gap:9px; padding:11px 12px; background:#f8fafc; border:1px solid var(--border); border-radius:13px; }
.permission-option input { width:18px; height:18px; min-height:auto; }
.permission-option span { font-weight:700; font-size:13px; }
.status-text { font-size:22px !important; }
.checklist-list { display:grid; gap:9px; }
.checklist-row { display:grid; grid-template-columns:minmax(0,1fr) 145px auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--border); border-radius:14px; background:#fff; }
.checklist-row strong,.checklist-row small { display:block; }
.checklist-row small { color:var(--muted); margin-top:3px; }
.task-board { display:grid; gap:12px; }
.task-card { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:15px; border:1px solid var(--border); border-left:5px solid #94a3b8; border-radius:16px; background:#fff; }
.task-card.priority-high { border-left-color:#f59e0b; }.task-card.priority-urgent { border-left-color:#dc2626; }.task-card.priority-low { border-left-color:#60a5fa; }
.task-card strong,.task-card p,.task-card small { display:block; }.task-card strong { margin-top:8px; }.task-card p { margin:6px 0; color:#475569; }.task-card small { color:var(--muted); }
.tracking-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,.7fr); gap:18px; align-items:start; }
.tracking-map-panel { padding:10px; }
#tracking-map { height:calc(100vh - 190px); min-height:520px; border-radius:16px; overflow:hidden; }
.tracking-list-card { width:100%; text-align:left; cursor:pointer; }
.live-tracking-card { border:1px solid #bfdbfe; background:linear-gradient(145deg,#eff6ff,#fff); }
.tracking-state { padding:7px 10px; border-radius:999px; font-size:12px; font-weight:800; background:#e2e8f0; color:#475569; }
.tracking-state.is-live { background:#dcfce7; color:#166534; position:relative; padding-left:26px; }
.tracking-state.is-live::before { content:''; position:absolute; left:10px; top:50%; width:8px; height:8px; border-radius:50%; background:#16a34a; transform:translateY(-50%); box-shadow:0 0 0 5px rgba(22,163,74,.12); }
.mobile-card-list { display:grid; gap:10px; }
.mobile-record-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--border); border-radius:15px; background:#fff; }
.mobile-record-card strong,.mobile-record-card span { display:block; }.mobile-record-card span { color:var(--muted); font-size:13px; margin-top:4px; }
.align-right { text-align:right; }
.journal-line { grid-template-columns:1.1fr 1.2fr .55fr .55fr; }
.border-driver-card { border-color:#c4b5fd; background:linear-gradient(145deg,#f5f3ff,#fff); }
body.is-offline::before { content:'Offline - updates will resume when your connection returns'; position:fixed; z-index:1000; left:50%; top:8px; transform:translateX(-50%); padding:8px 14px; border-radius:999px; background:#7f1d1d; color:#fff; font-size:12px; font-weight:800; }

/* Professional invoice print preview */
.invoice-preview { max-width:980px; margin:auto; background:#fff; }
.invoice-preview .invoice-head { padding:26px; margin:-24px -24px 24px; background:linear-gradient(135deg,#f8fafc,#eef2ff); }
.invoice-table thead th { background:#0f172a; color:#fff; }
.invoice-table tfoot tr:last-child td { font-size:18px; font-weight:900; }

@media (max-width:1100px){
  .tracking-layout { grid-template-columns:1fr; }
  #tracking-map { height:480px; min-height:420px; }
  .permission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:860px){
  .page-heading { flex-direction:column; align-items:stretch; }
  .page-heading h1 { font-size:25px; }
  .page-actions,.button-row { display:grid; grid-template-columns:1fr; width:100%; }
  .page-actions .btn,.button-row .btn { width:100%; }
  .form-grid.two,.form-grid.three,.permission-grid,.journal-line { grid-template-columns:1fr; }
  .checklist-row { grid-template-columns:1fr; }
  .task-card,.mobile-record-card { flex-direction:column; align-items:stretch; }
  .task-card form { display:grid; grid-template-columns:1fr; }
  .align-right { text-align:left; }
  #tracking-map { height:55vh; min-height:360px; }
  .tracking-layout { gap:12px; }
  .driver-page .panel { padding:14px; }
  .driver-page .page-heading { position:relative; }
}
@media (max-width:520px){
  .page-heading h1 { font-size:23px; }
  .stat-card { padding:16px; }
  .checklist-row,.mobile-record-card,.task-card { border-radius:14px; }
  #tracking-map { min-height:330px; }
}

/* Daily-use navigation, search, notifications, and calendar */
.global-search{display:flex;gap:.5rem;align-items:center;min-width:280px;max-width:460px;flex:1;margin-left:auto}.global-search input{width:100%;min-height:40px;border:1px solid var(--border,#dbe2ea);border-radius:10px;padding:.65rem .8rem;background:#fff}.notification-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.55rem .75rem;border:1px solid var(--border,#dbe2ea);border-radius:10px;background:#fff;color:inherit;text-decoration:none;font-weight:700}.notification-button span{position:absolute;right:-7px;top:-8px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;display:grid;place-items:center}.nav-count{float:right;min-width:22px;padding:1px 6px;border-radius:999px;background:rgba(255,255,255,.14);text-align:center}.notification-list{padding:0;overflow:hidden}.notification-item{display:grid;grid-template-columns:5px 1fr auto;gap:1rem;align-items:center;padding:1rem 1.1rem;border-bottom:1px solid var(--border,#e5e7eb)}.notification-item:last-child{border-bottom:0}.notification-item.is-unread{background:#f8fbff}.notification-item p{margin:.25rem 0;color:var(--muted,#64748b)}.notification-level{height:100%;min-height:52px;border-radius:999px;background:#94a3b8}.level-success{background:#16a34a}.level-warning{background:#f59e0b}.level-danger{background:#dc2626}.level-info{background:#2563eb}.result-list{display:grid}.result-list a{display:flex;justify-content:space-between;gap:1rem;padding:.85rem 0;border-bottom:1px solid var(--border,#e5e7eb);color:inherit;text-decoration:none}.result-list a:last-child{border-bottom:0}.result-list a span{font-weight:700;color:var(--primary,#2563eb)}.calendar-card{overflow:auto}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));min-width:1050px}.calendar-head>div{padding:.7rem;text-align:center;font-weight:800;color:var(--muted,#64748b);border-bottom:1px solid var(--border,#e5e7eb)}.calendar-day{min-height:150px;padding:.6rem;border-right:1px solid var(--border,#e5e7eb);border-bottom:1px solid var(--border,#e5e7eb);background:#fff}.calendar-day.is-empty{background:#f8fafc}.calendar-day.is-today{background:#eff6ff}.calendar-date{font-weight:800;margin-bottom:.45rem}.calendar-event{display:block;margin:.35rem 0;padding:.5rem;border-radius:8px;text-decoration:none;color:#0f172a;background:#eef2ff;border-left:3px solid #6366f1;font-size:.78rem}.calendar-event.event-delivery{background:#ecfdf5;border-left-color:#10b981}.calendar-event strong,.calendar-event span,.calendar-event small{display:block}.calendar-event small{margin-top:.2rem;color:#64748b}.button-row{display:flex;gap:.5rem;flex-wrap:wrap}.info-list{display:grid;gap:.75rem}.info-list>div{display:grid;gap:.2rem;padding:.75rem;border:1px solid var(--border,#e5e7eb);border-radius:10px}.info-list span{color:var(--muted,#64748b)}
@media(max-width:1100px){.topbar{flex-wrap:wrap}.global-search{order:3;flex-basis:100%;max-width:none;margin-left:0}.topbar-title{flex:1}.topbar-user .user-pill{display:none}}
@media(max-width:680px){.global-search .btn{display:none}.topbar-user form .btn{padding:.55rem}.notification-item{grid-template-columns:4px 1fr}.notification-item form{grid-column:2}.calendar-card{margin-left:-.25rem;margin-right:-.25rem}.page-heading .inline-form{width:100%}.page-heading .inline-form input{flex:1;min-width:130px}}
.invoice-brand{display:flex;gap:1rem;align-items:flex-start}.invoice-brand img{width:72px;height:72px;object-fit:contain;border-radius:10px;border:1px solid var(--border,#e5e7eb);background:#fff}
@media(max-width:680px){.invoice-brand img{width:52px;height:52px}.invoice-head{gap:1rem}}
.card{background:var(--panel,#fff);border:1px solid var(--border,#e5e7eb);border-radius:var(--radius,16px);box-shadow:var(--shadow,0 10px 30px rgba(15,23,42,.06));padding:22px}.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.table-card{padding:0;overflow:hidden}.table-card>.card-header{padding:20px 22px 0}.table-card>.table-wrap{border:0}.compact-form{align-content:start}.field{display:grid;gap:7px}.field>span{font-size:13px;font-weight:800;color:#334155}.field-full{grid-column:1/-1}
@media(max-width:680px){.card{padding:14px;border-radius:18px}.card-header{flex-direction:column;align-items:stretch}.table-card{padding:0}.table-card>.card-header{padding:16px 14px 0}}

/* FleetLume brand */
.brand-mark-image {
    overflow: hidden;
    padding: 4px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}
.brand-mark-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.sidebar-footer strong,
.sidebar-footer small {
    display: block;
}
.sidebar-footer strong {
    margin-bottom: 4px;
    font-size: 13px;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-logo {
    display: inline-block;
    margin: -6px 0 30px;
}
.auth-logo img {
    display: block;
    width: min(290px, 100%);
    height: auto;
}
.auth-help {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}
.auth-help a {
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
}

/* Public website */
.landing-body {
    --landing-navy: #071f5b;
    --landing-blue: #1553ff;
    --landing-cyan: #12cfc3;
    --landing-ink: #0b1736;
    --landing-muted: #5b6781;
    background: #fff;
    color: var(--landing-ink);
}
.landing-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}
.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}
.landing-nav {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.landing-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.landing-brand img {
    display: block;
    width: auto;
    max-width: 238px;
    height: 57px;
    object-fit: contain;
}
.landing-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}
.landing-links a {
    color: #38445e;
    font-size: 14px;
    font-weight: 750;
}
.landing-links a:hover {
    color: var(--landing-blue);
}
.landing-login {
    margin-left: 4px;
}
.landing-hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 96px;
    background:
        radial-gradient(circle at 78% 20%, rgba(18, 207, 195, 0.18), transparent 28%),
        radial-gradient(circle at 8% 0%, rgba(21, 83, 255, 0.14), transparent 32%),
        linear-gradient(180deg, #f9fbff 0%, #fff 100%);
}
.landing-hero::after {
    content: '';
    position: absolute;
    width: 680px;
    height: 680px;
    right: -360px;
    bottom: -490px;
    border: 100px solid rgba(21, 83, 255, 0.045);
    border-radius: 50%;
    pointer-events: none;
}
.landing-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    gap: 64px;
    align-items: center;
}
.landing-kicker {
    margin: 0 0 12px;
    color: var(--landing-blue);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 900;
}
.landing-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(44px, 5.3vw, 72px);
    line-height: 1.03;
    letter-spacing: -.055em;
}
.landing-lead,
.landing-copy {
    color: var(--landing-muted);
    font-size: 18px;
    line-height: 1.72;
}
.landing-lead {
    max-width: 720px;
    margin: 26px 0 0;
}
.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}
.btn-lg {
    min-height: 52px;
    padding: 14px 21px;
    border-radius: 15px;
}
.landing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.landing-trust-row span {
    padding: 8px 11px;
    border: 1px solid #dbe6ff;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #40506e;
    font-size: 12px;
    font-weight: 800;
}
.landing-visual {
    position: relative;
    min-height: 560px;
    display: grid;
    place-items: center;
}
.landing-logo-card {
    width: min(490px, 100%);
    padding: 40px 34px;
    border: 1px solid rgba(99, 128, 190, 0.18);
    border-radius: 38px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 40px 90px rgba(7,31,91,.14);
    transform: rotate(-1.5deg);
}
.landing-logo-card img {
    display: block;
    width: 100%;
    height: auto;
}
.landing-metric {
    position: absolute;
    max-width: 220px;
    padding: 15px 17px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 20px 50px rgba(7,31,91,.14);
}
.landing-metric strong,
.landing-metric span {
    display: block;
}
.landing-metric strong {
    color: var(--landing-blue);
    font-size: 14px;
}
.landing-metric span {
    margin-top: 4px;
    color: #63708a;
    font-size: 12px;
    line-height: 1.45;
}
.metric-one { top: 48px; right: -12px; }
.metric-two { bottom: 48px; left: -20px; }
.landing-section {
    padding: 96px 0;
}
.landing-section-alt {
    background: #f6f9ff;
}
.landing-section-heading {
    max-width: 780px;
    margin: 0 auto 44px;
    text-align: center;
}
.landing-section-heading h2,
.landing-split h2,
.landing-cta h2 {
    margin: 0;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.landing-section-heading > p:last-child {
    margin: 18px auto 0;
    color: var(--landing-muted);
    font-size: 17px;
    line-height: 1.7;
}
.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.landing-feature-grid article {
    padding: 28px;
    border: 1px solid #e1e8f4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(7,31,91,.055);
}
.landing-feature-grid article > span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #e9efff;
    color: var(--landing-blue);
    font-weight: 900;
    font-size: 12px;
}
.landing-feature-grid h3 {
    margin: 20px 0 10px;
    font-size: 20px;
    letter-spacing: -.02em;
}
.landing-feature-grid p {
    margin: 0;
    color: var(--landing-muted);
    line-height: 1.65;
}
.landing-split {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 74px;
    align-items: center;
}
.landing-split-reverse {
    grid-template-columns: minmax(330px, .82fr) minmax(0, 1.18fr);
}
.landing-role-list {
    display: grid;
    gap: 12px;
}
.landing-role-list > div {
    padding: 18px 20px;
    border: 1px solid #dfe7f5;
    border-radius: 18px;
    background: #fff;
}
.landing-role-list strong,
.landing-role-list span {
    display: block;
}
.landing-role-list strong {
    color: var(--landing-navy);
}
.landing-role-list span {
    margin-top: 5px;
    color: var(--landing-muted);
    line-height: 1.55;
}
.landing-phone {
    width: min(330px, 100%);
    margin: 0 auto;
    padding: 12px;
    border: 9px solid #071638;
    border-radius: 42px;
    background: #071638;
    box-shadow: 0 35px 80px rgba(7,31,91,.2);
}
.phone-top {
    width: 96px;
    height: 20px;
    margin: -2px auto 7px;
    border-radius: 999px;
    background: #020a1c;
}
.phone-screen {
    min-height: 540px;
    padding: 30px 20px;
    border-radius: 29px;
    background: linear-gradient(180deg, #f7faff, #eef4ff);
}
.phone-screen img {
    display: block;
    margin: 0 auto 15px;
    object-fit: contain;
}
.phone-screen > small,
.phone-screen > strong {
    display: block;
    text-align: center;
}
.phone-screen > small {
    color: var(--landing-blue);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 900;
}
.phone-screen > strong {
    margin-top: 7px;
    font-size: 23px;
}
.phone-status {
    margin: 20px 0;
    padding: 11px 13px;
    border-radius: 13px;
    background: #e6faef;
    color: #167344;
    font-size: 13px;
    font-weight: 800;
}
.phone-status span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: #18a65d;
    box-shadow: 0 0 0 5px rgba(24,166,93,.12);
}
.phone-stop {
    margin-top: 11px;
    padding: 15px;
    border: 1px solid #dce5f6;
    border-radius: 15px;
    background: #fff;
}
.phone-stop b,
.phone-stop span {
    display: block;
}
.phone-stop span {
    margin-top: 5px;
    color: var(--landing-muted);
    font-size: 12px;
}
.landing-checks {
    display: grid;
    gap: 13px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}
.landing-checks li {
    position: relative;
    padding-left: 30px;
    color: #35435f;
    line-height: 1.55;
}
.landing-checks li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ddfbf4;
    color: #087f6e;
    font-size: 12px;
    font-weight: 900;
}
.landing-section-dark {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(18,207,195,.22), transparent 30%),
        linear-gradient(135deg, #06183f, #0a2a72 60%, #124fcf);
}
.landing-section-heading.light h2 {
    color: #fff;
}
.landing-section-heading.light > p:last-child {
    color: #c7d5f0;
}
.landing-section-dark .landing-kicker {
    color: #67f2e5;
}
.landing-finance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.landing-finance-grid > div {
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
}
.landing-finance-grid strong,
.landing-finance-grid span {
    display: block;
}
.landing-finance-grid span {
    margin-top: 9px;
    color: #cad7ef;
    line-height: 1.6;
    font-size: 14px;
}
.landing-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.landing-faq details {
    padding: 20px 22px;
    border: 1px solid #e0e7f2;
    border-radius: 18px;
    background: #fff;
}
.landing-faq summary {
    cursor: pointer;
    font-weight: 850;
    line-height: 1.4;
}
.landing-faq details p {
    margin: 13px 0 0;
    color: var(--landing-muted);
    line-height: 1.65;
}
.landing-cta {
    padding: 20px 0 96px;
}
.landing-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 42px 46px;
    border: 1px solid #d9e4fa;
    border-radius: 30px;
    background:
        radial-gradient(circle at right top, rgba(18,207,195,.18), transparent 34%),
        #f4f8ff;
}
.landing-cta-card h2 {
    max-width: 760px;
    font-size: clamp(30px, 3.8vw, 48px);
}
.landing-footer {
    padding: 42px 0;
    border-top: 1px solid #e4eaf3;
    background: #f8faff;
}
.landing-footer .landing-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
}
.landing-footer .landing-brand img {
    max-width: 198px;
    height: 48px;
}
.landing-footer p,
.landing-footer span {
    margin: 0;
    color: #69758d;
    font-size: 13px;
}
.landing-footer span {
    text-align: right;
}

@media (max-width: 1040px) {
    .landing-links { display: none; }
    .landing-login { margin-left: auto; }
    .landing-hero-grid,
    .landing-split,
    .landing-split-reverse { grid-template-columns: 1fr; }
    .landing-hero-copy { text-align: center; }
    .landing-lead { margin-left: auto; margin-right: auto; }
    .landing-actions,
    .landing-trust-row { justify-content: center; }
    .landing-visual { min-height: 500px; width: min(620px, 100%); margin: 0 auto; }
    .landing-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-split { gap: 44px; }
    .landing-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .landing-container { width: min(100% - 28px, 1180px); }
    .landing-nav { min-height: 68px; gap: 12px; }
    .landing-brand img { max-width: 175px; height: 42px; }
    .landing-login { padding: 10px 13px; font-size: 13px; }
    .landing-hero { padding: 58px 0 70px; }
    .landing-hero h1 { font-size: clamp(39px, 12vw, 55px); }
    .landing-lead { font-size: 16px; }
    .landing-actions { display: grid; grid-template-columns: 1fr; }
    .landing-actions .btn { width: 100%; }
    .landing-visual { min-height: 410px; }
    .landing-logo-card { padding: 27px 22px; border-radius: 28px; }
    .landing-metric { max-width: 180px; padding: 12px; }
    .metric-one { top: 14px; right: -4px; }
    .metric-two { bottom: 10px; left: -4px; }
    .landing-section { padding: 70px 0; }
    .landing-feature-grid,
    .landing-finance-grid,
    .landing-faq-grid { grid-template-columns: 1fr; }
    .landing-feature-grid article { padding: 22px; }
    .landing-cta-card { flex-direction: column; align-items: stretch; padding: 30px 24px; }
    .landing-cta-card .btn { width: 100%; }
    .landing-footer .landing-container { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .landing-footer span { text-align: center; }
    .auth-help { flex-direction: column; }
}

/* FleetLume carrier-network and responsive operations refresh */
:root {
    --surface-soft: #f6f8fc;
    --surface-blue: #eef5ff;
    --navy-950: #071b45;
    --cyan-soft: #e8fbfa;
}
html, body { max-width: 100%; overflow-x: hidden; }
.page-content { width: min(100%, 1680px); margin-inline: auto; }
.panel, .card, .stat-card, .load-card, .mobile-record-card { min-width: 0; }
.panel-header > div, .page-heading > div, .topbar-title, .table-route, .driver-stop-card > * { min-width: 0; }
.panel-header h2, .page-heading h1, .topbar h1, .mini-card span, .load-card p, td, th { overflow-wrap: anywhere; }

.form-section {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, #fff, #fbfcff);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .035);
}
.form-section + .form-section { margin-top: 18px; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.form-section-head h3 { margin: 2px 0 4px; font-size: 20px; letter-spacing: -.025em; }
.form-section-head p { margin: 0; }
.section-chip, .reefer-badge, .requirement-chips span {
    display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 6px 10px;
    background: var(--surface-blue); color: #1d4ed8; font-size: 12px; font-weight: 800; line-height: 1.2;
}
.reefer-badge { background: var(--cyan-soft); color: #087f78; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.toggle-option { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 10px !important; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; }
.toggle-option input { width: 18px; height: 18px; flex: 0 0 auto; }
.toggle-option.toggle-primary { background: var(--surface-blue); border-color: #c8dcff; }
[data-reefer-fields].is-disabled, [data-load-reefer-fields].is-disabled { opacity: .55; filter: grayscale(.15); }

.financial-preview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.financial-preview > div { padding: 15px 16px; border: 1px solid #dce5f2; border-radius: 16px; background: var(--surface-soft); }
.financial-preview span, .reefer-reading-grid span, .financial-summary-list span { display: block; color: var(--muted); font-size: 12px; font-weight: 750; }
.financial-preview strong, .reefer-reading-grid strong { display: block; margin-top: 5px; color: var(--navy-950); font-size: 18px; }
.financial-cell { display: grid; gap: 4px; min-width: 125px; }
.financial-cell span { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.financial-cell strong { color: var(--text); }

.stop-row-expanded { grid-template-columns: 110px minmax(220px,1.5fr) 185px minmax(140px,1fr) 90px 80px 130px minmax(160px,1fr) auto !important; align-items: end; }
.stop-row-expanded > * { min-width: 0; }
.table-route { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; margin-top: 7px; font-size: 12px; color: var(--muted); }
.table-route span { color: #2563eb; font-weight: 900; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-links a { padding: 8px 11px; border-radius: 10px; background: var(--surface-blue); font-size: 13px; font-weight: 750; }

.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 30px; margin-bottom: 18px; background: radial-gradient(circle at 92% 10%, rgba(34,211,238,.18), transparent 30%), linear-gradient(135deg, #071f5b, #123f8d); color: #fff; }
.dashboard-hero h1 { max-width: 850px; margin: 4px 0 9px; color: #fff; font-size: clamp(26px,3vw,42px); letter-spacing: -.045em; }
.dashboard-hero p { max-width: 900px; margin: 0; color: #cfdbf2; line-height: 1.6; }
.dashboard-hero .eyebrow { color: #7ee8df; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.dashboard-main-grid { grid-template-columns: minmax(0,1.55fr) minmax(310px,.62fr); }
.operations-flow { min-height: 100%; }

.load-card-carrier { display: grid; gap: 2px; margin: 12px 0 7px; }
.load-card-carrier span { color: var(--muted); font-size: 12px; }
.load-card-flags, .load-card-links, .stop-meta-row, .requirement-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.load-card-flags { margin-top: 11px; }
.load-card-flags > span:not(.reefer-badge) { padding: 5px 8px; border-radius: 999px; background: #eef2f7; color: #526077; font-size: 11px; font-weight: 750; }
.load-card-links { justify-content: space-between; margin-top: 10px; }
.load-card-links a { font-size: 12px; font-weight: 800; }
.load-card-reefer { border-top: 3px solid #14b8a6; }
.dispatch-board-panel { overflow: hidden; }
.kanban-board { padding-bottom: 10px; scroll-snap-type: x proximity; }
.kanban-column { scroll-snap-align: start; }

.reefer-monitor-card { border-color: #bdebe7; background: linear-gradient(145deg, #fff, #f0fffd); }
.temperature-alert-card { border-color: #f7a7a7; background: linear-gradient(145deg, #fff, #fff3f3); }
.reefer-reading-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.reefer-reading-grid > div { padding: 14px; border-radius: 15px; background: rgba(255,255,255,.85); border: 1px solid rgba(148,163,184,.22); }
.reefer-reading-grid small { display: block; margin-top: 4px; color: var(--muted); }
.requirement-chips { margin-top: 13px; }
.requirement-chips span { background: #fff; color: #37615e; border: 1px solid #c9e9e6; }
.reefer-instructions { margin: 14px 0 0; line-height: 1.6; }
.inline-alert { margin-top: 14px; padding: 12px 14px; border-radius: 13px; font-weight: 750; }
.inline-alert.danger { color: #991b1b; background: #fee2e2; }
.temperature-entry-card { border-top: 4px solid #14b8a6; }
.temperature-log-list { display: grid; gap: 8px; }
.temperature-log-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.temperature-log-item div { display: grid; gap: 3px; }
.temperature-log-item span { color: var(--muted); font-size: 12px; }
.temperature-log-item.out-of-range { border-color: #fecaca; background: #fff5f5; }
.temperature-log-item.out-of-range > span { color: #b91c1c; font-weight: 850; }
.compact-temperature-list { margin-top: 16px; }
.compact-form-grid { gap: 10px !important; }
.text-danger { color: #b91c1c !important; }

.carrier-summary-strip, .carrier-money-row { display: flex; flex-wrap: wrap; gap: 10px; }
.carrier-money-row { justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.carrier-money-row strong { color: #075985; }
.driver-load-grid { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); }
.driver-load-card { min-width: 0; }

@media (max-width: 1280px) {
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .stop-row-expanded { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
    .stop-row-expanded .btn { width: 100%; }
    .reefer-reading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 860px) {
    body { background: #f4f7fb; }
    .main-content { width: 100%; min-width: 0; }
    .page-content { padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); }
    .topbar { gap: 10px; padding: 12px 14px; }
    .topbar-title { order: 1; }
    .mobile-menu { order: 0; }
    .topbar-user { order: 2; margin-left: auto; }
    .global-search { order: 3; width: 100%; flex-basis: 100%; }
    .global-search input { min-width: 0; }
    .panel { border-radius: 18px; padding: 17px; }
    .panel-header, .page-heading, .form-section-head, .dashboard-hero { align-items: stretch; flex-direction: column; }
    .panel-header .page-actions, .page-heading .page-actions, .dashboard-hero-actions { width: 100%; }
    .panel-header .page-actions .btn, .page-heading .page-actions .btn, .dashboard-hero-actions .btn { flex: 1; }
    .dashboard-hero { padding: 23px 20px; }
    .dashboard-hero h1 { font-size: 29px; }
    .form-section { padding: 17px; border-radius: 18px; }
    .financial-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stop-row-expanded { grid-template-columns: 1fr 1fr !important; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
    .stop-row-expanded input[name="stop_location[]"], .stop-row-expanded input[name="stop_notes[]"], .stop-row-expanded .btn { grid-column: 1/-1; }
    .reefer-reading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .driver-load-page { grid-template-columns: 1fr !important; }
    .driver-action-panel { position: static; }
    .sticky-mobile-card { position: static !important; }
    .route-card { grid-template-columns: 1fr auto 1fr; gap: 8px; }

    .responsive-table { min-width: 0 !important; width: 100%; }
    .responsive-table thead { display: none; }
    .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table tbody { display: grid; gap: 12px; }
    .responsive-table tr { padding: 8px 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.045); }
    .responsive-table td { display: grid; grid-template-columns: minmax(105px,34%) minmax(0,1fr); align-items: start; gap: 12px; padding: 10px 0 !important; border: 0 !important; border-bottom: 1px solid #edf0f5 !important; text-align: left !important; }
    .responsive-table td:last-child { border-bottom: 0 !important; }
    .responsive-table td::before { content: attr(data-label); color: #64748b; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
    .responsive-table td[colspan] { display: block; }
    .responsive-table td[colspan]::before { display: none; }
    .responsive-table .table-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 7px; }
    .responsive-table .table-actions::before { width: 100%; }
    .responsive-table .table-actions form { display: inline-flex; }
    .table-wrap { overflow: visible; border: 0; }
    .table-route { grid-template-columns: 1fr; }
    .table-route span { transform: rotate(90deg); width: fit-content; }
}

@media (max-width: 560px) {
    .page-content { padding-inline: 10px; }
    .panel, .form-section { padding: 14px; border-radius: 16px; }
    .stats-grid, .compact-stats { grid-template-columns: 1fr 1fr !important; gap: 9px; }
    .stat-card { padding: 15px; border-radius: 15px; }
    .stat-card strong { font-size: 23px; }
    .financial-preview, .reefer-reading-grid, .stop-row-expanded, .form-grid.two, .form-grid.three { grid-template-columns: 1fr !important; }
    .stop-row-expanded > * { grid-column: auto !important; }
    .button-row, .page-actions, .driver-mobile-toolbar { display: grid; grid-template-columns: 1fr; width: 100%; }
    .button-row .btn, .page-actions .btn, .driver-mobile-toolbar .btn { width: 100%; }
    .route-card { grid-template-columns: 1fr; }
    .route-arrow { transform: rotate(90deg); justify-self: center; }
    .responsive-table td { grid-template-columns: 1fr; gap: 4px; }
    .responsive-table td::before { margin-bottom: 1px; }
    .doc-gallery, .driver-load-grid { grid-template-columns: 1fr !important; }
    .mobile-record-card, .temperature-log-item { align-items: flex-start; flex-direction: column; }
    .topbar-user .notification-button { padding: 8px 9px; font-size: 0; }
    .topbar-user .notification-button::before { content: 'Alerts'; font-size: 12px; }
}


/* FleetLume compact navigation and fuel control */
.app-shell { grid-template-columns: 248px minmax(0,1fr); }
.sidebar-v2 { width:248px; padding:16px 12px; overflow:hidden; }
.sidebar-brand-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:2px 6px 12px; }
.sidebar-v2 .brand { min-width:0; gap:10px; }
.sidebar-v2 .brand-mark { width:40px; height:40px; flex:0 0 40px; border-radius:12px; overflow:hidden; background:#fff; }
.sidebar-v2 .brand-mark img { width:100%; height:100%; object-fit:contain; }
.sidebar-v2 .brand strong { font-size:16px; }
.sidebar-v2 .brand span { font-size:11px; white-space:nowrap; }
.sidebar-close { display:none; width:34px; height:34px; border:0; border-radius:10px; background:rgba(255,255,255,.08); color:#fff; font-size:22px; line-height:1; }
.compact-nav { display:block; margin-top:8px; padding:0 2px 16px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(148,163,184,.35) transparent; }
.compact-nav::-webkit-scrollbar { width:5px; }.compact-nav::-webkit-scrollbar-thumb { background:rgba(148,163,184,.32); border-radius:999px; }
.compact-nav .nav-item { display:flex; align-items:center; gap:10px; min-height:40px; padding:9px 10px; margin:3px 0; border-radius:10px; font-size:13px; font-weight:700; color:#cbd5e1; }
.compact-nav .nav-item svg,.nav-section summary svg { width:18px; height:18px; flex:0 0 18px; }
.compact-nav .nav-item span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.compact-nav .nav-item:hover,.compact-nav .nav-item.active { background:rgba(59,130,246,.17); color:#fff; }
.compact-nav .nav-item.active { box-shadow:inset 3px 0 0 #38bdf8; }
.nav-section { margin:4px 0; }
.nav-section summary { list-style:none; display:flex; align-items:center; gap:10px; min-height:42px; padding:10px; border-radius:10px; color:#94a3b8; cursor:pointer; font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; user-select:none; }
.nav-section summary::-webkit-details-marker { display:none; }
.nav-section summary:hover { color:#fff; background:rgba(255,255,255,.06); }
.nav-section summary span { flex:1; }
.nav-section summary i { width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:.2s ease; }
.nav-section[open] summary i { transform:rotate(225deg); margin-top:5px; }
.nav-section > div { padding:0 0 4px 12px; border-left:1px solid rgba(148,163,184,.18); margin-left:19px; }
.nav-section > div .nav-item { padding-left:11px; font-weight:650; }
.sidebar-v2 .sidebar-footer { display:flex; align-items:center; gap:10px; padding:10px; margin-top:8px; border-radius:12px; }
.sidebar-user-avatar { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:10px; background:linear-gradient(135deg,#2563eb,#06b6d4); font-size:12px; font-weight:900; }
.sidebar-v2 .sidebar-footer strong,.sidebar-v2 .sidebar-footer small { display:block; max-width:155px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.fuel-heading { align-items:center; }
.fuel-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
.fuel-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr); gap:18px; align-items:start; }
.fuel-form-panel[hidden] { display:none; }
.fuel-form-panel { border:1px solid #bfdbfe; background:linear-gradient(145deg,#eff6ff,#fff 45%); }
.fuel-calculation-note { padding:12px 14px; border-radius:12px; background:#eff6ff; color:#1e3a8a; font-size:13px; }
.compact-filter select { min-width:160px; }
.fuel-card-list,.fuel-transaction-list { display:grid; gap:12px; }
.fuel-allocation-card { border:1px solid var(--border); border-radius:17px; padding:15px; background:#fff; box-shadow:0 8px 22px rgba(15,23,42,.035); }
.fuel-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.fuel-card-top h3 { margin:4px 0 2px; font-size:17px; }.fuel-card-top p { margin:0; color:var(--muted); font-size:13px; }.fuel-id { color:var(--primary); font-size:11px; font-weight:900; letter-spacing:.08em; }
.fuel-progress { height:8px; margin:14px 0; border-radius:999px; background:#e2e8f0; overflow:hidden; }.fuel-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2563eb,#06b6d4); }
.fuel-money-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.fuel-money-grid div { padding:10px; border-radius:12px; background:#f8fafc; }.fuel-money-grid small,.fuel-money-grid strong { display:block; }.fuel-money-grid small { color:var(--muted); font-size:11px; }.fuel-money-grid strong { margin-top:3px; font-size:15px; }
.fuel-meta { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }.fuel-meta span { padding:5px 8px; border-radius:999px; background:#f1f5f9; color:#475569; font-size:11px; font-weight:700; }
.fuel-purchase-form { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; }.fuel-purchase-form summary { cursor:pointer; color:var(--primary); font-weight:800; font-size:13px; }.fuel-purchase-form form { margin-top:12px; }
.fuel-status-form { margin-top:12px; justify-content:flex-end; }
.fuel-transaction-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:13px; border:1px solid var(--border); border-radius:14px; background:#fff; }.fuel-transaction-card strong,.fuel-transaction-card span,.fuel-transaction-card small { display:block; }.fuel-transaction-card span,.fuel-transaction-card small { color:var(--muted); margin-top:3px; font-size:12px; }.fuel-transaction-right { text-align:right; }.fuel-transaction-right .badge,.fuel-transaction-right .text-link { margin-top:6px; display:inline-flex; }.fuel-review-form { grid-column:1/-1; justify-content:flex-end; padding-top:8px; border-top:1px solid var(--border); }
.text-link { color:var(--primary); font-size:12px; font-weight:800; }.text-danger { color:var(--danger); }

@media (max-width:1180px) {
    .fuel-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .fuel-layout { grid-template-columns:1fr; }
}
@media (max-width:860px) {
    .sidebar-v2 { width:min(86vw,310px); padding-top:max(14px,env(safe-area-inset-top)); }
    .sidebar-close { display:grid; place-items:center; }
    .compact-nav .nav-item { min-height:46px; font-size:14px; }
    .nav-section summary { min-height:46px; }
    .fuel-heading { align-items:flex-start; }
    .fuel-heading .btn { width:100%; }
    .fuel-money-grid { grid-template-columns:1fr 1fr 1fr; }
}
@media (max-width:620px) {
    .fuel-stats { grid-template-columns:1fr 1fr; }
    .fuel-money-grid { grid-template-columns:1fr; }
    .fuel-transaction-card { grid-template-columns:1fr; }.fuel-transaction-right { text-align:left; }
    .fuel-review-form,.fuel-status-form { display:grid; grid-template-columns:1fr; }.fuel-review-form select,.fuel-review-form button,.fuel-status-form select,.fuel-status-form button { width:100%; }
}
@media (max-width:420px) { .fuel-stats { grid-template-columns:1fr; } }

/* Driver Hours of Service / logbook */
.notice{padding:14px 16px;border-radius:14px;border:1px solid var(--border);line-height:1.55;margin-bottom:18px}.notice-warning{background:#fffbeb;border-color:#fde68a;color:#854d0e}.notice-info{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}.hos-compliance-notice{font-size:13px}.hos-stats{margin-bottom:18px}.hos-driver-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hos-driver-card{border:1px solid var(--border);border-radius:18px;padding:17px;background:#fff;min-width:0}.hos-driver-card.near-limit{border-color:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.08)}.hos-driver-card.has-violation{border-color:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.08)}.hos-driver-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.hos-driver-card h3{margin:0 0 4px}.hos-driver-card p{margin:0;color:var(--muted);font-size:13px}.hos-duty-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;white-space:nowrap}.hos-duty-pill:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.duty-off_duty{background:#eef2ff;color:#4338ca}.duty-sleeper_berth{background:#ede9fe;color:#6d28d9}.duty-driving{background:#dcfce7;color:#166534}.duty-on_duty{background:#fef3c7;color:#92400e}.hos-mini-clocks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:15px 0}.hos-mini-clocks>div{background:#f8fafc;border:1px solid #edf1f7;border-radius:13px;padding:10px}.hos-mini-clocks small,.hos-mini-clocks span{display:block;color:var(--muted);font-size:10px}.hos-mini-clocks strong{display:block;font-size:19px;margin:3px 0}.hos-driver-meta{display:flex;flex-wrap:wrap;gap:7px;color:var(--muted);font-size:11px;margin-bottom:12px}.hos-driver-meta span{background:#f8fafc;border-radius:999px;padding:5px 8px}.hos-warning-list{display:grid;gap:6px;margin:10px 0}.hos-warning-list span{display:block;padding:8px 10px;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:12px;font-weight:700}.card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.hos-edit-list{display:grid;gap:12px}.hos-edit-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.55fr);gap:14px;padding:14px;border:1px solid var(--border);border-radius:15px;background:#fff}.hos-edit-card strong,.hos-edit-card span{display:block}.hos-edit-card span{color:var(--muted);font-size:12px;margin-top:3px}.hos-edit-card p{margin:8px 0 0}.hos-edit-change{padding:10px;border-radius:12px;background:#f8fafc}.hos-review-form{grid-column:1/-1;display:flex;gap:8px;align-items:center}.hos-review-form input{flex:1}.hos-clock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:17px}.hos-clock-card{border:1px solid var(--border);background:#fff;border-radius:18px;padding:16px;overflow:hidden}.hos-clock-card>span,.hos-clock-card>small{display:block;color:var(--muted)}.hos-clock-card>span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.hos-clock-card>strong{display:block;font-size:30px;letter-spacing:-.04em;margin:8px 0 4px}.hos-clock-card>small{font-size:11px}.hos-clock-progress{height:6px;background:#eef2f7;border-radius:999px;margin-top:13px;overflow:hidden}.hos-clock-progress i{display:block;height:100%;background:#2563eb;border-radius:inherit}.hos-clock-card.warning{border-color:#f59e0b}.hos-clock-card.warning .hos-clock-progress i{background:#f59e0b}.hos-clock-card.danger{border-color:#ef4444}.hos-clock-card.danger .hos-clock-progress i{background:#ef4444}.hos-violation-banner{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;border-radius:15px;background:#7f1d1d;color:#fff;margin-bottom:16px}.hos-violation-banner div{display:flex;flex-wrap:wrap;gap:7px}.hos-violation-banner span{font-size:12px;padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.14)}.hos-main-grid{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.35fr);gap:16px;margin-bottom:16px}.hos-status-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.hos-status-button{border:1px solid var(--border);border-radius:14px;background:#fff;padding:12px 8px;cursor:pointer;transition:.18s ease;text-align:center}.hos-status-button:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.08)}.hos-status-button b,.hos-status-button span{display:block}.hos-status-button b{font-size:17px}.hos-status-button span{font-size:10px;color:var(--muted);margin-top:3px}.hos-status-button.off{border-color:#c7d2fe}.hos-status-button.sleeper{border-color:#ddd6fe}.hos-status-button.driving{border-color:#bbf7d0}.hos-status-button.on{border-color:#fde68a}.hos-special-actions{display:flex;flex-wrap:wrap;gap:8px}.input-action{display:flex;gap:7px}.input-action input{min-width:0}.hos-graph-wrap{width:100%;overflow-x:auto;padding-bottom:4px}.hos-graph{display:block;width:100%;min-width:650px;height:180px}.hos-graph-label{font-size:10px;fill:#64748b;font-family:Arial,sans-serif}.hos-hour-label{font-size:9px;fill:#94a3b8;font-family:Arial,sans-serif}.hos-grid-line{stroke:#dbe3ef;stroke-width:1}.hos-hour-line{stroke:#edf1f7;stroke-width:1}.hos-hour-line.major{stroke:#cbd5e1;stroke-width:1.3}.hos-duty-path{fill:none;stroke:#0f3f9f;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}.hos-total-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.hos-total-row>div{border:1px solid var(--border);background:#f8fafc;border-radius:12px;padding:10px}.hos-total-row span{display:block;color:var(--muted);font-size:10px}.hos-total-row strong{display:block;font-size:18px;margin-top:3px}.hos-cert-status{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.hos-cert-status>span{font-size:12px;font-weight:800}.hos-cert-status small{color:var(--muted)}.hos-date-filter input{max-width:170px}.hos-detail-grid{grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr)}.hos-option-grid{margin-top:9px}.hos-certify-box{margin-top:18px;padding:15px;border-radius:15px;background:#f0fdf4;border:1px solid #bbf7d0}.hos-certify-box h3{margin:0 0 5px}.hos-certify-box p{margin:0 0 12px;color:#166534}.hos-certify-box .inline-form{display:flex;gap:8px}.hos-certify-box input{flex:1}.hos-event-list{display:grid;gap:10px}.hos-event-card{display:grid;grid-template-columns:60px minmax(0,1fr);gap:12px;padding:12px;border:1px solid var(--border);border-radius:14px}.hos-event-time{text-align:center;padding-right:10px;border-right:1px solid var(--border)}.hos-event-time strong,.hos-event-time span{display:block}.hos-event-time strong{font-size:18px}.hos-event-time span{font-size:10px;color:var(--muted)}.hos-event-body>div{display:flex;justify-content:space-between;gap:10px}.hos-event-body>div span{color:var(--muted);font-size:11px;text-align:right}.hos-event-body p{margin:6px 0;font-size:13px}.hos-event-body small{color:var(--muted)}.hos-edit-details{margin-top:9px;border-top:1px dashed var(--border);padding-top:8px}.hos-edit-details summary{cursor:pointer;color:#2563eb;font-size:12px;font-weight:700}.hos-edit-details form{margin-top:10px}.hos-log-history{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:9px}.hos-log-history-card{display:block;border:1px solid var(--border);border-radius:14px;padding:11px;color:inherit;background:#fff}.hos-log-history-card.active{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.08)}.hos-log-history-card>span,.hos-log-history-card>strong,.hos-log-history-card>small{display:block}.hos-log-history-card>span,.hos-log-history-card>small{color:var(--muted);font-size:10px}.hos-log-history-card>strong{margin:2px 0 6px}.hos-log-history-card .badge{margin-top:7px;font-size:9px}.hos-log-history-card>b{display:block;margin-top:6px;color:#b91c1c;font-size:10px}.hos-inspection-list{display:grid;gap:16px}.hos-inspection-day{break-inside:avoid}.hos-inspection-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.hos-inspection-head h2{margin:0}.hos-inspection-head p{margin:4px 0;color:var(--muted)}.hos-inspection-head>div:last-child{display:flex;gap:10px;align-items:center}.hos-inspection-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;font-size:12px;color:#475569}.hos-print-footer{display:none}

@media(max-width:1100px){.hos-clock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hos-main-grid,.hos-detail-grid{grid-template-columns:1fr}.hos-driver-grid{grid-template-columns:1fr}}
@media(max-width:720px){.hos-clock-grid{grid-template-columns:1fr 1fr}.hos-status-buttons{grid-template-columns:1fr 1fr}.hos-total-row{grid-template-columns:1fr 1fr}.hos-edit-card{grid-template-columns:1fr}.hos-review-form{flex-wrap:wrap}.hos-review-form input{flex-basis:100%}.hos-driver-card-head,.hos-event-body>div,.hos-inspection-head{flex-direction:column}.hos-duty-pill{align-self:flex-start}.hos-mini-clocks{grid-template-columns:1fr 1fr 1fr}.hos-certify-box .inline-form{flex-direction:column}.hos-inspection-details{grid-template-columns:1fr}.hos-log-heading .page-actions{display:grid;grid-template-columns:1fr 1fr}.input-action{flex-direction:column}.input-action .btn{width:100%}}
@media(max-width:460px){.hos-clock-grid{grid-template-columns:1fr}.hos-mini-clocks{grid-template-columns:1fr}.hos-status-buttons{grid-template-columns:1fr 1fr}.hos-log-heading .page-actions{grid-template-columns:1fr}.hos-event-card{grid-template-columns:48px minmax(0,1fr);padding:10px}.hos-total-row{grid-template-columns:1fr 1fr}.hos-graph{min-width:580px}}
@media print{.sidebar,.topbar,.page-actions,.inspection-only-screen,.flash,.hos-print-footer+*{display:none!important}.main-content,.page-content{margin:0!important;padding:0!important;width:100%!important}.app-shell{display:block!important}.panel{box-shadow:none!important;border:1px solid #cbd5e1!important;margin:0 0 12px!important;padding:12px!important}.hos-inspection-day{page-break-inside:avoid}.hos-graph{min-width:0!important}.hos-print-footer{display:block;font-size:9px;color:#64748b;margin-top:12px}.hos-inspection-list{gap:8px}.page-heading{margin-bottom:10px!important}}


/* FleetLume AI workspace */
.ai-heading { align-items: center; }
.ai-status { display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;background:#eef2f7;color:#526077;font-size:12px;font-weight:850; }
.ai-status i { width:9px;height:9px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.15); }
.ai-status.is-ready { background:#e9fbf5;color:#047857; }
.ai-status.is-ready i { background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.15); }
.ai-settings-panel > summary { display:flex;align-items:center;justify-content:space-between;gap:20px;cursor:pointer;list-style:none; }
.ai-settings-panel > summary::-webkit-details-marker { display:none; }
.ai-settings-panel > summary h2 { margin:2px 0 4px; }
.ai-settings-panel > summary span { color:var(--muted); }
.ai-settings-panel > summary b { color:#2563eb; }
.ai-settings-form { margin-top:22px;padding-top:20px;border-top:1px solid var(--border); }
.ai-test-form { margin-top:14px; }
.ai-empty-state { display:flex;align-items:center;gap:18px;background:linear-gradient(135deg,#f7faff,#eef6ff); }
.ai-empty-state h2 { margin:0 0 5px; }
.ai-empty-state p { margin:0;color:var(--muted); }
.ai-orb { width:62px;height:62px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#0b2b73,#18a8df);color:#fff;font-weight:900;box-shadow:0 16px 35px rgba(20,92,190,.25); }
.ai-grid { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:18px;margin-bottom:18px; }
.ai-card { min-width:0; }
.ai-assistant-card { grid-row:span 2;background:radial-gradient(circle at 100% 0,rgba(56,189,248,.13),transparent 35%),#fff; }
.ai-prompt-chips { display:flex;flex-wrap:wrap;gap:8px; }
.ai-prompt-chips button { border:1px solid #d7e3f4;background:#f6f9ff;color:#24549a;border-radius:999px;padding:7px 10px;font:inherit;font-size:12px;font-weight:750;cursor:pointer; }
.ai-file-drop { padding:18px;border:1.5px dashed #a8bddb;border-radius:16px;background:#f8fbff; }
.ai-file-drop input { background:#fff; }
.ai-submit { min-height:46px; }
.ai-result { margin-bottom:18px;border-top:4px solid #2476d7; }
.ai-answer { padding:18px;border-radius:16px;background:#f7f9fc;color:#17243d;line-height:1.72;white-space:normal; }
.ai-extraction-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px; }
.ai-field { min-width:0;padding:13px;border:1px solid var(--border);border-radius:14px;background:#fbfcff; }
.ai-field span { display:block;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em; }
.ai-field strong { display:block;margin-top:5px;overflow-wrap:anywhere;font-size:14px; }
.ai-json { max-height:320px;overflow:auto;padding:15px;border-radius:14px;background:#0d1b31;color:#d6e6ff;font-size:12px;line-height:1.55; }
.ai-comparison { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:18px; }
.ai-comparison > div { padding:14px;border-radius:15px;background:#f6f8fc;border:1px solid var(--border); }
.ai-comparison span { display:block;color:var(--muted);font-size:11px;font-weight:750; }
.ai-comparison strong { display:block;margin-top:5px;font-size:18px; }
.ai-list { margin:8px 0 16px;padding-left:20px;line-height:1.65; }
.ai-safety-note { display:flex;align-items:flex-start;gap:12px;border-color:#f4d38d;background:#fffbeb; }
.ai-safety-note strong { color:#92400e;white-space:nowrap; }
.ai-safety-note span { color:#7c5a18;line-height:1.55; }
@media (max-width:1100px) { .ai-grid { grid-template-columns:1fr; } .ai-assistant-card { grid-row:auto; } .ai-comparison { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px) { .ai-settings-panel > summary,.ai-empty-state,.ai-safety-note { align-items:stretch;flex-direction:column; } .ai-extraction-grid { grid-template-columns:1fr 1fr; } .ai-comparison { grid-template-columns:1fr 1fr; } .ai-prompt-chips { display:grid;grid-template-columns:1fr; } .ai-prompt-chips button { text-align:left;border-radius:12px; } .ai-safety-note strong { white-space:normal; } }
@media (max-width:480px) { .ai-extraction-grid,.ai-comparison { grid-template-columns:1fr; } }
