:root {
    /* The one gap between stacked sections (form-layout-standard §2, Danny 2026-10-20). */
    --section-gap: 20px;
    --expand-step: 24px;
    --navy: #0f4a2c;
    --navy-deep: #09351f;
    --blue: #d6a21a;
    --blue-light: #fff3cf;
    --green: #0f5a34;
    --green-dark: #083a22;
    --green-light: #edf6ef;
    --red: #c34b3d;
    --red-light: #f9e8e3;
    /* R-01 (Round H): Delete / Reject - red text and a red outline, never filled. */
    --danger: #b4232c;
    --danger-hover-bg: #fbeceb;
    --amber: #d6a21a;
    --amber-light: #fff4d2;
    --amber-border: #e7c566;
    --gray-dark: #1f2a20;
    --gray-soft: #556258;
    --surface-muted: #f7f2e6;
    --border: #d7ccb7;
    --white: #ffffff;
    --app-bg: #f4efe3;
    --text: #243126;
    --text-muted: #5a6458;
    --status-neutral-bg: #e2e8e4;
    --status-neutral-text: #39443c;
    --status-neutral-border: #bdc9c0;
    --status-warning-bg: #ffedb5;
    --status-warning-text: #754900;
    --status-warning-border: #e4bd43;
    --status-success-bg: #d9f1df;
    --status-success-text: #075a2a;
    --status-success-border: #91cda1;
    --status-danger-bg: #fbd9d5;
    --status-danger-text: #a5231c;
    --status-danger-border: #e8a39b;
    --status-info-bg: #dceeff;
    --status-info-text: #175a8f;
    --status-info-border: #9fc5e5;
    --shadow-card: 0 6px 16px rgba(15, 44, 24, 0.08);
    --shadow-shell: 0 12px 28px rgba(6, 22, 13, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    background:
        linear-gradient(180deg, rgba(214, 162, 26, 0.08), rgba(214, 162, 26, 0) 180px),
        var(--app-bg);
    color: var(--text);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--green);
}

.invalid {
    outline: 1px solid var(--red);
}

.input--readonly {
    display: flex;
    align-items: center;
    min-height: 42px;
    background: var(--surface-muted);
    color: var(--text);
}

.validation-message {
    color: var(--red);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--app-bg);
    align-items: stretch;
}

.app-shell__main {
    min-height: 100vh;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-shell__body {
    flex: 1;
    padding: 28px;
}

.sidebar {
    width: 272px;
    min-width: 272px;
    flex: 0 0 272px;
    max-height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(214, 162, 26, 0.18), rgba(214, 162, 26, 0) 90px),
        linear-gradient(180deg, #0d4f2d, #08391f);
    color: rgba(255, 255, 255, 0.92);
    padding: 22px 18px;
    box-shadow: var(--shadow-shell);
    border-right: 3px solid rgba(214, 162, 26, 0.45);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px 20px;
    border-bottom: 1px solid rgba(231, 197, 102, 0.22);
}

.sidebar__logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    border: 2px solid rgba(255, 248, 231, 0.7);
    background: rgba(255, 248, 231, 0.96);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(8, 58, 34, 0.18);
}

.sidebar__logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
}

.sidebar__subtitle {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 239, 196, 0.72);
}

.sidebar__group {
    margin-top: 20px;
}

.sidebar__group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: 0;
    padding: 0 10px 8px;
    cursor: pointer;
    text-align: left;
}

.sidebar__group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 222, 152, 0.72);
}

.sidebar__group-caret {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.sidebar__group-links {
    display: grid;
    gap: 6px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.sidebar__link.active {
    background: linear-gradient(90deg, rgba(255, 243, 207, 0.98), rgba(255, 251, 238, 0.98));
    color: var(--green-dark);
    box-shadow: inset 4px 0 0 var(--amber);
}

.sidebar__link-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.sidebar__link.active .sidebar__link-icon {
    background: rgba(15, 90, 52, 0.12);
    color: var(--green-dark);
}

.topbar {
    background: linear-gradient(180deg, #fffdfa, #f8f1e5);
    border-bottom: 1px solid var(--border);
    border-top: 4px solid var(--amber);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar__eyebrow,
.page__eyebrow,
.card__label,
.login-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.topbar__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--green);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar__user {
    text-align: right;
}

.topbar__user-name {
    font-size: 13px;
    font-weight: 700;
}

.topbar__user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.auth-shell,
.loading-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-shell {
    background:
        linear-gradient(180deg, rgba(214, 162, 26, 0.16), rgba(214, 162, 26, 0) 140px),
        linear-gradient(180deg, var(--navy-deep), var(--navy));
}

.auth-shell__panel,
.loading-screen__card {
    width: min(100%, 420px);
    background: var(--white);
    border: 1px solid var(--amber-border);
    border-radius: 16px;
    padding: 36px 38px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.loading-screen__card {
    width: min(100%, 460px);
}

.login-card__copy,
.loading-screen__card p,
.card p,
.page-header__description,
.placeholder p {
    color: var(--text-muted);
    line-height: 1.5;
}

.login-card h1,
.page h1 {
    margin: 6px 0 18px;
    font-size: 28px;
    line-height: 1.1;
    color: var(--green);
}

.page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1160px;
    margin: 0 auto;
}

.page__header {
    margin-bottom: 4px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-header__description {
    margin-top: 4px;
    max-width: 60rem;
    font-size: 13px;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-tabs {
    display: flex;
    /* Wrap rather than widen the page: a Service Invoice opens one tab per B/L (docs/service-invoice-multi-bl-flow-complete.md). */
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.workspace-tab {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.workspace-tab:hover:not(:disabled) {
    border-color: var(--amber);
    background: var(--blue-light);
}

.workspace-tab--active {
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    border-color: var(--green-dark);
    color: var(--white);
}

.workspace-tab:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.workspace-tab-note {
    margin: -6px 0 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.page__header--compact {
    margin-bottom: 10px;
}

.page__header--compact h2 {
    margin: 0;
    font-size: 18px;
}

.page__header--compact .page__eyebrow {
    margin-bottom: 4px;
}

.service-invoice-detail-tabs {
    margin-top: 1.5rem;
}

.trip-summary-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.trip-summary-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.trip-summary-status__label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.operations-grid {
    grid-template-columns: 1fr;
    align-items: start;
}

/* Pending Work (Dispatcher Dashboard; Danny 2026-10-24, docs/dispatcher-layout-complete.md) - stacked columns, no row alignment
   (form-layout-standard §11a, the Dashboard's Q8 pattern). Below 992px one column in legacy's reading order: the two columns are
   display: contents and the cards take their place by order. From 992px two independent columns, each card --section-gap under the
   one above and as tall as its own rows: left Import, Export, Active Trucks; right Return Empty, Domestic. Guarded by
   DispatcherLayoutTests. */
.dispatcher-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--section-gap);
    align-items: start;
}

.dispatcher-dashboard-column {
    display: contents;
}

.dispatcher-work-card--import { order: 1; }
.dispatcher-work-card--return-empty { order: 2; }
.dispatcher-work-card--export { order: 3; }
.dispatcher-work-card--domestic { order: 4; }
.dispatcher-work-card--active-trucks { order: 5; }

@media (min-width: 992px) {
    .dispatcher-dashboard-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dispatcher-dashboard-column {
        display: flex;
        flex-direction: column;
        gap: var(--section-gap);
        min-width: 0;
    }
}

.dispatcher-work-card {
    padding: 16px 18px 18px;
}

/* A loaded card is as tall as its rows (the shared loading box keeps 190px only while its spinner shows). */
.dispatcher-work-card .billing-grid-loading-host:not(.is-loading) {
    min-height: 0;
}

/* Tables fit their cards (2026-10-24): tighter cells; client, port, destination and shipping line wrap on words; size and status stay
   on one line; a container number never breaks (two numbers wrap at their " / "). Below 1600px a long B/L may break inside its value.
   Measured with TruckOpis_Test data: 485 of 485 px at 1366, 600 of 600 px at 1920. The card's sideways scroll is only a fallback. */
/* .data-table's own padding rule comes later in this file: the doubled class outranks it. */
.data-table.dispatcher-pending-table th,
.data-table.dispatcher-pending-table td {
    padding: 8px 5px;
}

.dispatcher-pending-table td.dispatcher-col--size,
.dispatcher-pending-table td.dispatcher-col--status {
    white-space: nowrap;
}

/* Below 1600px (e.g. 1366 x 768) the half-width cards are ~485px: slightly smaller cells, and a long B/L breaks inside its value
   but keeps at least 9 characters a line (without the minimum it was squeezed to ~5). */
@media (max-width: 1599px) {
    .data-table.dispatcher-pending-table th,
    .data-table.dispatcher-pending-table td {
        padding: 8px 4px;
    }

    .data-table.dispatcher-pending-table td {
        font-size: 11px;
    }

    .dispatcher-pending-table td.dispatcher-col--bl {
        overflow-wrap: anywhere;
        min-width: 9ch;
    }
}

.dispatcher-work-card__title {
    margin: 0 0 12px;
}

.dispatcher-empty-row {
    color: var(--text-muted);
    text-align: center !important;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green), var(--amber));
    border-radius: 10px 10px 0 0;
}

.card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.card--wide {
    overflow: hidden;
    padding: 18px 20px;
}

.filter-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green), var(--amber));
    border-radius: 10px 10px 0 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.search-panel,
.client-search {
    margin-bottom: 18px;
    padding: 6px 0 18px;
    border-bottom: 1px solid rgba(215, 204, 183, 0.95);
}

.search-panel__header,
.client-search__header {
    margin-bottom: 14px;
}

.search-panel__header h2,
.client-search__header h2 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.search-panel__header p,
.client-search__header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.trip-filter-toggle {
    margin-top: 1rem;
}

.search-panel__body,
.client-search__body {
    margin-bottom: 8px;
}

.search-panel__actions,
.client-search__actions {
    justify-content: flex-start;
}

.record-summary {
    margin: 6px 0 18px;
    padding: 0;
}

.record-summary__toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.record-summary__content {
    margin-top: 10px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

/* A .status-chip is display:inline-flex, but as a direct child of this flex column it gets
   blockified per the flexbox spec and then stretches to the full container width under the
   default align-items:stretch - turning a small pill into a full-width colored bar. Only
   FinanceAccountEntry.razor's Status field puts a status-chip directly inside .form-field
   (confirmed - every other status-chip in the app lives in a table cell or a heading, not a
   flex column), so this is scoped narrowly rather than changing .form-field itself, which is
   shared by many other forms whose inputs rely on the default stretch to go full width. */
.form-field > .status-chip {
    align-self: flex-start;
}

.form-field--wide {
    grid-column: span 2;
}

/* The daily trip form's Bill of Lading and Container (Danny 2026-10-25, docs/bookkeeper-box-width-complete.md): a full-width row
   of their own - each on its own line, side by side 2 : 3 from 1600px (the longest real values, 47 and 73 characters, need ~470 and
   ~680px). */
.daily-trip-bl-container-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1600px) {
    .daily-trip-bl-container-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

@media (min-width: 1200px) {
    /* The trip form's header (Bill of Lading #, Client, Shipping Line, Type) and each container's row (Size, Container #, Container
       2 #, Pickup Point, Destination): widths by what they hold, so a long client, shipping line or destination shows whole. */
    .filter-grid.trip-entry-header-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.05fr) minmax(0, 0.7fr); }
    .filter-grid.trip-entry-container-grid { grid-template-columns: minmax(0, 0.8fr) repeat(3, minmax(0, 1fr)) minmax(0, 2.2fr); }
}

.form-field--checkbox {
    justify-content: flex-end;
}

.form-field--stacked {
    gap: 8px;
}

.form-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* Required-field asterisk: <RequiredMark /> renders .form-required; .required-marker is the older spelling from
   docs/form-layout-standard.md and looks the same. */
.form-required,
.required-marker {
    color: #e02424;
    font-weight: 700;
}

/* No asterisk on a read-only box (Q35 A2, Danny 2026-10-25): inside a disabled fieldset, or a form field whose box is disabled
   (plain inputs / selects, MudBlazor's .mud-disabled). Not on "readonly": date pickers keep a readonly input while editable. */
fieldset:disabled .form-required,
.form-field:has(input:not([type=checkbox]):disabled, select:disabled, textarea:disabled, .mud-input.mud-disabled) .form-required {
    display: none;
}

.form-field--error label {
    color: var(--red);
}

.form-field--error .input {
    border-color: var(--red);
    background: var(--red-light);
}

/* A message about one field, under it (FieldErrorSet; docs/addendum-roles-complete.md). */
.form-field__error {
    color: var(--red);
    font-size: 12px;
    margin-top: 4px;
}

/* A warning under a field that still saves (C2: a non-standard container number on an Export / Domestic trip). Dark amber, readable
   on white (contrast > 4.5:1). */
.form-field__warning {
    color: #7a5600;
    font-size: 12px;
    margin-top: 4px;
}

.form-field--error .mud-input-outlined-border {
    border-color: var(--red) !important;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(214, 162, 26, 0.14);
}

/* Q62 (Danny 2026-11-03): a MudBlazor dropdown in a form field (AppAutocompleteSelect, MudSelect / MudAutocomplete, dense outlined)
   lines up with a text box beside it - the same top edge and the same 38px height as .input. MudBlazor's dense control had a 4px
   top / bottom margin and a 40px box, so the Trip Details "Bill of Lading #" box sat 4px higher and 2px shorter than Client. */
.form-field .mud-input-control.mud-input-control-margin-dense {
    margin-top: 0;
    margin-bottom: 0;
}

.form-field .mud-input.mud-input-outlined.mud-input-margin-dense .mud-input-slot {
    padding-top: 9.5px;
    padding-bottom: 9.5px;
}

.workspace-tab-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.workspace-tab--record {
    padding-right: 38px;
}

.workspace-tab-close {
    position: absolute;
    right: 9px;
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.workspace-tab-close:hover {
    background: rgb(0 0 0 / 8%);
}

.workspace-tab-shell:has(.workspace-tab--active) .workspace-tab-close {
    color: var(--white);
}

.daily-trip-entry-page--embedded {
    min-width: 0;
}

.daily-trip-entry__embedded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.daily-trip-entry__embedded-header > :first-child {
    min-width: 0;
}

.daily-trip-entry__embedded-header .inline-actions {
    flex: 0 0 auto;
    align-items: center;
    margin-top: 0;
}

.trip-entry-page--embedded {
    min-width: 0;
}

.grid-value-link {
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgb(21 96 55 / 35%);
    text-underline-offset: 2px;
}

.grid-value-link:hover,
.grid-value-link:focus-visible {
    color: var(--green);
    text-decoration-color: currentColor;
}

.payment-summary-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.payment-summary-group {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-top: 3px solid var(--green);
    border-radius: 10px;
    background: var(--surface-muted);
}

.payment-summary-group > .page__eyebrow {
    margin: 0 0 8px;
}

.payment-entry-form__control {
    width: calc(50% - 8px);
}

.payment-entry-form__deposit-row {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
    width: 100%;
    gap: 16px;
    align-items: end;
}

.payment-entry-form__deposit-check {
    min-height: 42px;
    justify-content: center;
}

.payment-entry-form__upload {
    align-items: flex-start;
}

.payment-entry-page--embedded {
    min-width: 0;
}

@media (max-width: 800px) {
    .payment-summary-groups {
        grid-template-columns: 1fr;
    }

    .payment-entry-form__control {
        width: 100%;
    }

    .payment-entry-form__deposit-row {
        grid-template-columns: 1fr;
    }
}

.form-section__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-validation-error {
    border-color: var(--red) !important;
    background: var(--red-light);
}

.input-validation-error:focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(195, 75, 61, 0.16);
}

.input:disabled,
select.input:disabled,
textarea.input:disabled {
    background: #f1efe7;
    color: #7e7768;
    border-color: #d8d1be;
    cursor: not-allowed;
}

/* R-02 / form-layout-standard 9 (Round H): every locked box gets the same greyed look as .input:disabled - also the MudBlazor
   boxes (pickers, dates, numbers) inside a disabled fieldset (a ticketed daily trip's Trip Assignment: Client, B/L, Container,
   Plate, Driver, Helper looked white / editable while the expenses were grey) and a MudBlazor box set Disabled. */
fieldset:disabled .mud-input-control .mud-input.mud-input-outlined,
.mud-input-control .mud-input.mud-input-outlined.mud-disabled {
    background: #f1efe7;
    color: #7e7768;
    cursor: not-allowed;
}

fieldset:disabled .mud-input-control .mud-input.mud-input-outlined .mud-input-outlined-border,
.mud-input-control .mud-input.mud-input-outlined.mud-disabled .mud-input-outlined-border {
    border-color: #d8d1be !important;
}

fieldset:disabled .mud-input-control input,
fieldset:disabled .mud-input-control textarea,
.mud-input-control .mud-input.mud-disabled input {
    color: #7e7768;
    -webkit-text-fill-color: #7e7768;
    cursor: not-allowed;
}

fieldset:disabled .mud-input-control .mud-input-adornment {
    visibility: hidden;
}
.password-input {
    position: relative;
}

.password-input__field {
    padding-right: 76px;
}

.password-input__toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    height: 36px;
    min-width: 64px;
    border: 0;
    border-left: 1px solid #e4dcc8;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, #fcfaf3, #f3eddc);
    color: #6d6146;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.password-input__toggle:hover {
    background: linear-gradient(180deg, #f8f1dd, #eadfbe);
}

.autocomplete {
    position: relative;
}

.autocomplete__input {
    padding-right: 42px;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete__trigger {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 36px;
    height: 36px;
    border: 0;
    border-left: 1px solid #e4dcc8;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, #fcfaf3, #f3eddc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.autocomplete__chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #7f745a;
    border-bottom: 2px solid #7f745a;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.15s ease;
}

.autocomplete__chevron--open {
    transform: rotate(-135deg) translateY(-1px);
}

.autocomplete__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #d8cfae;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 30px rgba(31, 24, 12, 0.16);
}

.autocomplete__option {
    width: 100%;
    min-height: 38px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f0ead9;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete__option:last-child {
    border-bottom: 0;
}

.autocomplete__option:hover,
.autocomplete__option--active {
    background: linear-gradient(180deg, #fbf1cf, #f6e4aa);
}

.autocomplete__option--empty {
    color: var(--muted);
    cursor: default;
}

.button {
    height: 38px;
    border-radius: 6px;
    padding: 0 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.button:active {
    transform: scale(0.98);
}

.button--primary {
    border: none;
    color: #182117;
    background: linear-gradient(180deg, #f3c53f, #d6a21a);
}

.button--primary:hover {
    background: linear-gradient(180deg, #efbc2a, #c9940f);
}

.button:disabled,
.button[disabled],
.button.button--disabled,
.button.button--disabled:hover,
.button.button--disabled:active {
    border: 1px solid #c8cfca;
    color: #78817c;
    background: #e6eae7;
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.button--ghost {
    border: 1px solid var(--border);
    background: #fffdf8;
    color: var(--green);
}

.button--ghost:hover {
    background: var(--amber-light);
}

.button--approve {
    border: 1px solid #0b6b3a;
    background: #0f7a43;
    color: #ffffff;
}

.button--approve:hover {
    border-color: #085c31;
    background: #0b6638;
}

/* R-01 (Round H, Danny 2026-11-10): every Delete and Reject is red text + a red outline (not filled); the delete dialog's confirm too. */
.button--danger,
.button--reject {
    border: 1px solid var(--danger);
    background: #fffdf8;
    color: var(--danger);
}

.button--danger:hover,
.button--reject:hover {
    border-color: var(--danger);
    background: var(--danger-hover-bg);
}

/* A row's trash-can (DeleteIconButton) and the in-table delete icons: the same red outline. */
.delete-icon-button .mud-icon-button,
.mud-icon-button.danger-icon-button {
    border: 1px solid var(--danger);
    border-radius: 6px;
    color: var(--danger);
    padding: 3px;
}

.delete-icon-button .mud-icon-button:hover,
.mud-icon-button.danger-icon-button:hover {
    background: var(--danger-hover-bg);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th,
.data-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Money columns (form-layout standard): the left rule above outranks the plain .align-right helper, so restate it here. */
.data-table th.align-right,
.data-table td.align-right {
    text-align: right;
}

.data-table tbody tr:hover td {
    background: #fcf7e9;
}

.data-table__row-link {
    cursor: pointer;
}

.data-table__row-link:focus-visible td {
    outline: 2px solid var(--amber);
    outline-offset: -2px;
    background: #fcf7e9;
}

.dashboard-row--urgent td {
    color: #9d2a1f;
}

.dashboard-list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

.dashboard-list li + li {
    margin-top: 0.35rem;
}

.cell-strong {
    font-weight: 700;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-chip--done {
    background: var(--green-light);
    color: var(--green-dark);
}

.status-chip--open {
    background: var(--amber-light);
    color: #8f5b0b;
}

.workflow-status--neutral {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
    border: 1px solid var(--status-neutral-border);
}

.workflow-status--warning {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border: 1px solid var(--status-warning-border);
}

.workflow-status--success {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.workflow-status--danger {
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
    border: 1px solid var(--status-danger-border);
}

.workflow-status--info {
    background: var(--status-info-bg);
    color: var(--status-info-text);
    border: 1px solid var(--status-info-border);
}

.workflow-status--neutral,
.workflow-status--warning,
.workflow-status--success,
.workflow-status--danger,
.workflow-status--info {
    min-width: 74px;
    justify-content: center;
    text-transform: uppercase;
}

.status-chip--progress {
    background: var(--blue-light);
    color: #8f5b0b;
}

.status-chip--collection {
    background: var(--red-light);
    color: var(--red);
}

.status-chip--pending {
    background: #fff1c7;
    color: #7b5200;
}

.status-chip--missing {
    background: #fde5e2;
    color: #a12b24;
}

.daily-trip-entry__fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.billing-status-flow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.billing-status-flow__label {
    color: var(--gray-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.billing-status-flow__stages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.billing-status-stage {
    gap: 7px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.billing-status-stage strong {
    font-size: 12px;
}

.daily-trip-flow-stage.billing-status-stage--ongoing,
.billing-status-stage--ongoing {
    background: var(--blue-light);
    color: var(--green-dark);
}

.daily-trip-flow-stage.billing-status-stage--collection,
.billing-status-stage--collection {
    background: var(--red-light);
    color: var(--red);
}

.daily-trip-flow-stage.billing-status-stage--partial,
.billing-status-stage--partial {
    background: var(--amber-light);
    color: #8f5b0b;
}

.daily-trip-flow-stage.billing-status-stage--paid,
.billing-status-stage--paid {
    background: var(--green-light);
    color: var(--green-dark);
}

.billing-inline-payments {
    display: grid;
    gap: 12px;
}

.billing-payment-content { display: grid; gap: 18px; padding: 16px; }
.billing-payment-tab-form .billing-payment-content form { margin-top: 0; }
.billing-payment-fields { margin: 0; padding: 0; }

.billing-payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-ca-entry-form .financial-account-active-field > .checkbox-row {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.billing-payment-allocation-entry {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--border-color, #d7dde5);
}

.billing-payment-allocation-entry .billing-payment-list-actions {
    margin: 0;
}

.billing-payment-document-grid {
    width: 100%;
    min-height: 180px;
}

.billing-payment-document-empty-grid {
    width: 100%;
    min-width: 920px;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--border-color, #d7dde5);
    border-radius: 4px;
    background: #fff;
}

.billing-payment-document-empty-grid__header {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr 72px;
    min-height: 46px;
    align-items: center;
    border-bottom: 1px solid var(--border-color, #d7dde5);
    background: #f7f9fb;
}

.billing-payment-document-empty-grid__header span {
    min-width: 0;
    padding: 10px 16px;
    color: #4d5a67;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.billing-payment-document-empty-grid__body {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #536170;
    font-weight: 600;
}

.billing-payment-document-entry-grid {
    width: 100%;
    min-height: 220px;
    overflow-x: auto;
    border: 1px solid var(--border-color, #d7dde5);
    border-radius: 4px;
    background: #fff;
}

.billing-payment-document-entry-grid table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}

.billing-payment-document-entry-grid th,
.billing-payment-document-entry-grid td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color, #d7dde5);
    text-align: left;
    vertical-align: middle;
}

.billing-payment-document-entry-grid th {
    height: 46px;
    background: #f7f9fb;
    color: #4d5a67;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.billing-payment-document-entry-grid th:nth-child(1) { width: 42%; }
.billing-payment-document-entry-grid th:nth-child(2) { width: 24%; }
.billing-payment-document-entry-grid th:nth-child(3) { width: 22%; }
.billing-payment-document-entry-grid th:nth-child(4) { width: 12%; }

.billing-payment-document-entry-row td {
    background: #fbfcfd;
}

.billing-payment-document-entry-row .mud-input-control {
    margin-top: 0;
}

.billing-payment-document-context,
.billing-payment-grid-amount {
    font-variant-numeric: tabular-nums;
}

.billing-payment-grid-add {
    min-width: 72px;
}

.billing-payment-document-entry-grid__empty {
    height: 112px;
    color: #536170;
    font-weight: 600;
    text-align: center !important;
}

@media (max-width: 700px) {
    .billing-payment-content { padding: 16px; }
    .billing-payment-summary-grid { grid-template-columns: 1fr; }
}

.billing-inline-payment-grid {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.billing-payment-review-fields {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.approval-status--draft {
    background: #eef1ef;
    color: var(--gray-soft);
}

.approval-status--pending {
    background: var(--amber-light);
    color: #8f5b0b;
}

.approval-status--approved {
    background: var(--green-light);
    color: var(--green-dark);
}

.approval-status--rejected {
    background: var(--red-light);
    color: var(--red);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.align-center {
    text-align: center;
}

.align-right {
    text-align: right;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.table-footer__summary,
.pager__summary {
    color: var(--text-muted);
    font-size: 12px;
}

.pager,
.pager__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.placeholder {
    padding: 24px 8px;
}

.placeholder h2 {
    font-size: 18px;
    color: var(--green);
    margin-bottom: 6px;
}

.alert {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid;
    font-size: 13px;
}

.alert--error {
    background: var(--red-light);
    color: #791f1f;
    border-color: #f2bbbb;
}

.alert--warning {
    background: var(--amber-light);
    color: #6f4a0f;
    border-color: #ebd28d;
}

.payments-review-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.payments-old-app { margin-top: 4px; display: grid; gap: 2px; justify-items: start; }
.payments-old-app__line { font-size: 0.8rem; color: var(--muted-text, #5f6b7a); white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.payments-old-app .status-chip { white-space: normal; max-width: 100%; }.payments-old-app__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.payments-old-app-resolve { border-left: 4px solid var(--warning, #c77700); }
.payments-old-app-resolve__actions { display: flex; gap: 8px; margin-top: 8px; }

.dashboard-old-app-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.alert--inactive {
    background: var(--amber-light);
    color: #6f4a0f;
    border-color: #ebd28d;
}

.loading-screen__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 8px;
}

@media (max-width: 760px) {
    .app-shell {
        flex-direction: column;
    }

    .operations-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        padding: 18px;
    }

    .app-shell__body,
    .topbar {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page-header,
    .table-footer {
        flex-direction: column;
        align-items: stretch;
    }
}


@media (max-width: 640px) {
    .auth-shell__panel,
    .loading-screen__card {
        padding: 28px 22px;
    }

    .topbar__actions,
    .filter-actions,
    .pager,
    .pager__actions {
        flex-wrap: wrap;
    }

    .app-shell__body {
        padding: 18px 14px;
    }

    .form-field--wide {
        grid-column: span 1;
    }

    .topbar {
        padding: 14px;
    }
}

.form-section h2 {
    margin: 0;
    font-size: 18px;
    color: var(--green);
}

.form-section__header {
    margin-bottom: 16px;
}

.form-section__header--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.form-section__header p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.form-section__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* A section-header action (e.g. "Add ad-hoc service") keeps its label on one line; on a phone the header wraps and the
   action drops below the title instead of being squeezed into a narrow column. */
.form-section__actions .button {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .form-section__header--split {
        flex-wrap: wrap;
    }
}

.client-entry-workspace {
    min-width: 0;
}

.client-profile-form {
    width: min(100%, 760px);
    margin-top: 20px;
}

.client-profile-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.client-profile-related-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.container-editor {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    padding: 16px;
    margin-bottom: 14px;
}

.container-editor__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.container-editor__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
}

.container-editor__actions {
    display: flex;
    gap: 8px;
}

.inline-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.summary-grid--totals {
    margin-top: 18px;
}

.summary-grid--totals + .table-wrap {
    margin-top: 16px;
}

.summary-grid--totals + .daily-trip-groups {
    margin-top: 16px;
}

.daily-trip-flow-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.daily-trip-flow-header h2 {
    margin: 2px 0 0;
    font-size: 1rem;
}

.daily-trip-flow-type {
    width: 210px;
}

.daily-trip-flow-list {
    display: grid;
    gap: 8px;
}

.daily-trip-flow-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
}

.daily-trip-flow-row__label {
    color: var(--green-800);
    font-size: .78rem;
    font-weight: 700;
}

.daily-trip-flow-row__stages {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.daily-trip-flow-stage {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-width: 100px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    font-size: .72rem;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.daily-trip-flow-stage:hover {
    filter: brightness(.97);
}

.daily-trip-flow-stage:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.daily-trip-flow-stage--selected {
    box-shadow: 0 0 0 2px var(--green);
}

.daily-trip-flow-stage strong {
    color: inherit;
    font-size: .75rem;
}

.daily-trip-stage--ticket-queue {
    color: #4d5951;
    border-color: #cbd2cd;
    background: #eef1ef;
}

.daily-trip-stage--ticketed {
    color: #23527a;
    border-color: #b8d3e7;
    background: #eaf4fb;
}

.daily-trip-stage--empty-due {
    color: #795508;
    border-color: #e7c566;
    background: #fff4d2;
}

.daily-trip-stage--empty-queue {
    color: #854513;
    border-color: #e5bb8e;
    background: #fff0df;
}

.daily-trip-stage--empty-ticketed {
    color: #14615b;
    border-color: #a8d7d1;
    background: #e8f6f4;
}

.daily-trip-stage--done {
    color: #0b5a32;
    border-color: #add2bb;
    background: #e9f5ed;
}

.daily-trip-flow-row__arrow {
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .daily-trip-flow-row {
        grid-template-columns: 1fr;
    }

    .daily-trip-flow-row__stages {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .daily-trip-flow-header {
        align-items: stretch;
        flex-direction: column;
    }

    .daily-trip-flow-type {
        width: 100%;
    }
}

.daily-trip-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.daily-trip-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-trip-group__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.daily-trip-group__header h2 {
    margin: 4px 0 0;
    font-size: 18px;
    color: var(--green);
}

.daily-trip-group__count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.daily-trip-ledger {
    table-layout: fixed;
}

.daily-trip-ledger th:nth-child(1) {
    width: 12%;
}

.daily-trip-ledger th:nth-child(2) {
    width: 20%;
}

.daily-trip-ledger th:nth-child(3) {
    width: 20%;
}

.daily-trip-ledger th:nth-child(4) {
    width: 21%;
}

.daily-trip-ledger th:nth-child(5) {
    width: 19%;
}

.daily-trip-ledger th:nth-child(6) {
    width: 8%;
}

.daily-trip-ledger__row td {
    vertical-align: top;
    background: #fffdf8;
}

.ledger-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ledger-cell__line {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}

.ledger-cell__line--strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--green-dark);
}

.ledger-cell__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.summary-item {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.summary-item__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.summary-item__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.summary-item__value--positive {
    color: var(--green);
}

.summary-item__value--negative {
    color: #e02424;
}

.summary-item--highlight {
    background: #fcf7e9;
    border-color: #e1c875;
}

/* R-02 (Round H, Danny 2026-11-10: left is final): one bar at the bottom LEFT of every form. */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.form-actions--inline {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.alert--success {
    background: var(--green-light);
    color: var(--green-dark);
    border-color: #b8d9c3;
}

.placeholder--compact {
    padding: 12px 0;
}

.operations-grid .card {
    padding-top: 16px;
}

/* The trip ticket (Q28, Danny 2026-10-25): one A5 landscape sheet - black text, no shading; lines only around it, under the header,
   above the total and above the signatures. Printed twice on one A4 page (Q43); the screen shows one sheet. DailyTripTicket.razor
   holds the print page rules. */
.ticket-sheet {
    padding: 28px 32px;
}

.trip-ticket-print-area .ticket-sheet--copy,
.trip-ticket-print-area .ticket-cut {
    display: none;
}

/* Q47: the ticket rendered only to be printed (Print Trip Ticket goes straight to the print window) - never on screen. */
@media screen {
    .trip-ticket-print-area--print-only {
        display: none !important;
    }
}

.ticket-sheet__copy-label {
    padding: 4px 14px 0;
    font-weight: 700;
    text-align: right;
}

.trip-ticket-print-area .ticket-sheet {
    max-width: 210mm;
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    color: #000;
    background: #fff;
    font-size: 14px;
    line-height: 1.35;
}

.trip-ticket-print-area .ticket-sheet::before {
    display: none;
}

.ticket-sheet__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 10px 14px;
    border-bottom: 1px solid #000;
}

.ticket-sheet__head-left {
    font-weight: 700;
}

.ticket-sheet__number {
    font-weight: 700;
}

.ticket-sheet__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
    padding: 10px 14px;
}

.ticket-sheet__fields {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 10px;
    align-content: start;
}

.ticket-sheet__fields > span {
    overflow-wrap: anywhere;
}

.ticket-sheet__right {
    display: flex;
    flex-direction: column;
}

.ticket-sheet__money {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 16px;
}

.ticket-sheet__amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* The diesel's working ("20 L × ₱60.00/L") and the remarks under their lines, indented, across the row - not in the amount
   column (Q29, Q29b); long remarks wrap inside the money column. */
.ticket-sheet__note {
    grid-column: 1 / -1;
    padding-left: 1.5em;
    overflow-wrap: anywhere;
}

/* The short rule, then the total in the same alignment as the money above it. */
.ticket-sheet__total {
    border-top: 1px solid #000;
    margin-top: 4px;
    padding-top: 3px;
}

.ticket-sheet__sign {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 14px 14px;
    border-top: 1px solid #000;
}

.ticket-sheet__sign-line {
    display: inline-block;
    width: 52mm;
    border-bottom: 1px solid #000;
    vertical-align: bottom;
}
/* Screen only: the printed ticket is narrower than 760px but keeps its two columns (Q28). */
@media screen and (max-width: 760px) {
    .daily-trip-group__header {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-sheet {
        padding: 20px 18px;
    }

    .ticket-sheet__head {
        flex-direction: column;
        gap: 4px;
    }

    .ticket-sheet__body {
        grid-template-columns: 1fr;
        row-gap: 0;
    }
}

@media print {
    .sidebar,
    .topbar,
    .page-header__actions,
    .alert {
        display: none !important;
    }

    .app-shell,
    .app-shell__body,
    .page {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card,
    .ticket-sheet {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .card::before {
        display: none !important;
    }

    .page-header {
        margin-bottom: 16px;
    }

    body:has(.trip-ticket-print-area) * {
        visibility: hidden !important;
    }

    body:has(.trip-ticket-print-area) .trip-ticket-print-area,
    body:has(.trip-ticket-print-area) .trip-ticket-print-area * {
        visibility: visible !important;
    }

    body:has(.trip-ticket-print-area) .trip-ticket-print-area {
        position: absolute !important;
        inset: 0 auto auto 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}

.reports-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
}

.reports-layout__main,
.reports-layout__side {
    min-width: 0;
}

.summary-grid--reports {
    margin-bottom: 20px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: 24px;
    color: var(--green-dark);
}

.reports-caption {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.placeholder--tight {
    padding: 20px 0 8px;
}

@media (max-width: 1180px) {
    .reports-layout {
        grid-template-columns: 1fr;
    }
}

.inline-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.input--textarea {
    min-height: 140px;
    resize: vertical;
}


.client-collectibles-header-spacer {
    margin-top: 1rem;
}

/* Client Balances grid (docs/client-balances-mudgrid-complete.md): the Billing list's grid rules (.billing-client-grid) - fixed
   layout, long values wrap. The B/L-level columns only (the container columns are in the expanded lines), sized to fit the page
   without sideways scroll from 1366px up; the container still scrolls if a narrower window needs it. */
.client-balances-grid .mud-table-container {
    overflow-x: auto;
}

.client-balances-grid .mud-table-root {
    table-layout: fixed;
}

.client-balances-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 44px !important; }   /* MudBlazor writes width:0% inline on the hierarchy header */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 18%; }   /* BL Number (Q49b: long B/Ls such as "EGLV070600153667(TUKOD)D1" on one line) */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 14%; }   /* Client */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 10%; }   /* Shipping Line */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 9%; }    /* Status (Q49b: trip + payment icons) */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 9%; }    /* Paid Date */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 9%; }    /* Payment Type */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 9%; }    /* Paid Amount */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(9) { width: 9%; }    /* Total */
.client-balances-grid .mud-table-head .mud-table-cell:nth-child(10) { width: 12%; }  /* Balance (and "Total for <client>") */

/* Q50: the paid-status note above the Trips and Billing grids - the info note, then the section gap before the table. */
.paid-status-note { margin-bottom: var(--section-gap); }

/* Q49b: Billing's one Trip dates control, between the cards and the table (the cards' section gap above it, the same gap below). */
.billing-trip-dates { margin-bottom: var(--section-gap); }
.billing-trip-dates .mud-picker { max-width: 320px; }
.client-balances-grid .mud-table-body .mud-table-cell.client-balances-col--status { overflow-wrap: normal; white-space: nowrap; }
/* Q49b: rows on one line - a B/L or client name too long for its column ends in "…" (the full text is its tooltip). */
.client-balances-grid .mud-table-body .mud-table-cell.client-balances-col--oneline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }

.client-balances-grid .mud-table-body .mud-table-cell {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Right-aligned money headers on any MudDataGrid column with HeaderClass="align-right" (form-layout standard; first on Client Balances and
   the Billing list, docs/money-right-align-phase1-complete.md). The data-grid header rules further down force labels left;
   ".mud-data-grid .mud-table-root" keeps these selectors as specific as the grid-scoped ones they replace. */
.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right {
    text-align: right !important;
}

/* Label at the right edge, the sort / menu icons (which keep their space while hidden) to its left. */
.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right .column-header {
    flex-direction: row-reverse;
    justify-content: flex-start !important;
}

.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right .sortable-column-header {
    text-align: right;
}

/* The sort / menu icons keep their width while hidden, which leaves a narrow money column almost no room for its label; they
   float over the cell's left side instead (the label is right-aligned, so they don't cover it). */
.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right {
    position: relative;
}

.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right .column-options {
    position: absolute !important;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.mud-data-grid .mud-table-root .mud-table-head .mud-table-cell.align-right .mud-table-sort-label {
    justify-content: flex-end !important;
    text-align: right;
}

/* Header labels wrap between words only (each column is wide enough for its longest word and the filter funnel). */
.client-balances-grid .mud-table-head .mud-table-cell {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

/* Group header: the client and its trip count (all pages). */
.client-balances-group {
    display: inline-flex;
    gap: 10px;
    align-items: baseline;
}

.client-balances-group__count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.client-balances-group__total {
    font-weight: 600;
}

/* Group footers under Balance: "Total for <client>". The grid footer (tfoot) would repeat the first client's line, since MudBlazor
   feeds it the same aggregate; the Outstanding Total card covers it, so it is hidden. */
.client-balances-grid .client-balances-total {
    font-weight: 700;
    background: rgba(10, 92, 58, 0.06);
}

.client-balances-grid .mud-table-foot {
    display: none;
}

/* Container lines under a B/L (the hierarchy row): two steps in (the shared expandable-grid style below). */
.client-balances-lines {
    padding-top: 4px;
    padding-right: 8px;
    padding-bottom: 8px;
}

.client-balances-lines .data-table {
    max-width: 760px;
}

.client-balances-lines .data-table th.align-right,
.client-balances-lines .data-table td.align-right {
    text-align: right;
}

.client-balances-lines__caption {
    margin: 2px 0 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Header filter menus: Client (a pick list, Q42 R1), Trip Date from / to, Payment Status. */
.client-balances-filter {
    display: grid;
    gap: 4px;
    padding: 12px;
    min-width: 220px;
}

.client-balances-filter--client {
    min-width: 320px;
}

.client-balances-filter__applied {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.client-balances-filter__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

/* Billing History (Admin): the run state line, the sub-headings and the flag table under the cards. */
.billing-history__state {
    margin: 0 0 4px;
}

.billing-history__subhead {
    margin: 16px 0 8px;
    font-size: 0.95rem;
}

[data-testid=billing-history-result] .table-wrap {
    margin-top: 16px;
}

/* Billing Check (Admin, round 3): the state line, the verdict above the cards, a client that differs and its B/L lines under it. */
.billing-check__state {
    margin: 0 0 4px;
}

[data-testid=billing-check-result] .alert {
    margin-bottom: 16px;
}

.billing-check__mismatch > td {
    font-weight: 700;
    color: #791f1f;
}

.billing-check__trip > td {
    font-size: 0.9rem;
}

.billing-check__trip > td:first-child {
    padding-left: calc(var(--expand-step) + 12px);
}

/* Expandable grids (form-layout-standard §13, Danny 2026-10-21): ONE style for report rows that open into detail lines - Pay & Vale
   History and Client Balances. Level 0 (the employee / client) sits at the edge, bold, with ▼ / ▶; level 1 (a section heading:
   "Trips", "Vale (cash advances)"; Client Balances' B/L rows, one hierarchy column in) one --expand-step in; level 2 (its lines;
   the container lines) two steps in. Guarded by ExpandableGridStyleTests. */
.expand-grid__parent > td {
    cursor: pointer;
}

.expand-grid__parent > td:first-child {
    font-weight: 700;
}

.expand-grid__heading > td {
    background: rgba(10, 92, 58, 0.06);
}

.expand-grid__heading > td:first-child {
    padding-left: calc(9px + var(--expand-step));
    font-weight: 700;
}

/* Level 1 lines without a heading (the Dashboard's CLIENT BALANCE B/Ls, Security Bond's slip breakdown): one step in. */
.expand-grid__child > td:first-child {
    padding-left: calc(9px + var(--expand-step));
}

.expand-grid__detail > td {
    background: rgba(244, 235, 206, 0.16);
}

.expand-grid__detail > td:first-child {
    padding-left: calc(9px + 2 * var(--expand-step));
}

/* A payroll's line count above its grid (Q45 F9, the current system's "ITEMS: n"). */
.payroll-detail-count {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

/* A payroll opened in a Payrolls list tab: its actions on top, then the form (no page header). */
.payroll-embedded__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

/* Level 2 as a block inside a MudDataGrid child row (Client Balances' container lines). */
.expand-grid__lines {
    padding-left: calc(16px + 2 * var(--expand-step));
    background: rgba(244, 235, 206, 0.16);
}

.expand-grid__total > td {
    font-weight: 700;
    border-top: 1px solid var(--border);
}

.expand-grid__total > td:first-child {
    padding-left: calc(9px + 2 * var(--expand-step));
}

.expand-grid__note > td {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.expand-grid__note > td:first-child {
    padding-left: calc(9px + 2 * var(--expand-step));
}

.link-button {
    appearance: none;
    border: 0;
    background: transparent;
    /*color: inherit;*/
    color: var(--green-dark);
    font: inherit;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-button:hover {
    text-decoration: underline;
}

.employer-approval-toast {
    margin-bottom: 18px;
}

.employer-approval-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.employer-approval-summary-card .card__title {
    color: var(--green);
}

.billing-service-invoice-formula {
    padding: 0;
    overflow: hidden;
    margin: 14px 0 0;
    border-radius: 4px;
}

.billing-service-invoice-formula__row {
    display: grid;
    grid-template-columns: 112px minmax(135px,1fr) 34px minmax(135px,1fr) 34px minmax(135px,1fr) 34px minmax(150px,1.15fr) 34px minmax(165px,1.2fr);
    min-width: 1080px;
    border-bottom: 1px solid #d7e0db;
    background: #fbfcfb;
}

.billing-service-invoice-formula__row:last-child { border-bottom: 0; }
.billing-service-invoice-formula__band { display:flex;align-items:center;padding:14px 12px;background:#f1f5f2;color:#42564a;font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.billing-service-invoice-formula__term { min-width:0;padding:12px 10px;display:flex;flex-direction:column;justify-content:center;gap:5px; }
.billing-service-invoice-formula__term span { color:#66776d;font-size:.67rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase; }
.billing-service-invoice-formula__term strong { color:#073f25;font-size:1rem; }
.billing-service-invoice-formula__term strong.is-deduction { color:#a62d27; }
.billing-service-invoice-formula__term.is-result { margin:6px 0;background:#edf3ef;border-radius:8px; }
.billing-service-invoice-formula__term.is-balance { background:#dceee3; }
.billing-service-invoice-formula__operator { display:flex;align-items:center;justify-content:center;color:#607269;font-weight:800;font-size:.9rem; }

.service-invoice-service-tabs { display:flex;align-items:stretch;gap:0;width:100%;margin-top:14px;border-bottom:1px solid #cdbb98;overflow-x:auto;background:#f7f1e5; }
.billing-service-tabs {
  margin-top: .65rem;
  overflow: visible;
  background: transparent;
  border: 1px solid #c7d1ca;
  border-bottom: 0;
}

.billing-service-tabs .service-invoice-service-tab {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 0;
}

.billing-service-tab-content {
  margin-top: 0;
}

/* View tabs (ViewTabs component, form-layout-standard §12a, Danny 2026-10-21): the B/L workspace's service tabs for every page that
   switches between views - payroll types, Security Bond, a client's / employee's sections, Cash & Bank's lists. The tabs sit on the
   panel right below them: that panel loses its top gap and top corners. Guarded by ViewTabsTests. */
.view-tabs {
  margin-top: 0;
}

.view-tab:not([class*="service-invoice-service-tab--"]) {
  --tab-color: var(--green-dark);
}

a.view-tab {
  text-decoration: none;
}

.view-tab:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.view-tabs + *,
.view-tabs + fieldset > :first-child,
.view-tabs + .view-tabs__panel > :first-child {
  margin-top: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.billing-service-tab-content > .trip-entry-page,
.billing-service-tab-content > .billing-tab-page {
  margin-top: 0;
}

.billing-service-subtabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: auto;
  margin: 10px 18px 0;
  padding: 0 8px;
  border-bottom: 1px solid #c7d1ca;
  overflow-x: auto;
  background: transparent;
}

.billing-service-subtab {
  --tab-color: #65736b;
  min-height: 34px;
  padding: 7px 14px 6px;
  border: 1px solid transparent;
  border-top: 3px solid var(--tab-color);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: transparent;
  color: var(--tab-color);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  opacity: .62;
}

.billing-service-subtab:hover {
  opacity: 1;
  background: #f3f6f4;
}

.billing-service-subtab.is-active {
  position: relative;
  margin-bottom: -1px;
  opacity: 1;
  border-color: #c7d1ca;
  border-top: 4px solid var(--tab-color);
  border-bottom-color: #fff;
  background: #fffaf1;
  color: var(--tab-color);
  padding-top: 6px;
}

.billing-service-subtab--brokerage { --tab-color: #7652a8; }
.billing-service-subtab--pricing   { --tab-color: #168274; }
.billing-service-subtab--deposit   { --tab-color: #b88708; }
.billing-service-subtab--pop       { --tab-color: #2774b8; }
.billing-service-subtab--ar        { --tab-color: #9b3a32; }
.billing-service-subtab--rebate    { --tab-color: #c66d22; }
.billing-service-subtab--approval  { --tab-color: #7a5a2b; }
.service-invoice-service-tab { --tab-color:#68766e;display:flex;flex:1 1 0;align-items:center;justify-content:center;gap:9px;min-width:205px;min-height:48px;padding:9px 14px;border:1px solid #d8c8a8;border-bottom:0;border-right:0;border-radius:3px 3px 0 0;background:#f3ead8;color:#3f3526;font-weight:750;white-space:nowrap;cursor:pointer; }
.service-invoice-service-tab:last-child { border-right:1px solid #d8c8a8; }
.service-invoice-service-tab:hover { background:#eadcc2; }
.service-invoice-service-tab.is-active { position:relative;margin-bottom:-1px;background:#fffaf1;color:var(--tab-color);border-top:4px solid var(--tab-color);padding-top:6px; }
.service-invoice-service-tab--invoice { --tab-color:#b88708; }
.service-invoice-service-tab--trucking { --tab-color:#2774b8; }
.service-invoice-service-tab--brokerage { --tab-color:#7652a8; }
.service-invoice-service-tab--forwarding { --tab-color:#168274; }
.service-invoice-service-tab--lolo { --tab-color:#7a5a2b; }
.service-invoice-service-tab--reimbursables { --tab-color:#c66d22; }
.service-invoice-service-tab--receivables { --tab-color:#9b3a32; }
.service-invoice-service-tab .mud-icon-root { color:var(--tab-color); }
.service-invoice-tab-badge-shell { display:inline-flex!important;position:static!important;min-width:max-content; }
.service-invoice-tab-badge { position:static!important;inset:auto!important;transform:none!important;display:inline-flex!important;min-width:max-content!important;width:auto!important;white-space:nowrap;padding:3px 7px!important; }
.service-invoice-tab-badge { border:1px solid rgba(0,0,0,.22)!important;box-shadow:0 1px 3px rgba(20,35,25,.25)!important;font-weight:800!important;filter:saturate(1.35) brightness(.9); }
.service-invoice-service-tab--trucking .service-invoice-tab-badge { background:#155fa0!important;color:#fff!important; }
.service-invoice-service-tab--brokerage .service-invoice-tab-badge { background:#6a3fa0!important;color:#fff!important; }
.service-invoice-service-tab--forwarding .service-invoice-tab-badge { background:#00695f!important;color:#fff!important; }
.service-invoice-service-tab--lolo .service-invoice-tab-badge { background:#7a5a2b!important;color:#fff!important; }
.service-invoice-service-tab--reimbursables .service-invoice-tab-badge { background:#b45309!important;color:#fff!important; }
.service-invoice-service-tab--receivables .service-invoice-tab-badge { background:#92352f!important;color:#fff!important; }

/* Service Invoice form (docs/service-invoice-form-standard-layout-complete.md). "Services to Invoice" reuses the SOA picker
   classes (service-soa-bl-group / service-soa-picker); these only add what the invoice needs on top. */
.service-invoice-picker__unavailable td { color: var(--text-muted); }
.service-invoice-tax-table .mud-input-control { margin: 0; }
.service-invoice-tax-table__select { min-width: 150px; }
.service-invoice-tax-table__rate { min-width: 120px; }
.service-invoice-grid-icons { display:flex;align-items:center;gap:5px; }
.service-invoice-grid-icon { display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:23px;padding:0 5px;border:0;background:#f4f8f5;font-size:.68rem;font-weight:900;line-height:1; }
.service-invoice-grid-icon--trucking { color:#155fa0;background:#edf6ff; }
.service-invoice-grid-icon--fuel { color:#a85b08;background:#fff6e8; }
.service-invoice-grid-icon--brokerage { color:#6a3fa0;background:#f6f0ff; }
.service-invoice-grid-icon--forwarding { color:#00695f;background:#eaf8f5; }
.service-invoice-grid-icon--lolo { color:#7a5a2b;background:#f7f0e5; }
.service-invoice-grid-icon--reimbursables { color:#b45309;background:#fff1e5; }

/* Service Invoice B/L tab: the original one-row service tiles (checkbox + letter badge + name), restored from git history
   (before docs/service-invoice-form-standard-layout-complete.md) by decision of 2026-09-25 (docs/service-invoice-multi-bl-flow-complete.md).
   They wrap on narrow screens instead of scrolling; each tile's available amount sits under its name. */
.service-invoice-service-picker { display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px 22px;padding:2px 0 12px; }
.service-invoice-service-choice { display:inline-flex;align-items:center;gap:5px;min-width:max-content;padding:2px 0;border:0;background:transparent;color:#42564a;font-size:.78rem;font-weight:750;cursor:pointer; }
.service-invoice-service-choice:hover { color:#0b5a35; }
.service-invoice-service-choice.is-selected { color:#59420b; }
.service-invoice-service-choice.is-disabled { opacity:.48;cursor:not-allowed; }
.service-invoice-service-choice .mud-icon-root { color:#147643; }
.service-invoice-choice-letter { display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:19px;padding:0 3px;border:0;font-size:.65rem;font-weight:900;background:#f4f8f5; }
.service-invoice-service-choice__text { display:inline-flex;flex-direction:column;line-height:1.2; }
.service-invoice-service-choice__text small { color:var(--text-muted);font-size:.7rem;font-weight:650; }
.service-invoice-adhoc-list { margin-top:4px; }
.service-invoice-adhoc-list__header { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;border-bottom:1px solid var(--border);font-size:.8rem; }
.service-invoice-adhoc-list .service-soa-note { margin:10px 12px; }
/* The invoice's B/L grid: open/view icon, tick, then B/L facts. */
.service-invoice-bl-grid__open { width:44px;text-align:center; }
.service-invoice-bl-grid__ticked td { background:#f7fbf8; }
/* Workspace tabs: a B/L tab sits right after its invoice's tab; the invoice tab flags unsaved changes. */
.workspace-tab-shell--child .workspace-tab { font-size:.92em; }
.workspace-tab__dirty { margin-left:4px;color:#b45309;font-weight:900; }
.billing-receivables-bls { display:block;color:var(--text-muted);font-size:.72rem;font-weight:600;white-space:nowrap; }

.billing-receivables-card { margin-top:0;overflow:hidden; }
.billing-receivables-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid #d7e0db;background:#f6f9f7; }
.billing-receivables-heading h2,.billing-receivables-heading p { margin:0; }
.billing-receivables-heading h2 { color:#123b29;font-size:1rem; }
.billing-receivables-heading p { margin-top:4px;color:var(--text-muted);font-size:.78rem; }
.billing-receivables-grid { width:100%;min-width:1180px;border-collapse:collapse;font-size:.78rem; }
.billing-receivables-grid th,.billing-receivables-grid td { padding:10px 9px;border-bottom:1px solid #dce5df;text-align:right;white-space:nowrap; }
.billing-receivables-grid th { background:#eef3f0;color:#53685c;font-size:.67rem;letter-spacing:.05em;text-transform:uppercase; }
.billing-receivables-grid th:first-child,.billing-receivables-grid td:first-child,.billing-receivables-grid th:nth-child(3),.billing-receivables-grid td:nth-child(3) { text-align:left; }
.billing-receivables-grid tfoot th,.billing-receivables-grid tfoot td { background:#e3efe7;color:#123b29;font-weight:800; }
.billing-receivables-deduction { color:#a62d27; }
.billing-receivables-services { color:#435c4e;font-weight:700; }
.billing-receivables-actions { display:flex;justify-content:flex-end;gap:2px; }
.billing-receivables-empty { padding:28px!important;color:var(--text-muted);text-align:center!important; }
.service-invoice-editor-body .billing-service-card { margin-top:0; }

.service-invoice-grouping-option { margin:0;padding:14px 20px;border:1px solid #cbd8d0;border-top:0;background:#f7faf8; }
.service-invoice-embedded-document { margin-top:18px;padding:0;overflow:hidden;border:1px solid #a9cdb8;border-top:4px solid #147643;background:#f6fbf8;box-shadow:0 8px 22px rgba(17,76,45,.08); }
.service-invoice-embedded-document--separate,.service-invoice-embedded-document--fuel { border-top-color:#c66d22;background:#fffaf5; }
.service-invoice-embedded-document__header { display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 14px;border-bottom:1px solid #cfe0d6;background:rgba(229,242,234,.72); }
.service-invoice-embedded-document--separate .service-invoice-embedded-document__header,.service-invoice-embedded-document--fuel .service-invoice-embedded-document__header { background:#fff1e5;border-bottom-color:#ead1ba; }
.service-invoice-embedded-document__header h2 { margin:3px 0 2px;font-size:1.08rem; }
.service-invoice-embedded-document__header p { margin:0;color:var(--text-muted);font-size:.82rem; }
.service-invoice-embedded-document .billing-documents-bare { padding:18px 20px 20px; }
.service-invoice-assignment-panel { margin-top:18px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:24px;border:1px solid #a9cdb8;border-left:5px solid #147643;border-radius:4px;background:#eaf6ef; }
.service-invoice-assignment-panel h2 { margin:4px 0;font-size:1rem; }
.service-invoice-assignment-panel p { margin:2px 0;color:#53675b;font-size:.82rem; }
.service-invoice-tab-badge-shell { display:inline-flex!important;width:auto!important;min-width:max-content; }
.service-invoice-tab-badge { position:static!important;inset:auto!important;transform:none!important;width:auto!important;min-width:max-content!important;padding-inline:7px!important; }
.service-invoice-editor-body .billing-service-card { margin-top:0; }

@media (max-width: 1180px) {
    .billing-service-invoice-formula { overflow-x:auto; }
}

.employer-approval-filter-shell {
    margin-top: 20px;
}

.employer-approval-filter-row {
    display: grid;
    gap: 18px;
}

.employer-approval-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.employer-approval-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.employer-approval-chip:hover,
.employer-approval-chip--active {
    border-color: var(--amber-border);
    background: var(--amber-light);
    color: var(--green-dark);
}

.employer-approval-chip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(15, 74, 44, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.employer-approval-search {
    max-width: 420px;
    margin-bottom: 0;
}

.employer-approval-table tbody tr.employer-approval-row--active {
    background: rgba(214, 162, 26, 0.12);
}

.daily-trip-entry-page .daily-trip-entry__fieldset > * + * {
    margin-top: 18px;
}

.daily-trip-expense-grid .mud-table-cell {
    vertical-align: middle;
}

.daily-trip-expense-grid .mud-table-root {
    width: 100%;
    table-layout: fixed;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell,
.daily-trip-expense-grid .mud-table-body .mud-table-cell {
    min-width: 0;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(1),
.daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(1) {
    width: 28%;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(2),
.daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(2) {
    width: 42%;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(3),
.daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(3) {
    width: 20%;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(4),
.daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(4) {
    width: 10%;
    min-width: 76px;
    text-align: right;
}

.daily-trip-expense-grid .mud-table-head .mud-table-cell {
    white-space: nowrap;
}

.daily-trip-expense-grid .mud-input-control {
    margin: 0;
}

.daily-trip-expense-grid .mud-input-slot {
    font-size: 12px;
}

/* Expense entry is intentionally spreadsheet-like: compact cells, clear grid lines, and in-cell editors. */
.daily-trip-entry-page .daily-trip-expense-grid {
    border: 1px solid #cfd8d2;
    border-radius: 2px;
    box-shadow: none;
    background: #fff;
}

.daily-trip-entry-page .daily-trip-expense-grid .mud-table-root {
    border-collapse: collapse;
}

.daily-trip-entry-page .daily-trip-expense-grid .mud-table-cell {
    height: 34px;
    padding: 4px 8px;
    border-right: 1px solid #d8dfda;
    border-bottom: 1px solid #d8dfda;
    background: #fff;
    vertical-align: middle;
}

.daily-trip-entry-page .daily-trip-expense-grid .mud-table-head .mud-table-cell {
    height: 36px;
    background: #eef4ef;
    color: #395247;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.daily-trip-entry-page .daily-trip-expense-grid .mud-table-foot .mud-table-cell {
    background: #f5f8f5;
    border-top: 2px solid #b8c8bc;
}

.daily-trip-entry-page .daily-trip-expense-grid .mud-input,
.daily-trip-entry-page .daily-trip-expense-grid .mud-input-control,
.daily-trip-entry-page .daily-trip-expense-grid .mud-input-slot {
    min-height: 26px;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    background: transparent;
    font-size: 12px;
}

.employer-approval-detail-row td {
    padding: 0;
    background: #fbf7ec;
}

.employer-approval-inline-panel {
    padding: 20px;
    border-top: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(214, 162, 26, 0.08), rgba(214, 162, 26, 0) 120px),
        #fbf7ec;
}

.employer-approval-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.employer-approval-total-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 160px;
}

.employer-approval-total-inline__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-dark);
}

.employer-approval-type {
    font-weight: 700;
}

.employer-approval-type--import {
    background: #e7f2ff;
    color: #1f5d96;
}

.employer-approval-type--export {
    background: #eef8e8;
    color: #366e1f;
}

.employer-approval-type--domestic {
    background: #fff3df;
    color: #8b5d0e;
}

.employer-approval-status--urgent {
    background: var(--red-light);
    color: var(--red);
}

.employer-approval-status--waiting {
    background: var(--amber-light);
    color: #8b5d0e;
}

.employer-approval-status--submitted {
    background: var(--green-light);
    color: var(--green-dark);
}

.employer-approval-detail-table td {
    vertical-align: top;
    background: #fffdf8;
}

.employer-approval-detail-table th,
.employer-approval-detail-table td {
    padding-top: 14px;
    padding-bottom: 14px;
    padding-left: 14px;
    padding-right: 14px;
}

.employer-approval-identity-cell {
    text-align: center;
    vertical-align: middle !important;
}

.employer-approval-table-field {
    margin-bottom: 0;
    min-width: 110px;
}

.employer-approval-table-field .input {
    min-width: 0;
}

.employer-approval-computed-value {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    font-weight: 700;
    color: var(--green-dark);
    white-space: nowrap;
}

.employer-approval-panel-actions {
    margin-top: 18px;
}

.billing-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-overall-summary-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 2px;
}

.billing-overall-summary-heading h3,
.billing-overall-summary-heading p {
    margin: 0;
}

.billing-summary-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-bottom: 1px solid #dce5df;
    background: #f6f9f7;
}

.billing-summary-toggle-row > div:first-child { display:flex; flex-direction:column; gap:2px; }
.billing-summary-toggle-row strong { color:#123b29; }
.billing-summary-toggle-row span { color:var(--text-muted); font-size:.76rem; }
.billing-service-tabs-anchor { scroll-margin-top:12px; outline:none; }

.billing-overall-summary-heading p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.billing-overall-breakdown-wrap {
    margin-top: 0;
    padding: 1px;
    background: #dce5df;
}

.billing-overall-breakdown {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 1px;
    font-size: 13px;
}

.billing-overall-breakdown th,
.billing-overall-breakdown td {
    height: 62px;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    text-align: right;
    white-space: nowrap;
}

.billing-overall-breakdown th:first-child {
    text-align: left;
}

.billing-overall-breakdown thead th {
    height: auto;
    padding-top: 9px;
    padding-bottom: 9px;
    background: #f6f9f7;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.billing-overall-breakdown tbody th {
    background: #f6f9f7;
    color: #53685c;
    font-size: 11px;
    font-weight: 800;
}

.billing-overall-breakdown tbody td {
    color: #123b29;
    font-size: 15px;
    font-weight: 700;
}

.billing-overall-breakdown tbody td:nth-child(6) {
    background: #f1f7f3;
}

.billing-overall-breakdown tfoot th,
.billing-overall-breakdown tfoot td {
    height: 62px;
    border: 0;
    background: #f1f7f3;
    color: #123b29;
    font-size: 15px;
    font-weight: 800;
}

.billing-overall-breakdown tfoot td:nth-child(6) {
    background: #dff0e5;
}

.billing-overall-breakdown__link {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--green-dark);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.billing-overall-breakdown__link--pending {
    color: #9a6700;
}

.billing-temp-storage-table th:first-child,
.billing-temp-storage-table td:first-child {
    width: 180px;
    min-width: 180px;
    text-align: left;
}

.billing-temp-storage-table td:first-child .billing-trucking-amount-link {
    display: inline-flex;
    justify-content: flex-start;
    text-align: left;
}

.billing-overall-pending-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff4cf;
    color: #765600;
    font-size: 12px;
}

.billing-detail-row td {
    background: rgba(244, 235, 206, 0.2);
    padding-top: 0;
}

.billing-detail-list {
    display: grid;
    gap: 8px;
    padding: 12px 0;
}

.billing-detail-item {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1.4fr) minmax(120px, 1fr) minmax(110px, 1fr);
    gap: 16px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.billing-detail-item__label {
    font-weight: 700;
    color: var(--green-dark);
}

.billing-detail-item__value {
    color: var(--text);
}

/* Client B/L list (BillingClientDetail): percentage widths in the fit-grid's fixed layout (Danny 6 Nov 2026 - before, 1265 / 1292px
   minimum widths scrolled 57px at 1366). The selectable variant has one more leading checkbox column. */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(1) { width: 12%; }   /* BL No. */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(2) { width: 12%; }   /* Shipping Line */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(3) { width: 11%; }   /* Containers (opens in place) */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(4) { width: 10%; }    /* Expected */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(5) { width: 8%; }    /* Paid */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(6) { width: 11%; }   /* Remaining */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(7) { width: 12%; }   /* Payment Type */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(8) { width: 11%; }   /* Paid Date */
.billing-bl-grid--standard .mud-table-head .mud-table-cell:nth-child(9) { width: 13%; }   /* Status */
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(1) { width: 4%; }  /* checkbox */
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(2) { width: 11%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(3) { width: 12%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(4) { width: 10%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(5) { width: 9%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(6) { width: 8%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(7) { width: 11%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(8) { width: 12%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(9) { width: 11%; }
.billing-bl-grid--selectable .mud-table-head .mud-table-cell:nth-child(10) { width: 12%; }

.billing-bl-grid .billing-select-header,
.billing-bl-grid .billing-select-cell {
    text-align: center;
}

.billing-bl-grid .billing-status-cell .status-chip {
    max-width: 100%;
}

.billing-bl-link {
    color: var(--green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.billing-soa-status-link {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.billing-bl-grid .billing-actions-header,
.billing-bl-grid .billing-actions-cell {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.billing-bl-grid .billing-container-details {
    display: block;
    width: 100%;
    min-width: 0;
}

.billing-bl-grid .billing-container-details summary {
    cursor: pointer;
    white-space: nowrap;
}

.billing-bl-grid .billing-container-details .billing-detail-list {
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 8px 0 2px;
}

.billing-bl-grid .billing-container-details .billing-detail-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-muted);
}

.billing-bl-grid .billing-container-details .billing-detail-item > span {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.billing-bl-grid .billing-container-details .billing-detail-item__value {
    font-size: 12px;
    color: var(--text-muted);
}

button,
input,
select,
textarea,
.mud-typography,
.mud-button-root,
.mud-input,
.mud-select,
.mud-table-cell,
.mud-chip {
    font-family: "Segoe UI", Arial, sans-serif;
}

.billing-workspace-card {
    gap: 18px;
}

.billing-workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.billing-workspace-header h2 {
    margin: 0;
}

.billing-workspace-subtitle {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.billing-service-card {
    margin-top: 20px;
}

.billing-service-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.billing-service-card__header h2,
.billing-service-card__subsection h3 {
    margin: 0;
}

.billing-service-card__subsection {
    margin-top: 22px;
    margin-bottom: 12px;
}

.billing-selection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.billing-selection-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
}

.billing-selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border: 1px solid var(--amber-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 244, 210, 0.95), rgba(255, 251, 239, 0.95));
}

.billing-selection-bar__info {
    display: grid;
    gap: 4px;
}

.billing-selection-bar__count {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-dark);
}

.billing-selection-bar__total,
.billing-selection-bar__hint {
    color: var(--text-muted);
}

.billing-selection-bar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.billing-soa-header-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.billing-bank-list {
    display: grid;
    gap: 12px;
}

.billing-bank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
}

.billing-bank-item__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--green-dark);
}

.billing-bank-item__meta {
    margin-top: 3px;
    color: var(--text-muted);
}

.billing-bank-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.billing-banking-summary-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.billing-bank-breakdown {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 6px;
}

.billing-bank-breakdown__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.billing-bank-breakdown__name {
    font-weight: 700;
    color: var(--text-muted);
}

.billing-bank-breakdown__amount {
    color: var(--green-dark);
    font-family: monospace;
}

.billing-bank-balance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.billing-bank-balance-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(15, 90, 52, 0.14);
    background: rgba(255, 255, 255, 0.82);
}

.billing-bank-balance-card__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.billing-bank-balance-card__value {
    font-size: 20px;
    font-weight: 800;
    color: var(--green);
    font-family: monospace;
}

.billing-bank-balance-card__meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.billing-bank-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.billing-bank-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.billing-bank-pill--active {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}

.billing-bank-pill__amount {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.85;
}

.billing-ledger-filter-row {
    margin-bottom: 14px;
    max-width: 280px;
}

.finance-allocation-list {
    display: grid;
    gap: 12px;
}

.finance-allocation-row {
    display: grid;
    grid-template-columns: minmax(180px, .9fr) minmax(240px, 1.6fr) minmax(150px, .65fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.finance-allocation-remove {
    margin-bottom: 1px;
}

.finance-voucher-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 700;
}

.finance-voucher-total strong {
    min-width: 150px;
    color: var(--green-dark);
    font-size: 20px;
    text-align: right;
}

.billing-svc-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 90, 52, 0.12);
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 700;
}

.billing-placeholder-note {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text-muted);
}

.billing-document-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    cursor: pointer;
}

.billing-ref-block {
    margin-top: 20px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d6dfd8;
    background: #ffffff;
    box-shadow: none;
}

.billing-ref-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #f3f7f4;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.billing-ref-block.is-expanded > .billing-ref-block__header {
    border-bottom-color: #d6dfd8;
}

.billing-ref-block__header::-webkit-details-marker {
    display: none;
}

.billing-ref-block__header::after {
    content: "▾";
    flex: 0 0 auto;
    margin-left: 4px;
    color: #587064;
    font-size: 14px;
    transition: transform 0.16s ease;
}

.billing-ref-block:not(.is-expanded) > .billing-ref-block__header::after {
    transform: rotate(-90deg);
}

.billing-ref-block__body {
    padding: 18px;
}

.billing-ref-block__body.is-collapsed {
    display: none;
}

.billing-ref-block__title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--green-dark);
}

.billing-ref-block__heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

/* Billing detail uses one restrained surface treatment throughout. Status pills retain
   their semantic colors, while structural boxes no longer compete with one another. */
.billing-detail-page .billing-workspace-card,
.billing-detail-page .billing-ref-block,
.billing-detail-page .billing-service-card {
    border-color: #d6dfd8;
    background: #ffffff;
    box-shadow: none;
}

.billing-detail-page .billing-ref-block__header,
.billing-detail-page .billing-service-card__header {
    background: #f3f7f4;
    border-color: #d6dfd8;
}

.billing-detail-page .billing-ref-payment-card,
.billing-detail-page .billing-ref-info-banner,
.billing-detail-page .billing-ref-compute,
.billing-detail-page .billing-ref-lock-notice,
.billing-detail-page .billing-ref-approval-box,
.billing-detail-page .billing-ref-cd-box,
.billing-detail-page .billing-ref-cd-step,
.billing-detail-page .billing-ref-forwarding-box,
.billing-detail-page .billing-ref-forwarding-box--amber,
.billing-detail-page .billing-ref-upload-box,
.billing-detail-page .billing-ref-upload-box--locked {
    border-color: #d6dfd8;
    background: #f7f9f7;
    box-shadow: none;
}

.billing-detail-page .billing-ref-compute__row--highlight {
    background: #eef3ef;
}

.billing-detail-page .billing-ref-table--green thead th {
    background: #eaf1ec;
    color: #294b39;
}

.billing-ref-top-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.billing-ref-top-status--paid {
    background: #dff3e6;
    color: #145c32;
    padding: 7px 16px;
    font-size: 13px;
}

.billing-ref-top-status--partial {
    background: #fff0c2;
    color: #7b5a0e;
}

.billing-ref-top-status--pending {
    color: #8a5a00;
    background: #fff1c7;
    border-color: #efd28a;
}

.billing-ref-top-status--none {
    background: #fde8e8;
    color: #b42323;
}

.billing-ref-section-title {
    margin: 0 0 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 172, 91, 0.22);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7a46;
}

.billing-ref-block--trucking .billing-ref-section-title {
    margin: 18px 0 12px;
    padding: 8px 10px;
    border: 1px solid #e2d8bc;
    border-radius: 6px;
    background: #f7f2e6;
    color: #66572e;
    letter-spacing: 0.06em;
}

.billing-ref-block--cash-advance .billing-ref-payment-card--section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.billing-detail-page .billing-ref-approval-box--cash-advance {
    margin-top: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.billing-ref-block--trucking .billing-ref-block__body > .billing-ref-section-title:first-child {
    margin-top: 0;
}

.billing-detail-page .billing-container-grid {
    border: 1px solid #aebfb3;
    border-radius: 6px;
    box-shadow: none;
    overflow: hidden;
}

.billing-detail-page .billing-container-grid .mud-table-head .mud-table-cell {
    background: #dce9e0;
    color: #173f2a;
    border-color: #b9cbbf;
    font-weight: 800;
    text-align: center;
}

.billing-detail-page .billing-container-grid .mud-table-body .mud-table-cell {
    border-color: #d2ddd5;
}

.billing-detail-page .billing-container-grid .mud-table-foot .mud-table-cell {
    background: #eef1ef;
    color: #34433b;
    border-color: #cfd7d2;
    border-top: 2px solid #b7c2bb;
    font-weight: 400;
}

.billing-container-grid__total,
.billing-container-grid__total-label {
    display: block;
    white-space: nowrap;
    font-weight: 400;
}

.billing-container-grid__fuel-input {
    min-width: 120px;
}

.billing-overall-summary-table {
    width: 100%;
    border: 1px solid #cfd8d2;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13px;
}

.billing-overall-summary-table th,
.billing-overall-summary-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #d8dfda;
}

.billing-overall-summary-table tr:last-child th,
.billing-overall-summary-table tr:last-child td {
    border-bottom: 0;
}

.billing-overall-summary-table th {
    width: 55%;
    background: #f3f6f4;
    color: #43534a;
    font-weight: 600;
    text-align: left;
}

.billing-overall-summary-table td {
    color: #17261e;
    font-weight: 600;
    text-align: right;
}

.billing-summary-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.billing-summary-status-pill--collection {
    background: #fde8e8;
    color: #a52323;
}

.billing-summary-status-pill--partial {
    background: #fff3d2;
    color: #7b5a0e;
}

.billing-summary-status-pill--paid {
    background: #e4f3e9;
    color: #145c32;
    padding: 6px 14px;
    font-size: 13px;
}

.billing-ref-toggle-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.billing-ref-toggle-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.billing-ref-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.billing-ref-grid--1 {
    grid-template-columns: 1fr;
}

.billing-ref-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-ref-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-ref-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a8d5b;
}

.billing-ref-field input,
.billing-ref-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8cfb1;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
}

.billing-ref-field input[readonly] {
    background: #f3f5f7;
    color: var(--text-muted);
}

.billing-ref-pill-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.billing-ref-pill-button {
    min-height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #d7d7d7;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.billing-ref-pill-button--active {
    background: #fef7da;
    border-color: #e6cd69;
    color: #5e4e12;
}

.billing-ref-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
}

.billing-ref-pill--amber {
    background: #fff3d2;
    color: #9f6a00;
}

.billing-ref-pill--blue {
    background: #e3f0ff;
    color: #2d6fbc;
}

.billing-ref-payment-card {
    border: 1px solid #d7dde6;
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px;
    margin-bottom: 14px;
}

.billing-ref-payment-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.billing-ref-payment-card__label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.billing-ref-mini-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff3d2;
    font-size: 12px;
    font-weight: 700;
    color: #7b6b2f;
}

.billing-ref-upload-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px dashed #d9d9d9;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

.billing-ref-upload-box__miss {
    color: #d13f3f;
}

.billing-ref-upload-box__ok {
    color: var(--green-dark);
    font-weight: 600;
}

.billing-ref-upload-box--locked {
    background: #f1f4f8;
    color: var(--text-muted);
}

.billing-ref-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.billing-ref-helper-text {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.billing-ref-info-banner {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #bfdcff;
    border-radius: 10px;
    background: #eaf4ff;
    color: #2b6dad;
    font-size: 13px;
}

.billing-ref-table--green thead th {
    background: var(--green);
    color: #fff;
}

.billing-ref-compute {
    margin: 14px 0 18px;
    border: 1px solid #b8dcc7;
    border-radius: 12px;
    background: #eef9f1;
    overflow: hidden;
}

.billing-ref-compute__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(74, 144, 104, 0.18);
}

.billing-ref-compute__row:last-child {
    border-bottom: 0;
}

.billing-ref-compute__row--highlight {
    background: rgba(144, 196, 162, 0.18);
}

.billing-ref-compute__row--total {
    font-weight: 800;
    color: var(--green-dark);
}

.billing-ref-add-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.billing-ref-lock-notice {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff4cc;
    color: #a96500;
    font-size: 13px;
}

.billing-ref-approval-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d6b8ff;
    border-radius: 12px;
    background: #f5ecff;
}

.billing-ref-approval-box--compact {
    margin-top: 12px;
}

.billing-ref-approval-box__title {
    font-size: 18px;
    font-weight: 800;
    color: #5d2bd2;
    margin-bottom: 6px;
}

.billing-ref-approval-box__status {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d612f;
    margin-bottom: 12px;
}

.billing-detail-page .billing-ref-approval-box--trucking {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.billing-ref-approval-box--trucking .billing-ref-approval-box__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    padding: 8px 10px;
    border: 1px solid #e2d8bc;
    border-radius: 6px;
    background: #f7f2e6;
}

.billing-ref-approval-box--trucking .billing-ref-approval-box__title {
    margin: 0;
    color: #66572e;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.billing-ref-approval-box--trucking .billing-ref-approval-box__status {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff3d2;
    color: #7b6b2f;
    letter-spacing: normal;
    text-transform: none;
}

.billing-ref-approval-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.billing-ref-cd-box {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #f0cf6b;
    border-radius: 12px;
    background: #fff7d8;
}

.billing-ref-cd-step {
    padding: 14px;
    border: 1px solid #d7dde6;
    border-radius: 12px;
    background: #fff;
}

.billing-ref-cd-step__title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c06000;
}

.billing-ref-forwarding-box {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(52, 125, 74, 0.24);
    border-radius: 12px;
    background: #f0fbf4;
}

.billing-ref-forwarding-box--amber {
    border-color: rgba(180, 83, 9, 0.24);
    background: #fffaf0;
}

.billing-ref-forwarding-box__title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green-dark);
}

.billing-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.billing-panel-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-info-panel {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.billing-info-panel__title {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.billing-info-panel__text {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.billing-mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-mini-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 172, 91, 0.22);
    font-size: 13px;
}

.billing-mini-list__row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.billing-mini-list__row span:last-child {
    font-weight: 700;
    color: var(--text);
    text-align: right;
}

.billing-textarea {
    min-height: 92px;
    resize: vertical;
}

.billing-table-total-row td {
    font-weight: 700;
    background: rgba(214, 162, 26, 0.12);
}

@media (max-width: 1180px) {
    .employer-approval-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-panel-grid,
    .billing-panel-grid--triple {
        grid-template-columns: 1fr;
    }

    .billing-ref-grid--2,
    .billing-ref-grid--3 {
        grid-template-columns: 1fr;
    }

    .billing-soa-header-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-banking-summary-grid,
    .billing-bank-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .employer-approval-summary-grid {
        grid-template-columns: 1fr;
    }

    .employer-approval-inline-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .employer-approval-total-inline {
        align-items: flex-start;
    }

    .billing-summary-grid {
        grid-template-columns: 1fr;
    }

    .billing-detail-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .billing-selection-toolbar,
    .billing-selection-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .billing-selection-toolbar__meta,
    .billing-selection-bar__actions {
        flex-wrap: wrap;
    }

    .billing-workspace-header {
        flex-direction: column;
    }

    .billing-service-grid {
        grid-template-columns: 1fr;
    }

    .billing-panel-grid,
    .billing-panel-grid--triple {
        grid-template-columns: 1fr;
    }

    .billing-ref-grid--2,
    .billing-ref-grid--3 {
        grid-template-columns: 1fr;
    }

    .billing-ref-block__header,
    .billing-ref-payment-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .billing-soa-header-grid {
        grid-template-columns: 1fr;
    }

    .billing-bank-item,
    .billing-bank-add-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .billing-banking-summary-grid,
    .billing-bank-balance-grid {
        grid-template-columns: 1fr;
    }
}

/* Phase 1 shell: compact green-neutral visual system derived from TruckOpis_UI_Demo.html. */
:root {
    --truck-green: #1a7a3c;
    --truck-green-dark: #125d2c;
    --truck-green-soft: #e8f5ed;
    --truck-green-wash: #f2f8f4;
    --truck-ink: #172019;
    --truck-muted: #68736b;
    --truck-subtle: #909b92;
    --truck-line: #dfe6e1;
    --truck-canvas: #f4f6f4;
    --truck-header: #10261a;
}

body {
    background: var(--truck-canvas);
    color: var(--truck-ink);
}

.truckopis-shell,
.mud-layout {
    min-height: 100vh;
    background: var(--truck-canvas);
}

.mud-main-content.truckopis-main {
    min-width: 0;
    padding: 52px 26px 34px;
}

.truckopis-main:not(.truckopis-main--anonymous) > .truckopis-content {
    padding-top: 28px;
}

.mud-main-content.truckopis-main--anonymous {
    padding: 0;
}

/* Menu collapsed (desktop): the content uses the width the menu frees, on every page (Danny 2026-10-20,
   docs/form-layout-standard.md §1). The collapsed menu is a Mini drawer that stays "open" at 64px (AppSidebar), so MudBlazor kept
   the open menu's 224px margin and the freed 160px stayed empty. The content now starts after the 64px menu, and the page has no
   width cap (.page is 1320px with the menu open): it fills the screen less the normal padding (follow-up, Danny 2026-10-20). The
   narrower single-form caps (.expense-entry-form, .temp-storage-entry-shell, ...) are on their own elements and stay. */
.mud-main-content.truckopis-main.truckopis-main--menu-collapsed {
    margin-left: 64px !important;
}

.truckopis-main--menu-collapsed .page {
    max-width: none;
}

.truckopis-appbar {
    height: 52px;
    min-height: 52px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.truckopis-appbar .mud-toolbar {
    min-height: 52px;
    height: 52px;
    padding: 0 16px;
    gap: 12px;
}

.shell-toggle {
    color: #bdc9c0;
}

.app-brand {
    min-width: 178px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.app-brand img {
    width: 29px;
    height: 29px;
    display: block;
}

.quick-nav {
    height: 52px;
    display: flex;
    align-items: stretch;
}

.quick-nav .mud-nav-link {
    min-height: 52px;
    padding: 0 12px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    color: #bdc9c0;
    font-size: 12px;
    font-weight: 600;
}

.quick-nav .mud-nav-link:hover,
.quick-nav .mud-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .04);
    border-bottom-color: #4ade80;
}

.dev-role {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
}

/* STAGING on the Azure test sites (EnvironmentBadge): visible at every width, never in Production. */
.env-badge {
    margin-left: 10px;
    padding: 3px 8px;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    background: #b45309;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap;
}

/* The API's database when it isn't TruckOpis_Test (e.g. the ProdTrial launch profile): loud on purpose. */
.dev-database {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-right: 8px;
    padding: 4px 9px;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    background: #b91c1c;
    color: #fff;
}

.dev-database span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    color: #fecaca;
}

.dev-database strong {
    font-size: 12px;
    letter-spacing: .03em;
}

.dev-role span {
    color: #8fe4aa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
}

.dev-role select {
    max-width: 155px;
    padding: 3px 22px 3px 7px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: var(--truck-ink);
    font-size: 11px;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 5px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    text-align: left;
}

.user-button:hover {
    background: rgba(255, 255, 255, .08);
}

.user-copy {
    display: grid;
    line-height: 1.25;
}

.user-copy strong {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    white-space: nowrap;
}

.user-copy small {
    color: #aebbb2;
    font-size: 10px;
}

.truckopis-drawer {
    top: 52px !important;
    height: calc(100vh - 52px) !important;
    border-right: 1px solid var(--truck-line) !important;
}

.truckopis-drawer--collapsed {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
}

.truckopis-drawer--collapsed .sidebar-nav {
    padding-inline: 7px;
}

.truckopis-drawer--collapsed .module-link {
    justify-content: center;
    padding-inline: 0;
}

.truckopis-drawer--collapsed .module-link .mud-nav-link-icon {
    margin-inline: auto;
}

.truckopis-drawer--collapsed .mud-nav-link-text {
    display: none;
}

.truckopis-drawer .mud-drawer-content {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-head {
    min-height: 53px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--truck-line);
    padding: 5px 8px;
    gap: 6px;
}

.sidebar-profile {
    flex: 1;
    width: 100%;
    min-width: 0;
    border-radius: 6px;
}

.sidebar-collapse {
    flex: 0 0 auto;
    border: 1px solid var(--truck-line);
    border-radius: 6px;
    color: var(--truck-muted);
}

.sidebar-collapse:hover {
    background: var(--truck-green-wash);
    color: var(--truck-green);
}

.mud-drawer--mini .sidebar-head {
    justify-content: center;
    padding-inline: 6px;
}

.sidebar-profile .mud-nav-link-text {
    min-width: 0;
}

.sidebar-profile span {
    min-width: 0;
    display: grid;
    line-height: 1.25;
}

.sidebar-profile strong {
    color: #4f5d53;
    font-size: 12px;
}

.sidebar-profile small {
    overflow: hidden;
    color: var(--truck-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 8px 12px;
}

.nav-section {
    padding: 17px 9px 6px;
    color: var(--truck-subtle);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-nav .module-link {
    min-height: 40px;
    margin: 2px 0;
    border-radius: 6px;
    color: #566159;
    font-size: 12px;
}

.sidebar-nav .module-link:hover {
    background: #f7f9f7;
}

.sidebar-nav .sidebar-logout {
    justify-content: flex-start;
    padding: 0 16px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.sidebar-nav .sidebar-logout .mud-button-icon-start {
    margin-inline: 0 12px;
    color: #a43d3d;
}

.truckopis-drawer--collapsed .sidebar-nav .sidebar-logout {
    justify-content: center;
    padding-inline: 0;
}

.truckopis-drawer--collapsed .sidebar-nav .sidebar-logout .mud-button-icon-start {
    margin-inline: 0;
}

.sidebar-nav .module-link.active {
    background: var(--truck-green-soft);
    color: var(--truck-green-dark);
    font-weight: 700;
}

.sidebar-nav .mud-nav-link-icon {
    color: #657068;
}

.module-dashboard .mud-nav-link-icon,
.module-operations-board .mud-nav-link-icon { color: #326b9d; }
.module-trips .mud-nav-link-icon { color: #187b61; }
.module-daily-trips .mud-nav-link-icon { color: #56722f; }
.module-billing .mud-nav-link-icon { color: #376b4a; }
.module-payments .mud-nav-link-icon { color: #176f84; }
.module-container-deposits .mud-nav-link-icon { color: #98602f; }
.module-banks .mud-nav-link-icon,
.module-banking .mud-nav-link-icon { color: #3e629d; }
.module-payroll .mud-nav-link-icon { color: #16733b; }
.module-security-bond .mud-nav-link-icon { color: #7657a4; }
.module-cash-advance .mud-nav-link-icon { color: #a15d25; }
.module-expenses .mud-nav-link-icon,
.module-logout .mud-nav-link-icon { color: #a43d3d; }

.page {
    max-width: 1320px;
    gap: 14px;
}

/* C4 for every type (Danny 2026-11-02): the Payroll list and a payroll take the whole width at 1920, so the lines grid has room. Every
   other page keeps the 1320px cap. */
.page.payroll-page,
.page.list-page {
    max-width: none;   /* Q54 (Danny 2026-11-02): the Phase 1 list pages use the whole width at 1920 too */
}

.page h1,
.login-card h1 {
    color: var(--truck-ink);
    font-size: 21px;
    font-weight: 750;
}

.page-header-stack {
    width: 100%;
}

.page-header__back {
    align-self: flex-start;
    margin: 0;
}

.page-header__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.page-header__back .mud-button-root,
.page-header__back .button {
    min-height: 36px;
    padding: 5px 12px;
    border: 1px solid #a9bcae;
    border-radius: 6px;
    background: #fff;
    color: var(--truck-green-dark);
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 1px 2px rgb(17 49 34 / 8%);
}

.page-header__back .mud-button-root:hover,
.page-header__back .button:hover {
    border-color: var(--truck-green);
    background: var(--truck-green-soft);
    color: var(--truck-green-dark);
}

.page-header__back .button::before {
    content: "←";
    margin-right: 6px;
}

.phase2-page .phase2-stat {
    position: relative;
    min-height: 86px;
    overflow: hidden;
    border: 1px solid #dce4de;
    border-top: 3px solid #52735d;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 10px rgb(27 55 38 / 7%);
}

.phase2-page .phase2-stat--active { border-top-color: #287d6a; }
.phase2-page .phase2-stat--complete { border-top-color: #43884d; }
.phase2-page .phase2-stat--pending { border-top-color: #c58a25; }
.phase2-page .phase2-stat--balance { border-top-color: #4c6f9a; }
.phase2-page .phase2-stat--draft { border-top-color: #89958d; }
.phase2-page .phase2-stat--rejected { border-top-color: #c8323c; }

.phase2-page .phase2-stat .mud-typography-caption {
    color: #65736a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.phase2-page .phase2-stat .mud-typography-h6 {
    margin-top: 6px;
    color: var(--truck-ink);
    font-size: 21px;
    font-weight: 750;
}

/* Shared MudDataGrid and MudTable baseline from TruckOpis_UI_Demo.html. */
.mud-table-root {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: "Segoe UI", Arial, sans-serif;
}

.mud-table-container {
    max-width: 100%;
    overflow-x: hidden;
}

.mud-table-root .mud-table-head {
    background: #f3f8f4;
}

.mud-table-root .mud-table-head .mud-table-cell {
    padding: 9px 7px;
    border-bottom: 1px solid #dfe6e1;
    border-right: 1px solid #d7dfda;
    color: #607066;
    font: 700 10px/1.45 "Segoe UI", Arial, sans-serif !important;
    letter-spacing: .055em !important;
    text-transform: uppercase;
    white-space: normal;
    text-align: center !important;
}

.mud-table-root .mud-table-head .mud-table-sort-label {
    color: inherit;
    font: inherit !important;
    letter-spacing: inherit;
    text-transform: inherit;
    width: 100%;
    justify-content: center !important;
}

.mud-table-root .mud-table-head .mud-table-cell > div,
.mud-table-root .mud-table-head .mud-table-cell .column-header {
    justify-content: center !important;
}

/* MudDataGrid's supported header layout keeps the label left and filter/sort
   controls right. Plain MudTable headers retain the centered default above. */
.mud-data-grid .mud-table-head .mud-table-cell {
    text-align: left !important;
}

.mud-data-grid .mud-table-head .mud-table-cell .column-header {
    width: 100%;
    min-height: 28px;
    gap: 6px;
    justify-content: space-between !important;
}

.mud-data-grid .mud-table-head .mud-table-cell .column-header .sortable-column-header {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 0;
    text-align: left;
}

/* Staging check rows 24 / 51 (2026-11-05): compact header icons (sort, filter), so a narrow column's icons fit inside its own cell. */
.mud-data-grid .mud-table-head .mud-table-cell .column-header .column-options .mud-icon-button {
    padding: 3px;
}

.mud-data-grid .mud-table-head .mud-table-cell .column-header .column-options {
    position: static;
    margin-inline-start: 0;
    padding-inline-start: 0;
    flex: 0 0 auto;
    justify-content: flex-end !important;
}

.mud-data-grid .mud-table-head .mud-table-cell .column-header .mud-table-sort-label {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

.mud-data-grid .mud-table-head .mud-table-cell .mud-table-sort-label {
    justify-content: flex-start !important;
    text-align: left;
}

.mud-table-root .mud-table-body .mud-table-row {
    background: #fff;
}

.mud-table-root .mud-table-body .mud-table-row:nth-child(even) {
    background: #f7faf8;
}

.mud-table-root .mud-table-body .mud-table-row:hover {
    background: #edf5f0;
}

.mud-table-root .mud-table-body .mud-table-cell {
    padding: 9px 7px;
    border-bottom: 1px solid #edf1ee;
    border-right: 1px solid #e1e7e3;
    color: #172019;
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif !important;
    letter-spacing: normal !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mud-table-root .mud-table-foot .mud-table-cell {
    border-right: 1px solid #d7dfda;
}

.mud-table-root .mud-table-row > .mud-table-cell:last-child {
    border-right: 0;
}

.mud-table-root .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: 0;
}

.mud-table-root .mud-table-pagination,
.mud-table-root .mud-table-pager {
    color: #68736b;
    font: 400 11px/1.45 "Segoe UI", Arial, sans-serif !important;
}

/* Rows-per-page selector (every grid pager): MudBlazor pads the dropdown arrow as well as the number, leaving the number
   ~7px wide ("1.."). Drop the arrow's padding and give the number room for up to three digits. */
.mud-table-pagination-toolbar .mud-table-pagination-select {
    min-width: 72px;
}

.mud-table-pagination-toolbar .mud-table-pagination-select .mud-input-adornment {
    padding: 0 !important;
}

.mud-table-pagination-toolbar .mud-table-pagination-select input.mud-input-root {
    min-width: 36px;
    text-overflow: clip;
}

/* Trips list column widths live in TripList.razor (Q54: a fixed layout that fits; no sideways pan). */
.trips-grid .mud-table-head .column-header .sortable-column-header {
    min-width: 0;
}

/* Daily Trips column widths and alignment live in DailyTripList.razor (a class per column, never nth-child: the old seven-column
   rules right-aligned Book Keeper and squeezed Ticket - Helper; Daily Trips follow-up D1, 2026-10-23). Q54 (2026-11-02): its sideways
   scroll and 860px minimum here are gone - the list fits 1366 with the menu collapsed. */

.daily-trip-workspace-tabs__action {
    margin-left: auto;
}

.daily-trip-list-page--embedded {
    padding: 0;
}

/* Native inline editing exposes the complete Daily Trip record as table cells. */
.daily-trips-editable-table > .mud-table-container > .mud-table-root {
    width: 5520px;
    min-width: 5520px !important;
    table-layout: fixed;
}

.daily-trips-editable-table > .mud-table-container > .mud-table-root > .mud-table-head .mud-table-cell,
.daily-trips-editable-table > .mud-table-container > .mud-table-root > .mud-table-body .mud-table-cell,
.daily-trips-editable-table > .mud-table-container > .mud-table-root > .mud-table-foot .mud-table-cell {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.daily-trips-editable-table .mud-input-control,
.daily-trip-expense-grid .mud-input-control {
    margin: 0;
}

.daily-trips-editable-table .mud-input,
.daily-trip-expense-grid .mud-input {
    min-height: 30px;
    font-size: 12px;
}

.daily-trips-grid .mud-table-head .mud-table-cell,
.daily-trips-grid .mud-table-body .mud-table-cell,
.daily-trips-grid .mud-table-foot .mud-table-cell {
    min-width: 0;
}

.daily-trips-grid .mud-table-foot .mud-table-cell {
    padding: 10px 8px;
    border-top: 2px solid #d6dfd8;
    background: #f7faf7;
    vertical-align: top;
}

.grid-total {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--truck-ink);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.grid-total > span {
    color: #68736b;
    font-size: 9px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.grid-total--highlight {
    color: var(--truck-green);
}

.daily-trip-inline-editor {
    width: 100%;
    padding: 18px;
    border-top: 2px solid var(--truck-green);
    border-bottom: 1px solid #dfe6e1;
    background: #fbfdfb;
}

.daily-trip-expense-subgrid {
    width: 100%;
    padding: 16px 18px 18px;
    border-top: 2px solid #c69a25;
    border-bottom: 1px solid #dfe6e1;
    background: #fffdf8;
}

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-root {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-container {
    width: 100%;
    overflow-x: hidden;
}

.daily-trip-expense-subgrid .mud-table-foot .mud-table-cell {
    border-top: 1px solid #dfe6e1;
    background: #f7faf7;
}

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(1),
.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(1) { width: 30%; }

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(2),
.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(2) { width: 40%; }

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(3),
.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(3) { width: 16%; text-align: right; }

.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-head .mud-table-cell:nth-child(4),
.daily-trip-expense-subgrid .daily-trip-expense-grid .mud-table-body .mud-table-cell:nth-child(4) {
    width: 14%;
    min-width: 110px;
    text-align: right;
}

.daily-trip-expense-subgrid .expense-cell-editor .mud-input {
    min-height: 30px;
    font-size: 12px;
}

.daily-trip-inline-editor .filter-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.daily-trips-grid .mud-table-body .mud-table-row-expanded > .mud-table-cell {
    padding: 0;
    background: #fbfdfb;
}

@media (max-width: 1100px) {
    .daily-trip-inline-editor .filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 680px) {
    .daily-trip-inline-editor .filter-grid {
        grid-template-columns: 1fr;
    }
}

.phase2-page .phase2-panel {
    border: 1px solid #ddd7c8;
    border-top: 3px solid #c69a25;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgb(27 55 38 / 6%);
}

.phase2-page .mud-table-head {
    background: #f3f8f4;
}

.phase2-page .mud-table-head .mud-table-cell {
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid #d8ccb4;
    color: #607066;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.phase2-page .mud-table-body .mud-table-row { background: #fff; }
.phase2-page .mud-table-body .mud-table-row:hover { background: #fbfaf6; }

.phase2-page .mud-table-body .mud-table-cell {
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1ee;
    color: #172019;
    font-size: 12px;
    white-space: nowrap;
}

.phase2-page .temp-storage-grid .mud-table-root {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}

.phase2-page .temp-storage-grid .mud-table-container {
    overflow-x: hidden;
}

.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell {
    padding: 9px 7px;
    font: 700 10px/1.45 "Segoe UI", Arial, sans-serif !important;
    letter-spacing: .055em !important;
    white-space: normal;
    overflow-wrap: normal;
}

.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell {
    padding: 9px 7px;
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif !important;
    letter-spacing: normal !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(1),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(1) { width: 8%; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(2),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(2) { width: 9%; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(3),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(3) { width: 12%; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(4),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(4) { width: 10%; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(5),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(5),
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(6),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(6) { width: 8%; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(7),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(7) { width: 5%; text-align: center; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(8),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(8),
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(9),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(9) { width: 8%; text-align: right; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(10),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(10) { width: 7%; text-align: center; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(11),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(11) { width: 8%; text-align: center; }
.phase2-page .temp-storage-grid .mud-table-head .mud-table-cell:nth-child(12),
.phase2-page .temp-storage-grid .mud-table-body .mud-table-cell:nth-child(12) { width: 9%; text-align: center; }

.phase2-page .mud-table-body .mud-table-row:last-child .mud-table-cell { border-bottom: 0; }
.phase2-page .mud-table-root { border-collapse: collapse; }

.phase2-page .phase2-open {
    min-width: 70px;
    min-height: 34px;
    border-color: #cfc4ae;
    border-radius: 6px;
    background: #fff;
    color: var(--truck-green-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
}

.phase2-page .phase2-open:hover {
    border-color: var(--truck-green);
    background: var(--truck-green-soft);
}

.phase2-page .mud-chip {
    min-width: 54px;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.phase2-page .phase2-status {
    min-height: 22px;
    height: auto;
    padding: 3px 8px;
    line-height: 1.2;
}

.phase2-page .temp-pop {
    color: var(--text-muted);
    font-size: 11px;
}

.phase2-page .temp-pop--uploaded {
    color: var(--truck-green-dark);
    font-weight: 700;
}

.temp-detail-card {
    width: 100%;
    max-width: 1040px;
    overflow: hidden;
    border: 1px solid var(--truck-line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(25 45 32 / 5%);
}

.temp-storage-entry-shell {
    width: 100%;
    max-width: 1040px;
}

.temp-storage-entry-shell .page-header-stack,
.temp-storage-entry-shell .app-form-actions,
.temp-storage-entry-shell .form-actions,
.temp-storage-entry-shell .temp-entry-card,
.temp-storage-entry-shell .temp-detail-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 1040px;
}

.temp-entry-card {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--truck-line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(25 45 32 / 5%);
}

.temp-entry-body { padding: 16px; }

.temp-entry-note {
    margin-bottom: 12px;
    padding: 9px 11px;
    border-left: 3px solid var(--truck-green);
    background: var(--truck-green-wash);
    color: #506057;
    font-size: 11px;
}

.temp-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.temp-entry-field--full { grid-column: 1 / -1; }

.temp-operator-box.temp-storage-details { background: var(--truck-green-wash); }
.temp-storage-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.temp-lolo-fee { margin-top: 14px; }
.temp-container-remarks { margin-top: 14px !important; }
.temp-add-container { margin-top: 16px; }
.temp-container-card + .temp-container-card { margin-top: 16px; }

.temp-container-card {
    overflow: hidden;
    border: 1px solid var(--truck-line);
    border-radius: 7px;
}

.temp-container-head {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--truck-line);
    background: var(--truck-green-wash);
    color: var(--truck-green-dark);
    font-size: 12px;
}

.temp-container-head strong { font-weight: 800; }
.temp-container-head span { color: var(--truck-muted); font-size: 11px; }

.temp-operator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.temp-operator-box {
    padding: 12px;
    border: 1px dashed #cfd8d1;
    border-radius: 6px;
    background: #fcfdfc;
}

.temp-operator-title {
    margin-bottom: 10px;
    color: var(--truck-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.temp-operator-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.temp-entry-upload {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding: 16px;
    border: 1px dashed #bbc8be;
    border-radius: 7px;
    background: #fbfdfb;
}

.temp-entry-upload span { color: var(--truck-muted); font-size: 10px; }

.temp-rejection-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e2b3b3;
    border-radius: 7px;
    background: #fff7f7;
}

.temp-rejection-panel__title {
    color: #a52020;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.temp-rejection-panel p {
    margin: 5px 0 12px;
    color: var(--truck-muted);
    font-size: 11px;
}

.temp-correction-alert {
    margin-bottom: 14px;
}

.temp-entry-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--truck-line);
}

.trip-entry-page form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trip-entry-page .form-section {
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid var(--truck-line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(25 45 32 / 5%);
}

.trip-entry-page .form-section__header {
    margin: 0;
    padding: 13px 16px;
    border-bottom: 1px solid var(--truck-line);
    background: #fbfcfb;
}

.trip-entry-page .form-section h2 {
    color: var(--truck-ink);
    font: 800 13px/1.45 "Segoe UI", Arial, sans-serif;
}

.trip-entry-page .form-section__header p {
    margin: 2px 0 0;
    color: var(--truck-muted);
    font: 400 11px/1.45 "Segoe UI", Arial, sans-serif;
}

.trip-entry-page .form-section > .filter-grid,
.trip-entry-page .form-section > .placeholder,
.trip-entry-page .form-section > .container-editor {
    margin-right: 16px;
    margin-left: 16px;
}

.trip-entry-page .form-section > .filter-grid {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Tables, pickers, panels and totals sit inside the section's padding, like the field grid (billing-tab-form-body) does:
   wrap such a section's content in .form-section__body (docs/form-layout-standard.md §5/§6). Outside trip-entry-page the
   card's own padding already applies, so the class adds nothing there. A table still scrolls inside its .table-wrap. */
.trip-entry-page .form-section__body {
    min-width: 0;
    padding: 16px;
}

.trip-entry-page .form-field label {
    color: #7c887f;
    font: 800 10px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.trip-entry-page .input,
.trip-entry-page input,
.trip-entry-page select {
    color: var(--truck-ink);
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif;
}

.trip-entry-page .input[disabled],
.trip-entry-page input[disabled],
.trip-entry-page select[disabled],
.trip-entry-page .input--readonly {
    opacity: 1;
    background: #f7f9f7;
    color: #59665d;
}

.trip-entry-page .container-editor {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--truck-line);
    border-radius: 7px;
    background: #fff;
}

.trip-entry-page .container-editor__header {
    min-height: 44px;
    align-items: center;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--truck-line);
    background: var(--truck-green-wash);
}

.trip-entry-page .container-editor__title {
    color: var(--truck-green-dark);
    font: 800 12px/1.45 "Segoe UI", Arial, sans-serif;
}

.trip-entry-page .container-editor > .filter-grid {
    padding: 14px 12px;
}

.trip-entry-page .container-rate-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0 12px;
    padding: 14px 0;
    border-top: 1px solid var(--truck-line);
}

.trip-entry-page .container-rate-row .form-field {
    min-width: 0;
}

@media (max-width: 1100px) {
    .trip-entry-page .container-rate-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .trip-entry-page .container-rate-row {
        grid-template-columns: 1fr;
    }
}

.trip-entry-page .container-editor__actions .button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
}

.trip-entry-page .form-actions {
    justify-content: flex-start;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid var(--truck-line);
}

.expense-entry-form {
    display: flex;
    flex-direction: column;
    max-width: 760px;
    margin: 16px;
}

.expense-entry-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.expense-entry-form__control {
    width: calc(50% - 8px);
}

/* Vehicles (list standard, docs/list-standard-phase1-part2-complete.md): Plate Number, Vehicle Type, Status, Created Date, Updated Date. */
.vehicles-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 20%; }
.vehicles-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 18%; }
.vehicles-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 18%; }
.vehicles-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 22%; }
.vehicles-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 22%; }

.vehicles-grid-empty {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
}

.payments-grid .mud-table-container {
    overflow-x: auto;
}

.payments-grid .mud-table-root {
    min-width: 1180px !important;
    table-layout: fixed;
}

.payments-grid .mud-table-head .mud-table-cell:nth-child(1),
.payments-grid .mud-table-body .mud-table-cell:nth-child(1),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(1) { width: 14%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(2),
.payments-grid .mud-table-body .mud-table-cell:nth-child(2),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(2) { width: 14%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(3),
.payments-grid .mud-table-body .mud-table-cell:nth-child(3),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(3) { width: 11%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(4),
.payments-grid .mud-table-body .mud-table-cell:nth-child(4),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(4) { width: 11%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(5),
.payments-grid .mud-table-body .mud-table-cell:nth-child(5),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(5) { width: 11%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(6),
.payments-grid .mud-table-body .mud-table-cell:nth-child(6),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(6) { width: 11%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(7),
.payments-grid .mud-table-body .mud-table-cell:nth-child(7),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(7) { width: 11%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(8),
.payments-grid .mud-table-body .mud-table-cell:nth-child(8),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(8) { width: 9%; }

.payments-grid .mud-table-head .mud-table-cell:nth-child(9),
.payments-grid .mud-table-body .mud-table-cell:nth-child(9),
.payments-grid .mud-table-foot .mud-table-cell:nth-child(9) { width: 8%; }

.payments-grid .mud-table-body .mud-table-row:has(.vehicles-grid-empty) .mud-table-cell {
    width: auto !important;
    min-width: 1180px;
    padding: 0;
}

.payments-grid .mud-table-body .mud-table-row:has(.payments-grid-empty) .mud-table-cell {
    width: auto !important;
    min-width: 1180px;
    padding: 0;
}

.payments-grid-empty {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--truck-muted);
}

.payments-entry-tab {
    padding: 0 0 24px;
}

.payments-list-grid-card {
    margin-top: 18px;
}

.payments-context-panel {
    padding: 18px;
}

.billing-payment-allocation-grid .mud-table-container,
.billing-payment-document-grid .mud-table-container {
    overflow-x: auto;
}

.billing-payment-allocation-grid .mud-table-root {
    min-width: 760px !important;
    table-layout: fixed;
}

.billing-payment-document-grid .mud-table-root {
    min-width: 920px !important;
    table-layout: fixed;
}

.billing-payment-allocation-grid .mud-table-body .mud-table-row:has(.billing-payment-allocation-empty) .mud-table-cell {
    width: auto !important;
    min-width: 760px;
    padding: 0;
}

.billing-payment-document-grid .mud-table-body .mud-table-row:has(.billing-payment-allocation-empty) .mud-table-cell {
    width: auto !important;
    min-width: 920px;
    padding: 0;
}

.billing-payment-allocation-empty {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--truck-muted);
}

.billing-client-grid .mud-table-container {
    overflow-x: auto;
}

.billing-client-grid .mud-table-root {
    min-width: 1050px;
    table-layout: fixed;
}

.billing-client-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 18%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 11%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 12%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 12%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 14%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 12%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 12%; }
.billing-client-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 9%; }

/* Long values in the body may wrap anywhere; header labels wrap between words only (docs/billing-header-wrap-complete.md). Each
   grid below gives its columns room for the longest word plus the sort / filter / menu icons (about 82px) at 1366px. */
.billing-client-grid .mud-table-body .mud-table-cell {
    min-width: 0;
    overflow-wrap: anywhere;
}

.billing-client-grid .mud-table-head .mud-table-cell {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

/* Billing list (BillingDashboard.razor): Client, Open BLs, Trip Total, Paid Amount, Remaining Balance, Last Paid Date, Status. */
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 17%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 16%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 11%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 11%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 14%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 16%; }
.billing-accounts-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 15%; }

/* Container Deposit: Client, B/L No., Svc, Shipping Line, Amount, Status. */
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 22%; }
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 16%; }
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 14%; }
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 18%; }
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 15%; }
.container-deposit-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 15%; }

/* Rebate Nominees: Client, Trucking/Brokerage, Forwarding, Remarks, Status. */
.rebate-nominee-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 20%; }
.rebate-nominee-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 23%; }
.rebate-nominee-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 19%; }
.rebate-nominee-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 19%; }
.rebate-nominee-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 19%; }

/* Vehicle Cashouts: widths by column class, since Account and Ledger are hidden while accounts aren't live (Phases 1-2):
   Date, Vehicle, Reference, Amount, delete; with accounts live also Account and Ledger. */
.vehicle-cashout-grid .mud-table-head .mud-table-cell.vc-col--date { width: 16%; }
.vehicle-cashout-grid .mud-table-head .mud-table-cell.vc-col--vehicle { width: 20%; }
.vehicle-cashout-grid .mud-table-head .mud-table-cell.vc-col--reference { width: 38%; }
.vehicle-cashout-grid .mud-table-head .mud-table-cell.vc-col--amount { width: 18%; }
.vehicle-cashout-grid .mud-table-head .mud-table-cell.vc-col--delete { width: 8%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--date { width: 13%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--vehicle { width: 14%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--reference { width: 22%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--account { width: 20%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--amount { width: 13%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--ledger { width: 12%; }
.vehicle-cashout-grid:has(.vc-col--account) .mud-table-head .mud-table-cell.vc-col--delete { width: 6%; }

/* Transfers: Date, From, To, Amount, Reference, Attachment, Legs (two status chips, no icons). */
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 13%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 15%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 13%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 13%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 16%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 17%; }
.vault-transfer-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 13%; }

/* Deposits: Date, Account, Detail, Amount, Proof of Deposit, Status. */
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 14%; }
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 20%; }
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 20%; }
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 14%; }
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 16%; }
.vault-deposit-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 16%; }

/* Withdrawals (8 columns) and Operational Cash Advances (9): fit 1366 since 6 Nov 2026 (fit-grid, Danny's decision - before, they
   scrolled sideways inside the grid, Danny 2026-10-15). */
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 11%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 14%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 13%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 14%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 11%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 12%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 12%; }
.vault-withdrawal-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 13%; }

.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 14%; }   /* Requester */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 10%; }   /* Amount */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 14%; }   /* Purpose */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 10%; }   /* Trip Ticket */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 10%; }   /* B/L */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 11%; }   /* Status */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 13%; }   /* Received On / By (was Date Received + Released By) */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 13%; }   /* Filed On / By (was Date Filed + Filed By) */
.operational-ca-grid .mud-table-head .mud-table-cell:nth-child(9) { width: 5%; }    /* delete icon */

/* Expenses (docs/small-layout-fixes-complete.md): fits at 1366px with no sideways scroll. No column menu (ShowColumnOptions=false),
   so a filterable header needs its longest word plus the sort arrow and funnel; long values wrap in the body, headers on whole words.
   Rows open the expense; the last column holds only the trash-can button. */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 12%; }   /* Date */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 13%; }   /* Type */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 12%; }   /* Vehicle */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 10%; }   /* Amount */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 12%; }   /* OR No. */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 10%; }   /* VAT */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 15%; }   /* Remarks */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 11%; }   /* Filed By */
.expenses-grid .mud-table-head .mud-table-cell:nth-child(9) { width: 5%; }    /* Delete */

.expenses-grid .mud-table-body .mud-table-cell {
    min-width: 0;
    overflow-wrap: anywhere;
}

.expenses-grid .mud-table-head .mud-table-cell {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.expenses-grid .mud-table-body .expenses-grid__row { cursor: pointer; }
.expenses-grid .mud-table-cell.expenses-grid__actions { padding-inline: 4px; text-align: center; }

/* Standard list grid (docs/form-layout-standard.md §11): long values wrap in the body, headers on whole words, rows open the record,
   the last column holds only the trash-can button. Each grid sets its own column widths below. */
.list-grid .mud-table-body .mud-table-cell { min-width: 0; overflow-wrap: anywhere; }
.list-grid .mud-table-head .mud-table-cell { min-width: 0; overflow-wrap: normal; word-break: normal; }
.list-grid .mud-table-body .list-grid__row,
.mud-data-grid .mud-table-body .list-grid__row { cursor: pointer; }   /* rows that open their record, on grids with their own layout too */
.list-grid .mud-table-cell.list-grid__actions { padding-inline: 4px; text-align: center; }

/* Budgets: Amount, Type, Released By, Received By, Date Received, Remarks, Date Filed, delete. */
.budgets-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 11%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 10%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 15%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 15%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 13%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 17%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 13%; }
.budgets-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 6%; }

/* Vale: Receiver, Amount, Reason, Released By, Date Received, Date Filed, Filed By, delete. */
.vale-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 16%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 10%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 16%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 14%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 12%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 12%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 14%; }
.vale-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 6%; }

/* Payrolls: Type, Date From, Date To (equal shares), plus Payout once accounts are live (the inline pay controls need room). */
.payroll-grid .mud-table-head .mud-table-cell.pr-col--payout { width: 40%; }

/* The period group rows (item 1) span colspan="1000": under the shared fixed table layout that makes 1,000 columns and crushes the
   real ones, so the Payrolls grid lays out its columns automatically, Type / Date From / Date To sharing the width. */
.payroll-grid .mud-table-root {
    table-layout: auto !important;
}

.payroll-grid .mud-table-head .mud-table-cell.pr-col--type,
.payroll-grid .mud-table-head .mud-table-cell.pr-col--date {
    width: 33%;
}

/* An empty MudDataGrid renders its "no records" cell with colspan="1000". Under the shared fixed table layout that makes 1,000
   columns and crushes the real headers to ~1px each (Dashboard Checks Due with no checks). Taking that cell out of the table grid
   (absolutely positioned over its row) leaves only the real columns, so the header keeps the widths it has with rows and the
   message shows underneath. Only for the usual one-line MudText message; the custom empty blocks (payments-grid-empty,
   vehicles-grid-empty, billing-payment-allocation-empty, mud-grid-empty-state) have their own rules. */
.mud-table-root > tbody > tr:has(> .mud-table-empty-row > div > .mud-typography:only-child) {
    position: relative;
    height: 80px;   /* MudBlazor's my-3 wrapper + a pa-4 MudText line, as the row is in flow */
}

.mud-table-root > tbody > tr > .mud-table-empty-row:has(> div > .mud-typography:only-child) {
    position: absolute;
    inset: 0;
}

.billing-client-grid .billing-open-bls-header {
    min-width: 120px;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}

.billing-client-grid .billing-open-bls-header .mud-table-cell-label {
    white-space: nowrap;
}

.billing-ca-upload__file {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.billing-section-bottom-actions {
    margin: 18px 0;
}

/* Service Invoices has nine columns; keep document/client identifiers readable
   and give every money column a consistent spreadsheet-like alignment. */
.service-invoices-grid .mud-table-container {
    overflow-x: auto;
}

.service-invoices-grid .mud-table-root {
    table-layout: fixed;   /* fit-grid: no minimum width any more (Danny 6 Nov 2026 - it scrolled 112px at 1366) */
}

.service-invoices-grid .mud-table-head .mud-table-cell,
.service-invoices-grid .mud-table-body .mud-table-cell {
    padding: 11px 12px;
    vertical-align: middle;
    overflow-wrap: normal;
}

.service-invoices-grid .mud-table-cell:nth-child(1) { width: 13%; }
.service-invoices-grid .mud-table-cell:nth-child(2) { width: 9%; white-space: nowrap; }
.service-invoices-grid .mud-table-cell:nth-child(3) { width: 14%; }
.service-invoices-grid .mud-table-cell:nth-child(4) { width: 13%; }
.service-invoices-grid .mud-table-cell:nth-child(5),
.service-invoices-grid .mud-table-cell:nth-child(6),
.service-invoices-grid .mud-table-cell:nth-child(7),
.service-invoices-grid .mud-table-cell:nth-child(8) { width: 9.5%; white-space: nowrap; }
.service-invoices-grid .mud-table-cell:nth-child(9) { width: 13%; white-space: nowrap; }   /* Outstanding: the whole word with its sort / filter icons */

.service-invoices-grid .mud-table-body .mud-table-cell:nth-child(n+5),
.service-invoices-grid .mud-table-head .mud-table-cell:nth-child(n+5) {
    text-align: right !important;
}

.service-invoices-grid .mud-table-head .mud-table-cell:nth-child(n+5) .column-header,
.service-invoices-grid .mud-table-head .mud-table-cell:nth-child(n+5) .mud-table-sort-label {
    justify-content: flex-end !important;
    text-align: right;
}

/* Statements of Account list (ServiceSoaList.razor): nine columns. Same empty-Items collapse as the
   Client Cash Advance grid below, so it needs an explicit min-width; money columns 5-7 right-aligned. */
.service-soas-grid .mud-table-container {
    overflow-x: auto;
}

.service-soas-grid .mud-table-root {
    table-layout: fixed;   /* fit-grid: no minimum width any more (Danny 6 Nov 2026 - it scrolled 94px at 1366) */
}

.service-soas-grid .mud-table-head .mud-table-cell,
.service-soas-grid .mud-table-body .mud-table-cell {
    padding: 11px 12px;
    vertical-align: middle;
    overflow-wrap: normal;
}

.service-soas-grid .mud-table-cell:nth-child(1) { width: 13%; }
.service-soas-grid .mud-table-cell:nth-child(2) { width: 10%; white-space: nowrap; }
.service-soas-grid .mud-table-cell:nth-child(3) { width: 15.5%; }
.service-soas-grid .mud-table-cell:nth-child(4) { width: 14%; }
.service-soas-grid .mud-table-cell:nth-child(5),
.service-soas-grid .mud-table-cell:nth-child(6),
.service-soas-grid .mud-table-cell:nth-child(7) { width: 13%; white-space: nowrap; }
.service-soas-grid .mud-table-cell:nth-child(8) { width: 12%; }
.service-soas-grid .mud-table-cell:nth-child(9) { width: 4.5%; }

.service-soas-grid .mud-table-body .mud-table-cell:nth-child(n+5):nth-child(-n+7),
.service-soas-grid .mud-table-head .mud-table-cell:nth-child(n+5):nth-child(-n+7) {
    text-align: right !important;
}

.service-soas-grid .mud-table-head .mud-table-cell:nth-child(n+5):nth-child(-n+7) .column-header,
.service-soas-grid .mud-table-head .mud-table-cell:nth-child(n+5):nth-child(-n+7) .mud-table-sort-label {
    justify-content: flex-end !important;
    text-align: right;
}

/* Statement of Account form (ServiceSoaEntry.razor): one collapsible charge group per B/L. */
.service-soa-bl-group {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.service-soa-bl-group__header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: var(--surface-muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.service-soa-bl-group__subtotal {
    margin-left: auto;
    font-weight: 600;
    white-space: nowrap;
}

.service-soa-picker__check {
    width: 56px;
}

.service-soa-picker__auto td {
    font-style: italic;
    opacity: 0.85;
}

.service-soa-note {
    margin: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-soa-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 16px;
    margin-top: 14px;
    padding: 0 14px;
    font-size: 1rem;
}

.service-soa-total strong {
    font-size: 1.15rem;
}

/* Several B/L groups stack in the SOA form (docs/soa-multi-bl-adhoc-complete.md). */
.service-soa-bl-group + .service-soa-bl-group {
    margin-top: 12px;
}

.service-soa-picker__actions {
    width: 88px;
    white-space: nowrap;
    text-align: right;
}

.service-soa-picker__adhoc td:nth-child(2) {
    font-weight: 600;
}

/* "Add ad-hoc service" panel: B/L, description, amount. */
.service-soa-adhoc {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px dashed var(--amber-border);
    border-radius: 10px;
    background: var(--surface-muted);
}

.service-soa-adhoc__title {
    margin-bottom: 8px;
    font-weight: 700;
}

.service-soa-adhoc__fields {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) minmax(140px, 1fr);
    gap: 12px;
    align-items: end;
}

.service-soa-adhoc__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

@media (max-width: 720px) {
    .service-soa-adhoc__fields {
        grid-template-columns: 1fr;
    }
}

/* Client Cash Advances has seven columns; without an explicit min-width the grid's
   table-layout collapses to near nothing when Items is empty (no data to size columns from). */
.client-cash-advance-grid .mud-table-container {
    overflow-x: auto;
}

.client-cash-advance-grid .mud-table-root {
    min-width: 980px !important;
    table-layout: fixed;
}

.client-cash-advance-grid .mud-table-head .mud-table-cell,
.client-cash-advance-grid .mud-table-body .mud-table-cell {
    padding: 11px 12px;
    vertical-align: middle;
    overflow-wrap: normal;
}

.client-cash-advance-grid .mud-table-cell:nth-child(1) { width: 12%; min-width: 110px; white-space: nowrap; }
.client-cash-advance-grid .mud-table-cell:nth-child(2) { width: 13%; min-width: 130px; }
.client-cash-advance-grid .mud-table-cell:nth-child(3) { width: 17%; min-width: 160px; }
.client-cash-advance-grid .mud-table-cell:nth-child(4) { width: 19%; min-width: 180px; }
.client-cash-advance-grid .mud-table-cell:nth-child(5) { width: 12%; min-width: 110px; white-space: nowrap; }
.client-cash-advance-grid .mud-table-cell:nth-child(6) { width: 17%; min-width: 160px; }
.client-cash-advance-grid .mud-table-cell:nth-child(7) { width: 10%; min-width: 90px; white-space: nowrap; }

.client-cash-advance-grid .mud-table-body .mud-table-cell:nth-child(5),
.client-cash-advance-grid .mud-table-head .mud-table-cell:nth-child(5) {
    text-align: right !important;
}

.client-cash-advance-grid .mud-table-head .mud-table-cell:nth-child(5) .column-header,
.client-cash-advance-grid .mud-table-head .mud-table-cell:nth-child(5) .mud-table-sort-label {
    justify-content: flex-end !important;
    text-align: right;
}

/* Operator Payroll (TempStorage OperatorPayrollList, Danny 6 Nov 2026 fit): TS No., BL No., Container, Operator / Role (the role on the
   second line), Date, Total Pay, Paid, Balance, Status - the row opens the record (the Open button column is gone). */
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(1) { width: 11%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(2) { width: 11%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(3) { width: 12%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(4) { width: 15%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(5) { width: 10%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(6) { width: 10%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(7) { width: 8%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(8) { width: 10%; }
.operator-payroll-grid .mud-table-head .mud-table-cell:nth-child(9) { width: 13%; }
.operator-payroll-grid .mud-table-row { cursor: pointer; }

/* Rebates (8 columns on the Client Cash Advance grid's look, Danny 6 Nov 2026 fit): Date, Rebate, Type, Client, B/L No(s)., Amount,
   Vault / Account, Status - its own widths (the shared 7 left Status 0% and its icons over the edge) and Amount (6th) right-aligned. */
.rebates-grid .mud-table-cell:nth-child(1) { width: 11%; }
.rebates-grid .mud-table-cell:nth-child(2) { width: 12%; }
.rebates-grid .mud-table-cell:nth-child(3) { width: 11%; }
.rebates-grid .mud-table-cell:nth-child(4) { width: 15%; }
.rebates-grid .mud-table-cell:nth-child(5) { width: 13%; white-space: nowrap; }
.rebates-grid .mud-table-cell:nth-child(6) { width: 11%; }
.rebates-grid .mud-table-cell:nth-child(7) { width: 15%; }
.rebates-grid .mud-table-cell:nth-child(8) { width: 12%; }
.rebates-grid .mud-table-body .mud-table-cell:nth-child(5),
.rebates-grid .mud-table-head .mud-table-cell:nth-child(5) { text-align: left !important; }
.rebates-grid .mud-table-head .mud-table-cell:nth-child(5) .column-header { justify-content: flex-start !important; }
.rebates-grid .mud-table-body .mud-table-cell:nth-child(6),
.rebates-grid .mud-table-head .mud-table-cell:nth-child(6) { text-align: right !important; }
.rebates-grid .mud-table-head .mud-table-cell:nth-child(6) .column-header { justify-content: flex-end !important; }

/* Client Trip History (Q34, 2026-10-25): Bill of Lading, Container Qty, Rate, Shipping Line, Status (the shared icons, Q36: one
   line, so its share went from 25% to 14%), Created By. */
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(1),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(1) { width: 23%; }
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(2),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(2) { width: 12%; }
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(3),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(3) { width: 13%; }
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(4),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(4) { width: 18%; }
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(5),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(5) { width: 14%; min-width: 130px; }
.client-trip-history-grid .mud-table-head .mud-table-cell:nth-child(6),
.client-trip-history-grid .mud-table-body .mud-table-cell:nth-child(6) { width: 20%; }

/* Customer Payments' "Showing:" line above its grid (Q38 / Q41). */
.trip-payments-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 0 0 10px; }
.trip-payments-showing { margin: 0; }

/* Q33 / Q34: the one Status column's chips (TripStatusChips) wrap inside the cell; its header filter (TripStatusFilterPanel) is a
   group of tickboxes per status - the Trips list and Client Trip History. */
.trips-status-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Q36 (Danny 2026-10-25, docs/status-icons-complete.md): the Status cell as icons on one line in fixed slots (trip, payment, approval,
   then Rates needed / Rate to follow); the tooltip gives the word. DONE and paid share the check badge. Amber is darkened so the
   icons keep 3:1 against white. The legend (TripStatusLegend) sits on the pager's line. */
.trips-status-chips.trip-status-icons { flex-wrap: nowrap; gap: 6px; white-space: nowrap; }
.trip-status-icons__slot { display: inline-flex; justify-content: center; min-width: 22px; }
.trip-status-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; cursor: default; }
.trip-status-icon .trip-status-icon__glyph.mud-icon-root { font-size: 20px; width: 20px; height: 20px; color: inherit; }
.trip-status-icon__peso { font-weight: 800; font-size: 18px; line-height: 1; }
.trip-status-icon .trip-status-icon__check.mud-icon-root {
    position: absolute; right: -4px; bottom: -3px; width: 12px; height: 12px; font-size: 12px;
    color: var(--success, #2e7d32); background: var(--mud-palette-surface, #fff); border-radius: 50%;
}
.trip-status-icon--neutral { color: #66706a; }
.trip-status-icon--success { color: var(--success, #2e7d32); }
.trip-status-icon--danger { color: var(--red, #c34b3d); }
.trip-status-icon--warning { color: #a36b00; }
/* Q37 (Danny 2026-10-25): yellow = open (trip OPEN, payment OPEN, approval Pending), green = done / paid / approved, red = rejected.
   #A68A00 keeps 3.36:1 against white (hue 50°, a clearer yellow than the extras' amber #a36b00, hue 39°). */
.trip-status-icon--open { color: #A68A00; }
/* The legend takes the room left of the pager and wraps its own items there (never below the pager). */
.grid-pager-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; }
.grid-pager-row > .mud-table-pagination-toolbar { flex: 0 0 auto; margin-left: auto; }
.trip-status-legend { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 4px 0 4px 12px; font-size: 0.72rem; color: var(--gray-soft, #556258); }
.trip-status-legend__item { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.trip-status-legend__group { font-weight: 600; white-space: nowrap; }   /* Q69: the Daily Trips legend's "Stage:" / "Gate pass:" */
.trip-status-legend__item + .trip-status-legend__group { margin-left: 6px; }
.trip-status-legend .trip-status-icon { width: 16px; height: 16px; }
.trip-status-legend .trip-status-icon .trip-status-icon__glyph.mud-icon-root { font-size: 15px; width: 15px; height: 15px; }
.trip-status-legend .trip-status-icon__peso { font-size: 14px; }
.trip-status-legend .trip-status-icon .trip-status-icon__check.mud-icon-root { width: 9px; height: 9px; font-size: 9px; right: -3px; bottom: -2px; }
@media (max-width: 700px) {
    .grid-pager-row { flex-wrap: wrap; }
    .trip-status-legend { flex-basis: 100%; }
}
.trips-status-filter { display: grid; gap: 4px; padding: 12px; min-width: 230px; }
.trips-status-filter__group { border: 0; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.trips-status-filter__group legend { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 2px; padding: 0; }
.trips-status-filter__choice { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.trips-status-filter__choice input { width: 16px; height: 16px; margin: 0; }

.client-trip-history-grid .mud-table-head .mud-table-cell,
.client-trip-history-grid .mud-table-head .mud-table-cell-label,
.client-trip-history-grid .mud-table-head .sortable-column-header,
.client-trip-history-grid .mud-table-head .mud-table-sort-label {
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal;
}

.expense-entry-form__vat {
    justify-content: center;
    padding-top: 18px;
}

@media (max-width: 700px) {
    .expense-entry-form__control {
        width: 100%;
    }

    .expense-entry-form__row {
        grid-template-columns: 1fr;
    }

    .expense-entry-form__vat {
        justify-content: flex-start;
        padding-top: 0;
    }
}

.temp-detail-body { padding: 16px; }

.temp-detail-title {
    max-width: 980px;
    margin: 3px 0 14px;
    padding-bottom: 7px;
    border-bottom: 1px solid #c8e2d0;
    color: var(--truck-green);
    font: 800 11px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.temp-detail-title--spaced { margin-top: 20px; }

.temp-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px 12px;
    max-width: 980px;
}

.temp-detail-item--full { grid-column: 1 / -1; }

.temp-detail-item label {
    display: block;
    margin: 0 0 4px 2px;
    color: #7c887f;
    font: 800 9px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.temp-detail-item > div {
    display: flex;
    min-height: 35px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--truck-line);
    border-radius: 6px;
    background: #f7f9f7;
    color: #59665d;
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif;
}

.temp-detail-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eaf2fb;
    color: #2463a7;
    font-size: 10px;
    font-weight: 800;
}

.temp-money-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 980px;
}

.temp-money-box {
    padding: 13px;
    border: 1px solid var(--truck-line);
    border-radius: 6px;
    background: #fbfcfb;
}

.temp-money-box--total {
    border-color: #c8e2d0;
    background: var(--truck-green-soft);
}

.temp-money-box span {
    display: block;
    color: var(--truck-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.temp-money-box strong {
    display: block;
    margin-top: 5px;
    color: var(--truck-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.temp-proof-box {
    display: flex;
    max-width: 980px;
    min-height: 86px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border: 1px dashed #bbc8be;
    border-radius: 7px;
    background: #fbfdfb;
    color: var(--truck-muted);
    text-align: left;
}

.temp-proof-box .mud-icon-root { color: var(--truck-green); }
.temp-proof-box strong { display: block; color: var(--truck-green); font-size: 12px; }
.temp-proof-box span { display: block; margin-top: 2px; font-size: 10px; }

@media (max-width: 760px) {
    .finance-allocation-row {
        grid-template-columns: 1fr;
    }

    .finance-allocation-remove {
        width: 100%;
    }
    .temp-detail-grid,
    .temp-money-summary,
    .temp-entry-grid,
    .temp-operator-grid,
    .temp-operator-fields { grid-template-columns: 1fr; }
    .temp-detail-item--full { grid-column: auto; }
    .temp-entry-field--full { grid-column: auto; }
    .temp-entry-upload { align-items: flex-start; flex-direction: column; }
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 44%) 1fr;
    padding: 0;
    background: #f5f7f5;
}

.auth-shell__panel {
    width: auto;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 0;
    border-right: 1px solid var(--truck-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.auth-shell__aside {
    display: flex;
    align-items: flex-end;
    padding: 54px;
    background: linear-gradient(145deg, #e7f2e9, #f5f8f5 58%, #edf4ef);
}

.auth-shell__aside > div {
    max-width: 540px;
}

.auth-shell__aside img {
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
}

.auth-shell__aside h2 {
    max-width: 500px;
    margin: 0 0 10px;
    color: var(--truck-green-dark);
    font-size: 29px;
    line-height: 1.15;
}

.auth-shell__aside p {
    max-width: 460px;
    margin: 0;
    color: #587060;
    font-size: 13px;
    line-height: 1.65;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 42px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
}

.login-brand img {
    width: 32px;
    height: 32px;
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 25px;
}

.login-subtitle {
    margin: 0 0 23px;
    color: var(--truck-muted);
    font-size: 12px;
}

.login-card form {
    display: grid;
    gap: 13px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.login-button {
    min-height: 39px;
}

.loading-screen {
    display: flex;
    min-height: calc(100vh - 104px);
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    background: transparent;
}

.vehicle-financials-loading-overlay,
.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: wait;
    background: rgba(247, 249, 247, .82);
    backdrop-filter: blur(2px);
}

.vehicle-trip-income-grid .mud-table-container {
    overflow-x: auto;
}

.vehicle-trip-income-grid .mud-table-root {
    min-width: 1250px !important;
    table-layout: auto;
}

.vehicle-trip-income-grid .mud-table-cell:nth-child(1) { min-width: 145px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(2) { min-width: 125px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(3) { min-width: 210px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(4) { min-width: 190px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(5) { min-width: 210px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(6),
.vehicle-trip-income-grid .mud-table-cell:nth-child(7),
.vehicle-trip-income-grid .mud-table-cell:nth-child(8) { min-width: 135px; }
.vehicle-trip-income-grid .mud-table-cell:nth-child(9) { min-width: 100px; }

.vehicle-financials-content .mud-table-foot .mud-table-cell {
    background: #f2f5f3;
    color: #26382c;
    font-weight: 400;
}

.vehicle-financials-content .grid-total-label,
.vehicle-financials-content .grid-total-value {
    font-weight: 500;
}

.financial-scope-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid #cbd6cf;
    border-radius: 999px;
    background: #eef3f0;
    color: #4c5f53;
    font-size: 11px;
    font-weight: 600;
}

.financial-scope-badge--selected {
    border-color: #a8c9b2;
    background: #e8f4ec;
    color: #155f35;
}

.financial-formula {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr);
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
}

.financial-formula__operator {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #536359;
    font-size: 22px;
    font-weight: 500;
}

.financial-formula__item--income {
    border-color: #a9cbb4;
    background: #edf7f0;
}

.financial-formula__item--expense {
    border-color: #dfc786;
    background: #fbf5e5;
}

.financial-formula__item--cashout {
    border-color: #dfb58b;
    background: #fcf0e5;
}

.financial-formula__item--net-positive {
    border-color: #87be99;
    background: #e5f4ea;
}

.financial-formula__item--net-negative {
    border-color: #dda1a1;
    background: #fbeaea;
}

.financial-formula--historical {
    padding: 14px;
    border-radius: 8px;
    background: #f6f8f6;
}

@media (max-width: 900px) {
    .financial-formula {
        grid-template-columns: 1fr;
    }

    .financial-formula__operator {
        min-height: 16px;
        transform: rotate(90deg);
    }
}

@media (max-width: 980px) {
    .quick-nav .mud-nav-link:nth-child(n+5) { display: none; }
    .dev-role span { display: none; }
}

@media (max-width: 760px) {
    .mud-main-content.truckopis-main { padding: 52px 13px 28px; }
    .truckopis-main:not(.truckopis-main--anonymous) > .truckopis-content { padding-top: 22px; }
    .quick-nav, .dev-role, .user-copy { display: none; }
    .app-brand { min-width: 0; }
    .app-brand span { display: none; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-shell__panel { min-height: 100vh; padding: 28px 20px; border-right: 0; }
    .auth-shell__aside { display: none; }
}
.summary-item--clickable {
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.summary-item--clickable:hover,
.summary-item--clickable:focus-visible {
    border-color: var(--color-primary, #146c43);
    background: #f1f8f4;
    outline: none;
}

.billing-grid-loading-host {
    position: relative;
    min-height: 190px;
}

.billing-grid-loading-host__content {
    transition: opacity .12s ease;
}

.billing-grid-loading-host.is-loading .billing-grid-loading-host__content {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.billing-grid-loading-host__indicator {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 8px;
    background: var(--surface-muted, #f6f8f6);
    color: var(--text-muted);
}

.billing-ca-overview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.billing-ca-overview__action {
    margin-left: auto;
}

.billing-requirements {
    overflow: hidden;
}

#billing-containers {
    scroll-margin-top: 18px;
}

#billing-containers:focus-visible {
    outline: 2px solid var(--color-primary, #146c43);
    outline-offset: 3px;
}

.billing-requirements__header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #dce5df;
}

.billing-requirements__header h2 {
    margin: 0;
    font-size: 16px;
}

.billing-requirements__header p {
    margin: 4px 0 0;
    color: #68766d;
    font-size: 12px;
}

.billing-requirements__list {
    display: grid;
}

.billing-requirement-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 9px 20px;
    border-bottom: 1px solid #e5ebe7;
}

.billing-requirement-row:last-child {
    border-bottom: 0;
}

.billing-requirement-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #18864b;
    opacity: 1;
}

.billing-requirement-row > div {
    display: grid;
    gap: 2px;
}

.billing-requirement-row strong {
    color: #173a2b;
    font-size: 13px;
}

.billing-requirement-row strong small {
    margin-left: 6px;
    color: #7a877f;
    font-size: 10px;
    font-weight: 600;
}

.billing-requirement-row span {
    color: #718078;
    font-size: 11px;
}

.billing-requirement-row__actions {
    display: flex !important;
    grid-auto-flow: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px !important;
}

.billing-requirement-row__actions .button {
    white-space: nowrap;
}

.billing-workflow-card {
    overflow: hidden;
}

.billing-workflow-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #dce5df;
    background: #f3f8f5;
}

.billing-workflow-card__header h2,
.billing-workflow-group h3 {
    margin: 0;
    color: #123b29;
}

.billing-workflow-card__header h2 { font-size: 17px; }
.billing-workflow-card__header p { margin: 4px 0 0; color: #68766d; font-size: 12px; }
.billing-workflow-group { padding: 14px 20px 4px; }
.billing-workflow-group + .billing-workflow-group { border-top: 1px solid #e0e7e2; }
.billing-workflow-group h3 { margin-bottom: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.billing-workflow-list { display: grid; }

.billing-workflow-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 9px 0;
    border-bottom: 1px solid #e7ece9;
}

.billing-workflow-card > .billing-workflow-list .billing-workflow-row { padding-left: 20px; padding-right: 20px; }
.billing-workflow-row:last-child { border-bottom: 0; }
.billing-workflow-row > div:not(.billing-requirement-row__actions) { display: grid; gap: 2px; }
.billing-workflow-row strong { color: #173a2b; font-size: 13px; }
.billing-workflow-row div > span { color: #718078; font-size: 11px; }

.billing-workflow-status {
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.billing-workflow-status.is-complete { background: #dff3e7; color: #146b3b; }
.billing-workflow-status.is-missing { background: #fde8e6; color: #a62d27; }
.billing-workflow-status.is-pending { background: #fff0c7; color: #8a6200; }
.billing-workflow-status.is-locked { background: #fff0c7; color: #8a6200; }
.billing-workflow-status.is-optional { background: #edf1ee; color: #68766d; }
.billing-workflow-status.is-info { background: #e2efff; color: #205f9e; }

.billing-trucking-formula-card {
    overflow: hidden;
}

.billing-trucking-bands {
    display: grid;
    gap: 1px;
    padding: 1px;
    background: #dce5df;
}

.billing-trucking-band {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-width: 0;
    background: #fff;
}

.billing-trucking-band__title {
    display: grid;
    align-items: center;
    padding: 9px 12px;
    background: #f6f9f7;
    color: #53685c;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.billing-trucking-band__flow {
    display: grid;
    min-width: 0;
    overflow-x: auto;
}

.billing-trucking-band__flow--billing,
.billing-trucking-band__flow--receivable,
.billing-trucking-band__flow--collection {
    grid-template-columns: minmax(120px, .8fr) 24px minmax(175px, 1.15fr) 24px minmax(125px, .85fr) 24px minmax(110px, .75fr) 24px minmax(215px, 1.35fr);
}

.billing-trucking-band__collection-gap {
    grid-column: span 2;
}

.billing-trucking-band__collection-gap--brokerage {
    grid-column: span 4;
}

.billing-trucking-band__term {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 62px;
    padding: 8px 11px;
}

.billing-trucking-band__amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.billing-trucking-band__amount-values {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    white-space: nowrap;
}

.billing-trucking-band__amount > strong {
    color: #123b29;
    font-size: 15px;
    white-space: nowrap;
}

.billing-trucking-amount-link {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #126a3d;
    font: 800 15px/1.25 "Segoe UI", Arial, sans-serif;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    cursor: pointer;
}

.billing-trucking-amount-link:hover {
    color: #094e2b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.billing-trucking-amount-link:focus-visible {
    outline: 2px solid #d7a514;
    outline-offset: 3px;
}

.billing-trucking-text-link {
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #126a3d;
    font: 700 11px/1.25 "Segoe UI", Arial, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.billing-trucking-text-link:hover:not(:disabled) {
    color: #094e2b;
}

.billing-trucking-text-link:focus-visible {
    outline: 2px solid #d7a514;
    outline-offset: 3px;
}

.billing-trucking-text-link:disabled {
    color: #8c9891;
    cursor: not-allowed;
}

.billing-trucking-pending-amount {
    color: #a87500;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.billing-trucking-band__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-left: auto;
}

.brokerage-support-summary {
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(120px, auto);
    align-items: center;
    justify-content: start;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid #dce5df;
    background: #fbfcfb;
}

.brokerage-support-summary--ar {
    padding-top: 10px;
    padding-bottom: 10px;
    background: #f7f9f8;
}

.brokerage-support-summary > div {
    display: grid;
    gap: 2px;
}

.brokerage-support-summary__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brokerage-support-summary__heading .billing-workflow-status {
    flex: 0 0 auto;
}

.brokerage-support-summary > div > span {
    color: #66766d;
    font-size: 11px;
}

.billing-forwarding-flow--billing {
    grid-template-columns: minmax(180px, 1fr) 24px minmax(180px, 1fr) 24px minmax(210px, 1.15fr);
}

.billing-forwarding-flow--collection {
    grid-template-columns: minmax(180px, 1fr) 24px minmax(180px, 1fr) 24px minmax(210px, 1.15fr);
}

.forwarding-margin-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) repeat(5, minmax(115px, .72fr));
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #dce5df;
    background: #f5faf7;
}

.forwarding-margin-summary > div {
    display: grid;
    gap: 2px;
}

.forwarding-margin-summary span {
    color: #66766d;
    font-size: 10px;
}

.forwarding-margin-summary strong {
    color: #123b29;
}

.forwarding-margin-summary .billing-workflow-status {
    margin-left: 3px;
    padding: 2px 5px;
    font-size: 8px;
    vertical-align: middle;
}

.forwarding-margin-summary__negative {
    color: #b42318 !important;
}

.forwarding-admin-summary-row {
    grid-template-columns: minmax(320px, 400px) minmax(120px, auto);
}

.brokerage-supporting-amount {
    margin-right: 14px;
    font-size: 12px;
}

.billing-trucking-action.button {
    min-height: 29px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
}

.billing-trucking-band .billing-trucking-equation__label .billing-workflow-status {
    padding: 3px 6px;
    font-size: 8px;
}

.billing-trucking-band .billing-trucking-equation__result {
    margin: 4px 5px;
    border-radius: 8px;
    background: #f1f7f3;
}

.billing-trucking-band .billing-trucking-equation__balance {
    background: #dff0e5;
}

@media (max-width: 900px) {
    .billing-trucking-band {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .billing-trucking-band__flow--billing,
    .billing-trucking-band__flow--receivable,
    .billing-trucking-band__flow--collection { min-width: 930px; }
}

.billing-trucking-equations {
    display: grid;
    gap: 1px;
    padding: 1px;
    background: #dce5df;
}

.billing-trucking-equation {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 28px minmax(190px, 1.2fr) 28px minmax(170px, 1fr);
    align-items: stretch;
    background: #fff;
}

.billing-trucking-equation--collection {
    grid-template-columns: minmax(145px, 1fr) 26px minmax(175px, 1.15fr) 26px minmax(160px, 1fr) 26px minmax(175px, 1.1fr);
}

.billing-trucking-equation__term {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 76px;
    padding: 12px 15px;
}

.billing-trucking-equation__term + .billing-trucking-equation__operator,
.billing-trucking-equation__operator + .billing-trucking-equation__term {
    border-left: 1px solid #e3e9e5;
}

.billing-trucking-equation__label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: #697a70;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.billing-trucking-equation__label .billing-workflow-status {
    padding: 3px 6px;
    font-size: 8px;
    letter-spacing: 0;
}

.billing-trucking-equation__term > strong {
    color: #123b29;
    font-size: 16px;
}

.billing-trucking-equation__operator {
    display: grid;
    place-items: center;
    color: #718078;
    font-size: 18px;
    font-weight: 800;
}

.billing-trucking-equation__result {
    background: #f4f8f5;
}

.billing-trucking-equation__balance {
    background: #e2f2e8;
}

.billing-trucking-equation__balance > strong { color: #0b6536; }
.billing-trucking-equation__deduction { color: #a62d27 !important; }

.billing-trucking-inline-action {
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid #c8d3cc;
    border-radius: 5px;
    background: #fff;
    color: #17683d;
    font: 700 9px/1.2 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

.billing-trucking-inline-action:hover:not(:disabled) {
    border-color: #1c7b49;
    background: #f1f8f4;
}

.billing-trucking-inline-action:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.billing-trucking-supporting-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    padding: 11px 16px;
    border-top: 1px solid #dce5df;
    background: #f8faf9;
}

.billing-trucking-supporting-row > div {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #173a2b;
    font-size: 11px;
}

.billing-trucking-supporting-row .billing-workflow-status {
    padding: 3px 7px;
    font-size: 8px;
}

@media (max-width: 1050px) {
    .billing-trucking-equation,
    .billing-trucking-equation--collection {
        grid-template-columns: 1fr;
    }

    .billing-trucking-equation__term {
        min-height: 60px;
    }

    .billing-trucking-equation__operator {
        min-height: 26px;
        border-top: 1px solid #e3e9e5;
        border-left: 0 !important;
    }

    .billing-trucking-equation__term + .billing-trucking-equation__operator,
    .billing-trucking-equation__operator + .billing-trucking-equation__term {
        border-left: 0;
    }
}

.billing-trucking-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-trucking-section-heading .button {
    min-height: 32px;
    padding: 6px 14px;
}

.billing-trucking-unsaved {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff0c7;
    color: #8a6200;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.billing-trucking-hero {
    overflow: hidden;
}

.billing-trucking-financial-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: #dce5df;
}

.billing-trucking-financial-grid > div {
    display: grid;
    gap: 5px;
    min-height: 74px;
    padding: 14px 16px;
    background: #fff;
}

.billing-trucking-financial-grid span,
.billing-trucking-approval__body span {
    color: #718078;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.billing-trucking-financial-grid strong {
    color: #173a2b;
    font-size: 16px;
}

.billing-trucking-financial-grid .is-deduction { color: #a62d27; }
.billing-trucking-financial-grid > .is-total { background: #f2f8f4; }
.billing-trucking-financial-grid > .is-balance { background: #e2f2e8; }
.billing-trucking-financial-grid > .is-balance strong { color: #0b6536; }

.billing-trucking-formula {
    padding: 10px 16px;
    border-top: 1px solid #dce5df;
    background: #f8faf9;
    color: #607068;
    font-size: 11px;
}

.billing-trucking-approval {
    overflow: hidden;
}

.billing-trucking-approval__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: #dce5df;
}

.billing-trucking-approval__body > div {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    background: #fff;
}

.billing-trucking-approval__body strong {
    color: #173a2b;
    font-size: 13px;
}

@media (max-width: 950px) {
    .billing-trucking-financial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .billing-trucking-financial-grid,
    .billing-trucking-approval__body { grid-template-columns: 1fr; }
}

#billing-trucking-reimbursables,
#billing-container-deposits,
#billing-trucking-ar,
#billing-trucking-approval,
#billing-eir { scroll-margin-top: 18px; }

.billing-ca-overview__body {
    padding: 1rem 1.25rem;
}

.billing-ca-readonly-form {
    max-width: 980px;
}

.billing-ca-readonly-form .billing-ref-field input[readonly] {
    min-height: 38px;
    padding: 8px 10px;
    border-color: #cbd6cf;
    border-radius: 6px;
    background: #f7f9f7;
    color: #59665d;
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif;
}

.billing-ca-readonly-form .billing-ref-field label {
    margin-bottom: 5px;
    color: #7c887f;
    font: 800 10px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: .06em;
}

.billing-ca-readonly-form__last-row {
    margin-bottom: 0;
}

.billing-ref-section-title--actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sales-invoice-ewt-control {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
}

.sales-invoice-attachments {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
}

.sales-invoice-attachments .form-field,
.sales-invoice-attachments .billing-ca-upload {
    min-width: 0;
    width: 100%;
}

.sales-invoice-attachments .billing-ca-upload > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sales-invoice-attachments .mud-file-upload {
    min-width: 150px;
    max-width: 100%;
}

.billing-sales-invoice-page .form-section__title-row { align-items: center; gap: 10px; }
.billing-sales-invoice-page .form-section__title-row .button { min-height: 32px; padding: 6px 14px; }
.billing-attachment-view { margin-top: 8px; }

.billing-ca-readonly-attachment {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px dashed #cbd6cf;
    border-radius: 6px;
    background: #f7f9f7;
}

.billing-ca-readonly-attachment__file {
    min-width: 0;
}

.billing-ca-readonly-attachment__file span,
.billing-ca-readonly-attachment__file strong {
    display: block;
}

.billing-ca-readonly-attachment__status {
    margin-bottom: 2px;
    color: var(--truck-green);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.billing-ca-readonly-attachment__file strong {
    overflow-wrap: anywhere;
    color: var(--truck-ink);
    font-size: 12px;
    font-weight: 500;
}

.billing-ca-readonly-attachment__empty {
    color: var(--truck-muted);
    font-size: 12px;
}

.billing-ca-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 1.25rem;
    color: #5f6f66;
    text-align: center;
}

.billing-ca-overview__fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.billing-ca-overview__fields > div {
    padding: .75rem;
    border: 1px solid #d8e1db;
    border-radius: .4rem;
    background: #f7faf8;
}

.billing-ca-overview__fields span,
.billing-ca-overview__fields strong {
    display: block;
}

.billing-ca-overview__fields span {
    margin-bottom: .25rem;
    color: #607068;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

@media (max-width: 800px) {
    .billing-ca-overview__fields { grid-template-columns: 1fr 1fr; }
}

.billing-ca-form-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #123f2a;
    font-size: 1.08rem;
    font-weight: 700;
    background: #f3f6f4;
    border: 1px solid #d7e1db;
    border-left: 4px solid #0b5d38;
    border-radius: 6px;
    padding: .7rem .85rem;
    margin-top: .5rem;
}

.billing-ca-fieldset { margin: 0; padding: 0; border: 0; }

.billing-ca-entry-form {
    display: flex;
    flex-direction: column;
    max-width: 760px;
    gap: 14px;
    margin: 16px;
}

/* Shared spacing contract for forms opened in Billing workspace tabs. */
.billing-tab-page > form,
.billing-tab-page > .form-section,
.billing-tab-page > .billing-ref-block,
.billing-tab-page > .card--wide {
    margin-top: 20px !important;
}

.billing-tab-page .billing-ca-entry-form,
.billing-tab-page .billing-tab-form-body {
    box-sizing: border-box;
    width: min(100%, 960px);
    max-width: none;
    margin: 0;
    padding: 16px;
    gap: 14px;
}

.billing-tab-page .billing-payment-content {
    width: 100%;
    padding: 16px;
}

.billing-tab-page .billing-payment-fields {
    width: 100%;
    margin: 0;
    padding: 0;
}

.billing-ca-entry-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.billing-ca-entry-form .form-field {
    min-width: 0;
}

.billing-ca-entry-form .form-field > label {
    display: block;
    margin: 0 0 5px;
    color: #7c887f;
    font: 800 10px/1.45 "Segoe UI", Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.billing-ca-entry-form .mud-input-control,
.billing-ca-entry-form .mud-input,
.billing-ca-entry-form .mud-input-slot,
.billing-ca-entry-form .mud-select,
.billing-ca-entry-form .mud-select-input,
.billing-ca-entry-form textarea {
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif;
}

/* Inline helper text under a field (e.g. VaultTransferForm's "Current balance" hint under the From
   Vault select) - had no rule at all before, so it rendered as an unstyled inline span crammed
   against the control above it. */
.billing-ca-entry-form .form-help {
    display: block;
    margin-top: 5px;
    color: #7c887f;
    font: 400 11px/1.4 "Segoe UI", Arial, sans-serif;
}

.billing-ca-entry-form .mud-input-control {
    margin-top: 0;
}

.billing-ca-entry-form .mud-input-outlined-border {
    border-color: #c5cec8;
    border-radius: 6px;
}

/* Locked document forms (approved Service Invoice / approved SOA): the MudBlazor inputs are ReadOnly, so values stay
   readable and copyable, but they looked like normal editable fields. Scoped to MudBlazor outlined inputs only, so the
   View / Replace File / Print buttons and the tab close buttons inside the form are untouched.
   docs/locked-document-form-styling-complete.md */
.document-form--locked .mud-input-control .mud-input.mud-input-outlined {
    background: var(--surface-muted);
    border-radius: 6px;
    cursor: default;
}

.document-form--locked .mud-input-control .mud-input.mud-input-outlined .mud-input-slot {
    color: var(--text);
    font-weight: 400;
    cursor: default;
}

.document-form--locked .mud-input-control .mud-input.mud-input-outlined .mud-input-outlined-border,
.document-form--locked .mud-input-control .mud-input.mud-input-outlined:hover .mud-input-outlined-border,
.document-form--locked .mud-input-control .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-width: 1px;
    border-color: var(--border);
}

/* Nothing that invites editing: the date-picker calendar button, the select arrow, the numeric up/down spinners. */
.document-form--locked .mud-input-control .mud-input.mud-input-outlined .mud-input-adornment,
.document-form--locked .mud-input-control .mud-input-numeric-spin {
    display: none;
}

.billing-ca-entry-form__control { width: calc(50% - 8px); }
.billing-ca-entry-form__wide { width: 100%; }

.billing-ca-upload {
    min-height: 50px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px dashed #cbd8d0;
    border-radius: .45rem;
    background: #f8faf9;
    color: var(--truck-ink);
    font: 400 12px/1.45 "Segoe UI", Arial, sans-serif;
}

.billing-ca-upload .button {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 10px;
}

.billing-ca-upload__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .billing-ca-entry-form__row { grid-template-columns: 1fr; }
    .billing-ca-entry-form__control { width: 100%; }
    .billing-ca-form-heading { align-items: flex-start; flex-direction: column; }
    .billing-ca-entry-form { margin: 14px; }
    .billing-tab-page .billing-ca-entry-form,
    .billing-tab-page .billing-tab-form-body { margin: 0; padding: 14px; }
    .billing-tab-page .billing-payment-fields { padding: 0; }
    .billing-ca-upload { align-items: flex-start; flex-direction: column; }
    .billing-ca-upload__actions { justify-content: flex-start; flex-wrap: wrap; }
}
.attachment-size-limit {
    color: #6b756f;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}
.finance-dashboard-section {
    margin-top: 1.25rem;
}

.finance-summary-card {
    appearance: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    border: 1px solid var(--border-color, #d8dfda);
}

.finance-summary-card:hover,
.finance-summary-card--active {
    border-color: var(--mud-palette-primary, #18643a);
    box-shadow: 0 0 0 2px rgb(24 100 58 / 12%);
}

.finance-payment-summary {
    max-width: 520px;
}

.billing-list-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.75rem;
}

.billing-payment-list-actions {
    justify-self: end;
}

.billing-payment-status-row .status-chip {
    align-self: flex-start;
}

.billing-payment-deposited-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    font-weight: 600;
}

.service-invoice-print-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:12px; max-width:194mm; margin:0 auto 20px; }
.standalone-print-layout { min-height:100vh; padding:1.5rem; background:#f3f5f2; }
.service-invoice-editor-body { position:relative; }
.service-invoice-header-print { position:absolute; right:1.25rem; top:.7rem; z-index:2; }
.service-invoice-paper { width:210mm; min-height:280mm; margin:auto; padding:8mm; background:#fff; color:#111; font-family:Arial,sans-serif; border:1px solid #555; }
.service-invoice-paper__header { display:grid; grid-template-columns:26mm 1fr 72mm; align-items:center; gap:4mm; padding-bottom:3mm; }
.service-invoice-paper__header img { width:24mm; height:24mm; object-fit:contain; }
.service-invoice-paper__header h1 { margin:0; color:#267535; font-size:18px; text-transform:uppercase; }
.service-invoice-paper__header strong { color:#267535; font-size:11px; }
.service-invoice-paper__header address { font-style:normal; font-size:11px; line-height:1.45; }
.service-invoice-paper table { width:100%; border-collapse:collapse; font-size:11px; }
.service-invoice-paper th,.service-invoice-paper td { border:1px solid #555; padding:3px 5px; vertical-align:top; }
.service-invoice-paper__facts th { width:17%; text-align:left; white-space:nowrap; }
.service-invoice-paper__facts td { width:33%; }
.service-invoice-paper__facts .number { color:#7b2b68; font-size:15px; font-weight:700; text-align:center; }
.service-invoice-paper__lines { margin-top:-1px; }
.service-invoice-paper__lines thead th { text-transform:uppercase; text-align:center; font-size:13px; }
.service-invoice-paper__lines th:last-child,.service-invoice-paper__lines td:last-child { width:25%; text-align:right; }
.service-invoice-paper__lines tbody tr:not(.total) { height:8mm; }
.service-invoice-paper__lines .total { font-weight:700; text-transform:uppercase; }
.service-invoice-paper__totals { width:70% !important; margin-top:8mm; margin-left:auto; }
.service-invoice-paper__totals th { text-align:left; }
.service-invoice-paper__totals td { text-align:right; }
.service-invoice-paper__totals .net { font-weight:700; }
.service-invoice-paper__service-totals { margin-top:8mm; table-layout:fixed; }
.service-invoice-paper__service-totals th { text-align:center; text-transform:uppercase; font-size:10px; }
.service-invoice-paper__service-totals tbody th { text-align:left; }
.service-invoice-paper__service-totals td { text-align:right; }
.service-invoice-paper__service-totals .net { font-weight:700; }
.service-invoice-paper__breakdown { margin-top:-1px; }
.service-invoice-paper__breakdown thead th { text-transform:uppercase; text-align:center; font-size:13px; }
.service-invoice-paper__breakdown th:last-child,.service-invoice-paper__breakdown td:last-child { width:28%; text-align:right; }
.service-invoice-paper__breakdown tbody tr:not(.invoice-net) > th,
.service-invoice-paper__breakdown tbody tr:not(.invoice-net) > td { border-top:0; border-bottom:0; }
.service-invoice-paper__breakdown .service-heading th { padding-top:8px; text-align:left; font-weight:800; }
.service-invoice-paper__breakdown .service-heading td { border-bottom-color:transparent; }
.service-invoice-paper__breakdown .service-net td { font-weight:700; padding-bottom:8px; }
.service-invoice-paper__breakdown .invoice-net th { border-top:2px solid #111; padding-top:7px; padding-bottom:7px; font-size:12px; }
/* Several B/Ls on one invoice: a heading and facts line per B/L, a B/L subtotal, then the invoice's totals. */
.service-invoice-paper__breakdown .bl-heading th { padding-top:12px;text-align:left;font-weight:900;text-transform:uppercase;border-top:1px solid #111 !important; }
.service-invoice-paper__breakdown .bl-facts td { text-align:left !important;font-size:11px;padding-bottom:4px; }
.service-invoice-paper__breakdown .bl-subtotal th { text-align:right;font-weight:800;padding-top:4px;padding-bottom:10px; }
.service-invoice-paper__breakdown .bl-subtotal th:first-child { text-align:left; }
.service-invoice-paper__breakdown .invoice-totals td { font-weight:700; }
.service-invoice-paper__breakdown .bl-subtotal + .invoice-totals td { border-top:1px solid #111 !important;padding-top:7px; }
.service-invoice-paper footer { display:grid; grid-template-columns:1fr 1fr; margin-top:20mm; border:1px solid #555; }
.service-invoice-paper footer div { padding:4px; min-height:22mm; display:flex; flex-direction:column; }
.service-invoice-paper footer div+div { border-left:1px solid #555; }
.service-invoice-paper footer strong { margin:auto 0 2px; text-align:center; }
.service-invoice-paper footer span { border-top:1px solid #555; padding-top:2px; text-align:center; font-size:10px; }

@media print {
    @page { size:A4 portrait; margin:0; }
    .service-invoice-print-actions { display:none !important; }
    .service-invoice-print-page { margin:0 !important; padding:0 !important; }
    .standalone-print-layout { min-height:0; padding:0; background:#fff; }
    .service-invoice-paper { border:0; margin:0; width:210mm; min-height:297mm; box-shadow:none; }
}
.service-invoice-tax-grid {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.service-invoice-tax-grid th,
.service-invoice-tax-grid td {
  padding: .65rem .7rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border, #d9ded9);
}

.service-invoice-tax-grid thead th,
.service-invoice-tax-grid tfoot th {
  background: #f1f5f1;
  color: #173e2d;
  text-align: left;
}

.service-invoice-tax-grid tfoot th:last-child {
  background: #dfede4;
  font-size: 1rem;
}

.cash-bank-floating-summary .summary-grid--totals {
  margin-top: 12px;
}

/* Shared by Cash & Bank's Account Balances and the Rebates summary row (both use finance-summary-card). */
.finance-summary-cards {
  margin-bottom: 28px;
}

.finance-summary-cards .billing-banking-summary-grid {
  margin-top: 12px;
  margin-bottom: 0;
}

/* Label on top, amount below - explicit on the card itself (not scoped to .cash-bank-balances), so every
   page using finance-summary-card (Cash & Bank, Rebates) stacks the same way regardless of label length. */
.finance-summary-card {
  display: flex;
  min-height: 80px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.finance-summary-card .card__label,
.finance-summary-card .card__title {
  display: block;
  margin: 0;
}

.cash-bank-list-actions {
  margin-top: 20px;
  gap: 0.5rem;
}

.billing-payment-form-alert {
  margin-top: 16px;
}

.cash-bank-account-grid-card {
  margin-top: 18px;
}

.cash-bank-account-grid .mud-table-container,
.cash-bank-floating-grid-card .mud-table-container {
  min-height: 300px;
  overflow-x: auto;
}

.cash-bank-account-grid .mud-table-root {
  min-width: 760px !important;
  table-layout: fixed;
}

.cash-bank-floating-tab-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .cash-bank-floating-tab-summary {
    grid-template-columns: 1fr;
  }
}

/* Payroll list: inline Salary Payout controls (docs/withdrawal-type-specific-details-handover.md). */
.payroll-payout-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 420px;
}

.payroll-payout-inline .mud-input-control {
  min-width: 180px;
  margin: 0;
}

/* Trip delete-impact confirmation (TripEntry.razor) */
.trip-delete-dialog {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 44, 24, .45);
}

.trip-delete-dialog__card {
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 22px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow-shell);
}

.trip-delete-dialog__card h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.trip-delete-dialog__section {
    margin-top: 14px;
}

.trip-delete-dialog__section h3 {
    margin: 0 0 6px;
    font-size: .9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.trip-delete-dialog__section ul {
    margin: 0;
    padding-left: 20px;
}

.trip-delete-dialog__section--blocked {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--status-danger-border);
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
}

.trip-delete-dialog__section--blocked h3 {
    color: var(--status-danger-text);
}

.trip-delete-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.confirm-delete-dialog__detail {
    margin: 0;
}

/* Cash & Bank period summary + Missing POP tab (docs/banking-ledger-dashboard-handover.md) */
.cash-bank-period-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-top: 12px;
}

.cash-bank-period-filter .form-field {
  width: 180px;
  margin: 0;
}

.cash-bank-period-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 2px;
}

.finance-summary-cards .cash-bank-period-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cash-bank-period-card {
  cursor: default;
}

.cash-bank-period-card:hover {
  border-color: var(--border-color, #d8dfda);
  box-shadow: none;
}

.cash-bank-period-card__note {
  font-size: 12px;
  color: var(--text-muted);
}

.cash-bank-list-tabs {
  margin-top: 4px;
}

.cash-bank-pop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--red, #c34b3d);
  color: var(--white, #fff);
  font-size: 12px;
  line-height: 20px;
}

@media (max-width: 720px) {
  .finance-summary-cards .cash-bank-period-grid {
    grid-template-columns: 1fr;
  }

  .cash-bank-period-filter .form-field {
    width: 100%;
  }
}

.cash-bank-pop-badge--zero {
  background: var(--status-neutral-bg, #e2e8e4);
  color: var(--status-neutral-text, #39443c);
}

/* App version (docs/versioning.md): small and muted - login panel (pinned to its bottom edge) and the sidebar's foot. */
.app-version {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--text-muted);
    opacity: 0.85;
}

.app-version__api--differs {
    color: #b45309;
    font-weight: 600;
}

.auth-shell__panel {
    position: relative;
}

.auth-shell__panel > .app-version {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
}

.app-version--stacked {
    flex-direction: column;
    align-items: flex-start;
    margin-top: auto;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--truck-line);
}

/* Customer Payments, Phases 1-2: every trip_payment row with the legacy columns (docs/p1-payments-list-complete.md). */
.trip-payments-grid .mud-table-container { overflow-x: auto; }
.trip-payments-grid .mud-table-root { table-layout: auto; }   /* Q54: its min-width 1400px never applied (computed 0) - removed */
.trip-payments-grid .mud-table-body .mud-table-cell { white-space: nowrap; vertical-align: top; }
.trip-payments-grid .trip-payment-old-app,
.trip-payments-grid .trip-payment-deposited { margin-left: 6px; }
.trip-payments-grid .cell-sub { font-size: 0.75rem; opacity: 0.7; }
.trips-column-filter .trips-column-filter__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.old-app-payment-view .alert { margin-bottom: 12px; }

/* Numbers and money right-aligned in every input (Danny 2026-10-20, docs/form-layout-standard.md §3): number boxes, the shared
   money box (AppMoneyInput) and the trip-rate boxes (inputmode decimal / numeric), MudNumericField. Dates and text stay left. */
input[type="number"],
input[inputmode="decimal"],
input[inputmode="numeric"],
.mud-input-control.mud-numeric-field input,
.mud-numeric-field input {
    text-align: right;
}
/* Customer Payment form (Danny 2026-10-20, docs/payment-form-vehicle-cashout-and-tabs-complete.md item 1): the B/L's cards fill
   their row whatever their number (no empty band beside them), read-only money at the right of its box, the view-only note above
   the section with the standard gap. */
.bl-payment-entry .bl-payment-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 2px 0 14px;
}

.bl-payment-entry .bl-payment-note {
    margin-bottom: 14px;
}

.app-readonly-field--money {
    justify-content: flex-end;
}
/* The payment form's first element sits right under the tab bar (no extra 20px band; item 1). */
.bl-payment-entry > form,
.bl-payment-entry > .form-section {
    margin-top: 0 !important;
}

.bl-payment-entry > .alert,
.bl-payment-entry > .billing-form-alert {
    margin: 0 0 14px;
}
/* The current system's vehicle form (Vehicle Cashout page and the truck's Financials tab, item 2): four cards per row, the wide
   Trips table scrolls inside its card (never the page), one line per cell. */
.vehicle-report-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .vehicle-report-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.vehicle-report-card--negative .summary-item__value {
    color: var(--red);
}

.vehicle-report-pick {
    margin: 0;
    color: var(--text-muted);
}

.vehicle-trips-grid .mud-table-cell {
    white-space: nowrap;
}

.vehicle-trips-grid,
.vehicle-other-expenses-grid,
.vehicle-cashout-ledger-grid {
    max-width: 100%;
}

/* Q54 (Danny 2026-11-02): the truck page's Trips table fits 1366 with the menu collapsed - set widths for the short columns, the text columns share
   what is left (one line, ellipsis, the whole value as the tooltip), the 18 expense columns open under the row (§13), their totals in
   the strip under the grid. Replaces the in-grid sideways scroll stop-gap of the payroll-fit round. */
.vehicle-trips-grid .mud-table-root {
    table-layout: auto;   /* not fixed: an open row's colspan=1000 would hand the spare width to phantom columns (§13) */
    width: 100% !important;
}

.vehicle-trips-grid .mud-table-head th:first-child { width: 36px !important; }   /* the ▶ column: MudBlazor writes width:0% inline */
.vehicle-trips-grid .vtg-no { width: 44px; }
.vehicle-trips-grid .vtg-type { width: 96px; font-size: 0.75rem; }
.vehicle-trips-grid .vtg-date { width: 100px; }
.vehicle-trips-grid .vtg-money { width: 106px; white-space: nowrap; }
.vehicle-trips-grid .mud-table-cell.vtg-text { max-width: 0; width: 20%; }   /* the four text columns share the rest and truncate */
.vehicle-trips-grid .vtg-text > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vehicle-trips-grid .mud-table-cell { padding: 6px 8px !important; }   /* MudBlazor's 16px sides x 12 columns didn't fit 1366 */
.vehicle-trips-grid .mud-table-head .mud-table-cell.vtg-text { max-width: 0; }
.vehicle-trips-grid .mud-table-head .vtg-text .column-header { min-width: 0; }
.vehicle-trips-grid .mud-table-head .vtg-text .column-header > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.vehicle-trips-grid .vtg-second { color: var(--text-muted); }
.vehicle-trips-grid .mud-table-head .mud-table-cell { white-space: normal; overflow-wrap: normal; word-break: normal; }   /* headers wrap at spaces only */
.vehicle-trips-grid .mud-table-cell.vtg-type,
.vehicle-trips-grid .mud-table-cell.vtg-date { min-width: 96px; white-space: nowrap; }

.row-details,
.totals-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 0.8125rem;
}

.totals-strip {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-muted);
}

.totals-strip__title { font-weight: 700; }
.row-details__label { color: var(--text-muted); }
/* The wide Trips table's empty message sits at its left edge, not centred across 36 columns off-screen (item 2). */
.vehicle-trips-grid .mud-table-empty-row {
    text-align: left !important;
}

.vehicle-trips-grid .mud-table-empty-row > div {
    position: sticky;
    left: 16px;
    display: inline-block;
}

/* Stacked sections: the standard gap between a section (or a card / filter panel) and the next one, from the one --section-gap
   value (form-layout-standard §2; guarded by SectionGapTests). A form counts as the section before (an EditForm around the client
   profile; since Q69, Danny 2026-11-04, any form, so a section under a form's button row - the daily trip form's Gate pass, the
   cash advance's Status, the user's Salary History - gets the same gap). */
.form-section + .form-section,
.form-section + .card,
.card + .form-section,
.search-panel + .form-section,
.search-panel + .card,
form + .form-section,
form + .card {
    margin-top: var(--section-gap);
}

/* Q69: a form directly on the page (.page is a flex column with a 14px gap): the section under it ends up --section-gap below, the
   same gap the form keeps between its own sections (the list-totals rule does the same). */
.page > form + .form-section,
.page > form + .card {
    margin-top: calc(var(--section-gap) - 14px);
}

/* A grid's filter line (GridFilterLine, form-layout-standard §11, Danny 2026-10-24): the text ("Showing: …" / "Filtered" /
   "Filtered: ₱x") and its button side by side on one line, the button right after the text - no space-between gap, no wrap.
   Guarded by GridFilterLineTests. */
.grid-filter-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 8px;
}

.grid-filter-line__text,
.grid-filter-line__button {
    white-space: nowrap;
}

/* List pages (Danny 2026-10-21, payroll and layout round, item 5): the totals / cards block (`list-totals`) and the grid under it are
   --section-gap apart on every list page. Inside a card the next element takes the whole gap; as direct children of `.page` the page's
   own 14px flex gap is already there, so the margin adds the rest. Guarded by SectionGapTests (List_pages_space_their_totals_from_the_grid). */
.list-totals + * {
    margin-top: var(--section-gap) !important;
}

.page > .list-totals + * {
    margin-top: calc(var(--section-gap) - 14px) !important;
}

/* The vehicle DETAIL's top section (VehicleDetail, step 2): sub-headings for Details / All Time (Paid) / Period / Selected Period,
   the two check boxes side by side, the period panel without its own card inside the section, and the Payment Status / Checks
   Deposited pick lists in the Trips header. */
.vehicle-detail__subhead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
    color: var(--green);
    font: 800 12px/1.4 "Segoe UI", Arial, sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.vehicle-detail__top > .vehicle-detail__subhead:first-child {
    margin-top: 0;
}

.vehicle-detail__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 22px;
}

.vehicle-detail__plate {
    width: 220px;
    margin: 0;
}

.vehicle-detail__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    text-transform: none;
    font-weight: 600;
}

.vehicle-detail__top .vehicle-report-filters {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

.vehicle-trips-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.vehicle-trips-filters .form-field {
    min-width: 150px;
    margin: 0;
}
/* Daily Collectibles (Danny 2026-10-21): one narrow Report Date box; the Collectibles grid's ten columns sized so the headers stay on
   one or two lines at 1366 (the page never scrolls sideways); the Expenses grid's Name / Remarks / Amount. */
.daily-collectibles__date .mud-picker { max-width: 260px; }
.daily-collectibles__date .alert { margin-top: 12px; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--client { width: 11%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--bl { width: 12%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--line { width: 9%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--date { width: 8%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--container { width: 13%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--count { width: 8%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--destination { width: 10%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--check { width: 10%; }
.daily-collectibles-grid .mud-table-head .mud-table-cell.dc-col--amount { width: 11%; }
.daily-collectibles-grid .mud-table-body .mud-table-cell.dc-col--bl,
.daily-collectibles-grid .mud-table-body .mud-table-cell.dc-col--container { overflow-wrap: anywhere; }
.daily-collectibles-grid--expenses .mud-table-head .mud-table-cell.dc-col--name { width: 30%; }
.daily-collectibles-grid--expenses .mud-table-head .mud-table-cell.dc-col--remarks { width: 50%; }
.daily-collectibles-grid--expenses .mud-table-head .mud-table-cell.dc-col--amount { width: 20%; }
/* Q72 gate pass per container (Trip form box, read-only line on the daily trip form) - moved from the Q60 daily trip section. */
.gate-pass { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.gate-pass__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.gate-pass__files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gate-pass__file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--border, #e5e0d5); }
.gate-pass__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gate-pass__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gate-pass__pending { font-style: italic; }
.gate-pass--card { padding: 0 12px 12px; }
@media (max-width: 900px) { .gate-pass__file { grid-template-columns: minmax(0, 1fr); } }

/* The shared attachment box (Danny 7 Nov 2026, docs/design/attachment-box-mockup.html; Components/Shared/AttachmentBox.razor +
   js/attachments.js). One dashed area, content centered; the editable paste layer lies under the content (so right-click offers Paste
   anywhere on the box), the content lets clicks through except its buttons. */
.attach-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.attach-box__zone { position: relative; border: 2px dashed var(--border); border-radius: 10px; padding: 18px 14px; text-align: center; background: var(--surface-muted); cursor: pointer; transition: border-color .15s, background-color .15s; }
.attach-box__zone:hover, .attach-box__zone:focus-within { border-color: var(--green); background: var(--green-light); }
.attach-box__zone.attach-zone--over { border-color: var(--green); background: var(--status-success-bg); }
.attach-box__zone.attach-zone--received { background: var(--status-success-bg); }
.attach-box__zone--busy { opacity: .7; cursor: progress; }
.attach-box__paste { position: absolute; inset: 0; z-index: 1; border-radius: 10px; outline: none; caret-color: transparent; color: transparent; overflow: hidden; white-space: nowrap; }
.attach-box__paste:focus-visible { box-shadow: 0 0 0 3px rgba(15, 90, 52, .25); }
.attach-box__content { position: relative; z-index: 2; pointer-events: none; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.attach-box__content button { pointer-events: auto; }
.attach-box__icon { width: 30px; height: 30px; stroke: var(--gray-soft); }
.attach-box__title { margin: 6px 0 2px; font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.attach-box__hint { margin: 0 0 10px; font-size: 0.8125rem; color: var(--text-muted); }
.attach-box__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.attach-box__button { min-height: 32px; padding: 4px 12px; font-size: 0.8125rem; }
.attach-box__types { margin: 8px 0 0; font-size: 0.75rem; color: var(--text-muted); }
.attach-box__input { display: none !important; }
.attach-box__files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; }
.attach-box--readonly .attach-box__files { margin-top: 0; align-items: flex-start; }
.attach-box__file { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); font-size: 0.8125rem; text-align: left; }
.attach-box__file-type { font-size: 0.6875rem; font-weight: 700; color: var(--green); border: 1px solid var(--status-success-border); border-radius: 4px; padding: 1px 4px; }
.attach-box__file-name { font-weight: 600; min-width: 0; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-box__file-size, .attach-box__file-detail { color: var(--text-muted); }
.attach-box__remove { color: var(--red) !important; }
.attach-box__message { margin: 0; font-size: 0.8125rem; font-weight: 600; min-height: 1em; }
.attach-box__message--ok { color: var(--green); }
.attach-box__message--error { color: var(--red); }
@media (max-width: 600px) { .attach-box__file-name { max-width: 55vw; } }


/* Phase 2 - 4 grids fit 1366 (Danny 6 Nov 2026, the Q54 rule for the later phases; docs/archive/2026-11/phase3-grids-and-attachment-types-complete.md,
   form-layout-standard §13). One class on every Phase 2 - 4 list / grid, `fit-grid`: a fixed table layout at the box's width (no table
   min-width any more - nothing can push it wider), body cells on one line with "…" (the whole value on hover: js/gridFit.js sets the
   cell's title), headers wrap at spaces only, and the header's label gives way before the sort / filter icons. None of these grids has
   ▶ child rows (a fixed layout would hand their colspan=1000 phantom columns the spare width - §13). Guarded by Phase3GridsAndAttachmentTypesTests. */
.fit-grid .mud-table-container { overflow-x: auto; }   /* a fallback only: the table below is never wider than its box */
.fit-grid .mud-table-root {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
}
.fit-grid .mud-table-cell { padding: 6px 8px !important; min-width: 0 !important; }
.fit-grid .mud-table-body .mud-table-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}
.fit-grid .mud-table-body .mud-table-cell .status-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.fit-grid .mud-table-body .mud-table-cell .link-button { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; vertical-align: middle; }
.fit-grid .mud-table-foot .mud-table-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fit-grid .mud-table-head .mud-table-cell { white-space: normal; overflow-wrap: normal; word-break: normal; overflow: hidden; }
.fit-grid .mud-table-head .column-header { min-width: 0; }
.fit-grid .mud-table-head .column-header > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fit-grid .mud-table-head .column-header .mud-icon-button { padding: 2px; }   /* the sort / filter icons stay inside their own header */
/* An empty grid's message and the "No … match the filters." row span the whole width, on as many lines as they need. */
.fit-grid .mud-table-body .mud-table-empty-row .mud-table-cell,
.fit-grid .mud-table-body .mud-table-row:has(.payments-grid-empty) .mud-table-cell,
.fit-grid .mud-table-body .mud-table-row:has(.billing-payment-allocation-empty) .mud-table-cell { white-space: normal; min-width: 0 !important; }
/* Cells holding several things (a ▸ list that opens in place, buttons, two lines) keep wrapping inside their own width. */
.fit-grid .mud-table-body .mud-table-cell.fit-grid__wrap { white-space: normal; overflow: visible; text-overflow: clip; }
.fit-grid .fit-grid__second { display: block; color: var(--text-muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }

/* Danny 6 Nov 2026: a file a box refuses on attach (AttachmentField / AppInstructionFileUpload Rule) - the server's text under the box. */
.attachment-field__error { margin-top: 4px; color: var(--red, #c62828); font-size: 0.8125rem; font-weight: 600; }
.cash-bank-missing-pop-types { margin: 0 0 8px; }

/* CR-17 step 1: Sign-in log result words (Admin page) */
.sign-in-log__ok { color: var(--green); font-weight: 600; }
.sign-in-log__refused { color: var(--red); font-weight: 600; }

/* Staging fix 7 Nov 2026 (form-layout-standard §8): the last click's errors just above the action buttons (AppFormActions Errors,
   ActionErrors) - the full width of the button row, the buttons under it. */
.form-actions__errors { flex: 1 1 100%; width: 100%; margin: 0; text-align: left; }
.form-actions__errors ul { margin: 0; padding-left: 1.2rem; }
