:root {
    --blue: #0b4d92;
    --blue-2: #1675c1;
    --navy: #062d52;
    --navy-deep: #031a32;
    --sky: #eaf4fb;
    --light: #f3f7fa;
    --white: #ffffff;
    --ink: #10283b;
    --muted: #607485;
    --line: #dce7ee;
    --red: #b42318;
    --amber: #d98a00;
    --green: #16845b;
    --shadow: 0 18px 48px rgba(6, 45, 82, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 85% 0%, rgba(22, 117, 193, .08), transparent 28rem),
        var(--light);
    color: var(--ink);
    font-family: Aptos, "Segoe UI Variable Text", "Segoe UI", Inter, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--blue); }

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

button {
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: var(--white);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(11, 77, 146, .18);
}

button:hover { filter: brightness(1.05); transform: translateY(-1px); }

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #c8d8e3;
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(22, 117, 193, .13);
    border-color: var(--blue-2);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--blue);
}

h1,
h2,
h3,
.brand,
.document-title h1 {
    font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", Aptos, sans-serif;
    font-weight: 800;
    text-wrap: balance;
}
h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.08; letter-spacing: -.038em; }
h2 { line-height: 1.16; letter-spacing: -.024em; }
h3 { line-height: 1.22; letter-spacing: -.014em; }
small { line-height: 1.45; }
table { font-variant-numeric: tabular-nums; }

.error {
    padding: 12px 14px;
    border-left: 4px solid var(--red);
    border-radius: 9px;
    background: #fff0ef;
    color: var(--red);
    font-size: .9rem;
}

.notice {
    padding: 12px 14px;
    border-left: 4px solid var(--blue-2);
    border-radius: 9px;
    background: #e7f2fb;
    color: #083c67;
}

/* Sign-in / landing */
.login-page {
    min-height: 100vh;
    padding: 0;
    background:
        linear-gradient(90deg, rgba(1, 13, 28, .34) 0%, rgba(1, 15, 31, .20) 50%, rgba(1, 14, 29, .82) 100%),
        url("mesma-fleet-port-hero-v4.png") 34% center / cover no-repeat;
}

.login-shell {
    width: min(100%, 1560px);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(26px, 4.5vw, 68px);
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 395px);
    align-items: center;
    gap: clamp(38px, 6vw, 90px);
}

.login-story {
    min-height: calc(100vh - clamp(52px, 9vw, 136px));
    align-self: stretch;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 0 clamp(10px, 3vh, 34px);
    color: var(--white);
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 24px;
    font-weight: 900;
    letter-spacing: .11em;
}

.login-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
}

.login-logo {
    width: min(350px, 72vw);
    height: auto;
    display: block;
    margin: 0;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .32));
}

.login-story h2 {
    max-width: 650px;
    margin: auto 0 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    letter-spacing: -.045em;
}

.login-story p {
    max-width: 560px;
    margin: 22px 0 0;
    font-size: 1.08rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .88);
}

.login-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.login-proof span {
    min-height: 56px;
    display: grid;
    place-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 12px;
    background: rgba(2, 19, 36, .68);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: center;
    backdrop-filter: blur(9px);
}

.login-card {
    width: 100%;
    max-width: 395px;
    padding: clamp(26px, 3vw, 36px);
    border: 1px solid rgba(119, 188, 235, .34);
    border-radius: 20px;
    color: #eaf4fb;
    background:
        radial-gradient(circle at 88% 0%, rgba(19, 126, 211, .08), transparent 15rem),
        rgba(2, 20, 36, .60);
    box-shadow: 0 26px 70px rgba(0, 8, 20, .38);
    backdrop-filter: blur(10px);
}

.login-page > .login-card { max-width: 500px; margin: clamp(30px, 8vh, 90px) auto; }
.login-card h1 { color: #fff; font-size: clamp(1.75rem, 2.8vw, 2.2rem); }
.login-card .eyebrow { color: #55b8ff; }
.login-copy { color: #a9bfd0; line-height: 1.6; }
.login-card form { display: grid; gap: 8px; margin-top: 22px; }
.login-card label { font-size: .8rem; font-weight: 800; color: #c8dbe8; }
.login-card input,
.login-card select {
    padding: 11px 12px;
    border-color: rgba(134, 181, 214, .36);
    color: #fff;
    background: rgba(2, 18, 33, .72);
}
.login-card input::placeholder { color: #7891a4; }
.login-card button { margin-top: 10px; padding: 12px; }
.login-security { margin: 17px 0 0; color: #91a8b9; font-size: .72rem; text-align: center; }
.login-card a { color: #72c4ff; }
.version { margin: 28px 0 0; text-align: center; color: var(--muted); font-size: .8rem; }

/* Application shell */
.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 0%, rgba(39, 135, 207, .23), transparent 18rem),
        linear-gradient(180deg, var(--navy), var(--navy-deep));
    box-shadow: 12px 0 40px rgba(3, 26, 50, .07);
}

.brand {
    font-size: 1.38rem;
    font-weight: 950;
    letter-spacing: .075em;
}

.brand span { color: #8dccff; }
.brand-subtitle { margin: 6px 8px 24px; color: #b7cee1; font-size: .72rem; line-height: 1.45; text-align: center; }
.sidebar nav { display: grid; gap: 13px; }
.nav-group { display: grid; gap: 4px; }
.nav-group-title {
    margin: 0 10px 2px;
    color: #7fa6c5;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.sidebar .nav-group a {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: .82rem;
}
.nav-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(170, 211, 242, .28);
    border-radius: 6px;
    color: #a9d8fb;
    font-size: .72rem;
    font-weight: 900;
}
.sidebar a.active .nav-icon { border-color: #70c4ff; background: rgba(112, 196, 255, .16); color: #fff; }

.sidebar a {
    padding: 10px 13px;
    color: #dbeaf5;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 9px;
    transition: .18s ease;
}

.sidebar a.active,
.sidebar a:hover {
    border-color: rgba(255, 255, 255, .08);
    background: linear-gradient(90deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .08));
    color: var(--white);
    transform: translateX(2px);
}

.sidebar .sidebar-logo {
    display: block;
    width: 220px;
    margin: -4px auto 5px;
    padding: 2px 5px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.sidebar .sidebar-logo:hover {
    border: 0;
    background: transparent;
    transform: none;
}

.sidebar-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.sidebar .logout {
    width: 100%;
    margin-top: 0;
    padding: 10px;
    border: 1px solid #547b9e;
    border-radius: 9px;
    background: transparent;
    color: var(--white);
    text-align: center;
    box-shadow: none;
}
.logout-form { margin-top: auto; }

/* Module 20: production readiness and security handoff */
.readiness-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 20px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(24, 113, 181, .18);
    border-radius: 22px;
    color: var(--white);
    background:
        radial-gradient(circle at 90% 20%, rgba(43, 154, 235, .33), transparent 19rem),
        linear-gradient(135deg, #041d34, #0b3c66);
    box-shadow: 0 24px 58px rgba(3, 26, 50, .16);
}
.readiness-hero h2 { margin: 2px 0 8px; color: var(--white); font-size: clamp(1.7rem, 3vw, 2.55rem); }
.readiness-hero p { margin-bottom: 0; color: #c9deed; }
.readiness-hero .eyebrow { color: #73c2ff; }
.readiness-score {
    width: 154px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(2, 20, 36, .42);
    box-shadow: inset 0 0 0 9px rgba(36, 145, 225, .13);
}
.readiness-score strong { display: block; color: var(--white); font-size: 2.2rem; line-height: 1; }
.readiness-score span { display: block; margin-top: 7px; color: #bcd5e8; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.readiness-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.readiness-metrics article {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 11px 28px rgba(3, 26, 50, .06);
}
.readiness-metrics article > span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.readiness-metrics article > strong {
    color: var(--navy-deep);
    font-size: 1.85rem;
    line-height: 1;
}
.readiness-metrics article > small { color: var(--muted); line-height: 1.35; }
.readiness-group { margin-bottom: 18px; }
.readiness-list { display: grid; gap: 10px; }
.readiness-check {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fbfdff;
}
.readiness-check p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.readiness-check > b { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.readiness-status {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 950;
}
.readiness-pass .readiness-status { color: #08773f; background: #ddf7e8; }
.readiness-pass > b { color: #08773f; }
.readiness-warn .readiness-status { color: #9a5a00; background: #fff0cd; }
.readiness-warn > b { color: #9a5a00; }
.readiness-fail .readiness-status { color: #b42318; background: #fee4e2; }
.readiness-fail > b { color: #b42318; }

@media (max-width: 720px) {
    .readiness-hero { grid-template-columns: 1fr; }
    .readiness-score { width: 128px; }
    .readiness-metrics { grid-template-columns: 1fr 1fr; }
    .readiness-check { grid-template-columns: 34px minmax(0, 1fr); }
    .readiness-check > b { grid-column: 2; }
}

.main-content { min-width: 0; padding: clamp(24px, 3.3vw, 46px); }

.topbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
    min-height: 64px;
    padding-right: 146px;
}

.topbar::after,
.dashboard-topbar::after {
    content: "LINX TMS";
    position: absolute;
    top: 0;
    right: 0;
    width: 142px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #075ea8;
    font-weight: 900;
    letter-spacing: .08em;
    filter: drop-shadow(0 6px 12px rgba(3, 26, 50, .08));
}
.topbar h1 { color: var(--navy-deep); }
.profile { text-align: right; font-weight: 800; color: var(--navy-deep); }
.profile span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; text-transform: capitalize; font-weight: 600; }

.dashboard-hero {
    position: relative;
    min-height: 250px;
    margin-bottom: 22px;
    padding: clamp(28px, 5vw, 52px);
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 22px;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(3, 26, 50, .94), rgba(3, 26, 50, .62) 55%, rgba(3, 26, 50, .18)),
        url("mesma-fleet-port-hero-v4.png") center 54% / cover no-repeat;
    box-shadow: 0 24px 56px rgba(6, 45, 82, .19);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: inherit;
    pointer-events: none;
}

.dashboard-hero-content { position: relative; z-index: 1; max-width: 560px; }
.dashboard-hero .eyebrow { color: #9bd5ff; }
.dashboard-hero h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.02; letter-spacing: -.045em; }
.dashboard-hero p { max-width: 500px; color: rgba(255, 255, 255, .82); line-height: 1.55; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-actions a {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 9px;
    background: rgba(255, 255, 255, .13);
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
    backdrop-filter: blur(8px);
}
.hero-actions a:first-child { border-color: var(--white); background: var(--white); color: var(--navy); }

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

.metric-card,
.panel {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(214, 228, 237, .92);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 21px;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(var(--blue-2), var(--blue));
}

.metric-card.alert-metric::before { background: linear-gradient(#f2b84b, var(--amber)); }
.metric-card span { font-size: .78rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.metric-card strong { display: block; margin: 11px 0 4px; color: var(--navy-deep); font-size: 2.35rem; line-height: 1; }
.metric-card small { color: var(--muted); }

.panel { min-width: 0; padding: clamp(24px, 2.2vw, 32px); }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.panel h2 { margin-top: 0; font-size: 1.18rem; color: var(--navy-deep); }
.panel p { color: var(--muted); line-height: 1.6; }
.panel a { font-weight: 750; }
.alert-card { border-left: 4px solid var(--amber); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #355267; background: #f4f8fb; font-size: .76rem; text-transform: uppercase; letter-spacing: .055em; }
tbody tr:hover { background: #f8fbfd; }

.data-form { display: grid; gap: 14px; }
.data-form label { color: #3c586b; font-size: .9rem; font-weight: 800; }
.data-form > label + input,
.data-form > label + select,
.data-form > label + textarea { width: 100%; }
.data-form .panel-grid > div {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 9px;
}
.data-form .panel-grid > div > input,
.data-form .panel-grid > div > select,
.data-form .panel-grid > div > textarea { width: 100%; min-width: 0; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.form-field > input,
.form-field > select,
.form-field > textarea { width: 100%; min-width: 0; }
.form-submit { width: 100%; margin-top: 4px; }
.compact-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.calculation-preview {
    display: block;
    min-height: 1.2em;
    margin-top: 2px;
    color: #0b64b4;
    font-size: .7rem;
    font-weight: 800;
}
input[readonly] {
    background: #eef5fb;
    color: #24465f;
    cursor: default;
}
.invoice-allocation-list {
    min-width: 0;
    max-height: 380px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    border: 1px solid #c8d8e3;
    border-radius: 12px;
    background: #f8fbfd;
}
.invoice-allocation-list legend {
    padding: 0 7px;
    color: #3c586b;
    font-size: .78rem;
    font-weight: 850;
}
.invoice-allocation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, .42fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #dce7ee;
}
.invoice-allocation-row:last-child { border-bottom: 0; }
.invoice-allocation-row > label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    cursor: pointer;
}
.invoice-allocation-row input[type="checkbox"] { width: 18px; height: 18px; }
.invoice-allocation-row strong,
.invoice-allocation-row small { display: block; }
.invoice-allocation-row small { margin-top: 2px; color: var(--muted); font-weight: 650; }
.invoice-allocation-row:not(.is-selected) [data-allocation-amount] {
    opacity: .58;
}

/* Module 21: fuel-control workspace */
.fuel-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    min-height: 220px;
    margin-bottom: 18px;
    padding: clamp(24px, 4vw, 40px);
    border-radius: 20px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(3, 26, 50, .98) 0%, rgba(3, 26, 50, .95) 38%, rgba(3, 26, 50, .73) 58%, rgba(3, 26, 50, .26) 100%),
        linear-gradient(0deg, rgba(2, 18, 34, .28), rgba(2, 18, 34, .04)),
        url("mesma-fuel-station-hero-v1.png") center 58% / cover no-repeat;
    box-shadow: 0 22px 52px rgba(3, 26, 50, .18);
}
.fuel-hero h2 { margin: 3px 0 8px; color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.fuel-hero p { margin: 0; max-width: 760px; color: #c7dfef; }
.fuel-hero .eyebrow { color: #72c4ff; }
.fuel-hero-mark { display: none; }
.fuel-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.fuel-summary article {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(6, 45, 82, .06);
}
.fuel-summary span { display: block; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.fuel-summary strong { display: block; margin-top: 7px; color: var(--navy-deep); font-size: 1.45rem; }
.fuel-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.7fr); gap: 18px; align-items: start; }
.fuel-layout > .register-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.fuel-layout > .register-card > .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
[data-fuel-payment-summary] {
    grid-template-columns: 1fr;
    gap: 8px;
}
[data-fuel-payment-summary] article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 12px 14px;
}
[data-fuel-payment-summary] article span,
[data-fuel-payment-summary] article strong {
    min-width: 0;
    margin: 0;
}
[data-fuel-payment-summary] article strong {
    text-align: right;
    font-size: clamp(1rem, 1.35vw, 1.35rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.fuel-form-card { position: sticky; top: 20px; }
.efficiency-good { color: var(--green); font-weight: 900; }
.efficiency-watch { color: var(--amber); font-weight: 900; }
.cost-restricted { color: var(--muted); font-style: italic; }

/* Executive dashboard */
.dashboard-main {
    padding: 0 0 42px;
    background:
        radial-gradient(circle at 85% 0%, rgba(12, 126, 232, .08), transparent 27rem),
        #f4f8fb;
}

.dashboard-topbar {
    position: relative;
    min-height: 94px;
    padding: 19px 176px 19px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #e5edf3;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(3, 26, 50, .04);
    backdrop-filter: blur(14px);
}

.dashboard-title h1 {
    font-size: 1.55rem;
    color: var(--navy-deep);
}

.dashboard-title > p:last-child {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.dashboard-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
}

.quick-action {
    margin-right: 8px;
    padding: 9px 14px;
    border-radius: 9px;
    background: linear-gradient(135deg, #0879e4, #075cb7);
    color: var(--white);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 850;
    box-shadow: 0 8px 20px rgba(12, 126, 232, .18);
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 3px solid #e4f1fc;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c7ee8, #093d70);
    color: #fff;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.dashboard-command-strip {
    margin: 22px 30px 0;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    border: 1px solid rgba(126, 196, 255, .16);
    border-radius: 16px;
    background:
        linear-gradient(90deg, #031a2e 0%, #031a2e 36%, rgba(3, 26, 46, .90) 48%, rgba(3, 26, 46, .43) 72%, rgba(3, 26, 46, .20) 100%),
        linear-gradient(0deg, rgba(2, 18, 34, .20), rgba(2, 18, 34, .04)),
        url("mesma-fleet-port-hero-v4.png") center 58% / cover no-repeat;
    color: #fff;
    box-shadow: 0 18px 42px rgba(3, 26, 50, .16);
}

.dashboard-command-strip h2 {
    margin: 0;
    font-size: clamp(1.42rem, 2.2vw, 2rem);
}

.dashboard-command-strip p:last-child {
    margin: 7px 0 0;
    color: #c9dbea;
    font-size: .9rem;
}

.dashboard-command-strip .eyebrow { color: #78c2ff; }
.command-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.command-links a {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 9px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 800;
}
.command-links a:hover { background: rgba(255, 255, 255, .16); }

.executive-metrics {
    margin: 18px 30px 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px;
}

.executive-metric {
    min-width: 0;
    min-height: 150px;
    padding: 15px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: flex-start;
    column-gap: 10px;
    row-gap: 9px;
    border: 1px solid #e1eaf1;
    border-radius: 13px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 9px 28px rgba(6, 45, 82, .07);
    overflow: hidden;
}

.metric-symbol {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 3px;
    border: 1px solid rgba(12, 126, 232, .09);
    border-radius: 15px;
    background: linear-gradient(145deg, #f7fbff, #eaf4ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 16px rgba(7, 54, 93, .08);
}

.metric-symbol img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(7, 42, 74, .18));
}

.metric-copy {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.executive-metric strong {
    display: block;
    color: var(--navy-deep);
    font-size: 1.8rem;
    line-height: 1;
}

.executive-metric span {
    display: block;
    margin-top: 7px;
    color: #284a63;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1.32;
    overflow-wrap: anywhere;
    word-break: normal;
}

.executive-metric small,
.metric-caption {
    grid-column: 1 / -1;
    display: block;
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.tone-cyan .metric-symbol { background: linear-gradient(145deg, #f6fdfe, #e7f8fb); border-color: rgba(0, 136, 165, .1); }
.tone-green .metric-symbol { background: linear-gradient(145deg, #f6fdf9, #e7f8ef); border-color: rgba(19, 131, 84, .1); }
.tone-amber .metric-symbol { background: linear-gradient(145deg, #fffaf1, #fff4de); border-color: rgba(179, 107, 0, .1); }
.tone-red .metric-symbol { background: linear-gradient(145deg, #fff9f8, #fff0ef); border-color: rgba(186, 47, 38, .1); }

.compliance-overview {
    margin: 18px 30px 0;
    padding: 17px 19px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.15fr);
    align-items: center;
    gap: 18px;
    border: 1px solid #dce7ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 9px 28px rgba(6, 45, 82, .06);
}
.compliance-overview h2 { margin: 0; color: var(--navy-deep); font-size: 1rem; }
.compliance-overview p:last-child { margin: 6px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.compliance-status-actions { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.compliance-status-button {
    min-width: 0;
    padding: 11px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 850;
}
.compliance-status-button strong { flex: 0 0 auto; font-size: 1.18rem; }
.compliance-status-button span { min-width: 0; font-size: .68rem; line-height: 1.25; text-align: right; overflow-wrap: anywhere; }
.compliance-status-button.expired { border-color: #f2bbb5; background: #fee9e7; color: #9f2018; }
.compliance-status-button.missing { border-color: #efaaaa; background: #fde8e8; color: #8f1d1d; }
.compliance-status-button.expiring { border-color: #efd18a; background: #fff3d6; color: #855500; }
.compliance-status-button.valid { border-color: #acd9c0; background: #e8f7ef; color: #17683d; }
.compliance-status-button.active { box-shadow: 0 0 0 3px rgba(12,126,232,.14); }
.compliance-badge {
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}
.compliance-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.compliance-badge.expired { background: #fee2e2; color: #991b1b; }
.compliance-badge.expiring { background: #fff0c7; color: #8a5700; }
.compliance-badge.valid { background: #dcf5e8; color: #137347; }
.expiry-detail { display: block; margin-top: 4px; color: #64748b; font-size: .68rem; white-space: nowrap; }

.dashboard-primary-grid,
.dashboard-secondary-grid {
    margin: 18px 30px 0;
    display: grid;
    gap: 14px;
}

.dashboard-primary-grid { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .82fr) minmax(280px, .86fr); }
.dashboard-secondary-grid { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .82fr) minmax(280px, .86fr); }

.dashboard-card {
    min-width: 0;
    padding: 19px;
    border: 1px solid #e0e9f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 10px 30px rgba(6, 45, 82, .07);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.card-heading h2 {
    margin: 0;
    color: var(--navy-deep);
    font-size: 1rem;
}

.card-heading > a {
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.card-heading > div > small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .7rem;
}

.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: .7rem; }
.chart-legend span::before {
    content: "";
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 50%;
}
.chart-legend .completed::before { background: #0c7ee8; }
.chart-legend .active::before { background: #13b4a3; }
.trend-chart svg { width: 100%; height: 222px; display: block; }
.chart-grid line { stroke: #e5edf3; stroke-width: 1; }
.completed-line,
.active-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.completed-line { stroke: #0c7ee8; }
.active-line { stroke: #13b4a3; }
.trend-axis { display: flex; justify-content: space-between; color: #718494; font-size: .67rem; }

.fleet-visual {
    min-height: 230px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 20px;
}

.fleet-donut {
    width: 152px;
    height: 152px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(3, 26, 50, .04);
}

.fleet-donut > div {
    width: 96px;
    height: 96px;
    display: grid;
    place-content: center;
    border-radius: 50%;
    background: #fff;
    text-align: center;
    box-shadow: 0 3px 16px rgba(3, 26, 50, .12);
}

.fleet-donut strong { color: var(--navy-deep); font-size: 1.8rem; line-height: 1; }
.fleet-donut span { margin-top: 5px; color: var(--muted); font-size: .68rem; }
.fleet-legend { width: 100%; }
.fleet-legend p { margin: 7px 0; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 7px; font-size: .72rem; }
.fleet-legend b { color: #355267; font-weight: 750; }
.fleet-legend em { color: var(--muted); font-style: normal; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.available { background: #0c7ee8; }
.dot.workshop { background: #f4a62a; }
.dot.other { background: #173f63; }

.alert-centre {
    display: flex;
    flex-direction: column;
    border-color: #0c3558;
    background:
        radial-gradient(circle at 90% 0%, rgba(12, 126, 232, .28), transparent 18rem),
        linear-gradient(155deg, #062943, #031a2e);
    color: #fff;
}
.alert-centre .eyebrow { color: #7ac5ff; }
.alert-centre .card-heading h2 { color: #fff; }
.alert-list { display: grid; }
.alert-row {
    padding: 10px 0;
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    color: #fff;
    text-decoration: none;
}
.alert-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.alert-row small { display: -webkit-box; margin-top: 3px; overflow: hidden; color: #b8ccdc; font-size: .66rem; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.priority-dot {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f4a62a;
    color: #fff;
    font-size: .62rem;
    font-weight: 900;
}
.priority-dot.priority-critical { background: #e4473d; }
.priority-dot.priority-high { background: #ef781f; }
.priority-dot.priority-medium { background: #f4a62a; }
.priority-dot.priority-information { background: #0c7ee8; }
.card-footer-link { margin-top: auto; padding-top: 14px; color: #71bfff; text-align: center; text-decoration: none; font-size: .73rem; font-weight: 800; }
.alert-centre .empty-state { color: #b8ccdc; }

.recent-trip-filters {
    margin: 9px 0 4px;
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr)) repeat(2, minmax(115px, .8fr)) auto auto;
    gap: 6px;
    align-items: center;
}
.recent-trip-filters select,
.recent-trip-filters input {
    min-width: 0;
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #d8e4ec;
    border-radius: 8px;
    background: #fff;
    color: var(--navy-deep);
    font: inherit;
    font-size: .65rem;
}
.recent-trip-filters button,
.recent-trip-filters a {
    width: auto;
    padding: 7px 9px;
    font-size: .65rem;
    white-space: nowrap;
}
.invoice-builder-tools {
    margin: 14px 0 6px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
}
.invoice-builder-tools .secondary-button {
    width: auto;
    min-height: 44px;
    padding: 10px 14px;
    background: #eaf3fa;
    color: var(--navy-deep);
    box-shadow: none;
}
.invoice-selection-count {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e8f5ff;
    color: #075c9f;
    font-size: .74rem;
    font-weight: 900;
    white-space: nowrap;
}
.invoice-builder-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.invoice-builder-summary > strong {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e8f7ef;
    color: #087443;
    font-size: .74rem;
    white-space: nowrap;
}
.invoice-document-note {
    margin: 10px 0 4px;
    padding: 11px 13px;
    border: 1px solid #b9dbf2;
    border-radius: 10px;
    background: #eff8ff;
    color: #31586f;
    font-size: .72rem;
    line-height: 1.5;
}
.invoice-document-note strong { color: #075c9f; }
.invoice-builder table { min-width: 1580px; }
.billing-cell-detail {
    display: block;
    margin-top: 4px;
    max-width: 190px;
    color: var(--muted);
    font-size: .61rem;
    line-height: 1.35;
}
.billing-rate-input {
    min-width: 125px;
    padding: 8px 9px;
}
.billing-document-state {
    min-width: 142px;
    display: grid;
    gap: 5px;
}
.billing-document-state a {
    width: max-content;
    max-width: 100%;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: .59rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}
.billing-document-state .attached { background: #dcf5e8; color: #087443; }
.billing-document-state .pending { background: #fff0cf; color: #855600; }
.billing-remember-rate {
    min-width: 132px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #4b6578;
    font-size: .62rem;
    line-height: 1.35;
}
.billing-remember-rate input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin-top: 1px;
}
.invoice-builder tr:has([data-billing-trip-checkbox]:checked) {
    background: #f0f8ff;
}
.delay-review-panel {
    padding: 18px 20px;
}
.delay-review-panel h2 {
    margin-bottom: 10px;
}
.delay-review-panel th,
.delay-review-panel td {
    padding: 8px 10px;
    vertical-align: middle;
}
.delay-review-panel tbody tr {
    height: auto;
}
.delay-review-panel th:nth-child(1) { width: 36%; }
.delay-review-panel th:nth-child(2) { width: 23%; }
.delay-review-panel th:nth-child(3) { width: 9%; }
.delay-review-panel th:nth-child(4) { width: 7%; }
.delay-review-panel th:nth-child(5) { width: 25%; }
.delay-decision {
    min-width: 350px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.delay-charge-form {
    flex: 1;
    display: grid;
    grid-template-columns: 54px minmax(92px, 1fr) auto auto;
    align-items: center;
    gap: 6px;
}
.delay-charge-form input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 5px 7px;
    font-size: .7rem;
}
.delay-charge-form .delay-charge-total {
    min-width: 72px;
    margin: 0;
    font-size: .62rem;
    white-space: nowrap;
}
.delay-charge-form button,
.delay-waive-form button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: .66rem;
    white-space: nowrap;
}
.delay-waive-form {
    margin: 0;
}
.invoice-builder tr[hidden] { display: none; }
.invoice-builder input[type="checkbox"]:disabled { opacity: .35; cursor: not-allowed; }
.inline-form { display: inline; }
.danger-link { color: #b42318; }
.fleet-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.fleet-status-key {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.fleet-status-key span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #4d6576;
    font-size: .62rem;
    font-weight: 850;
    white-space: nowrap;
}
.fleet-status-key i { width: 9px; height: 9px; border-radius: 50%; background: #7990a2; }
.fleet-status-key .valid i { background: #20a464; }
.fleet-status-key .warning i { background: #e8a11a; }
.fleet-status-key .danger i { background: #e34b43; }
.fleet-status-key .active i { background: #0c7ee8; }
.fleet-status-key .workshop i { background: #8e5bd7; }
.fleet-record-card {
    border: 1px solid #d9e5ec;
    border-radius: 14px;
    background: #f8fbfd;
    overflow: hidden;
    box-shadow: 0 7px 22px rgba(7, 48, 82, .06);
}
.fleet-record-card summary {
    min-height: 112px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    gap: 7px 12px;
    cursor: pointer;
    list-style: none;
    position: relative;
    overflow: hidden;
}
.fleet-record-card summary::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(to bottom, var(--fleet-status-colours, #7990a2));
}
.fleet-record-card summary::-webkit-details-marker { display: none; }
.fleet-record-card summary::after {
    content: "+";
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: #456377;
    font-size: 1.35rem;
    font-weight: 900;
}
.fleet-record-card[open] summary::after { content: "−"; }
.fleet-card-registration {
    color: var(--navy-deep);
    font-size: 1.22rem;
    font-weight: 950;
    letter-spacing: .025em;
}
.fleet-card-states {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.fleet-card-state {
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e9f0f5;
    color: #355469;
    font-size: .68rem;
    font-weight: 900;
}
.fleet-record-card summary small {
    grid-column: 1;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}
.fleet-record-card--valid summary { background: #effaf4; }
.fleet-record-card--warning summary { background: #fff8e8; }
.fleet-record-card--danger summary { background: #fff1f0; }
.fleet-record-card--active summary { background: #edf6ff; }
.fleet-record-card--workshop summary { background: #f7f1ff; }
.fleet-card-state--valid { background: #d8f2e5; color: #087640; }
.fleet-card-state--warning { background: #ffedbd; color: #875600; }
.fleet-card-state--danger { background: #ffdeda; color: #a5221c; }
.fleet-card-state--active { background: #d6ebff; color: #075fae; }
.fleet-card-state--workshop { background: #eadcff; color: #6630ad; }
.fleet-card-state--neutral { background: #e9f0f5; color: #355469; }
.fleet-card-body { padding: 18px; border-top: 1px solid #d9e5ec; background: #fff; }
.fleet-card-details {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.fleet-card-details div { padding: 10px; border-radius: 9px; background: #f5f8fa; }
.fleet-card-details dt { color: var(--muted); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .055em; }
.fleet-card-details dd { margin: 4px 0 0; color: var(--navy-deep); font-size: .78rem; font-weight: 850; }
.fleet-card-issues { margin-top: 13px; display: grid; gap: 7px; }
.fleet-card-issues p { margin: 0; padding: 9px 10px; border-radius: 8px; font-size: .7rem; line-height: 1.45; }
.fleet-card-issues .blocking { background: #fff0ef; color: #9f241e; }
.fleet-card-issues .attention { background: #fff7df; color: #815400; }
.fleet-card-clear { margin: 13px 0 0; padding: 9px 10px; border-radius: 8px; background: #eaf8f1; color: #087443; font-size: .7rem; font-weight: 800; }
.fleet-card-body .table-actions { margin-top: 14px; }
.dashboard-list { display: grid; }
.dashboard-list-row {
    padding: 11px 0;
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.2fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf2f6;
    font-size: .71rem;
}
.dashboard-list-row:last-child,
.service-row:last-child,
.customer-row:last-child { border-bottom: 0; }
.dashboard-list-row strong,
.service-row strong { display: block; color: var(--navy-deep); font-size: .75rem; }
.dashboard-list-row small,
.service-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .65rem; }
.dashboard-list-row .route { overflow: hidden; color: #3e596d; text-overflow: ellipsis; white-space: nowrap; }
.recent-trip-list-header,
.recent-trip-list-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.25fr) minmax(82px, .55fr) minmax(180px, 1.1fr) auto;
    align-items: center;
    gap: 10px;
}
.recent-trip-list-header {
    padding: 8px 0 7px;
    border-bottom: 1px solid #dce7ef;
    color: var(--muted);
    font-size: .61rem;
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.recent-trip-list-row .trip-date { color: #3e596d; font-size: .69rem; white-space: nowrap; }
.status-chip {
    padding: 4px 7px;
    border-radius: 999px;
    background: #e7f8ef;
    color: #138354;
    font-size: .62rem;
    font-weight: 850;
    text-transform: capitalize;
    white-space: nowrap;
}
.status-chip.status-planned { background: #e9f3fd; color: #0c6dbe; }
.status-chip.status-cancelled { background: #fff0ef; color: #b42318; }

.service-row {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf2f6;
    font-size: .7rem;
}
.service-icon,
.rank {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f3fd;
    color: #0c6dbe;
    font-size: .65rem;
    font-weight: 900;
}
.service-row > span:last-child { color: #426078; font-size: .67rem; }
.customer-row {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #edf2f6;
    font-size: .7rem;
}
.customer-row strong { overflow: hidden; color: #27465e; text-overflow: ellipsis; white-space: nowrap; }
.customer-row > span:last-child { color: var(--navy-deep); font-weight: 800; }
.empty-state { margin: 12px 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.governance-strip {
    margin: 18px 30px 0;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dce7ee;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(6, 45, 82, .05);
}
.governance-strip strong { display: block; color: var(--navy-deep); font-size: .9rem; }
.governance-strip span { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.governance-strip > div:last-child { display: flex; gap: 8px; }
.governance-strip a { padding: 8px 10px; border-radius: 8px; background: #edf5fb; text-decoration: none; font-size: .73rem; font-weight: 800; }

/* Guided setup and dispatch readiness */
.setup-ribbon {
    margin: 16px 30px 0;
    padding: 15px 18px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #bddcf4;
    border-radius: 13px;
    background: linear-gradient(135deg, #f6fbff, #eaf5fe);
    box-shadow: 0 8px 24px rgba(6, 45, 82, .05);
}
.setup-ribbon-progress {
    width: 68px;
    height: 68px;
    display: grid;
    place-content: center;
    border: 6px solid #cce5f8;
    border-top-color: #0c7ee8;
    border-radius: 50%;
    text-align: center;
}
.setup-ribbon-progress strong { color: var(--navy-deep); font-size: 1rem; }
.setup-ribbon-progress span { color: var(--muted); font-size: .55rem; }
.setup-ribbon h2 { margin: 0; color: var(--navy-deep); font-size: 1rem; }
.setup-ribbon p:last-child { margin: 5px 0 0; color: var(--muted); font-size: .76rem; }
.setup-ribbon > a {
    padding: 9px 12px;
    border-radius: 9px;
    background: #0c7ee8;
    color: #fff;
    text-decoration: none;
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
}

.setup-main { background: #f4f8fb; }
.setup-hero {
    margin-top: 22px;
    padding: clamp(22px, 3vw, 34px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: center;
    gap: 28px;
    overflow: hidden;
    border: 1px solid #0b4d92;
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 20%, rgba(32, 144, 235, .36), transparent 22rem),
        linear-gradient(135deg, #031a2e, #074477);
    color: #fff;
    box-shadow: 0 20px 48px rgba(3, 26, 50, .18);
}
.setup-hero.is-ready {
    background:
        radial-gradient(circle at 88% 20%, rgba(25, 179, 126, .30), transparent 22rem),
        linear-gradient(135deg, #04283a, #075844);
}
.setup-hero .eyebrow { color: #7bc8ff; }
.setup-hero.is-ready .eyebrow { color: #8ee0bd; }
.setup-hero h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.06; }
.setup-hero p { max-width: 660px; color: #c4d8e8; line-height: 1.6; }
.setup-hero small { display: block; margin-top: 8px; color: #acc7d9; font-size: .7rem; }
.setup-progress { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.setup-progress span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #35a8ff, #79d3ff); }
.setup-hero.is-ready .setup-progress span { background: linear-gradient(90deg, #1bb47b, #8ee0bd); }
.setup-next-action {
    padding: 19px;
    display: block;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(12px);
}
.setup-next-action span,
.setup-next-action em { display: block; color: #bcd3e4; font-size: .7rem; font-style: normal; }
.setup-next-action strong { display: block; margin: 8px 0 14px; font-size: 1.05rem; }
.setup-next-action em { color: #7bc8ff; font-weight: 850; }

.setup-summary {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.setup-summary article {
    padding: 16px;
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
    align-items: center;
    border: 1px solid #e0e9f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(6,45,82,.06);
}
.setup-summary article > span {
    width: 34px;
    height: 34px;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eaf4ff;
    color: #0c7ee8;
    font-size: .66rem;
    font-weight: 950;
}
.setup-summary strong { color: var(--navy-deep); font-size: 1.35rem; line-height: 1; }
.setup-summary small { color: var(--muted); font-size: .68rem; }
.setup-steps { margin-top: 18px; display: grid; gap: 11px; }
.setup-step {
    padding: 17px 18px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    border: 1px solid #e0e9f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(6,45,82,.05);
}
.step-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf4ff;
    color: #0c7ee8;
    font-weight: 950;
}
.setup-step.complete .step-number { background: #e5f8ef; color: #138354; }
.step-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.step-title-row h2 { margin: 0; color: var(--navy-deep); font-size: .95rem; }
.step-status { padding: 4px 7px; border-radius: 999px; background: #fff1df; color: #9a5d00; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.setup-step.complete .step-status { background: #e5f8ef; color: #138354; }
.step-copy p { margin: 5px 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.step-copy > small { color: #8a99a5; font-size: .66rem; }
.setup-step > a { padding: 8px 10px; border-radius: 8px; background: #edf5fb; text-decoration: none; font-size: .72rem; font-weight: 850; white-space: nowrap; }
.setup-note {
    margin-top: 18px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: center;
    gap: 20px;
    border-left: 4px solid #0c7ee8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(6,45,82,.05);
}
.setup-note h2 { margin: 0; color: var(--navy-deep); font-size: 1rem; }
.setup-note > p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.55; }

.master-tabs {
    margin: 18px 0;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
}
.master-tabs a {
    flex: 0 0 auto;
    padding: 9px 11px;
    border: 1px solid #dce7ee;
    border-radius: 9px;
    background: #fff;
    color: #456075;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 800;
}
.master-tabs a.active { border-color: #0c7ee8; background: #eaf4ff; color: #0b64b4; }
.master-setup-note {
    margin-bottom: 18px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #d7e7f2;
    border-radius: 11px;
    background: #f8fbfd;
}
.master-setup-note > div { display: flex; align-items: center; gap: 10px; }
.master-setup-note > div > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf4ff;
    color: #0c7ee8;
    font-weight: 950;
}
.master-setup-note p { margin: 0; }
.master-setup-note strong,
.master-setup-note small { display: block; }
.master-setup-note strong { color: var(--navy-deep); font-size: .78rem; }
.master-setup-note small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.master-setup-note > a { font-size: .71rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.master-grid {
    grid-template-columns: minmax(340px, .62fr) minmax(0, 1.8fr);
    align-items: start;
}
.master-grid > .panel { min-width: 0; }
.edit-context,
.restricted-field-note {
    margin: 0 0 14px;
    padding: 11px 12px;
    border-radius: 9px;
    font-size: .72rem;
    line-height: 1.5;
}
.edit-context { border: 1px solid #cfe3f4; background: #f2f8fd; color: #315b78; }
.restricted-field-note { border: 1px solid #f1d8a4; background: #fff9eb; color: #76500b; }
.master-form-actions { margin-top: 4px; display: flex; align-items: center; gap: 12px; }
.master-form-actions a,
.table-action { color: #0b69bd; font-size: .72rem; font-weight: 850; text-decoration: none; }
.master-form-actions a:hover,
.table-action:hover { text-decoration: underline; }
.table-actions { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.table-actions form { margin: 0; }

/* Operations command workspace */
.topbar-copy { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
.operations-summary {
    margin: 18px 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
}
.operations-summary article {
    padding: 14px;
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 9px;
    align-items: center;
    border: 1px solid #e0e9f0;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(6,45,82,.05);
}
.operations-summary article > span {
    width: 32px;
    height: 32px;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eaf4ff;
    color: #0c7ee8;
    font-size: .63rem;
    font-weight: 950;
}
.operations-summary strong { color: var(--navy-deep); font-size: 1.25rem; line-height: 1; }
.operations-summary small { color: var(--muted); font-size: .65rem; }
.compliance-hold {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #efb4ae;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff8f7, #ffefed);
}
.compliance-hold-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.compliance-hold-heading h2 { margin: 0; color: #842018; font-size: 1.05rem; }
.compliance-hold-heading p:last-child { margin: 6px 0 0; color: #8f4b45; font-size: .75rem; }
.compliance-hold-heading > a {
    padding: 9px 11px;
    border-radius: 8px;
    background: #a82b22;
    color: #fff;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}
.compliance-hold-items { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.compliance-hold-items article { padding: 11px 12px; border: 1px solid rgba(159,32,24,.14); border-radius: 9px; background: rgba(255,255,255,.78); }
.compliance-hold-items strong,
.compliance-hold-items small { display: block; }
.compliance-hold-items strong { margin-top: 3px; color: #631a15; font-size: .78rem; }
.compliance-hold-items small { margin-top: 5px; color: #86514c; font-size: .67rem; line-height: 1.4; }
.compliance-type { color: #a82b22; font-size: .58rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.dispatch-readiness {
    margin-bottom: 18px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(240px, .85fr) minmax(0, 1.4fr);
    gap: 22px;
    border: 1px solid #e9c477;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffaf0, #fff4dc);
}
.dispatch-readiness h2 { margin: 0; color: #6f4600; font-size: 1.15rem; }
.dispatch-readiness p:last-child { margin: 7px 0 0; color: #856a3b; font-size: .77rem; line-height: 1.5; }
.readiness-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.readiness-items a {
    padding: 11px 12px;
    display: grid;
    border: 1px solid rgba(174,111,0,.16);
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    text-decoration: none;
}
.readiness-items a.guide-link { border-color: #b9d9f3; background: #f2f9ff; }
.readiness-items span { color: #a56a00; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.readiness-items strong { margin-top: 3px; color: #6f4600; font-size: .78rem; }
.readiness-items em { margin-top: 7px; color: #0c6dbe; font-size: .67rem; font-style: normal; font-weight: 800; }
.operations-layout {
    display: grid;
    grid-template-columns: minmax(260px, 3fr) minmax(520px, 7fr);
    gap: 15px;
    align-items: stretch;
}
.operations-layout > .dashboard-card { min-width: 0; }
.trip-register-card { grid-column: 1 / -1; }
.operations-container-card,
.operations-create-card { border-top: 3px solid #0c6dbe; }
.operations-container-card { border-top-color: #15a46f; }
.card-step {
    width: 27px; height: 27px; display: inline-grid; place-items: center;
    border-radius: 50%; background: #eaf4fb; color: #0c6dbe;
    font-size: .61rem; font-weight: 950;
}
.operations-container-card .card-step { background: #e8f8f1; color: #138354; }
.compact-operations-form { gap: 10px; }
.compact-operations-form label { font-size: .78rem; }
.compact-operations-form input,
.compact-operations-form select { min-height: 40px; padding-top: 9px; padding-bottom: 9px; }
.dispatch-compact-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 12px; align-items: end; }
.dispatch-compact-form > .form-split { display: contents; }
.dispatch-compact-form .form-split > div:has(input[readonly]) { display: none; }
.dispatch-compact-form .dispatch-field,
.dispatch-compact-form .form-split > div { min-width: 0; }
.dispatch-compact-form label { margin-bottom: 5px; font-size: .75rem; }
.dispatch-compact-form input,
.dispatch-compact-form select { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.dispatch-compact-form .field-help { margin-top: 3px; font-size: .61rem; white-space: nowrap; }
.dispatch-compact-form > .field-help { display: none; }
.dispatch-compact-form .dispatch-barcode { grid-column: span 2; }
.dispatch-compact-form > button { min-height: 40px; margin: 0; }
@media (max-width: 1050px) {
    .dispatch-compact-form { grid-template-columns: 1fr 1fr; }
    .dispatch-compact-form .dispatch-barcode { grid-column: auto; }
}
@media (max-width: 700px) {
    .dispatch-compact-form { grid-template-columns: 1fr; }
}
.panel-grid > .panel:first-child:has(input[name="action"][value="create"]) { display: none; }
.panel-grid:has(input[name="action"][value="create"]) { grid-template-columns: 1fr; }
.operations-main { display: flex; flex-direction: column; }
.operations-main > .operations-workflow-grid { order: 1; }
.operations-main > #trip-history { order: 2; }
.operations-workflow-grid { margin-top: 15px; display: grid; grid-template-columns: 1fr; gap: 15px; }
.operations-workflow-grid > .final-confirmation-card { display: none; }
.delay-horizontal-form { display: grid; grid-template-columns: minmax(190px,1.2fr) minmax(140px,.7fr) minmax(190px,1fr) minmax(190px,1fr) minmax(210px,1.2fr) auto; gap: 12px; align-items: end; }
.delay-horizontal-form > label { display: none; }
.delay-horizontal-form > .form-split { display: contents; }
.delay-horizontal-form > .field-help { display: none; }
.delay-horizontal-form > textarea { min-height: 54px; height: 54px; margin: 0; }
.delay-horizontal-form > button { width: auto; min-height: 54px; margin: 0; white-space: nowrap; }
@media (max-width: 1180px) {
    .delay-horizontal-form { grid-template-columns: 1fr 1fr; }
    .delay-horizontal-form > .field-help { display: block; grid-column: 1 / -1; }
    .delay-horizontal-form > textarea,
    .delay-horizontal-form > button { height: auto; }
}
.container-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.container-register-panel { margin-top: 15px; }
.container-control-main { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.container-control-main > .topbar,
.container-control-main > .notice,
.container-control-main > .error { grid-column: 1 / -1; }
.container-handover-panel { grid-column: 1; grid-row: 2; margin-top: 0; }
.container-confirmation-panel { grid-column: 2; grid-row: 2; margin-top: 0; }
.container-control-main > .container-register-panel { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
.readiness-pill { padding: 5px 8px; border-radius: 999px; background: #fff1df; color: #a16400; font-size: .61rem; font-weight: 900; text-transform: uppercase; }
.readiness-pill.ready { background: #e5f8ef; color: #138354; }
.data-form label b { color: #b42318; }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.form-split > div { min-width: 0; display: grid; gap: 9px; }
.form-split > div > input,
.form-split > div > select,
.form-split > div > textarea { width: 100%; min-width: 0; max-width: 100%; }
.blocked-form {
    min-height: 330px;
    display: grid;
    place-content: center;
    justify-items: center;
    padding: 28px;
    border: 1px dashed #d9c18d;
    border-radius: 12px;
    background: #fffaf0;
    text-align: center;
}
.blocked-form > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff0cc;
    color: #a16400;
    font-size: 1.3rem;
    font-weight: 950;
}
.blocked-form h3 { margin: 13px 0 0; color: #6f4600; }
.blocked-form p { max-width: 310px; margin: 8px 0; color: #856a3b; font-size: .76rem; line-height: 1.5; }
.blocked-form a { font-size: .73rem; font-weight: 850; text-decoration: none; }
.trip-register-card table { min-width: 1040px; table-layout: auto; }
.trip-register-card td small { display: block; margin-top: 3px; color: var(--muted); font-size: .65rem; }
.route-cell { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-register-card th,
.trip-register-card td { padding: 11px 12px; }
.trip-register-card th:first-child,
.trip-register-card td:first-child { min-width: 270px; width: 270px; }
.trip-register-card .trip-reference-cell strong {
    display: block;
    max-width: 270px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}
.trip-container-assign {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 6px;
    min-width: 205px;
}
.trip-container-assign select {
    min-width: 0;
    width: 100%;
    padding: 8px 9px;
    border: 1px solid #cbdbe6;
    border-radius: 8px;
    background: #fff;
    color: var(--navy-deep);
    font: inherit;
    font-size: .67rem;
}
.trip-container-assign button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: .65rem;
}
.not-captured {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
}
.table-empty { padding: 32px 18px; text-align: center; }
.table-empty strong,
.table-empty span { display: block; }
.table-empty strong { color: var(--navy-deep); }
.table-empty span { margin-top: 6px; color: var(--muted); font-size: .75rem; }
.workflow-empty {
    min-height: 250px;
    display: grid;
    place-content: center;
    justify-items: center;
    padding: 25px;
    border: 1px dashed #d9e5ec;
    border-radius: 11px;
    background: #f8fbfd;
    text-align: center;
}
.workflow-empty > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #eaf4ff; color: #0c7ee8; font-size: .67rem; font-weight: 950; }
.workflow-empty p { max-width: 330px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.workflow-empty a { font-size: .72rem; font-weight: 850; text-decoration: none; }

/* Workshop workflow, preventive maintenance, inventory, and tyre control */
.workshop-main {
    padding-bottom: 46px;
    background:
        radial-gradient(circle at 92% 0%, rgba(12, 126, 232, .09), transparent 30rem),
        #f4f8fb;
}
.workshop-tabs {
    position: sticky;
    top: 12px;
    z-index: 10;
    margin: 18px 0;
    padding: 7px;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    border: 1px solid #dfe9f0;
    border-radius: 13px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 9px 25px rgba(6, 45, 82, .08);
    backdrop-filter: blur(12px);
}
.workshop-tabs a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 8px;
    color: #37566c;
    font-size: .74rem;
    font-weight: 850;
    text-decoration: none;
}
.workshop-tabs a:hover { background: #eaf4ff; color: #0c6dbe; }
.workshop-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.workshop-summary article {
    min-height: 105px;
    padding: 14px;
    display: grid;
    grid-template-columns: 33px 1fr;
    align-content: center;
    gap: 2px 10px;
    border: 1px solid #dfe9f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 23px rgba(6, 45, 82, .06);
}
.workshop-summary article > span {
    width: 33px;
    height: 33px;
    grid-row: span 2;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eaf4ff;
    color: #0c6dbe;
    font-size: .63rem;
    font-weight: 950;
}
.workshop-summary strong { color: var(--navy-deep); font-size: 1.5rem; line-height: 1; }
.workshop-summary small { color: var(--muted); font-size: .67rem; line-height: 1.25; }
.workshop-summary article.warning { border-color: #f0d59e; background: #fffbf3; }
.workshop-summary article.warning > span { background: #fff0cc; color: #a16400; }
.workshop-summary article.critical { border-color: #efc1bd; background: #fff7f6; }
.workshop-summary article.critical > span { background: #ffe7e5; color: #b42318; }
.workshop-section {
    margin-top: 22px;
    padding-top: 10px;
    scroll-margin-top: 90px;
}
.section-heading {
    margin-bottom: 13px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.section-heading h2 { margin: 0; color: var(--navy-deep); font-size: 1.28rem; }
.section-heading p:last-child { max-width: 720px; margin: 5px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.section-heading > a,
.section-heading > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #eaf4ff;
    color: #0c6dbe;
    font-size: .68rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}
.workshop-grid { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(0, 1.55fr); gap: 14px; align-items: start; }
.workshop-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-guidance {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--amber);
    border-radius: 7px;
    background: #fff8e8;
    color: #715318;
    font-size: .73rem;
    line-height: 1.45;
}
.data-form textarea { min-height: 78px; resize: vertical; }
.job-register { min-height: 470px; }
.job-card-list { display: grid; gap: 10px; }
.job-work-card {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #dfe8ef;
    border-radius: 11px;
    background: #fbfdff;
}
.job-work-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #0c7ee8; }
.job-work-card.tone-critical::before { background: #d43a31; }
.job-work-card.tone-warning::before { background: #e99b11; }
.job-work-card.tone-testing::before { background: #7c4dcc; }
.job-work-card.tone-repair::before { background: #0c7ee8; }
.job-work-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-work-head strong { display: block; color: var(--navy-deep); font-size: .82rem; }
.job-work-head div > span { display: block; margin-top: 3px; color: #3f5e73; font-size: .72rem; font-weight: 750; }
.job-work-card > p { margin: 11px 0; color: #365368; font-size: .75rem; line-height: 1.45; }
.workshop-stage,
.service-state,
.stock-state,
.tyre-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e9f3fd;
    color: #0c6dbe;
    font-size: .61rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    white-space: nowrap;
}
.workshop-stage.critical,
.service-state.overdue,
.stock-state.low,
.tyre-state.scrapped { background: #ffe8e6; color: #b42318; }
.workshop-stage.warning,
.service-state.due,
.stock-state.issue { background: #fff0d2; color: #a66600; }
.workshop-stage.testing { background: #eee8ff; color: #6536ad; }
.workshop-stage.repair,
.workshop-stage.inspection { background: #e8f3ff; color: #0c6dbe; }
.workshop-stage.complete,
.stock-state.ok,
.stock-state.receipt,
.stock-state.return,
.tyre-state.store,
.tyre-state.returned { background: #e5f8ef; color: #138354; }
.workshop-stage.muted,
.service-state.unscheduled,
.stock-state.adjustment,
.tyre-state.removed { background: #eef2f5; color: #5d7181; }
.service-state.scheduled { background: #e5f8ef; color: #138354; }
.tyre-state.installed,
.tyre-state.rotated { background: #e8f3ff; color: #0c6dbe; }
.tyre-state.retreading,
.tyre-state.retread { background: #fff0d2; color: #a66600; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.job-meta span {
    padding: 5px 7px;
    border-radius: 6px;
    background: #eef4f8;
    color: #566d7e;
    font-size: .64rem;
    font-weight: 750;
}
.job-stage-form {
    margin-top: 11px;
    padding-top: 11px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) auto;
    gap: 7px;
    border-top: 1px solid #e6edf2;
}
.job-stage-form input,
.job-stage-form select,
.job-stage-form button { min-width: 0; padding: 8px 9px; font-size: .7rem; }
.service-status-grid { margin-bottom: 13px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.service-status-grid article {
    padding: 13px;
    border: 1px solid #dce7ee;
    border-left: 4px solid #1a915f;
    border-radius: 10px;
    background: #fff;
}
.service-status-grid article.overdue { border-left-color: #c3372e; background: #fff8f7; }
.service-status-grid article.due { border-left-color: #e49a13; background: #fffbf3; }
.service-status-grid article.unscheduled { border-left-color: #8393a0; }
.service-status-grid strong { display: block; color: var(--navy-deep); font-size: 1.25rem; }
.service-status-grid span { color: var(--muted); font-size: .69rem; font-weight: 800; }
.service-schedule-list { display: grid; }
.service-schedule-list article {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eaf0f4;
}
.service-schedule-list article:last-child { border-bottom: 0; }
.service-schedule-list strong { display: block; color: var(--navy-deep); font-size: .76rem; }
.service-schedule-list small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.service-schedule-list em { color: #506a7e; font-size: .68rem; font-style: normal; white-space: nowrap; }
.service-row { grid-template-columns: 78px minmax(0, 1fr); }
.workshop-history {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid #dfe9f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(6, 45, 82, .05);
}
.workshop-history summary {
    padding: 13px 15px;
    color: #24475f;
    font-size: .74rem;
    font-weight: 850;
    cursor: pointer;
}
.workshop-history[open] summary { border-bottom: 1px solid #e4ecf2; background: #f8fbfd; }
.workshop-history table { min-width: 880px; font-size: .72rem; }
.register-card { margin-top: 0; }
.register-card table { min-width: 760px; font-size: .73rem; }
.low-stock-row { background: #fffaf1; }

/* Scheduled reports and monitored delivery automation */
.schedule-panel {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #dce7ee;
    border-radius: 15px;
    background:
        radial-gradient(circle at 100% 0%, rgba(12, 126, 232, .08), transparent 26rem),
        #f8fbfd;
}
.automation-heading {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.automation-heading h2 { margin: 0; color: var(--navy-deep); }
.automation-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: .76rem; }
.automation-health {
    min-width: 145px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
    border-radius: 10px;
    background: #eef2f5;
    color: #526979;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}
.automation-health small {
    color: inherit;
    font-size: .61rem;
    font-weight: 650;
    line-height: 1.35;
    text-transform: none;
}
.automation-health.healthy { background: #e5f8ef; color: #138354; }
.automation-health.warning { background: #fff0d2; color: #9f6500; }
.automation-health.attention { background: #ffe8e6; color: #b42318; }
.automation-install {
    margin-bottom: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5px 16px;
    border: 1px solid #efd39b;
    border-radius: 11px;
    background: #fff9eb;
}
.automation-install strong { color: #775312; }
.automation-install p { margin: 0; color: #836b3c; font-size: .72rem; }
.automation-install a {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 8px 11px;
    border-radius: 8px;
    background: #fff;
    color: #8a5b00;
    font-size: .7rem;
    font-weight: 850;
    text-decoration: none;
}
.schedule-workspace {
    display: grid;
    grid-template-columns: minmax(300px, .68fr) minmax(0, 1.65fr);
    gap: 14px;
    align-items: start;
}
.automation-copy { color: var(--muted); font-size: .73rem; line-height: 1.5; }
.confidential-note {
    margin: 2px 0 4px;
    padding: 9px 10px;
    border-left: 3px solid #d98a00;
    border-radius: 6px;
    background: #fff8e9;
    color: #74581f;
    font-size: .67rem;
    line-height: 1.45;
}
.schedule-register table { min-width: 980px; font-size: .7rem; }
.schedule-register td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .62rem;
}
.recipient-cell { max-width: 220px; overflow-wrap: anywhere; }
.schedule-controls { min-width: 175px; display: flex; gap: 5px; }
.schedule-controls select,
.schedule-controls button { padding: 7px 8px; font-size: .66rem; }
.delivery-state {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f5;
    color: #5e7180;
    font-size: .6rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}
.delivery-state.sent { background: #e5f8ef; color: #138354; }
.delivery-state.partial,
.delivery-state.queued,
.delivery-state.processing { background: #fff0d2; color: #9f6500; }
.delivery-state.failed { background: #ffe8e6; color: #b42318; }
.delivery-state.cancelled,
.delivery-state.skipped { background: #eef2f5; color: #5e7180; }
.delivery-history {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #dce7ee;
    border-radius: 11px;
    background: #fff;
}
.delivery-history summary { padding: 13px 15px; color: #24475f; font-size: .75rem; font-weight: 850; cursor: pointer; }
.delivery-history[open] summary { border-bottom: 1px solid #e5edf2; background: #f6fafd; }
.delivery-history table { min-width: 900px; font-size: .7rem; }
.settings-health-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.automation-status-card {
    margin-top: 12px;
    padding: 12px;
    display: grid;
    gap: 4px;
    border: 1px solid #dce7ee;
    border-radius: 10px;
    background: #f7fafc;
}
.automation-status-card strong { color: #2a4b62; font-size: .76rem; }
.automation-status-card span,
.automation-status-card small { color: var(--muted); font-size: .68rem; line-height: 1.4; }
.automation-status-card.healthy { border-color: #b9e1cf; background: #f2fbf7; }
.automation-status-card.warning { border-color: #efd49d; background: #fffaf0; }
.automation-status-card.attention { border-color: #efc3c0; background: #fff7f6; }
.email-queue-panel table { min-width: 980px; font-size: .71rem; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: 1fr minmax(350px, 440px); }
    .executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-primary-grid { grid-template-columns: minmax(0, 1.45fr) minmax(250px, .8fr); }
    .alert-centre { grid-column: 1 / -1; min-height: 280px; }
    .dashboard-secondary-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-secondary-grid > article:last-child { grid-column: 1 / -1; }
    .operations-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .operations-layout { grid-template-columns: 1fr; }
    .operations-create-card { max-width: none; }
    .setup-summary { grid-template-columns: 1fr 1fr; }
    .compliance-overview { grid-template-columns: 1fr; }
    .compliance-hold-items { grid-template-columns: 1fr 1fr; }
    .workshop-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .workshop-grid { grid-template-columns: 1fr; }
    .schedule-workspace { grid-template-columns: 1fr; }
    .settings-health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fuel-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fuel-layout { grid-template-columns: 1fr; }
    .fuel-form-card { position: static; }
    .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1450px) and (min-width: 1051px) {
    .operations-layout { grid-template-columns: minmax(250px, 3fr) minmax(480px, 7fr); }
    .operations-main { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 900px) {
    .container-control-main { grid-template-columns: 1fr; }
    .container-handover-panel,
    .container-confirmation-panel,
    .container-control-main > .container-register-panel { grid-column: 1; grid-row: auto; }
    .recent-trip-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-builder-tools { grid-template-columns: 1fr 1fr; }
    .invoice-builder-tools .form-field { grid-column: 1 / -1; }
    .fleet-card-grid { grid-template-columns: 1fr; }
    .app-shell { display: block; }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 12px 16px 10px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand logout"
            "subtitle logout"
            "nav nav";
        column-gap: 14px;
        box-shadow: 0 10px 30px rgba(3, 26, 50, .22);
    }
    .sidebar .brand,
    .sidebar .sidebar-logo { grid-area: brand; }
    .sidebar .sidebar-logo { width: 205px; margin: -5px 0 0; border-radius: 8px; }
    .sidebar .brand-subtitle {
        grid-area: subtitle;
        margin: 3px 0 9px;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sidebar nav {
        grid-area: nav;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
        scrollbar-color: #547b9e transparent;
    }
    .sidebar .nav-group { display: contents; }
    .sidebar .nav-group-title { display: none; }
    .sidebar nav a,
    .sidebar .nav-group a {
        flex: 0 0 auto;
        padding: 8px 11px;
        font-size: .82rem;
        white-space: nowrap;
    }
    .sidebar a:hover { transform: none; }
    .logout-form {
        grid-area: logout;
        margin-top: 0;
    }
    .sidebar .logout {
        width: auto;
        margin: 0;
        align-self: start;
        padding: 7px 11px;
        font-size: .78rem;
    }
    .main-content { padding: 22px; }
    .dashboard-main { padding: 0 0 32px; }
    .dashboard-topbar { padding: 18px 164px 18px 22px; }
    .dashboard-command-strip,
    .executive-metrics,
    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .compliance-overview,
    .setup-ribbon,
    .governance-strip { margin-left: 22px; margin-right: 22px; }
    .dashboard-primary-grid,
    .dashboard-secondary-grid { grid-template-columns: 1fr; }
    .alert-centre,
    .dashboard-secondary-grid > article:last-child { grid-column: auto; }
    .setup-hero { grid-template-columns: 1fr; }
    .dispatch-readiness { grid-template-columns: 1fr; }
    .compliance-hold-heading { align-items: flex-start; flex-direction: column; }
    .operations-workflow-grid { grid-template-columns: 1fr; }
    .panel-grid { grid-template-columns: 1fr 1fr; }
    .master-grid { grid-template-columns: 1fr; }
    .workshop-form-grid { grid-template-columns: 1fr; }
    .automation-heading { flex-direction: column; }
    .login-shell { grid-template-columns: 1fr; justify-items: end; }
    .login-story { display: none; }
    .login-card { max-width: 395px; }
}

@media (max-width: 560px) {
    .recent-trip-filters { grid-template-columns: 1fr; }
    .invoice-builder-tools { grid-template-columns: 1fr; }
    .invoice-builder-tools .form-field { grid-column: auto; }
    .fleet-card-details { grid-template-columns: 1fr; }
    .login-page {
        background:
            linear-gradient(rgba(3, 26, 50, .72), rgba(3, 26, 50, .88)),
            url("mesma-fleet-port-hero-v4.png") 38% center / cover no-repeat;
    }
    .login-shell { padding: 18px; align-items: center; }
    .login-card { padding: 28px 22px; border-radius: 18px; }
    .login-logo { width: 280px; }
    .metric-grid,
    .panel-grid { grid-template-columns: 1fr; }
    .main-content { padding: 16px; }
    .dashboard-main { padding: 0 0 24px; }
    .dashboard-topbar { padding: 15px 16px; align-items: flex-start; }
    .dashboard-user .profile,
    .quick-action { display: none; }
    .dashboard-command-strip,
    .executive-metrics,
    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .compliance-overview,
    .setup-ribbon,
    .governance-strip { margin-left: 14px; margin-right: 14px; }
    .dashboard-command-strip {
        align-items: flex-start;
        flex-direction: column;
        padding: 19px;
        background:
            linear-gradient(90deg, rgba(3, 26, 46, .96) 0%, rgba(3, 26, 46, .88) 60%, rgba(3, 26, 46, .56) 100%),
            url("mesma-fleet-port-hero-v4.png") center 58% / cover no-repeat;
    }
    .command-links { justify-content: flex-start; }
    .executive-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
    .compliance-status-actions { grid-template-columns: 1fr; }
    .executive-metric {
        min-height: 110px;
        padding: 13px;
        grid-template-columns: 46px minmax(0, 1fr);
        column-gap: 9px;
        row-gap: 7px;
    }
    .metric-symbol { width: 46px; height: 46px; border-radius: 13px; }
    .executive-metric strong { font-size: 1.5rem; }
    .executive-metric small { display: none; }
    .dashboard-card { padding: 16px; }
    .chart-legend { display: none; }
    .trend-chart svg { height: 180px; }
    .dashboard-list-row { grid-template-columns: 1fr auto; }
    .recent-trip-list-header { display: none; }
    .recent-trip-list-row { grid-template-columns: 1fr auto; }
    .recent-trip-list-row .trip-date { justify-self: end; }
    .dashboard-list-row .route { grid-column: 1 / -1; grid-row: 2; }
    .governance-strip { align-items: flex-start; flex-direction: column; }
    .setup-ribbon { grid-template-columns: auto 1fr; }
    .setup-ribbon > a { grid-column: 1 / -1; text-align: center; }
    .setup-summary { grid-template-columns: 1fr 1fr; }
    .setup-step { grid-template-columns: 38px 1fr; }
    .setup-step > a { grid-column: 1 / -1; text-align: center; }
    .setup-note { grid-template-columns: 1fr; }
    .operations-summary { grid-template-columns: 1fr 1fr; }
    .compliance-hold-items { grid-template-columns: 1fr; }
    .readiness-items { grid-template-columns: 1fr; }
    .form-split { grid-template-columns: 1fr; }
    .invoice-allocation-row { grid-template-columns: 1fr; }
    .master-setup-note { align-items: flex-start; flex-direction: column; }
    .topbar { display: block; }
    .profile { margin-top: 14px; text-align: left; }
    .dashboard-hero { min-height: 300px; padding: 26px; background-position: 38% center; }
    .workshop-tabs { top: 8px; }
    .workshop-summary { grid-template-columns: 1fr 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
    .service-status-grid { grid-template-columns: 1fr 1fr; }
    .job-stage-form { grid-template-columns: 1fr; }
    .service-schedule-list article { grid-template-columns: 76px minmax(0, 1fr); }
    .service-schedule-list em { grid-column: 2; }
    .schedule-panel { padding: 14px; }
    .automation-install { grid-template-columns: 1fr; }
    .automation-install a { grid-column: 1; grid-row: auto; text-align: center; }
    .settings-health-grid { grid-template-columns: 1fr 1fr; }
    .form-grid,
    .form-grid-3 { grid-template-columns: 1fr; }
    .fuel-hero {
        grid-template-columns: 1fr;
        background:
            linear-gradient(90deg, rgba(3, 26, 50, .97), rgba(3, 26, 50, .84)),
            url("mesma-fuel-station-hero-v1.png") 63% center / cover no-repeat;
    }
    .fuel-hero-mark { display: none; }
    .fuel-summary { grid-template-columns: 1fr 1fr; }
    .topbar::after,
    .dashboard-topbar::after { display: none; }
    .topbar { min-height: 0; padding-right: 0; }
    .dashboard-topbar { padding-right: 16px; }
}

@media print {
    body { background: #fff; }
    button { box-shadow: none; }
}

/* Accounts: keep every delay decision on one compact table row. */
.delay-review-panel .delay-charge-form input {
    height: 32px;
    min-height: 32px;
    padding: 4px 6px;
}

.delay-review-panel .delay-charge-form button,
.delay-review-panel .delay-waive-form button {
    height: 32px;
    min-height: 32px;
    padding: 4px 9px;
}

.delay-review-panel .delay-decision,
.delay-review-panel .delay-charge-form,
.delay-review-panel .delay-waive-form {
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.delay-review-panel {
    padding: 14px 16px;
}

.delay-review-panel table {
    min-width: 900px;
}

.delay-review-panel th,
.delay-review-panel td {
    padding-top: 6px;
    padding-bottom: 6px;
}

.delay-review-panel th:nth-child(-n+4),
.delay-review-panel td:nth-child(-n+4) {
    white-space: nowrap;
}

/* Live trip stages and time-based delay attention. */
.trip-stage-form {
    width: 210px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    margin: 7px 0 5px;
}

.trip-stage-form select,
.trip-stage-form button,
.end-delay-form input,
.end-delay-form button {
    min-height: 34px;
    height: 34px;
    padding: 5px 8px;
    font-size: .68rem;
}

.delay-operations-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.delay-operation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #e4b55d;
    border-radius: 11px;
    background: #fff8e8;
}

.delay-operation-row.active {
    border-color: #ef8d85;
    background: #fff0ef;
    box-shadow: inset 4px 0 #d92d20;
}

.delay-operation-row strong,
.delay-operation-row span,
.delay-operation-row small {
    display: block;
}

.delay-operation-row span {
    margin-top: 2px;
    color: var(--ink);
    font-size: .75rem;
    font-weight: 800;
}

.delay-operation-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .68rem;
}

.end-delay-form {
    display: grid;
    grid-template-columns: 170px auto;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.delay-charge-state {
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef4f8;
    color: #355267;
    font-size: .66rem;
    font-weight: 900;
    white-space: nowrap;
}

.delay-charge-state.status-approved { background: #e6f7ef; color: #13704d; }
.delay-charge-state.status-waived { background: #eef2f5; color: #5f7180; }
.delay-alert-row.active {
    position: relative;
    margin-left: 5px;
    padding-left: 9px;
    border-left: 3px solid #ff5a52;
    background: transparent;
    box-shadow: -8px 0 18px rgba(255, 90, 82, .14);
}

.delay-alert-row.active b { padding-right: 48px; color: #fff; }
.delay-alert-row.active small { color: #d4e5f1; }
.delay-alert-row.active .priority-dot {
    outline: 3px solid rgba(255, 90, 82, .18);
    box-shadow: 0 0 0 0 rgba(255, 90, 82, .5);
    animation: delay-attention-pulse 1.8s ease-out infinite;
}

.delay-alert-row.active::after {
    content: "ACTIVE";
    position: absolute;
    top: 8px;
    right: 0;
    padding: 2px 6px;
    border: 1px solid rgba(255, 117, 109, .65);
    border-radius: 999px;
    background: #8f241f;
    color: #fff;
    font-size: .5rem;
    font-weight: 950;
    letter-spacing: .08em;
}

@keyframes delay-attention-pulse {
    70% { box-shadow: 0 0 0 8px rgba(255, 90, 82, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 90, 82, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .delay-alert-row.active .priority-dot { animation: none; }
}
.status-loading_done { background: #e9f4ff; color: #0b69bd; }
.status-en_route { background: #e8f8f6; color: #087b70; }
.status-offloading_done { background: #e8f7ee; color: #16754f; }

@media (max-width: 760px) {
    .delay-operation-row { grid-template-columns: 1fr; }
    .end-delay-form { grid-template-columns: 1fr auto; }
}

/* Compact long registers without allowing them to dominate the page. */
.trip-register-card .table-wrap {
    max-height: 480px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.trip-register-card table { min-width: 1240px; }
.trip-register-card th,
.trip-register-card td {
    padding: 7px 9px;
    vertical-align: middle;
    line-height: 1.25;
}

.trip-register-card th:first-child,
.trip-register-card td:first-child {
    min-width: 255px;
    width: 255px;
}

.trip-register-card th:nth-child(2) { width: 155px; }
.trip-register-card th:nth-child(3) { width: 190px; }
.trip-register-card th:nth-child(4) { width: 165px; }
.trip-register-card th:nth-child(5) { width: 135px; }
.trip-register-card th:nth-child(6) { width: 125px; }
.trip-register-card th:nth-child(7) { width: 235px; }
.trip-register-card td small { margin-top: 2px; line-height: 1.3; }
.trip-register-card .trip-stage-form {
    width: 120px;
    display: inline-grid;
    margin: 3px 4px 0 0;
    vertical-align: middle;
}

.trip-register-card .trip-stage-form select,
.trip-register-card .trip-stage-form button {
    height: 30px;
    min-height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
}

.trip-register-card td:last-child > form:not(.trip-stage-form) {
    display: inline-block;
    margin: 3px 0 0;
    vertical-align: middle;
}

.trip-register-card td:last-child > form:not(.trip-stage-form) button {
    height: 30px;
    min-height: 30px;
    padding: 4px 8px;
    font-size: .65rem;
}

.trip-register-card .table-wrap:has(tbody tr:nth-child(9)) {
    max-height: 480px;
}

.table-wrap:has(tbody tr:nth-child(9)) {
    max-height: 520px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.table-wrap:has(tbody tr:nth-child(9)) thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: 0 1px 0 var(--line);
}

.table-wrap:has(tbody tr:nth-child(9)) td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.dashboard-list:has(> :nth-child(7)),
.alert-list:has(> :nth-child(7)),
.delay-operations-list:has(> :nth-child(7)) {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.trip-register-card .table-wrap,
.table-wrap:has(tbody tr:nth-child(9)),
.dashboard-list:has(> :nth-child(7)),
.alert-list:has(> :nth-child(7)),
.delay-operations-list:has(> :nth-child(7)) {
    scrollbar-width: thin;
    scrollbar-color: #83a9c5 #edf3f7;
}
