:root {
    --blue: var(--brand-blue);
    --ink: #111827;
    --muted: #667085;
    --page: #fafbfc;
    --border: #e6eaf0;
    --soft-border: #edf0f4;
    --green: #16a34a;
    --amber: #f59e0b;
    --red: #ef4444;
    --purple: #8b5cf6;
}

.settings-workspace {
    background: #f8fafc;
}

.settings-notice,
.settings-errors {
    margin-bottom: 14px;
}

.settings-notice {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 8px;
    color: #027a48;
    font-size: 13px;
    font-weight: 750;
    padding: 12px 14px;
}

.settings-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 240px minmax(0, 1fr);
}

.settings-sidebar,
.settings-panel {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.settings-sidebar {
    align-self: start;
    display: grid;
    gap: 6px;
    padding: 12px;
}

.settings-sidebar button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #344054;
    display: flex;
    font-size: 13px;
    font-weight: 750;
    gap: 10px;
    height: 42px;
    padding: 0 12px;
    text-align: left;
}

.settings-sidebar button.active {
    background: var(--brand-blue-soft);
    color: var(--blue);
}

.settings-panel {
    padding: 22px;
}

.settings-panel-header {
    align-items: center;
    border-bottom: 1px solid #eaecf0;
    display: grid;
    gap: 14px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding-bottom: 18px;
}

.settings-panel-header > span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 10px;
    color: var(--blue);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.settings-panel-header h2 {
    color: #101828;
    font-size: 20px;
    margin: 0 0 4px;
}

.settings-panel-header p {
    color: #667085;
    font-size: 13px;
    margin: 0;
}

.settings-switch {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: 48px auto;
}

.settings-switch input {
    position: absolute;
    opacity: 0;
}

.settings-switch > span {
    background: #d0d5dd;
    border-radius: 999px;
    height: 26px;
    position: relative;
    transition: background .18s ease;
    width: 48px;
}

.settings-switch > span::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .22);
    content: "";
    height: 20px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform .18s ease;
    width: 20px;
}

.settings-switch input:checked + span {
    background: var(--blue);
}

.settings-switch input:checked + span::after {
    transform: translateX(22px);
}

.settings-switch strong {
    color: #101828;
    font-size: 12px;
    white-space: nowrap;
}

.webhook-copy-box {
    background: #f5f8ff;
    border: 1px solid #c7d7fe;
    border-radius: 9px;
    display: grid;
    gap: 8px;
    margin: 18px 0;
    padding: 14px;
}

.webhook-copy-box small,
.settings-form-grid span {
    color: #475467;
    font-size: 11px;
    font-weight: 750;
}

.webhook-copy-box strong {
    color: #101828;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.webhook-copy-box em {
    color: #667085;
    font-size: 12px;
    font-style: normal;
}

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

.settings-form-grid label {
    display: grid;
    gap: 6px;
}

.settings-form-grid label.wide {
    grid-column: 1 / -1;
}

.settings-form-grid input {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #101828;
    font-size: 13px;
    height: 40px;
    padding: 0 12px;
}

.settings-form-grid input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(21, 112, 239, .12);
    outline: none;
}

.settings-status-row {
    align-items: center;
    border-top: 1px solid #eaecf0;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 18px;
}

.status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    padding: 8px 11px;
}

.status-pill span {
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.status-pill.on {
    background: #ecfdf3;
    color: #027a48;
}

.status-pill.on span {
    background: #12b76a;
}

.status-pill.off {
    background: #f2f4f7;
    color: #475467;
}

.status-pill.off span {
    background: #98a2b3;
}

.settings-status-row button {
    align-items: center;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
}

.settings-payment-panel h3 {
    color: #101828;
    font-size: 15px;
    margin: 22px 0 12px;
}

.settings-payment-mode {
    display: inline-flex;
    border: 1px solid #d0d5dd;
    margin-top: 22px;
}

.settings-payment-mode button {
    min-width: 84px;
    background: #fff;
    border: 0;
    border-right: 1px solid #d0d5dd;
    color: #344054;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    padding: 10px 16px;
}

.settings-payment-mode button:last-child { border-right: 0; }
.settings-payment-mode button.active { background: var(--brand-blue); color: #fff; }
.settings-payment-hint { color: #667085; font-size: 12px; line-height: 1.5; margin: 10px 0 0; }
.settings-payment-overview { border-top: 1px solid #eaecf0; margin-top: 20px; }
.settings-payment-overview > div { display: grid; grid-template-columns: 132px 1fr; column-gap: 16px; padding: 11px 0; border-bottom: 1px solid #eaecf0; font-size: 12px; }
.settings-payment-overview span { color: #667085; }
.settings-payment-overview strong { color: #101828; }
.settings-payment-overview small { grid-column: 2; color: #667085; font-size: 11px; margin-top: 2px; }
.settings-payment-unsaved { color: #a15c00; font-size: 12px; margin: 12px 0 0; }
.settings-payment-test-link { align-items: center; display: inline-flex; gap: 6px; color: var(--brand-blue); font-size: 12px; font-weight: 750; margin-top: 12px; }
.settings-field-state { color: #667085; font-size: 11px; font-style: normal; font-weight: 500; margin-left: 4px; }
.settings-payment-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.settings-payment-credentials section { min-width: 0; border-top: 1px solid #eaecf0; margin-top: 16px; }
.settings-payment-credentials section > p { color: #667085; font-size: 12px; margin: -4px 0 14px; }
.settings-payment-credentials .settings-form-grid { grid-template-columns: 1fr; }
.settings-clear-key { display: flex; align-items: center; gap: 8px; color: #b42318; font-size: 12px; margin-top: 12px; }
.settings-payment-authorization { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border-top: 1px solid #eaecf0; margin-top: 24px; padding-top: 20px; }
.settings-payment-authorization label { display: grid; gap: 6px; min-width: 0; }
.settings-payment-authorization label span { color: #475467; font-size: 11px; font-weight: 750; }
.settings-payment-authorization input { height: 40px; min-width: 0; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 8px; }
.settings-payment-authorization p { grid-column: 1 / -1; color: #b42318; font-size: 12px; margin: 0; }
.settings-payment-panel .webhook-copy-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-payment-panel .webhook-copy-box > div { display: grid; gap: 5px; min-width: 0; }
.settings-payment-log { border-top: 1px solid #d0d5dd; margin-top: 28px; padding-top: 18px; }
.settings-payment-log-head, .settings-payment-log-controls, .settings-payment-log-pager { display: flex; align-items: center; gap: 10px; }
.settings-payment-log-head { justify-content: space-between; }
.settings-payment-log-head h3 { margin: 0; }
.settings-payment-log button { border: 1px solid #cbd5e1; background: #fff; color: #101828; cursor: pointer; font-size: 12px; font-weight: 700; padding: 8px 11px; }
.settings-payment-log button:disabled { cursor: default; opacity: .5; }
.settings-payment-log-head button, .settings-payment-log-controls > button { display: inline-flex; align-items: center; gap: 6px; }
.settings-payment-log .app-icon { height: 14px; width: 14px; }
.settings-payment-log-controls { margin: 16px 0; flex-wrap: wrap; }
.settings-payment-log-filter { display: inline-flex; }
.settings-payment-log-filter button + button { border-left: 0; }
.settings-payment-log-filter button.active { background: var(--brand-blue); color: #fff; }
.settings-payment-log-controls input { border: 1px solid #cbd5e1; flex: 1 1 230px; font-size: 12px; min-width: 0; padding: 9px 11px; }
.settings-payment-log-empty { border-top: 1px solid #eaecf0; color: #667085; font-size: 12px; padding: 18px 0; }
.settings-payment-log-list details { border-top: 1px solid #eaecf0; }
.settings-payment-log-list summary { align-items: center; cursor: pointer; display: grid; gap: 10px; grid-template-columns: 82px minmax(0, 1fr) 130px 140px; list-style: none; padding: 11px 0; font-size: 12px; }
.settings-payment-log-list summary::-webkit-details-marker { display: none; }
.settings-payment-log-list summary strong { overflow-wrap: anywhere; }
.settings-payment-log-list summary time { color: #667085; text-align: right; }
.settings-payment-log-outcome { color: #067647; font-weight: 800; }
.settings-payment-log-outcome.failed { color: #b42318; }
.settings-payment-log-list dl { background: #f7f9fc; display: grid; gap: 8px; margin: 0 0 10px; padding: 14px; }
.settings-payment-log-list dl > div { display: grid; gap: 12px; grid-template-columns: 140px minmax(0, 1fr); font-size: 12px; }
.settings-payment-log-list dt { color: #667085; }
.settings-payment-log-list dd { margin: 0; overflow-wrap: anywhere; }
.settings-payment-log-pager { border-top: 1px solid #eaecf0; justify-content: flex-end; padding-top: 12px; font-size: 12px; }
.settings-payment-log-pager span { margin-right: auto; }

@media (max-width: 960px) {
    .settings-grid,
    .settings-panel-header,
    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-status-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .settings-payment-credentials,
    .settings-payment-authorization,
    .settings-payment-panel .webhook-copy-box { grid-template-columns: 1fr; }
    .settings-payment-overview > div { grid-template-columns: 1fr; row-gap: 3px; }
    .settings-payment-overview small { grid-column: 1; }
    .settings-payment-log-list summary { grid-template-columns: 75px minmax(0, 1fr); }
    .settings-payment-log-list summary time { text-align: left; }
    .settings-payment-log-list dl > div { grid-template-columns: 1fr; gap: 2px; }
}

* {
    box-sizing: border-box;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.top-nav {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e8ecf2;
    display: flex;
    height: 64px;
    left: 0;
    position: sticky;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 100;
}

.brand-zone {
    align-items: center;
    background: #fff;
    border-right: 1px solid #eaecf0;
    display: flex;
    height: 64px;
    padding: 0 16px 0 18px;
    width: 240px;
}

.app-brand {
    align-items: center;
    background: transparent;
    border-radius: 0;
    display: inline-flex;
    gap: 11px;
    height: 64px;
    justify-content: center;
    text-decoration: none;
    width: auto;
}

.app-brand:hover {
    background: transparent;
}

.app-brand-mark {
    align-items: center;
    background: var(--brand-blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 36px;
    font-size: 15.5px;
    font-weight: 750;
    height: 36px;
    justify-content: center;
    letter-spacing: -0.01em;
    line-height: 1;
    width: 36px;
}

.app-brand-wordmark {
    color: #101828;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

.user-avatar {
    align-items: center;
    background: var(--blue);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    text-decoration: none;
    width: 34px;
}

.main-nav {
    align-items: stretch;
    display: flex;
    gap: 34px;
    height: 64px;
    padding-left: 26px;
    min-width: 0;
}

.nav-entry {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #0f1b3d;
    display: inline-flex;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    padding: 0 2px;
}

.nav-entry.active {
    border-bottom-color: var(--blue);
    color: var(--blue);
}

.nav-icon {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 6px;
    display: inline-flex;
    font-size: 11px;
    height: 19px;
    justify-content: center;
    width: 19px;
}

.nav-account {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-left: auto;
    padding-right: 18px;
}

.bell-button,
.chevron-button {
    background: transparent;
    border: 0;
    color: #111827;
    position: relative;
}

.bell-shape {
    border: 2px solid #0f1b3d;
    border-radius: 9px 9px 5px 5px;
    display: block;
    height: 17px;
    width: 14px;
}

.notification-count {
    align-items: center;
    background: var(--red);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 10px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    position: absolute;
    right: -5px;
    top: -7px;
    width: 18px;
}

.user-copy {
    display: grid;
    gap: 2px;
}

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

.user-copy span {
    color: var(--muted);
    font-size: 11px;
}

.orders-page-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.orders-sidebar {
    background: #fff;
    border-right: 1px solid #e8ecf2;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
    padding: 28px 14px 14px;
}

.sidebar-section {
    display: grid;
    gap: 8px;
}

.sidebar-section.with-border {
    border-top: 1px solid #e8ecf2;
    margin-top: 22px;
    padding-top: 22px;
}

.sidebar-section h2 {
    color: #34436d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin: 0 8px 6px;
}

.side-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #233157;
    display: grid;
    font-size: 13px;
    font-weight: 600;
    grid-template-columns: 28px 1fr auto;
    min-height: 40px;
    padding: 0 10px;
    text-align: left;
}

.side-item span {
    align-items: center;
    border: 1px solid #cad4e5;
    border-radius: 6px;
    color: #3c4b73;
    display: inline-flex;
    font-size: 10px;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.side-item.active {
    background: var(--brand-blue-soft);
    color: var(--blue);
}

.side-item.active span {
    border-color: #bcd1ff;
    color: var(--blue);
}

.side-item em {
    background: var(--brand-blue-soft);
    border-radius: 7px;
    color: var(--blue);
    font-size: 12px;
    font-style: normal;
    padding: 2px 7px;
}

.orders-main {
    min-width: 0;
    overflow-x: auto;
    padding: 26px 36px 32px;
}

.orders-main-header {
    align-items: start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.orders-main-header h1 {
    font-size: 27px;
    line-height: 1.1;
    margin: 0 0 8px;
}

.orders-main-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

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

.kpi-strip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 64px;
    width: 610px;
}

.kpi-item {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 32px 1fr;
    padding: 0 16px;
}

.kpi-item + .kpi-item {
    border-left: 1px solid var(--border);
}

.kpi-icon {
    align-items: center;
    border-radius: 8px;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.kpi-blue { background: var(--brand-blue-soft); color: var(--blue); }
.kpi-amber { background: #fff3df; color: #f97316; }
.kpi-purple { background: #f4edff; color: var(--purple); }
.kpi-green { background: #eaf8ef; color: var(--green); }

.kpi-item div {
    align-items: baseline;
    display: grid;
    grid-template-columns: auto auto;
    gap: 1px 8px;
}

.kpi-item span {
    color: #172347;
    font-size: 11px;
    font-weight: 700;
    grid-column: span 2;
    white-space: nowrap;
}

.kpi-item strong {
    font-size: 17px;
    line-height: 1;
}

.kpi-item em {
    color: var(--green);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.kpi-item em.down {
    color: var(--red);
}

.new-order-button {
    align-items: center;
    background: var(--blue);
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 9px;
    height: 42px;
    padding: 0 22px;
    white-space: nowrap;
}

.order-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(135px, 1fr));
    height: 40px;
    max-width: 670px;
    margin-bottom: 16px;
}

.order-tabs button {
    background: #fff;
    border: 1px solid var(--border);
    color: #172347;
    font-size: 13px;
    font-weight: 800;
}

.order-tabs button:first-child {
    border-radius: 8px 0 0 8px;
}

.order-tabs button:last-child {
    border-radius: 0 8px 8px 0;
}

.order-tabs button.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.filter-toolbar {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(400px, 1.7fr) repeat(3, minmax(150px, 0.65fr)) minmax(170px, 0.8fr) 130px;
    margin-bottom: 28px;
}

.search-field,
.select-card,
.more-filters {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 60px;
}

.search-field {
    align-items: center;
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    padding: 0 10px;
}

.search-field span {
    color: #667da9;
    font-weight: 800;
}

.search-field input {
    border: 0;
    color: #233157;
    min-width: 0;
    outline: 0;
}

.search-field button {
    background: #f5f7fb;
    border: 0;
    border-radius: 7px;
    color: #4d5d84;
    height: 34px;
}

.select-card {
    display: grid;
    gap: 3px;
    padding: 10px 14px;
}

.select-card span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.select-card select {
    appearance: none;
    background: transparent;
    border: 0;
    color: #172347;
    font-size: 13px;
    font-weight: 800;
    outline: 0;
    width: 100%;
}

.more-filters {
    color: #3e4d73;
    font-size: 13px;
    font-weight: 800;
}

.orders-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    min-width: 1140px;
    overflow: visible;
    position: relative;
}

.order-grid {
    display: grid;
    grid-template-columns: 170px 200px minmax(300px, 1fr) 100px 135px 90px 140px 135px;
}

.orders-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border);
    color: #63708f;
    font-size: 11px;
    font-weight: 800;
    height: 34px;
    padding: 0 14px;
}

.order-row {
    border-bottom: 1px solid var(--soft-border);
    min-height: 82px;
    padding: 14px;
}

.order-row:hover {
    background: #fafcff;
}

.order-cell {
    align-items: center;
    display: flex;
    min-width: 0;
}

.order-id-cell {
    align-items: flex-start;
    gap: 10px;
}

.order-id-cell input {
    margin-top: 3px;
}

.order-id-cell div,
.customer-cell div,
.deadline-cell {
    display: grid;
    gap: 5px;
}

.order-id-cell strong,
.customer-name-line strong {
    color: #101a3d;
    font-size: 13px;
    font-weight: 800;
}

.order-id-cell span,
.customer-cell span,
.quiet-date,
.deadline-cell span {
    color: #53617f;
    font-size: 12px;
}

.customer-cell {
    align-items: flex-start;
    gap: 10px;
}

.avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--brand-blue), #11a878);
    border-radius: 50%;
    color: #fff !important;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px !important;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.customer-name-line {
    align-items: center;
    display: flex;
    gap: 7px;
}

.phone-line {
    color: #0a9d4f !important;
}

.customer-badge {
    border-radius: 6px;
    font-size: 11px !important;
    font-weight: 800;
    padding: 3px 7px;
}

.customer-new { background: var(--brand-blue-soft); color: var(--brand-blue) !important; }
.customer-returning { background: #e8f7ee; color: #128042 !important; }
.customer-vip { background: #f1e8ff; color: #7c3aed !important; }
.customer-priority { background: #fff1dc; color: #c66b00 !important; }

.items-cell {
    align-items: stretch;
    display: grid;
    gap: 6px;
    padding-right: 16px;
}

.item-line {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 28px 70px minmax(0, 1fr) 60px;
}

.item-icon,
.size-badge {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 6px;
    color: #26395f;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 24px;
    justify-content: center;
}

.item-category {
    color: #2b3654;
    font-size: 12px;
    font-weight: 800;
}

.item-description {
    color: #111827;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.quiet-date {
    color: #172347;
}

.deadline-cell {
    align-content: center;
}

.deadline-cell strong,
.total-cell {
    color: #101a3d;
    font-size: 13px;
    font-weight: 700;
}

.deadline-soon span {
    color: #f97316;
}

.deadline-overdue span {
    color: #ef4444;
}

.deadline-complete span {
    color: #16a34a;
}

.order-status-pill {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    min-height: 28px;
    padding: 0 12px;
    white-space: nowrap;
}

.order-status-pill span {
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.status-pendingintake { background: #fff1dc; color: #d97706; }
.status-inproduction { background: var(--brand-blue-soft); color: var(--brand-blue); }
.status-awaitingfitting { background: #f1e8ff; color: #7c3aed; }
.status-readyfordelivery { background: #e8f7ee; color: #128042; }
.status-delivered { background: #e7f7ee; color: #128042; }
.status-overdue { background: #ffe8e8; color: #dc2626; }

.status-pendingintake span { background: #f59e0b; }
.status-inproduction span { background: var(--brand-blue); }
.status-awaitingfitting span { background: #8b5cf6; }
.status-readyfordelivery span,
.status-delivered span { background: #16a34a; }
.status-overdue span { background: #ef4444; }

.action-cell {
    gap: 8px;
}

.action-cell button,
.pagination-controls button,
.pagination-controls select {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    color: #233157;
    font-size: 12px;
    font-weight: 800;
    height: 30px;
    min-width: 44px;
}

.action-cell button:first-child {
    color: var(--blue);
}

.action-cell .icon-action {
    min-width: 30px;
}

.row-menu-host {
    position: relative;
}

.row-menu-dismiss {
    background: transparent;
    border: 0;
    inset: 0;
    min-width: 0 !important;
    padding: 0;
    position: fixed;
    z-index: 140;
}

.row-action-menu {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    display: grid;
    min-width: 160px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 150;
}

.row-action-menu button {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 6px;
    color: #233157;
    display: flex;
    font-size: 13px;
    font-weight: 750;
    gap: 9px;
    height: 36px;
    justify-content: flex-start;
    padding: 0 10px;
    text-align: left;
}

.row-action-menu button:hover {
    background: #f6f8fb;
}

.row-action-menu span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 5px;
    color: var(--blue);
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    width: 20px;
}

.empty-orders {
    color: var(--muted);
    font-size: 14px;
    padding: 36px;
    text-align: center;
}

.orders-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 18px;
}

.orders-footer > span {
    color: #53617f;
    font-size: 13px;
}

.pagination-controls {
    align-items: center;
    display: flex;
    gap: 8px;
}

.pagination-controls button {
    height: 34px;
    min-width: 34px;
}

.pagination-controls button.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.pagination-controls button:disabled {
    opacity: 0.45;
}

.pagination-controls select {
    height: 34px;
    margin-left: 16px;
    min-width: 100px;
    padding: 0 10px;
}

.ellipsis {
    color: #53617f;
    font-weight: 800;
}

.modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, 0.28);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 200;
}

.placeholder-modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    display: grid;
    gap: 10px;
    max-width: 360px;
    padding: 20px;
}

.placeholder-modal p {
    color: var(--muted);
    margin: 0;
}

.placeholder-modal button {
    background: var(--blue);
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
    height: 34px;
}

.journey-overlay {
    align-items: center;
    background: rgba(17, 24, 39, 0.45);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 300;
}

.journey-modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
    max-height: 80vh;
    max-width: calc(100vw - 48px);
    overflow: hidden;
    width: 740px;
}

.journey-header {
    align-items: flex-start;
    display: grid;
    gap: 16px;
    grid-template-columns: 54px 1fr 36px;
    padding: 24px 28px 18px;
}

.journey-header-icon {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 10px;
    color: var(--blue);
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.journey-header h2 {
    font-size: 25px;
    line-height: 1.15;
    margin: 2px 0 6px;
}

.journey-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.journey-x {
    background: #fff;
    border: 0;
    color: #172347;
    font-size: 24px;
    height: 36px;
    width: 36px;
}

.journey-identity {
    align-items: center;
    background: #f2f7ff;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    height: 58px;
    margin: 0 28px;
    padding: 0 16px;
}

.journey-identity span {
    align-items: center;
    background: #e5efff;
    border-radius: 8px;
    color: var(--blue);
    display: flex;
    font-size: 12px;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.journey-identity strong {
    color: var(--blue);
    font-size: 15px;
}

.journey-identity em,
.journey-meta em {
    background: #172347;
    border-radius: 50%;
    height: 4px;
    width: 4px;
}

.journey-identity p {
    color: #172347;
    font-size: 14px;
    margin: 0;
}

.journey-loading {
    color: var(--muted);
    font-size: 14px;
    padding: 40px 28px;
}

.journey-timeline {
    max-height: calc(80vh - 225px);
    overflow-y: auto;
    padding: 28px 28px 24px 44px;
}

.journey-event {
    display: grid;
    gap: 18px;
    grid-template-columns: 24px 44px minmax(0, 1fr);
    min-height: 86px;
    position: relative;
}

.journey-rail {
    background: var(--blue);
    height: 100%;
    left: 7px;
    position: absolute;
    top: 15px;
    width: 2px;
}

.journey-rail.last {
    display: none;
}

.event-pending .journey-rail {
    background: #d0d5dd;
}

.journey-dot {
    background: #fff;
    border: 3px solid var(--blue);
    border-radius: 50%;
    height: 16px;
    margin-top: 14px;
    position: relative;
    width: 16px;
    z-index: 1;
}

.event-pending .journey-dot {
    border-color: #d0d5dd;
}

.journey-stage-icon {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: var(--blue);
    display: flex;
    font-size: 14px;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.event-pending .journey-stage-icon {
    background: #f2f4f7;
    color: #344054;
}

.journey-event-content {
    padding-top: 7px;
}

.journey-event-title {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 11px;
}

.journey-event-title strong {
    font-size: 17px;
}

.journey-event-title span {
    background: var(--brand-blue-soft);
    border-radius: 7px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.event-pending .journey-event-title span {
    background: #eef0f3;
    color: #344054;
}

.journey-meta {
    align-items: center;
    color: #34436d;
    display: flex;
    font-size: 13px;
    gap: 13px;
}

.journey-meta time {
    color: #34436d;
}

.journey-footer {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    height: 70px;
    justify-content: flex-end;
    padding: 0 28px;
}

.journey-footer button {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 7px;
    color: #233157;
    font-size: 13px;
    font-weight: 800;
    height: 40px;
    padding: 0 22px;
}

.journey-modal {
    display: flex;
    flex-direction: column;
}

.journey-scroll {
    min-height: 0;
    overflow-y: auto;
}

.journey-scroll .journey-timeline {
    max-height: none;
    overflow: visible;
}

.journey-progress {
    border-bottom: 1px solid var(--border);
    margin: 0 28px;
    padding: 20px 0;
}

.journey-progress-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 36px;
}

.journey-progress-heading div {
    display: grid;
    gap: 4px;
}

.journey-progress-heading span {
    color: #667085;
    font-size: 12px;
}

.journey-progress-heading strong {
    color: #101828;
    font-size: 15px;
}

.journey-progress p {
    color: #667085;
    font-size: 12px;
    margin: 12px 0 0;
}

.journey-progress .journey-action-error {
    color: #b42318;
}

.journey-history {
    border-top: 1px solid var(--border);
    margin: 0 28px 24px;
    padding-top: 18px;
}

.journey-history h3 {
    font-size: 14px;
    margin: 0 0 8px;
}

.journey-history > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: space-between;
    padding: 7px 0;
}

.journey-history strong,
.journey-history span {
    font-size: 12px;
}

.journey-history span { color: #667085; }

.journey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.journey-actions button {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #233157;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    min-height: 38px;
    padding: 8px 14px;
}

.journey-actions button:first-child {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.journey-actions button:disabled {
    cursor: wait;
    opacity: .6;
}

.action-cell .order-progress-button {
    background: var(--brand-blue-soft);
    border-color: #c8dcff;
    color: #175cd3;
    min-width: 65px;
}

.shop-admin-order-detail > button {
    background: var(--brand-blue-soft);
    border: 1px solid #c8dcff;
    border-radius: 6px;
    color: #175cd3;
    cursor: pointer;
    font-weight: 700;
    margin-top: 12px;
    padding: 9px 14px;
}

@media (max-width: 600px) {
    .journey-overlay { padding: 10px; }
    .journey-modal { max-height: calc(100dvh - 20px); max-width: 100%; }
    .journey-header { grid-template-columns: 44px 1fr 32px; gap: 10px; padding: 18px 16px; }
    .journey-header-icon { height: 42px; width: 42px; }
    .journey-header h2 { font-size: 20px; }
    .journey-identity, .journey-progress, .journey-history { margin-left: 16px; margin-right: 16px; }
    .journey-identity { gap: 8px; padding: 0 10px; }
    .journey-identity p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .journey-timeline { padding: 22px 14px 18px 20px; }
    .journey-event { gap: 10px; grid-template-columns: 18px 40px minmax(0, 1fr); }
    .journey-footer { flex-shrink: 0; height: 60px; padding: 0 16px; }
}

@media (max-width: 1500px) {
    .orders-main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .header-actions {
        gap: 16px;
    }

    .kpi-strip {
        width: 570px;
    }

    .filter-toolbar {
        gap: 12px;
        grid-template-columns: minmax(400px, 1.6fr) repeat(3, minmax(140px, 0.58fr)) minmax(160px, 0.75fr) 124px;
    }
}

@media (max-width: 1279px) {
    .main-nav {
        gap: 18px;
    }

    .orders-main-header {
        align-items: stretch;
        flex-direction: column;
    }

    .orders-page-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .brand-zone {
        width: 220px;
    }

    .app-brand-wordmark {
        font-size: 15px;
    }

    .orders-sidebar {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 980px) {
    .brand-zone {
        justify-content: center;
        padding: 0;
        width: 72px;
    }

    .app-brand {
        justify-content: center;
    }

    .app-brand-wordmark {
        display: none;
    }

    .main-nav {
        padding-left: 18px;
    }
}

.new-order-main {
    min-width: 0;
    padding: 26px 24px 28px 36px;
}

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

.new-order-header h1 {
    font-size: 27px;
    line-height: 1.1;
    margin: 0 0 7px;
}

.new-order-header p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.back-link {
    background: transparent;
    border: 0;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    margin-top: 7px;
}

.intake-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1fr) 390px;
}

.intake-form {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.intake-card,
.summary-card,
.action-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.intake-card {
    padding: 18px 20px;
}

.section-title {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title > span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 7px;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.section-title h2 {
    font-size: 16px;
    line-height: 1.15;
    margin: 0 0 4px;
}

.section-title p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.section-with-action {
    align-items: center;
}

.section-with-action .add-item-button {
    margin-left: auto;
}

.customer-card {
    min-height: 190px;
}

.phone-finder {
    align-items: center;
    border: 1px solid #d7deea;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 24px 1fr 28px;
    height: 40px;
    padding: 0 12px;
}

.phone-finder input {
    border: 0;
    color: #172347;
    font-size: 13px;
    font-weight: 700;
    outline: 0;
}

.phone-finder span {
    color: #667da9;
    font-weight: 800;
}

.phone-finder button {
    background: transparent;
    border: 0;
    color: #46577d;
    font-weight: 800;
}

.phone-finder em {
    color: var(--blue);
    font-style: normal;
    font-weight: 900;
}

.lookup-state {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin: 8px 0 14px;
}

.lookup-state.found {
    color: var(--green);
}

.customer-fields {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 0.9fr 1.4fr;
}

.customer-fields label,
.date-row label,
.order-state-row label {
    display: grid;
    gap: 7px;
}

.customer-fields label span,
.date-row label span,
.order-state-row label span,
.status-field > span,
.turnaround-box > span {
    color: #34436d;
    font-size: 11px;
    font-weight: 800;
}

.customer-fields input,
.date-row input,
.order-state-row input,
.order-state-row select,
.item-editor-row input,
.item-editor-row select {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 7px;
    color: #111827;
    font-size: 13px;
    font-weight: 650;
    height: 38px;
    outline: 0;
    padding: 0 12px;
    width: 100%;
}

.status-field {
    display: grid;
    gap: 8px;
}

.status-pills {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
}

.status-choice {
    border: 1px solid #d7deea;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    height: 38px;
}

.status-choice.selected {
    border-color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
}

.order-info-card {
    min-height: 205px;
}

.date-row {
    align-items: end;
    display: grid;
    gap: 40px;
    grid-template-columns: 260px 280px minmax(120px, 1fr);
}

.date-row label span em {
    color: var(--muted);
    font-style: normal;
    font-weight: 600;
}

.turnaround-box {
    display: grid;
    gap: 7px;
}

.turnaround-box strong {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 8px;
    color: var(--blue);
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 72px;
}

.date-helper,
.field-error {
    font-size: 12px;
    margin: 9px 0 16px;
}

.date-helper {
    color: #53617f;
}

.field-error {
    color: var(--red);
    font-weight: 800;
}

.order-state-row {
    display: grid;
    gap: 40px;
    grid-template-columns: 260px 270px 1fr;
}

.price-field input {
    border: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    padding-left: 0;
}

.items-card {
    min-height: 160px;
}

.add-item-button {
    background: var(--blue);
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    height: 32px;
    padding: 0 16px;
}

.item-editor-head,
.item-editor-row {
    display: grid;
    gap: 16px;
    grid-template-columns: 120px 1.25fr 1.15fr 130px 100px 40px;
}

.item-editor-head {
    color: #53617f;
    font-size: 11px;
    font-weight: 800;
    margin: 0 8px 8px;
}

.item-editor-row {
    align-items: center;
    min-height: 54px;
}

.trash-button {
    background: #fff;
    border: 0;
    color: var(--red);
    font-size: 16px;
    font-weight: 900;
}

.reference-card {
    min-height: 150px;
}

.upload-zone {
    align-items: center;
    border: 1px dashed #b9d1ff;
    border-radius: 8px;
    color: #314166;
    display: grid;
    gap: 5px;
    justify-items: center;
    min-height: 100px;
    position: relative;
    text-align: center;
}

.upload-zone input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
}

.upload-zone strong {
    color: #233157;
    font-size: 12px;
}

.upload-zone span {
    color: var(--muted);
    font-size: 11px;
}

.reference-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.reference-thumb {
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 7px;
    position: relative;
    width: 90px;
}

.reference-thumb img {
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.reference-thumb button {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 50%;
    height: 18px;
    position: absolute;
    right: -6px;
    top: -6px;
    width: 18px;
}

.reference-thumb strong,
.reference-thumb span {
    color: #53617f;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-column {
    display: grid;
    gap: 16px;
    height: fit-content;
}

.summary-card {
    padding: 24px;
}

.summary-lines {
    align-items: center;
    display: grid;
    gap: 16px 12px;
    grid-template-columns: 130px 1fr;
}

.summary-lines > span {
    color: #34436d;
    font-size: 13px;
}

.summary-lines > strong {
    font-size: 13px;
    justify-self: end;
}

.summary-card hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 22px 0;
}

.summary-card h3 {
    color: #34436d;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 14px;
}

.summary-items {
    display: grid;
    gap: 14px;
}

.summary-items > div {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 32px 72px 1fr 52px;
}

.summary-item-icon {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: var(--blue);
    display: flex;
    font-size: 12px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.summary-item-icon.shoe {
    background: #e8f7ee;
    color: var(--green);
}

.summary-items strong,
.summary-items span,
.summary-items em {
    font-size: 12px;
}

.summary-items em {
    font-style: normal;
    justify-self: end;
}

.total-panel {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    padding: 18px 12px;
}

.total-panel span {
    font-size: 22px;
    font-weight: 900;
}

.action-card {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.action-card button {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: #25365c;
    font-size: 14px;
    font-weight: 800;
    height: 48px;
    text-align: left;
    padding: 0 22px;
}

.action-card .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    text-align: center;
}

.form-notice,
.validation-panel {
    border-radius: 8px;
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 4px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.form-notice {
    background: #e8f7ee;
    color: #128042;
}

.validation-panel {
    background: #fff1f1;
    color: #dc2626;
}

@media (max-width: 1279px) {
    .new-order-main {
        padding-left: 24px;
    }

    .intake-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
    }

    .date-row,
    .order-state-row {
        gap: 20px;
        grid-template-columns: 1fr 1fr 120px;
    }
}

@media (max-width: 999px) {
    .intake-grid {
        grid-template-columns: 1fr;
    }
}

.deliveries-main {
    min-width: 0;
    overflow-x: auto;
    padding: 24px 36px 32px;
}

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

.deliveries-header h1 {
    font-size: 28px;
    line-height: 1.1;
    margin: 0 0 8px;
}

.deliveries-header p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.dispatch-kpi-strip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 88px;
    margin-bottom: 16px;
    overflow: hidden;
}

.dispatch-kpi-strip > div {
    align-items: center;
    display: grid;
    gap: 2px 16px;
    grid-template-columns: 42px 1fr auto;
    padding: 0 24px;
}

.dispatch-kpi-strip > div + div {
    border-left: 1px solid var(--border);
}

.dispatch-kpi-strip strong {
    font-size: 22px;
    line-height: 1;
}

.dispatch-kpi-strip p {
    color: #26365f;
    font-size: 13px;
    font-weight: 800;
    grid-column: 2;
    margin: 0;
}

.dispatch-kpi-strip em {
    color: var(--green);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.dispatch-live-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 390px;
    margin-bottom: 16px;
}

.dispatch-map-card,
.active-drivers-card,
.dispatch-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.dispatch-map-card header {
    align-items: center;
    display: flex;
    gap: 10px;
    height: 48px;
    padding: 0 16px;
}

.dispatch-map-card header div:first-child {
    display: grid;
    margin-right: auto;
}

.dispatch-map-card strong,
.active-drivers-card header strong {
    font-size: 15px;
}

.dispatch-map-card header span {
    color: var(--muted);
    font-size: 12px;
}

.live-pill {
    background: #e8f7ee;
    border-radius: 10px;
    color: var(--green);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    padding: 2px 9px;
}

.map-controls {
    align-items: center;
    display: flex !important;
    gap: 10px;
    position: relative;
}

.map-controls select,
.map-controls button {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 7px;
    color: #233157;
    font-size: 12px;
    font-weight: 800;
    height: 32px;
    padding: 0 12px;
}

.map-legend {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    display: grid !important;
    gap: 8px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 38px;
    width: 170px;
    z-index: 250;
}

.dispatch-map {
    height: 300px;
    min-height: 280px;
    width: 100%;
}

.leaflet-driver-marker {
    align-items: center;
    background: var(--blue);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(20, 99, 255, 0.35);
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.leaflet-driver-marker.stale {
    background: #f59e0b;
}

.leaflet-driver-marker.offline {
    background: #98a2b3;
}

.leaflet-stop-marker {
    background: #ef4444;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 5px 14px rgba(239, 68, 68, 0.25);
    height: 24px;
    transform: rotate(-45deg);
    width: 24px;
}

.leaflet-stop-marker.done {
    background: #16a34a;
}

.active-drivers-card header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    height: 52px;
    justify-content: space-between;
    padding: 0 18px;
}

.active-drivers-card header button,
.view-all-drivers {
    background: transparent;
    border: 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.driver-row {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: #172347;
    display: grid;
    gap: 12px;
    grid-template-columns: 44px 1fr 140px;
    min-height: 82px;
    padding: 0 18px;
    text-align: left;
    width: 100%;
}

.driver-row.selected,
.driver-row:hover {
    background: #f8fbff;
}

.driver-avatar {
    align-items: center;
    background: var(--blue);
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.driver-row div {
    display: grid;
    gap: 4px;
}

.driver-row strong {
    font-size: 13px;
}

.driver-row em,
.driver-row span {
    color: #53617f;
    font-size: 12px;
    font-style: normal;
}

.freshness {
    background: var(--brand-blue-soft);
    border-radius: 10px;
    color: var(--blue) !important;
    justify-self: end;
    padding: 2px 8px;
}

.freshness.stale {
    background: #fff1dc;
    color: #d97706 !important;
}

.freshness.offline {
    background: #eef0f3;
    color: #344054 !important;
}

.view-all-drivers {
    height: 44px;
    padding-left: 18px;
    text-align: left;
}

.dispatch-filters {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(360px, 1.5fr) repeat(4, minmax(150px, 0.65fr)) 130px;
    margin-bottom: 16px;
}

.dispatch-list {
    min-width: 1180px;
}

.dispatch-grid {
    display: grid;
    grid-template-columns: 28px 120px 150px 140px 150px 170px 180px 140px 120px 150px;
}

.dispatch-table-head {
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: #53617f;
    font-size: 11px;
    font-weight: 900;
    height: 36px;
    padding: 0 12px;
}

.dispatch-row {
    align-items: center;
    border-bottom: 1px solid var(--soft-border);
    color: #172347;
    font-size: 12px;
    min-height: 46px;
    padding: 0 12px;
}

.dispatch-row > strong {
    font-size: 12px;
}

.dispatch-customer {
    align-items: center;
    display: flex;
    gap: 8px;
}

.dispatch-customer span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: var(--blue);
    display: flex;
    font-size: 10px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.dispatch-badge,
.payment-chip {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    gap: 7px;
    height: 26px;
    justify-content: center;
    padding: 0 12px;
    width: fit-content;
}

.dispatch-badge span {
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.dispatch-pending { background: var(--brand-blue-soft); color: var(--blue); }
.dispatch-assigned { background: #fff1dc; color: #d97706; }
.dispatch-outfordelivery { background: var(--brand-blue-soft); color: var(--blue); }
.dispatch-delivered { background: #e8f7ee; color: var(--green); }
.dispatch-pending span,
.dispatch-outfordelivery span { background: var(--blue); }
.dispatch-assigned span { background: #f59e0b; }
.dispatch-delivered span { background: var(--green); }

.payment-paid { background: #e8f7ee; color: var(--green); }
.payment-unpaid { background: #eef0f3; color: #344054; }
.payment-partiallypaid { background: #fff1dc; color: #d97706; }

.window-cell {
    display: grid;
    gap: 2px;
}

.window-cell strong,
.window-cell span {
    font-size: 12px;
}

.dispatch-actions {
    display: flex;
    gap: 8px;
}

.dispatch-actions button {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 7px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    height: 28px;
    min-width: 54px;
}

.dispatch-actions .primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.create-dispatch-modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
    max-width: calc(100vw - 48px);
    overflow: hidden;
    width: 760px;
}

.create-dispatch-modal header,
.create-dispatch-modal footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 18px 22px;
}

.create-dispatch-modal header {
    border-bottom: 1px solid var(--border);
}

.create-dispatch-modal h2 {
    font-size: 21px;
    margin: 0;
}

.create-dispatch-modal header button {
    background: #fff;
    border: 0;
    font-size: 20px;
}

.create-dispatch-body {
    display: grid;
    gap: 18px;
    padding: 20px 22px;
}

.create-dispatch-body h3 {
    font-size: 14px;
    margin: 0 0 10px;
}

.dispatch-order-option {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 24px 130px 1fr;
    margin-bottom: 8px;
    min-height: 40px;
    padding: 0 12px;
}

.create-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 150px 120px 120px;
}

.create-grid label {
    display: grid;
    gap: 6px;
}

.create-grid span {
    color: #34436d;
    font-size: 11px;
    font-weight: 900;
}

.create-grid input,
.create-grid select {
    border: 1px solid #d7deea;
    border-radius: 7px;
    height: 38px;
    padding: 0 10px;
}

.create-dispatch-modal footer {
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    gap: 10px;
}

.create-dispatch-modal footer button {
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 7px;
    font-weight: 900;
    height: 38px;
    padding: 0 18px;
}

.create-dispatch-modal footer .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

@media (max-width: 1279px) {
    .deliveries-main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .dispatch-live-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .dispatch-filters {
        grid-template-columns: minmax(320px, 1fr) repeat(3, 150px);
    }
}

@media (max-width: 999px) {
    .dispatch-live-grid {
        grid-template-columns: 1fr;
    }
}

.past-orders-main {
    min-width: 0;
    overflow-x: auto;
    padding: 24px 36px 32px;
}

.past-header {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.past-header h1 {
    font-size: 27px;
    line-height: 1.1;
    margin: 0 0 8px;
}

.past-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.past-header-actions {
    align-items: center;
    display: flex;
    gap: 12px;
}

.period-select {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 9px;
    grid-template-columns: 20px 1fr;
    height: 40px;
    padding: 0 12px;
    width: 142px;
}

.period-select span {
    color: #4a5b83;
    font-size: 11px;
    font-weight: 800;
}

.period-select select {
    appearance: none;
    background: transparent;
    border: 0;
    color: #172347;
    font-size: 13px;
    font-weight: 800;
    outline: 0;
}

.period-date {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #172347;
    font-size: 12px;
    font-weight: 800;
    height: 40px;
    padding: 0 10px;
    width: 132px;
}

.export-report {
    height: 40px;
    padding: 0 18px;
}

.history-kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
    min-width: 980px;
}

.history-kpi-card {
    align-items: end;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 112px;
    min-height: 120px;
    padding: 18px;
}

.history-kpi-copy {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: 46px minmax(0, 1fr);
}

.history-kpi-icon {
    align-items: center;
    border-radius: 11px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.icon-blue { background: var(--brand-blue-soft); color: var(--blue); }
.icon-green { background: #e8f7ee; color: var(--green); }
.icon-red { background: #ffe8e8; color: var(--red); }
.icon-amber { background: #fff1dc; color: #f97316; }

.history-kpi-copy p {
    color: #34436d;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 4px;
}

.history-kpi-copy strong {
    color: #101a3d;
    display: block;
    font-size: 25px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.history-kpi-copy em {
    color: #4b5a7b;
    display: block;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

.sparkline {
    height: 38px;
    width: 110px;
}

.spark-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.spark-fill {
    opacity: .12;
}

.sparkline-blue .spark-line,
.sparkline-blue .spark-fill { stroke: var(--blue); fill: var(--blue); }
.sparkline-green .spark-line,
.sparkline-green .spark-fill { stroke: var(--green); fill: var(--green); }
.sparkline-red .spark-line,
.sparkline-red .spark-fill { stroke: var(--red); fill: var(--red); }
.sparkline-amber .spark-line,
.sparkline-amber .spark-fill { stroke: #f97316; fill: #f97316; }

.history-analytics-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 360px minmax(620px, 1fr);
    margin-bottom: 16px;
    min-width: 980px;
}

.history-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 260px;
    padding: 18px;
}

.history-card h2 {
    color: #111827;
    font-size: 14px;
    margin: 0 0 18px;
}

.completion-body {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: 170px 1fr;
}

.donut-shell {
    align-items: center;
    border-radius: 50%;
    display: flex;
    height: 150px;
    justify-content: center;
    position: relative;
    width: 150px;
}

.donut-shell::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 96px;
    position: absolute;
    width: 96px;
}

.donut-shell div {
    display: grid;
    gap: 2px;
    position: relative;
    text-align: center;
    z-index: 1;
}

.donut-shell strong {
    color: #172347;
    font-size: 23px;
}

.donut-shell span {
    color: #53617f;
    font-size: 12px;
}

.completion-legend {
    display: grid;
    gap: 18px;
}

.completion-legend p {
    align-items: center;
    color: #34436d;
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 9px;
    grid-template-columns: 10px 1fr auto;
    margin: 0;
}

.legend-dot,
.health-legend em {
    border-radius: 50%;
    display: inline-block;
    height: 9px;
    width: 9px;
}

.legend-dot.green,
.health-legend em.green { background: var(--green); }
.legend-dot.red,
.health-legend em.red { background: var(--red); }

.health-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.health-chart {
    display: grid;
    gap: 8px;
    grid-template-columns: 34px 1fr;
    min-height: 0;
}

.health-y-axis {
    color: #667085;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 700;
    justify-content: space-between;
    padding: 4px 0 24px;
    text-align: right;
}

.health-chart svg {
    height: 170px;
    min-width: 0;
    width: 100%;
}

.health-grid line {
    stroke: #dfe5ef;
    stroke-width: 1;
}

.health-bar {
    fill: #18bb74;
    opacity: .9;
}

.health-line {
    fill: none;
    stroke: var(--red);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.health-x-axis {
    color: #34436d;
    display: grid;
    font-size: 11px;
    font-weight: 700;
    grid-column: 2;
    grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
    margin-top: -26px;
    text-align: center;
}

.health-legend {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.health-legend span {
    align-items: center;
    color: #53617f;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
}

.history-filter-wrap {
    margin-bottom: 16px;
    min-width: 980px;
    position: relative;
}

.history-filter-toolbar {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(340px, 1.7fr) minmax(150px, .75fr) minmax(155px, .8fr) minmax(170px, .85fr) minmax(190px, .95fr) 136px;
}

.history-filter-toolbar .search-field,
.history-filter-toolbar .select-card,
.history-filter-toolbar .more-filters {
    height: 42px;
}

.history-filter-toolbar .select-card {
    padding: 5px 12px;
}

.history-more-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .1);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(120px, 1fr)) 74px;
    padding: 14px;
    position: absolute;
    right: 0;
    top: 50px;
    width: 650px;
    z-index: 20;
}

.history-custom-range {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    width: fit-content;
}

.history-custom-range label {
    display: grid;
    gap: 5px;
}

.history-custom-range span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.history-custom-range input {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    height: 34px;
    padding: 0 10px;
}

.history-more-panel label {
    display: grid;
    gap: 5px;
}

.history-more-panel span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.history-more-panel input,
.history-more-panel select,
.history-more-panel button {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    height: 34px;
    min-width: 0;
}

.history-more-panel button {
    align-self: end;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.history-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    min-width: 1160px;
    overflow: visible;
}

.history-grid {
    display: grid;
    grid-template-columns: 126px 168px 132px minmax(180px, 1fr) 104px 118px 116px 126px 92px 104px;
}

.history-table-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: #63708f;
    font-size: 11px;
    font-weight: 800;
    height: 36px;
    padding: 0 14px;
}

.history-row {
    align-items: center;
    border-bottom: 1px solid var(--soft-border);
    min-height: 52px;
    padding: 0 14px;
}

.history-row:hover {
    background: #fafcff;
}

.history-order-number,
.history-total {
    color: #172347;
    font-size: 12px;
}

.history-customer {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.history-customer strong {
    color: #233157;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-avatar {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.history-phone,
.history-date,
.history-items {
    color: #34436d;
    font-size: 12px;
    min-width: 0;
}

.history-items {
    overflow: hidden;
    padding-right: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-status,
.payment-chip {
    border-radius: 7px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 26px;
    padding: 5px 10px;
    width: fit-content;
}

.history-status.status-completed { background: #dff7e9; color: #0f9f4e; }
.history-status.status-cancelled { background: #ffe4e6; color: #ef4444; }

.history-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.history-actions button {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    height: 30px;
    min-width: 48px;
}

.history-actions .icon-action {
    color: #233157;
    min-width: 30px;
}

.history-empty {
    align-items: center;
    color: #53617f;
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 160px;
}

.history-empty button {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    height: 32px;
    padding: 0 14px;
}

.history-footer .pagination-controls {
    gap: 8px;
}

.side-item em.green { background: #e8f7ee; color: var(--green); }
.side-item em.red { background: #ffe8e8; color: var(--red); }
.side-item em.amber { background: #fff1dc; color: #f97316; }

@media (max-width: 1280px) {
    .past-orders-main {
        padding-left: 24px;
        padding-right: 24px;
    }

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

    .history-analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .top-nav,
    .orders-sidebar,
    .past-header-actions,
    .history-filter-wrap,
    .history-actions,
    .pagination-controls {
        display: none !important;
    }

    .orders-page-shell {
        display: block;
    }

    .past-orders-main {
        overflow: visible;
        padding: 0;
    }

    .history-card,
    .history-kpi-card,
    .history-table {
        break-inside: avoid;
        box-shadow: none;
    }
}

.accounting-main {
    min-width: 0;
    overflow-x: auto;
    padding: 24px 32px 32px;
}

.accounting-header {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.accounting-header h1 {
    font-size: 26px;
    margin: 0 0 8px;
}

.accounting-header p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.accounting-header-actions {
    align-items: center;
    display: flex;
    gap: 12px;
}

.secondary-action {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #172347;
    font-size: 13px;
    font-weight: 800;
    height: 40px;
    padding: 0 18px;
}

.accounting-kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
    min-width: 1020px;
}

.accounting-kpi-card {
    align-items: end;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 110px;
    min-height: 118px;
    padding: 18px;
}

.accounting-kpi-copy {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: 46px minmax(0, 1fr);
}

.accounting-kpi-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-weight: 900;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.icon-purple { background: #f1e8ff; color: #8b5cf6; }

.accounting-kpi-copy p {
    color: #34436d;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 5px;
}

.accounting-kpi-copy strong {
    color: #101a3d;
    display: block;
    font-size: 23px;
    margin-bottom: 5px;
}

.accounting-kpi-copy em {
    color: #53617f;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.accounting-analytics-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .9fr) minmax(260px, .72fr);
    margin-bottom: 14px;
    min-width: 1020px;
}

.accounting-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 292px;
    padding: 16px;
}

.accounting-card h2,
.accounting-card header h2 {
    font-size: 14px;
    margin: 0;
}

.accounting-card header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.accounting-card header select {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    height: 34px;
    padding: 0 14px;
}

.rev-chart {
    display: grid;
    gap: 6px;
    grid-template-rows: 24px 1fr 20px;
    height: 245px;
}

.rev-legend {
    align-items: center;
    display: flex;
    gap: 18px;
    font-size: 11px;
    font-weight: 700;
}

.rev-legend em {
    border-radius: 50%;
    display: inline-block;
    height: 7px;
    margin-right: 6px;
    width: 7px;
}

.rev-legend .blue { background: var(--blue); }
.rev-legend .red { background: var(--red); }
.rev-chart svg { height: 196px; width: 100%; }
.rev-bar { fill: #2681ff; }
.rev-line { fill: none; stroke: var(--red); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.rev-axis { display: grid; font-size: 11px; font-weight: 700; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); text-align: center; }

.expense-breakdown-body {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 145px 1fr;
    margin-top: 18px;
}

.expense-donut {
    align-items: center;
    border-radius: 50%;
    display: flex;
    height: 142px;
    justify-content: center;
    position: relative;
    width: 142px;
}

.expense-donut::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 88px;
    position: absolute;
    width: 88px;
}

.expense-donut div {
    display: grid;
    position: relative;
    text-align: center;
    z-index: 1;
}

.expense-donut strong { font-size: 19px; }
.expense-donut span { font-size: 12px; font-weight: 800; }
.expense-slices { display: grid; gap: 8px; }
.expense-slices button { align-items: center; background: transparent; border: 0; display: grid; font-size: 11px; gap: 7px; grid-template-columns: 8px 1fr auto 38px; padding: 0; text-align: left; }
.expense-slices em,
.expense-slices small { color: #53617f; font-style: normal; font-weight: 700; }
.slice-dot { border-radius: 50%; height: 8px; width: 8px; }
.dot-blue { background: var(--blue); }
.dot-green { background: var(--green); }
.dot-purple { background: var(--purple); }
.dot-amber { background: var(--amber); }
.dot-violet { background: #a855f7; }
.view-details { background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 800; height: 34px; margin-top: 18px; width: 100%; }

.cash-card { display: grid; grid-template-rows: auto 1fr; }
.cash-list { display: grid; gap: 10px; margin-top: 18px; }
.cash-list p { align-items: center; border: 1px solid var(--border); border-radius: 9px; display: grid; font-size: 12px; font-weight: 800; gap: 10px; grid-template-columns: 34px 1fr auto; margin: 0; padding: 11px 12px; }
.cash-icon { align-items: center; border-radius: 50%; display: inline-flex; height: 28px; justify-content: center; width: 28px; }
.cash-icon.green { background: #e8f7ee; color: var(--green); }
.cash-icon.red { background: #ffe8e8; color: var(--red); }
.cash-icon.blue { background: var(--brand-blue-soft); color: var(--blue); }
.cash-icon.purple { background: #f1e8ff; color: var(--purple); }

.accounting-insights {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
    min-width: 1020px;
}

.accounting-insight {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    display: grid;
    grid-template-columns: 46px 1fr 18px;
    min-height: 82px;
    padding: 14px 16px;
    text-align: left;
}

.insight-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.accounting-insight p { color: #53617f; font-size: 12px; font-weight: 700; margin: 0 0 3px; }
.accounting-insight strong { color: #101a3d; display: block; font-size: 17px; }
.accounting-insight em { color: #34436d; display: block; font-size: 12px; font-style: normal; }

.accounting-filters {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(250px, 1.45fr) 90px 120px 150px 170px 130px;
    margin-bottom: 12px;
    min-width: 1020px;
    position: relative;
}

.accounting-filters label,
.accounting-filters .more-filters {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 40px;
}

.accounting-filters select,
.accounting-filters input {
    background: transparent;
    border: 0;
    height: 100%;
    outline: 0;
    padding: 0 12px;
    width: 100%;
}

.accounting-more {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .1);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    padding: 14px;
    position: absolute;
    right: 0;
    top: 48px;
    width: 760px;
    z-index: 20;
}

.accounting-more label { display: grid; height: auto; padding: 6px; }
.accounting-more span { color: #667085; font-size: 11px; font-weight: 800; }

.transaction-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    min-width: 1180px;
    overflow: visible;
}

.transaction-grid {
    display: grid;
    grid-template-columns: 120px 150px 190px 110px 96px 86px 120px 145px 112px 100px 58px;
}

.transaction-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: #63708f;
    font-size: 11px;
    font-weight: 800;
    height: 36px;
    padding: 0 14px;
}

.transaction-row {
    align-items: center;
    border-bottom: 1px solid var(--soft-border);
    color: #233157;
    font-size: 12px;
    min-height: 48px;
    padding: 0 14px;
}

.transaction-row a { color: var(--blue); font-weight: 800; }
.transaction-row button { background: transparent; border: 0; color: #233157; font-weight: 900; }
.amount-revenue { color: var(--green); }
.amount-expense,
.amount-refund { color: var(--red); }
.amount-adjustment { color: var(--purple); }

.accounting-type,
.accounting-status {
    border-radius: 6px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    justify-content: center;
    padding: 5px 9px;
    width: fit-content;
}

.type-revenue { background: #dff7e9; color: #0f9f4e; }
.type-expense { background: #ffe4e6; color: #ef4444; }
.type-refund { background: #f1e8ff; color: var(--purple); }
.type-adjustment { background: #fff1dc; color: #d97706; }
.status-posted { background: #dff7e9; color: #0f9f4e; }
.status-reconciled { background: var(--brand-blue-soft); color: var(--blue); }
.status-pending { background: #fff1dc; color: #d97706; }
.status-voided { background: #e5e7eb; color: #475569; }

.transaction-detail-modal,
.add-expense-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    padding: 18px;
    width: min(680px, calc(100vw - 40px));
}

.transaction-detail-modal header,
.add-expense-modal header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.transaction-detail-modal header button,
.add-expense-modal header button {
    background: transparent;
    border: 0;
    font-size: 18px;
}

.expense-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.expense-form label {
    display: grid;
    gap: 6px;
}

.expense-form label.wide {
    grid-column: span 2;
}

.expense-form span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.expense-form input,
.expense-form select,
.expense-form textarea {
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    min-height: 38px;
    padding: 8px 10px;
}

.add-expense-modal footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.add-expense-modal footer button {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    font-weight: 900;
    height: 38px;
    padding: 0 18px;
}

.add-expense-modal footer .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

@media (max-width: 1280px) {
    .accounting-main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .accounting-kpi-grid,
    .accounting-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-analytics-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Order management visual refinement */
.app-icon {
    display: block;
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
}

.top-nav {
    border-bottom-color: #eaecf0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.brand-zone {
    background: #fff;
    border-right: 1px solid #eaecf0;
    gap: 0;
    padding: 0 16px 0 18px;
    width: 232px;
}

.app-brand {
    gap: 11px;
    height: 64px;
    justify-content: flex-start;
    width: 100%;
}

.app-brand-mark {
    flex-basis: 36px;
    height: 36px;
    width: 36px;
}

.app-brand-wordmark {
    font-size: 16px;
}

.user-avatar {
    font-weight: 750;
    height: 32px;
    width: 32px;
}

.main-nav {
    gap: 30px;
    padding-left: 26px;
}

.nav-entry {
    color: #344054;
    font-size: 13.5px;
    font-weight: 550;
    gap: 8px;
    text-decoration: none;
}

.nav-icon,
.side-item span {
    border: 0;
    border-radius: 0;
    height: auto;
    width: auto;
}

.nav-icon .app-icon {
    height: 17px;
    width: 17px;
}

.workspace-main {
    min-height: calc(100vh - 64px);
    min-width: 0;
    padding: 24px 32px 30px;
}

.workspace-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 58px;
    margin-bottom: 14px;
}

.workspace-header h1 {
    color: #101828;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 5px;
}

.workspace-header p {
    color: #667085;
    font-size: 13px;
    margin: 0;
}

.workspace-placeholder {
    align-items: center;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    display: flex;
    gap: 14px;
    max-width: 720px;
    padding: 18px;
}

.workspace-placeholder > span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 8px;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 auto;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.workspace-placeholder h2 {
    color: #101828;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.workspace-placeholder p {
    color: #667085;
    font-size: 12.5px;
    line-height: 1.45;
    margin: 0;
}

.orders-page-shell {
    grid-template-columns: 232px minmax(0, 1fr);
}

.orders-sidebar {
    border-right-color: #eaecf0;
    padding: 25px 14px 14px;
}

.sidebar-section {
    gap: 6px;
}

.sidebar-section.with-border {
    border-top-color: #eaecf0;
    margin-top: 20px;
    padding-top: 20px;
}

.sidebar-section h2 {
    color: #667085;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.02em;
    margin: 0 8px 7px;
}

.side-item {
    border-radius: 8px;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    grid-template-columns: 28px 1fr auto;
    min-height: 40px;
    padding: 0 10px;
}

.side-item strong {
    font-weight: 600;
}

.side-item.active {
    background: var(--brand-blue-soft);
    color: var(--blue);
}

.side-item span {
    color: #475467;
}

.side-item.active span {
    color: var(--blue);
}

.side-item .app-icon {
    height: 16px;
    width: 16px;
}

.side-item em {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    min-width: 22px;
    padding: 2px 7px;
    text-align: center;
}

.side-item.quick.ready em {
    background: #dcfae6;
    color: #079455;
}

.side-item.quick.overdue em {
    background: #fee4e2;
    color: #d92d20;
}

.orders-main {
    padding: 24px 32px 30px;
}

.orders-main-header {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(300px, 1fr) minmax(620px, 780px);
    margin-bottom: 16px;
}

.orders-main-header h1 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin-bottom: 6px;
}

.orders-main-header p {
    color: #667085;
    font-size: 13px;
}

.header-actions {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) max-content;
    min-width: 0;
}

.new-order-button {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    height: 42px;
    min-width: 132px;
    padding: 0 20px;
    white-space: nowrap;
}

.new-order-button .app-icon {
    height: 17px;
    width: 17px;
}

.kpi-strip {
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    height: auto;
    min-height: 66px;
    overflow: visible;
    width: 100%;
}

.kpi-item {
    align-items: center;
    gap: 9px;
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 0;
    padding: 10px 13px;
}

.kpi-item + .kpi-item {
    border-left-color: #eaecf0;
}

.kpi-icon {
    border-radius: 8px;
    font-size: 0;
    height: 32px;
    width: 32px;
}

.kpi-icon .app-icon {
    height: 17px;
    width: 17px;
}

.kpi-item div {
    align-items: baseline;
    column-gap: 7px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    justify-content: start;
    min-width: 0;
}

.kpi-item span {
    color: #344054;
    font-size: 10.5px;
    font-weight: 600;
    grid-column: 1 / -1;
    line-height: 1.15;
    white-space: normal;
}

.kpi-item strong {
    font-size: 17px;
    font-weight: 700;
    grid-column: 1;
    line-height: 1.05;
    min-width: max-content;
}

.kpi-item em {
    font-size: 10.5px;
    font-weight: 650;
    grid-column: 2;
    line-height: 1.05;
    white-space: nowrap;
}

.order-tabs {
    border: 1px solid #eaecf0;
    border-radius: 8px;
    display: inline-grid;
    grid-template-columns: repeat(4, auto);
    height: 40px;
    margin-bottom: 14px;
    min-width: 650px;
    overflow: hidden;
}

.order-tabs button {
    align-items: center;
    border: 0;
    border-right: 1px solid #eaecf0;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-width: 150px;
    padding: 0 20px;
    font-size: 12.5px;
    font-weight: 600;
}

.order-tabs button:first-child,
.order-tabs button:last-child {
    border-radius: 0;
}

.order-tabs button:last-child {
    border-right: 0;
}

.order-tabs button .app-icon {
    height: 15px;
    width: 15px;
}

.filter-toolbar {
    gap: 10px;
    grid-template-columns: minmax(340px, 1fr) 140px 145px 155px 175px 125px;
    margin-bottom: 18px;
}

.search-field,
.select-card,
.more-filters {
    border-color: #eaecf0;
    border-radius: 8px;
    height: 50px;
}

.search-field {
    grid-template-columns: 32px minmax(0, 1fr) 34px;
    padding: 0 10px;
}

.search-field span {
    color: #667085;
}

.search-field span .app-icon {
    height: 17px;
    width: 17px;
}

.search-field input {
    color: #101828;
    font-size: 13px;
    font-weight: 450;
}

.search-field input::placeholder {
    color: #667085;
}

.search-field button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.search-field button .app-icon {
    height: 16px;
    width: 16px;
}

.select-card {
    gap: 2px;
    padding: 8px 13px;
}

.select-card span {
    color: #667085;
    font-size: 10.5px;
    font-weight: 650;
}

.select-card select {
    color: #101828;
    font-size: 12.5px;
    font-weight: 600;
}

.more-filters {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    color: #344054;
    font-size: 12.5px;
    font-weight: 600;
}

.more-filters .app-icon {
    height: 15px;
    width: 15px;
}

.orders-list {
    border-color: #eaecf0;
    border-radius: 12px;
    min-width: 1120px;
}

.order-grid {
    grid-template-columns: 150px 205px minmax(330px, 1fr) 92px 122px 90px 145px 180px;
}

.orders-header {
    background: #fcfcfd;
    border-bottom-color: #eaecf0;
    color: #667085;
    font-size: 11px;
    font-weight: 650;
    height: 40px;
    padding: 0 14px;
}

.order-row {
    border-bottom-color: #f0f2f5;
    min-height: 82px;
    padding: 13px 14px;
}

.order-row:hover {
    background: #fcfdff;
}

.order-id-cell strong,
.customer-name-line strong {
    color: #101828;
    font-size: 13px;
    font-weight: 650;
}

.order-id-cell span,
.customer-cell span,
.quiet-date,
.deadline-cell span {
    color: #667085;
    font-size: 11.5px;
}

.customer-cell {
    gap: 10px;
}

.avatar {
    background: linear-gradient(135deg, var(--brand-blue), #0694a2);
    font-size: 12px !important;
    font-weight: 700;
    height: 34px;
    width: 34px;
}

.customer-name-line {
    gap: 6px;
}

.customer-badge {
    border-radius: 6px;
    font-size: 10.5px !important;
    font-weight: 650;
    line-height: 1;
    min-width: 0;
    padding: 4px 8px;
}

.phone-line {
    color: #079455 !important;
}

.items-cell {
    align-content: center;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
}

.item-line {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 90px minmax(0, 1fr) 58px;
    height: 26px;
    width: 100%;
}

.item-category {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    gap: 6px;
    height: 22px;
    justify-content: flex-start;
    padding: 0 7px;
    width: fit-content;
    color: #175cd3;
    font-size: 10.5px;
    font-weight: 650;
}

.item-category .app-icon {
    height: 13px;
    width: 13px;
}

.item-garment {
    background: var(--brand-blue-soft);
    color: #175cd3;
}

.item-shoe {
    background: #ecfdf3;
    color: #067647;
}

.item-description {
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.size-badge {
    background: #f8fafc;
    border-color: #e4e7ec;
    border-radius: 6px;
    color: #101828;
    font-size: 10.5px;
    font-weight: 650;
    height: 22px;
    justify-self: start;
    min-width: 42px;
    padding: 0 8px;
}

.quiet-date {
    color: #344054;
    font-weight: 500;
}

.deadline-cell strong,
.total-cell {
    color: #101828;
    font-size: 12.5px;
    font-weight: 650;
}

.deadline-cell span {
    font-weight: 450;
}

.order-status-pill {
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 650;
    gap: 7px;
    min-height: 24px;
    padding: 0 9px;
}

.order-status-pill span {
    height: 5px;
    width: 5px;
}

.action-cell {
    gap: 7px;
}

.action-cell button,
.pagination-controls button,
.pagination-controls select {
    border-color: #d0d5dd;
    border-radius: 7px;
    color: #344054;
    font-size: 11.5px;
    font-weight: 600;
    height: 30px;
    min-width: 42px;
}

.action-cell button:first-child {
    color: var(--blue);
}

.action-cell .icon-action {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 30px;
}

.action-cell .icon-action .app-icon {
    height: 15px;
    width: 15px;
}

.journey-header-icon .app-icon {
    height: 23px;
    width: 23px;
}

.journey-identity .app-icon,
.journey-stage-icon .app-icon {
    height: 18px;
    width: 18px;
}

@media (max-width: 1500px) {
    .main-nav {
        gap: 24px;
    }

    .orders-main {
        padding-left: 30px;
        padding-right: 30px;
    }

    .header-actions {
        grid-template-columns: 520px auto;
    }

    .kpi-strip {
        width: 520px;
    }

    .kpi-item {
        gap: 8px;
        padding: 0 10px;
    }

    .kpi-item span {
        font-size: 10px;
    }
}

@media (max-width: 1320px) {
    .orders-main-header {
        grid-template-columns: 1fr;
    }

    .header-actions {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .kpi-strip {
        width: 100%;
    }

    .filter-toolbar {
        grid-template-columns: minmax(300px, 1fr) repeat(2, 145px) 155px 175px 125px;
    }
}

/* New order intake refinement */
.new-order-main {
    min-width: 0;
    padding: 24px 32px 30px;
}

.new-order-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 58px;
    margin-bottom: 14px;
}

.new-order-header h1 {
    color: #101828;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0 0 5px;
}

.new-order-header p {
    color: #667085;
    font-size: 13px;
    font-weight: 400;
}

.back-link {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--blue);
    display: inline-flex;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    margin: 0;
    padding: 8px 0;
}

.back-link .app-icon {
    height: 15px;
    width: 15px;
}

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

.intake-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.new-order-main .intake-card,
.new-order-main .summary-card,
.new-order-main .action-card {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.new-order-main .intake-card {
    padding: 16px 18px;
}

.new-order-main .section-title {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.new-order-main .section-title > span {
    align-items: center;
    background: var(--brand-blue-soft);
    border: 0;
    border-radius: 7px;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.new-order-main .section-title > span .app-icon {
    height: 18px;
    width: 18px;
}

.new-order-main .section-title h2 {
    color: #101828;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 3px;
}

.new-order-main .section-title p {
    color: #667085;
    font-size: 11.5px;
    font-weight: 400;
}

.customer-card,
.order-info-card,
.items-card,
.reference-card {
    min-height: 0;
}

.phone-finder {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 22px minmax(170px, 220px) minmax(0, 1fr) 28px;
    height: 42px;
    padding: 0 12px;
}

.phone-finder:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}

.phone-finder input,
.phone-finder select {
    background: transparent;
    border: 0;
    color: #101828;
    font-size: 12.5px;
    font-weight: 500;
    min-width: 0;
    outline: 0;
}

.phone-finder select {
    border-right: 1px solid #eaecf0;
    padding-right: 8px;
}

.phone-finder input::placeholder,
.new-order-main input::placeholder {
    color: #98a2b3;
}

.phone-finder span {
    color: #667085;
}

.phone-finder span .app-icon {
    height: 17px;
    width: 17px;
}

.phone-finder button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #667085;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.phone-finder button:hover {
    background: #f2f4f7;
}

.phone-finder button .app-icon {
    height: 14px;
    width: 14px;
}

.lookup-spinner {
    border: 2px solid #d1e0ff;
    border-top-color: var(--blue);
    border-radius: 50%;
    height: 16px;
    justify-self: center;
    width: 16px;
}

.lookup-state {
    align-items: center;
    color: #667085;
    display: inline-flex;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    margin: 6px 0 10px;
}

.lookup-state span {
    align-items: center;
    display: inline-flex;
}

.lookup-state .app-icon {
    height: 13px;
    width: 13px;
}

.lookup-state.found {
    color: #039855;
}

.customer-result-list {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
    display: grid;
    gap: 2px;
    margin: -2px 0 12px;
    max-height: 252px;
    overflow-y: auto;
    padding: 6px;
    position: relative;
    z-index: 6;
}

.customer-result-list button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    display: grid;
    gap: 10px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 48px;
    padding: 7px 8px;
    text-align: left;
}

.customer-result-list button:hover {
    background: #f5f8ff;
}

.result-avatar {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: var(--blue);
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.customer-result-list strong,
.customer-result-list em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-result-list strong {
    color: #101828;
    font-size: 12px;
    font-weight: 700;
}

.customer-result-list em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
    margin-top: 2px;
}

.customer-fields {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr 1.35fr;
}

.customer-fields label,
.date-row label,
.order-state-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.customer-fields label span,
.date-row label span,
.order-state-row label span,
.status-field > span,
.turnaround-box > span {
    color: #344054;
    font-size: 10.5px;
    font-weight: 550;
}

.customer-fields input,
.date-row input,
.order-state-row select,
.item-editor-row input,
.item-editor-row select {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #101828;
    font-size: 12.5px;
    font-weight: 450;
    height: 38px;
    outline: 0;
    padding: 0 11px;
    width: 100%;
}

.customer-fields input:focus,
.date-row input:focus,
.order-state-row select:focus,
.item-editor-row input:focus,
.item-editor-row select:focus,
.money-input:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}

.status-field {
    display: grid;
    gap: 6px;
}

.status-pills {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, 1fr);
}

.status-choice {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #344054;
    font-size: 11.5px;
    font-weight: 550;
    height: 36px;
}

.status-choice.selected {
    color: #0b122e;
    font-weight: 750;
    outline: 2px solid rgba(23, 105, 255, 0.2);
    outline-offset: 1px;
}

.status-choice.customer-new.selected {
    background: var(--brand-blue-soft);
    border-color: #84adff;
}

.status-choice.customer-returning.selected {
    background: #ecfdf3;
    border-color: #75e0a7;
}

.status-choice.customer-vip.selected {
    background: #f4f3ff;
    border-color: #bdb4fe;
}

.status-choice.customer-priority.selected {
    background: #fffaeb;
    border-color: #fec84b;
}

.date-row,
.order-state-row {
    align-items: end;
    display: grid;
    gap: 24px;
    grid-template-columns: 220px 240px 150px;
    justify-content: start;
}

.date-row label span em {
    color: #667085;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 400;
}

.turnaround-box {
    display: grid;
    gap: 6px;
}

.turnaround-control {
    align-items: center;
    background: var(--brand-blue-soft);
    border: 1px solid #b2ccff;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 26px minmax(0, 46px) auto 26px;
    height: 34px;
    overflow: hidden;
    width: 150px;
}

.turnaround-control input {
    background: transparent;
    border: 0;
    color: #155eef;
    font-size: 11.5px;
    font-weight: 600;
    height: 32px;
    min-width: 0;
    padding: 0 2px;
    text-align: center;
}

.turnaround-control button {
    align-items: center;
    background: #dbeafe;
    border: 0;
    color: #155eef;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 26px;
}

.turnaround-control em {
    color: #155eef;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 650;
    padding-right: 3px;
}

.date-helper,
.field-error {
    align-items: center;
    display: flex;
    gap: 6px;
    font-size: 11px;
    margin: 8px 0 12px;
}

.date-helper {
    color: #667085;
}

.date-helper .app-icon {
    height: 13px;
    width: 13px;
}

.field-error {
    color: #d92d20;
    font-weight: 500;
}

.order-state-row {
    grid-template-columns: 200px 220px 170px 176px;
}

.emergency-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.emergency-field > span {
    color: #344054;
    font-size: 10.5px;
    font-weight: 550;
}

.emergency-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #fecdca;
    border-radius: 7px;
    color: #b42318;
    cursor: pointer;
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 750;
    height: 38px;
    justify-content: center;
    padding: 0 12px;
    white-space: nowrap;
}

.emergency-toggle input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.emergency-toggle.selected {
    background: #fef3f2;
    border-color: #f04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12);
}

.money-input {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: 38px;
    padding: 0 10px 0 0;
    width: 170px;
}

.money-input input {
    border: 0;
    box-shadow: none !important;
    color: #101828;
    font-size: 12.5px;
    font-weight: 500;
    height: 36px;
    min-width: 0;
    padding: 0 10px;
}

.money-input em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.section-with-action {
    align-items: center;
}

.section-with-action .add-item-button {
    margin-left: auto;
}

.add-item-button {
    align-items: center;
    background: var(--blue);
    border: 0;
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    height: 34px;
    padding: 0 12px;
}

.add-item-button .app-icon {
    height: 14px;
    width: 14px;
}

.item-editor-head,
.item-editor-row {
    display: grid;
    gap: 8px;
    grid-template-columns: 110px minmax(165px, 1.08fr) minmax(165px, 1.08fr) 120px 104px 124px 30px;
}

.item-editor-head {
    color: #667085;
    font-size: 10.5px;
    font-weight: 550;
    margin: 0 0 7px;
}

.item-editor-row {
    align-items: center;
    min-height: 48px;
    padding: 6px 0;
}

.item-editor-row + .item-editor-row {
    border-top: 1px solid #f2f4f7;
}

.item-editor-row input,
.item-editor-row select {
    font-size: 12px;
    height: 37px;
}

.line-price-input {
    align-items: center;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    display: grid;
    grid-template-columns: minmax(58px, 1fr) auto;
    height: 37px;
    padding-right: 8px;
    width: 124px;
}

.line-price-input:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}

.line-price-input input {
    border: 0;
    box-shadow: none !important;
    height: 35px;
    min-width: 0;
    padding: 0 8px;
    width: 100%;
}

.line-price-input em {
    color: #667085;
    font-size: 10px;
    font-style: normal;
    font-weight: 650;
}

.trash-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #d92d20;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.trash-button:hover {
    background: #fef3f2;
}

.trash-button .app-icon {
    height: 15px;
    width: 15px;
}

.upload-zone {
    background: #fcfdff;
    border: 1px dashed #b2ccff;
    border-radius: 8px;
    gap: 5px;
    min-height: 96px;
}

.upload-zone > .app-icon {
    color: var(--blue);
    height: 22px;
    width: 22px;
}

.upload-zone strong {
    color: #101828;
    font-size: 12px;
    font-weight: 600;
}

.upload-zone span {
    color: #667085;
    font-size: 10.5px;
}

.reference-list {
    gap: 10px;
    margin-top: 10px;
}

.reference-thumb {
    border-color: #eaecf0;
    border-radius: 8px;
    grid-template-rows: 72px auto auto;
    padding: 7px;
    width: 88px;
}

.reference-thumb img {
    height: 72px;
}

.reference-thumb button {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    color: #667085;
    display: inline-flex;
    height: 20px;
    justify-content: center;
    width: 20px;
}

.reference-thumb button .app-icon {
    height: 12px;
    width: 12px;
}

.reference-thumb strong,
.reference-thumb span {
    color: #667085;
    font-size: 10px;
    font-weight: 500;
}

.summary-column {
    display: grid;
    gap: 12px;
    height: fit-content;
    position: sticky;
    top: 84px;
}

.summary-card {
    padding: 20px;
}

.summary-card .section-title {
    margin-bottom: 18px;
}

.summary-lines {
    align-items: center;
    display: grid;
    gap: 12px 12px;
    grid-template-columns: 92px minmax(0, 1fr);
}

.summary-lines > span {
    color: #667085;
    font-size: 11px;
    font-weight: 400;
}

.summary-lines > strong {
    align-items: center;
    color: #344054;
    display: inline-flex;
    font-size: 12px;
    font-weight: 500;
    gap: 6px;
    justify-self: end;
    min-width: 0;
    text-align: right;
}

.summary-lines > .order-status-pill {
    justify-self: end;
    width: fit-content;
}

.summary-customer .customer-badge {
    flex: 0 0 auto;
}

.summary-card hr {
    border-top: 1px solid #eaecf0;
    margin: 18px 0;
}

.summary-card h3 {
    color: #344054;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 10px;
}

.summary-items {
    display: grid;
    gap: 6px;
}

.summary-items > div {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 24px 58px minmax(0, 1fr) 44px 62px;
    min-height: 34px;
}

.summary-item-icon {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 50%;
    color: #175cd3;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.summary-item-icon .app-icon {
    height: 14px;
    width: 14px;
}

.summary-item-icon.shoe {
    background: #ecfdf3;
    color: #067647;
}

.summary-item-icon.empty {
    background: #f2f4f7;
    color: #667085;
}

.summary-items strong,
.summary-items span,
.summary-items em,
.summary-items b {
    color: #344054;
    font-size: 11.5px;
    font-weight: 500;
    min-width: 0;
}

.summary-items span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-items em {
    color: #667085;
    font-style: normal;
    justify-self: end;
}

.summary-items b {
    color: #101828;
    font-weight: 650;
    justify-self: end;
}

.pricing-lines {
    border-top: 1px solid #eaecf0;
    margin-top: 14px;
    padding-top: 14px;
}

.payment-summary {
    background: #f2f4f7;
    border-radius: 999px;
    padding: 4px 8px;
}

.deadline-summary {
    display: grid !important;
    gap: 2px;
}

.deadline-summary small {
    color: #039855;
    font-size: 10.5px;
    font-weight: 500;
}

.total-panel {
    background: #f5f8ff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
}

.total-panel strong {
    color: #101828;
    font-size: 12px;
    font-weight: 550;
}

.total-panel span {
    color: #101828;
    font-size: 19px;
    font-weight: 700;
}

.action-card {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.action-card button {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 550;
    height: 40px;
    justify-content: flex-start;
    padding: 0 14px;
    text-align: left;
}

.action-card button .app-icon {
    height: 15px;
    width: 15px;
}

.action-card .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    height: 42px;
    justify-content: center;
}

.form-notice,
.validation-panel {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

@media (min-width: 1650px) {
    .intake-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .item-editor-head,
    .item-editor-row {
        gap: 12px;
        grid-template-columns: 120px minmax(190px, 1.1fr) minmax(190px, 1.1fr) 130px 110px 128px 34px;
    }
}

@media (max-width: 1500px) {
    .new-order-main {
        padding-left: 30px;
        padding-right: 30px;
    }

    .intake-grid {
        gap: 20px;
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .summary-card {
        padding: 18px;
    }
}

@media (max-width: 1400px) {
    .intake-grid {
        grid-template-columns: 1fr;
    }

    .summary-column {
        position: static;
    }
}

@media (max-width: 1180px) {
    .intake-grid {
        grid-template-columns: 1fr;
    }

    .summary-column {
        position: static;
    }

    .date-row,
    .order-state-row,
    .customer-fields {
        grid-template-columns: 1fr;
    }
}

/* Past orders / history refinement */
.past-orders-main {
    min-width: 0;
    overflow-x: auto;
    padding: 24px 32px 32px;
}

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

.past-header h1 {
    color: #101828;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 5px;
}

.past-header p {
    color: #667085;
    font-size: 13px;
}

.past-header-actions {
    gap: 10px;
}

.period-select {
    border-color: #d0d5dd;
    border-radius: 7px;
    gap: 8px;
    grid-template-columns: 18px 1fr;
    height: 40px;
    width: 140px;
}

.period-select span {
    color: #475467;
}

.period-select span .app-icon,
.export-report .app-icon {
    height: 15px;
    width: 15px;
}

.period-select select {
    color: #101828;
    font-size: 12px;
    font-weight: 500;
}

.period-date {
    border-color: #d0d5dd;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
}

.export-report {
    gap: 8px;
    height: 40px;
    min-width: 142px;
    padding: 0 14px;
}

.history-kpi-grid {
    gap: 14px;
    margin-bottom: 14px;
    min-width: 980px;
}

.history-kpi-card {
    align-items: center;
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    grid-template-columns: minmax(0, 1fr) 104px;
    min-height: 112px;
    padding: 16px;
}

.history-kpi-copy {
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
}

.history-kpi-icon {
    border-radius: 9px;
    height: 38px;
    width: 38px;
}

.history-kpi-icon .app-icon {
    height: 18px;
    width: 18px;
}

.icon-blue { background: var(--brand-blue-soft); color: var(--brand-blue); }
.icon-green { background: #ecfdf3; color: #039855; }
.icon-red { background: #fef3f2; color: #d92d20; }
.icon-amber { background: #fff6e5; color: #dc6803; }

.history-kpi-copy p {
    color: #475467;
    font-size: 11.5px;
    font-weight: 550;
    margin-bottom: 3px;
}

.history-kpi-copy strong {
    color: #101828;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 3px;
}

.history-kpi-copy em {
    color: #667085;
    font-size: 10.5px;
    font-weight: 400;
}

.sparkline {
    height: 38px;
    width: 104px;
}

.spark-line {
    stroke-width: 2;
}

.spark-fill {
    opacity: .08;
}

.sparkline-amber .spark-line,
.sparkline-amber .spark-fill { stroke: #dc6803; fill: #dc6803; }

.history-analytics-grid {
    gap: 14px;
    grid-template-columns: 340px minmax(0, 1fr);
    margin-bottom: 16px;
    min-width: 980px;
}

.history-card {
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    height: 240px;
    padding: 16px 18px;
}

.history-card h2 {
    color: #101828;
    font-size: 13.5px;
    font-weight: 600;
    margin: 0 0 12px;
}

.completion-body {
    gap: 16px;
    grid-template-columns: 154px minmax(0, 1fr);
}

.donut-shell {
    height: 148px;
    width: 148px;
}

.donut-shell::after {
    height: 96px;
    width: 96px;
}

.donut-shell strong {
    color: #101828;
    font-size: 22px;
    font-weight: 700;
}

.donut-shell span {
    color: #667085;
    font-size: 10.5px;
}

.completion-legend {
    gap: 12px;
}

.completion-legend p {
    color: #475467;
    font-size: 12px;
    font-weight: 500;
    gap: 8px;
    grid-template-columns: 9px 1fr;
}

.completion-legend p strong {
    color: #101828;
    font-size: 11.5px;
    font-weight: 600;
    grid-column: 2;
}

.legend-dot,
.health-legend em {
    height: 8px;
    width: 8px;
}

.legend-dot.green,
.health-legend em.green { background: #039855; }
.legend-dot.red,
.health-legend em.red { background: #d92d20; }

.health-chart {
    gap: 8px;
    grid-template-columns: 32px 1fr;
}

.health-y-axis {
    color: #667085;
    font-size: 10px;
    font-weight: 400;
}

.health-chart svg {
    height: 150px;
}

.health-grid line {
    stroke: #eef1f4;
}

.health-bar {
    fill: #12b76a;
    opacity: .92;
}

.health-line {
    stroke: #d92d20;
    stroke-width: 2;
}

.health-line-dot {
    fill: #fff;
    stroke: #d92d20;
    stroke-width: 1.6;
}

.health-x-axis {
    color: #667085;
    font-size: 10.5px;
    font-weight: 400;
}

.health-legend {
    gap: 20px;
}

.health-legend span {
    color: #667085;
    font-size: 10.5px;
    font-weight: 500;
}

.history-list-surface {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    min-width: 1160px;
    overflow: visible;
}

.history-filter-wrap {
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 0;
    min-width: 0;
    padding: 12px;
}

.history-filter-toolbar {
    gap: 10px;
    grid-template-columns: minmax(320px, 1.8fr) 160px 180px 180px 210px 135px;
}

.history-filter-toolbar .search-field,
.history-filter-toolbar .select-card,
.history-filter-toolbar .more-filters {
    border-color: #d0d5dd;
    border-radius: 7px;
    height: 40px;
}

.history-filter-toolbar .search-field {
    grid-template-columns: 30px minmax(0, 1fr);
}

.history-filter-toolbar .search-field .app-icon {
    height: 16px;
    width: 16px;
}

.history-filter-toolbar .search-field input {
    font-size: 12.5px;
    font-weight: 400;
}

.history-filter-toolbar .select-card {
    gap: 1px;
    padding: 6px 11px;
}

.history-filter-toolbar .select-card span {
    font-size: 10px;
    font-weight: 500;
}

.history-filter-toolbar .select-card select {
    font-size: 12px;
    font-weight: 500;
}

.history-filter-toolbar .more-filters {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    font-weight: 500;
    gap: 8px;
}

.history-filter-toolbar .more-filters .app-icon {
    height: 15px;
    width: 15px;
}

.history-custom-range {
    border-color: #eaecf0;
    border-radius: 8px;
}

.history-more-panel {
    border-color: #eaecf0;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
    top: 58px;
}

.history-custom-range span,
.history-more-panel span {
    font-size: 10.5px;
    font-weight: 500;
}

.history-more-panel input,
.history-more-panel select,
.history-more-panel button {
    border-color: #d0d5dd;
    font-size: 12px;
}

.history-table {
    border: 0;
    border-radius: 0;
    min-width: 0;
    overflow: visible;
}

.history-grid {
    grid-template-columns: 150px 170px 155px minmax(240px, 1fr) 135px 120px 120px 125px 90px 105px;
}

.history-table-header {
    background: #fcfcfd;
    border-bottom-color: #eaecf0;
    color: #667085;
    font-size: 10.5px;
    font-weight: 600;
    height: 38px;
    padding: 0 12px;
}

.history-row {
    border-bottom-color: #f2f4f7;
    min-height: 50px;
    padding: 8px 12px;
}

.history-row:hover {
    background: #fafcff;
}

.history-order-number,
.history-total {
    color: #101828;
    font-size: 12px;
    font-weight: 600;
}

.history-customer strong {
    color: #101828;
    font-size: 12px;
    font-weight: 550;
}

.history-avatar {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
    font-size: 10.5px;
    font-weight: 650;
    height: 29px;
    width: 29px;
}

.history-phone,
.history-date,
.history-items {
    color: #475467;
    font-size: 11.5px;
    font-weight: 400;
}

.history-date {
    font-weight: 500;
}

.history-status,
.payment-chip {
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 550;
    min-height: 22px;
    padding: 0 8px;
}

.history-status.status-completed { background: #ecfdf3; color: #027a48; }
.history-status.status-cancelled { background: #fef3f2; color: #b42318; }

.payment-chip {
    color: #344054;
    font-weight: 500;
}

.payment-paid { background: #ecfdf3; color: #027a48; }
.payment-partiallypaid { background: #fff6e5; color: #b54708; }
.payment-unpaid { background: #f2f4f7; color: #344054; }

.history-actions {
    gap: 7px;
}

.history-actions button {
    border-color: #d0d5dd;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 500;
    height: 30px;
    min-width: 46px;
    padding: 0 9px;
}

.history-actions .icon-action {
    color: #344054;
    min-width: 30px;
}

.history-footer {
    border-top-color: #eaecf0;
    min-height: 52px;
    padding: 0 12px;
}

.history-footer .pagination-controls {
    gap: 7px;
}

.past-sidebar .side-item em.green { background: #dcfae6; color: #039855; }
.past-sidebar .side-item em.red { background: #fee4e2; color: #d92d20; }
.past-sidebar .side-item em.amber { background: #fff6e5; color: #dc6803; }

@media (max-width: 1500px) {
    .past-orders-main {
        padding-left: 30px;
        padding-right: 30px;
    }

    .history-kpi-card {
        grid-template-columns: minmax(0, 1fr) 86px;
    }

    .sparkline {
        width: 86px;
    }

    .history-filter-toolbar {
        grid-template-columns: minmax(280px, 1.5fr) 140px 155px 155px 185px 125px;
    }
}

@media (max-width: 1280px) {
    .history-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-analytics-grid {
        grid-template-columns: 320px minmax(620px, 1fr);
    }
}

/* Deliveries / Dispatch Control refinement */
.deliveries-main {
    color: #071431;
    padding: 28px 30px 32px;
}

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

.deliveries-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.18;
    margin: 0 0 7px;
}

.deliveries-header p {
    color: #475467;
    font-size: 13.5px;
    font-weight: 400;
    margin: 0;
}

.deliveries-header .new-order-button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    white-space: nowrap;
}

.deliveries-header .new-order-button .app-icon {
    height: 17px;
    width: 17px;
}

.delivery-sidebar .side-item span {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.delivery-sidebar .side-item .app-icon {
    height: 15px;
    width: 15px;
}

.dispatch-kpi-strip {
    border-color: #dfe5ef;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .03);
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
    min-height: 82px;
    overflow: hidden;
    padding: 0;
}

.dispatch-kpi-strip > div {
    gap: 1px 14px;
    grid-template-areas:
        "icon value"
        "icon label"
        "icon delta";
    grid-template-columns: 40px minmax(0, 1fr);
    min-width: 0;
    padding: 17px 22px;
}

.dispatch-kpi-strip .kpi-icon {
    border-radius: 8px;
    grid-area: icon;
    height: 34px;
    width: 34px;
}

.dispatch-kpi-strip .kpi-icon .app-icon {
    height: 18px;
    width: 18px;
}

.dispatch-kpi-strip .kpi-purple {
    background: #f4ebff;
    color: #7f56d9;
}

.dispatch-kpi-strip .kpi-rose {
    background: #ffe4e8;
    color: #e11d48;
}

.dispatch-kpi-strip .kpi-green {
    background: #dcfae6;
    color: #039855;
}

.dispatch-kpi-strip .kpi-amber {
    background: #fff3dc;
    color: #dc6803;
}

.dispatch-kpi-strip strong {
    color: #071431;
    font-size: 23px;
    font-weight: 700;
    grid-area: value;
}

.dispatch-kpi-strip p {
    color: #101828;
    font-size: 12.5px;
    font-weight: 650;
    grid-area: label;
}

.dispatch-kpi-strip em {
    color: #039855;
    font-size: 11.5px;
    font-weight: 650;
    grid-area: delta;
}

.dispatch-live-grid {
    align-items: start;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 340px;
    margin-bottom: 14px;
}

.dispatch-map-card,
.active-drivers-card,
.dispatch-queue-surface {
    background: #fff;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .025);
    overflow: hidden;
}

.dispatch-map-card header {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    min-height: 50px;
    padding: 8px 13px;
}

.dispatch-map-card header > div:first-child strong {
    color: #101828;
    font-size: 15px;
    font-weight: 700;
}

.dispatch-map-card header > div:first-child span {
    color: #667085;
    font-size: 11.5px;
    margin-top: 2px;
}

.live-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    height: 22px;
    padding: 0 9px;
}

.live-pill.is-live {
    background: #dcfae6;
    color: #027a48;
}

.live-pill.is-offline {
    background: #f2f4f7;
    color: #667085;
}

.map-controls {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    position: relative;
}

.map-controls select,
.map-controls button {
    border-color: #d0d5dd;
    border-radius: 7px;
    color: #101828;
    font-size: 11.5px;
    font-weight: 600;
    height: 32px;
    min-width: 110px;
    padding: 0 10px;
}

.map-controls button {
    align-items: center;
    background: #fff;
    display: inline-flex;
    justify-content: center;
    min-width: 72px;
}

.map-legend {
    border-color: #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
    padding: 10px 12px;
    right: 0;
    top: 38px;
}

.map-legend span {
    color: #475467;
    font-size: 11px;
    font-weight: 600;
}

.dispatch-map {
    height: 300px;
}

.leaflet-driver-marker {
    border: 3px solid #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .24);
    font-size: 11px;
    font-weight: 750;
    height: 38px;
    position: relative;
    width: 38px;
}

.leaflet-driver-marker::after {
    background: #12b76a;
    border: 2px solid #fff;
    border-radius: 999px;
    bottom: 1px;
    content: "";
    height: 9px;
    position: absolute;
    right: 0;
    width: 9px;
}

.leaflet-driver-marker.stale::after {
    background: #f79009;
}

.leaflet-driver-marker.offline::after {
    background: #98a2b3;
}

.leaflet-driver-marker.selected {
    box-shadow: 0 0 0 5px rgba(21, 112, 239, .24), 0 12px 24px rgba(15, 23, 42, .28);
}

.leaflet-stop-marker {
    background: #f04438;
    border: 3px solid #fff;
    border-radius: 999px 999px 999px 4px;
    box-shadow: 0 5px 12px rgba(15, 23, 42, .2);
    height: 20px;
    transform: rotate(-45deg);
    width: 20px;
}

.leaflet-stop-marker.done {
    background: #12b76a;
}

.leaflet-stop-marker.selected {
    box-shadow: 0 0 0 4px rgba(240, 68, 56, .22), 0 8px 16px rgba(15, 23, 42, .22);
}

.active-drivers-card header {
    min-height: 50px;
    padding: 0 14px;
}

.active-drivers-card header strong {
    align-items: center;
    color: #101828;
    display: inline-flex;
    font-size: 15px;
    gap: 7px;
}

.active-drivers-card header strong span {
    align-items: center;
    background: var(--brand-blue-soft);
    border-radius: 999px;
    color: #155eef;
    display: inline-flex;
    font-size: 11px;
    height: 20px;
    justify-content: center;
    min-width: 22px;
    padding: 0 7px;
}

.active-drivers-card header button,
.view-all-drivers {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.active-drivers-card header button .app-icon,
.view-all-drivers .app-icon {
    height: 14px;
    width: 14px;
}

.driver-row {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 40px minmax(0, 1fr) 108px;
    height: 86px;
    min-height: 86px;
    padding: 12px 14px;
    position: relative;
}

.driver-row.selected {
    background: #f5f8ff;
}

.driver-row:focus {
    outline: none;
}

.driver-row:focus-visible {
    outline: 2px solid rgba(21, 94, 239, .35);
    outline-offset: -2px;
}

.driver-row.selected::before {
    background: #155eef;
    border-radius: 0 999px 999px 0;
    bottom: 12px;
    content: "";
    left: 0;
    position: absolute;
    top: 12px;
    width: 3px;
}

.driver-avatar {
    font-size: 12px;
    height: 36px;
    width: 36px;
}

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

.driver-main strong {
    color: #101828;
    display: block;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-main em,
.driver-meta span {
    color: #475467;
    display: block;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}

.driver-progress {
    background: #eaecf0;
    border-radius: 999px;
    display: block;
    height: 4px;
    margin: 6px 0 5px;
    overflow: hidden;
    width: 100%;
}

.driver-progress span {
    background: #155eef;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.driver-meta {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    text-align: right;
}

.driver-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.freshness {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    gap: 5px;
    min-height: 24px;
    padding: 0 9px;
}

.freshness::before {
    border-radius: 999px;
    content: "";
    height: 6px;
    width: 6px;
}

.freshness.live::before {
    background: #12b76a;
}

.freshness.stale::before {
    background: #f79009;
}

.freshness.offline::before {
    background: #98a2b3;
}

.view-all-drivers {
    border-top: 1px solid #eaecf0;
    height: 48px;
    padding: 0 14px;
}

.dispatch-queue-surface {
    min-width: 1100px;
}

.dispatch-filters {
    border-bottom: 1px solid #eaecf0;
    gap: 10px;
    grid-template-columns: minmax(300px, 1.6fr) 150px 150px 170px 160px 128px;
    margin-bottom: 0;
    padding: 12px;
}

.dispatch-filters .search-field,
.dispatch-filters .select-card,
.dispatch-filters .more-filters {
    border-color: #d0d5dd;
    border-radius: 7px;
    height: 40px;
}

.dispatch-filters .search-field {
    grid-template-columns: 32px minmax(0, 1fr);
}

.dispatch-filters .search-field .app-icon {
    color: #667085;
    height: 16px;
    margin-left: 11px;
    width: 16px;
}

.dispatch-filters input,
.dispatch-filters select {
    color: #101828;
    font-size: 12px;
    font-weight: 500;
}

.dispatch-filters input::placeholder {
    color: #667085;
    font-weight: 400;
}

.dispatch-filters .select-card {
    gap: 1px;
    padding: 6px 11px;
}

.dispatch-filters .select-card span {
    color: #475467;
    font-size: 10px;
    font-weight: 600;
}

.dispatch-filters .more-filters {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 8px;
    justify-content: center;
}

.dispatch-filters .more-filters .app-icon {
    height: 15px;
    width: 15px;
}

.dispatch-list {
    border: 0;
    border-radius: 0;
    min-width: 0;
    overflow: visible;
}

.dispatch-grid {
    grid-template-columns: 28px 126px 142px 126px 130px 140px minmax(148px, 1fr) 108px 90px 110px;
}

.dispatch-table-head {
    background: #fcfcfd;
    border-bottom: 1px solid #eaecf0;
    color: #667085;
    font-size: 10.5px;
    font-weight: 650;
    height: 38px;
    padding: 0 12px;
}

.dispatch-row {
    border-bottom: 1px solid #f2f4f7;
    min-height: 54px;
    padding: 8px 12px;
    position: relative;
}

.dispatch-row:hover {
    background: #fafcff;
}

.dispatch-row.selected {
    background: #f5f8ff;
}

.dispatch-row.selected::before {
    background: #155eef;
    bottom: 8px;
    content: "";
    left: 0;
    position: absolute;
    top: 8px;
    width: 3px;
}

.dispatch-row > strong,
.dispatch-total {
    color: #101828;
    font-size: 12px;
    font-weight: 700;
}

.dispatch-customer {
    color: #101828;
    font-size: 12px;
    font-weight: 550;
}

.dispatch-customer span {
    font-size: 10.5px;
    height: 27px;
    width: 27px;
}

.dispatch-row > span,
.dispatch-driver,
.window-cell span {
    color: #475467;
    font-size: 11.5px;
    font-weight: 500;
}

.window-cell strong {
    color: #101828;
    font-size: 11.5px;
    font-weight: 700;
}

.dispatch-status,
.dispatch-list .payment-chip {
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 650;
    min-height: 22px;
    padding: 0 9px;
    width: max-content;
}

.dispatch-actions {
    gap: 7px;
}

.dispatch-actions button {
    border-color: #d0d5dd;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
    height: 30px;
    min-width: 48px;
    padding: 0 10px;
}

.dispatch-actions .primary {
    background: #155eef;
    border-color: #155eef;
}

.dispatch-actions .icon-action {
    align-items: center;
    color: #344054;
    display: inline-flex;
    justify-content: center;
    min-width: 34px;
    padding: 0;
}

.dispatch-actions .icon-action .app-icon {
    height: 16px;
    width: 16px;
}

.dispatch-list .orders-footer {
    border-top: 1px solid #eaecf0;
    min-height: 52px;
    padding: 0 12px;
}

.create-dispatch-modal header button {
    align-items: center;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.create-dispatch-modal header button .app-icon {
    height: 18px;
    width: 18px;
}

@media (max-width: 1500px) {
    .deliveries-main {
        padding-left: 26px;
        padding-right: 26px;
    }

    .dispatch-live-grid {
        grid-template-columns: minmax(0, 1fr) 330px;
    }

    .dispatch-kpi-strip > div {
        padding-left: 18px;
        padding-right: 18px;
    }

    .dispatch-map {
        height: 285px;
    }
}

@media (max-width: 1280px) {
    .dispatch-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dispatch-live-grid {
        grid-template-columns: 1fr;
    }

    .dispatch-filters {
        grid-template-columns: minmax(280px, 1fr) repeat(3, 150px);
    }

    .dispatch-filters .more-filters {
        grid-column: auto;
    }
}

/* Accounting Workspace refinement */
.accounting-main {
    color: #101828;
    padding: 24px 30px 32px;
}

.accounting-header {
    align-items: flex-start;
    margin-bottom: 18px;
}

.accounting-header h1 {
    color: #101828;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.18;
    margin-bottom: 7px;
}

.accounting-header p {
    color: #667085;
    font-size: 13px;
    font-weight: 400;
}

.accounting-header-actions {
    gap: 10px;
}

.accounting-header-actions .period-select,
.accounting-header-actions .secondary-action,
.accounting-header-actions .new-order-button {
    align-items: center;
    border-color: #d0d5dd;
    border-radius: 7px;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 600;
    gap: 8px;
    height: 40px;
    justify-content: center;
}

.accounting-header-actions .period-select {
    background: #fff;
    border: 1px solid #d0d5dd;
    padding: 0 10px;
    width: 142px;
}

.accounting-header-actions .period-select select {
    border: 0;
    color: #101828;
    font-size: 12.5px;
    font-weight: 600;
    outline: 0;
    width: 100%;
}

.accounting-header-actions .secondary-action {
    background: #fff;
    color: #101828;
    padding: 0 16px;
    width: 142px;
}

.accounting-header-actions .new-order-button {
    padding: 0 16px;
    width: 135px;
}

.accounting-header-actions .app-icon {
    height: 16px;
    width: 16px;
}

.accounting-sidebar .side-item span {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.accounting-sidebar .side-item .app-icon {
    height: 15px;
    width: 15px;
}

.accounting-sidebar .side-item strong {
    font-size: 13px;
    font-weight: 500;
}

.accounting-sidebar .side-item.quick em {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    height: 20px;
    justify-content: center;
    min-width: 22px;
    padding: 0 7px;
}

.accounting-sidebar .side-item.quick em .app-icon {
    height: 13px;
    width: 13px;
}

.accounting-kpi-grid {
    gap: 14px;
    margin-bottom: 14px;
    min-width: 1080px;
}

.accounting-kpi-card {
    align-items: center;
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: none;
    grid-template-columns: minmax(0, 1fr) 104px;
    min-height: 112px;
    padding: 16px;
}

.accounting-kpi-copy {
    gap: 13px;
    grid-template-columns: 42px minmax(0, 1fr);
}

.accounting-kpi-icon {
    border-radius: 10px;
    height: 40px;
    width: 40px;
}

.accounting-kpi-icon .app-icon {
    height: 19px;
    width: 19px;
}

.icon-blue { background: var(--brand-blue-soft); color: var(--brand-blue); }
.icon-red { background: #fee4e2; color: #d92d20; }
.icon-green { background: #dcfae6; color: #039855; }
.icon-purple { background: #f4ebff; color: #7f56d9; }
.icon-amber { background: #fff6e5; color: #dc6803; }
.icon-neutral { background: #f2f4f7; color: #475467; }

.accounting-kpi-copy p {
    color: #475467;
    font-size: 11.5px;
    font-weight: 550;
    margin-bottom: 5px;
}

.accounting-kpi-copy strong {
    color: #101828;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.08;
    margin-bottom: 7px;
}

.kpi-state-red .accounting-kpi-copy strong {
    color: #7a271a;
}

.accounting-kpi-copy em {
    color: #667085;
    display: block;
    font-size: 10.8px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.35;
}

.kpi-state-red .accounting-kpi-copy em {
    color: #d92d20;
}

.sparkline {
    height: 36px;
    overflow: visible;
    width: 104px;
}

.spark-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.spark-fill {
    opacity: .075;
}

.sparkline-blue .spark-line,
.sparkline-blue .spark-fill { stroke: var(--brand-blue); fill: var(--brand-blue); }
.sparkline-red .spark-line,
.sparkline-red .spark-fill { stroke: #d92d20; fill: #d92d20; }
.sparkline-green .spark-line,
.sparkline-green .spark-fill { stroke: #039855; fill: #039855; }
.sparkline-purple .spark-line,
.sparkline-purple .spark-fill { stroke: #7f56d9; fill: #7f56d9; }
.sparkline-neutral .spark-line,
.sparkline-neutral .spark-fill { stroke: #667085; fill: #667085; }

.accounting-analytics-grid {
    gap: 14px;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .86fr) minmax(250px, .72fr);
    margin-bottom: 14px;
    min-width: 1080px;
}

.accounting-card {
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: none;
    height: 270px;
    padding: 16px;
}

.accounting-card h2,
.accounting-card header h2 {
    color: #101828;
    font-size: 13.5px;
    font-weight: 600;
}

.accounting-card header select {
    border-color: #d0d5dd;
    border-radius: 7px;
    color: #101828;
    font-size: 11px;
    font-weight: 500;
    height: 32px;
    padding: 0 10px;
}

.rev-chart {
    gap: 5px;
    grid-template-rows: 22px 178px 18px;
    height: 224px;
    margin-top: 8px;
}

.rev-legend {
    color: #475467;
    font-size: 10.5px;
    font-weight: 500;
    gap: 16px;
}

.rev-legend em {
    height: 7px;
    width: 7px;
}

.rev-chart svg {
    height: 178px;
}

.health-grid line {
    stroke: #eef1f4;
    stroke-width: 1;
}

.health-grid text {
    fill: #667085;
    font-size: 10px;
    font-weight: 400;
}

.rev-bar {
    fill: var(--brand-blue);
}

.rev-line {
    fill: none;
    stroke: #d92d20;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.rev-point {
    fill: #fff;
    stroke: #d92d20;
    stroke-width: 2;
}

.rev-axis {
    color: #667085;
    font-size: 10.5px;
    font-weight: 400;
}

.expense-breakdown-body {
    gap: 13px;
    grid-template-columns: 140px minmax(0, 1fr);
    margin-top: 14px;
}

.expense-donut {
    height: 138px;
    width: 138px;
}

.expense-donut::after {
    height: 82px;
    width: 82px;
}

.expense-donut strong {
    color: #101828;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
}

.expense-donut span {
    color: #475467;
    font-size: 10px;
    font-weight: 600;
}

.expense-slices {
    gap: 9px;
}

.expense-slices button {
    color: #101828;
    font-size: 11px;
    gap: 7px;
    grid-template-columns: 8px minmax(72px, 1fr) auto 38px;
}

.expense-slices button:hover strong {
    color: var(--brand-blue);
}

.expense-slices strong {
    font-weight: 550;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-slices em {
    color: #344054;
    font-size: 10.5px;
    font-weight: 550;
}

.expense-slices small {
    color: #667085;
    font-size: 10.5px;
    font-weight: 500;
    text-align: right;
}

.dot-blue { background: var(--brand-blue); }
.dot-green { background: #039855; }
.dot-purple { background: #7f56d9; }
.dot-amber { background: #dc6803; }
.dot-violet { background: #c11574; }

.view-details {
    align-items: center;
    border-color: #eaecf0;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    font-size: 11px;
    font-weight: 500;
    gap: 6px;
    height: 32px;
    justify-content: center;
    margin-top: 14px;
}

.view-details .app-icon {
    height: 13px;
    width: 13px;
}

.cash-card {
    height: 270px;
}

.cash-list {
    gap: 0;
    margin-top: 14px;
}

.cash-list p {
    border: 0;
    border-bottom: 1px solid #f2f4f7;
    border-radius: 0;
    color: #475467;
    font-size: 11px;
    font-weight: 500;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 8px 0;
}

.cash-list p:last-child {
    border-bottom: 0;
}

.cash-list strong {
    color: #101828;
    font-size: 11.8px;
    font-weight: 600;
}

.cash-icon {
    height: 28px;
    width: 28px;
}

.cash-icon .app-icon {
    height: 14px;
    width: 14px;
}

.accounting-insights {
    gap: 14px;
    margin-bottom: 14px;
    min-width: 1080px;
}

.accounting-insight {
    border-color: #eaecf0;
    border-radius: 10px;
    box-shadow: none;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    min-height: 76px;
    padding: 13px 14px;
}

.accounting-insight:hover {
    background: #fafcff;
}

.insight-icon {
    border-radius: 10px;
    height: 34px;
    width: 34px;
}

.insight-icon .app-icon {
    height: 17px;
    width: 17px;
}

.accounting-insight p {
    color: #667085;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 3px;
}

.accounting-insight strong {
    color: #101828;
    font-size: 16px;
    font-weight: 650;
}

.accounting-insight em {
    color: #667085;
    font-size: 10.5px;
    font-weight: 400;
}

.accounting-insight b {
    color: #98a2b3;
    display: inline-flex;
}

.accounting-insight:hover b {
    color: var(--brand-blue);
}

.accounting-insight b .app-icon {
    height: 15px;
    width: 15px;
}

.accounting-ledger-surface {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    min-width: 1080px;
    overflow: hidden;
}

.accounting-filters {
    border-bottom: 1px solid #eaecf0;
    gap: 10px;
    grid-template-columns: minmax(320px, 1.9fr) 120px 150px 170px 170px 125px;
    margin-bottom: 0;
    min-width: 0;
    padding: 12px;
}

.accounting-filters label,
.accounting-filters .more-filters {
    border-color: #d0d5dd;
    border-radius: 7px;
    height: 38px;
}

.accounting-filters .search-field {
    align-items: center;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
}

.accounting-filters .search-field .app-icon {
    color: #667085;
    height: 16px;
    margin-left: 11px;
    width: 16px;
}

.accounting-filters select,
.accounting-filters input {
    color: #101828;
    font-size: 11.8px;
    font-weight: 500;
    padding: 0 11px;
}

.accounting-filters input::placeholder {
    color: #667085;
    font-weight: 400;
}

.accounting-filters .more-filters {
    align-items: center;
    background: #fff;
    color: #344054;
    display: inline-flex;
    font-size: 11.8px;
    font-weight: 500;
    gap: 8px;
    justify-content: center;
}

.accounting-filters .more-filters .app-icon {
    height: 15px;
    width: 15px;
}

.accounting-more {
    border-color: #eaecf0;
    border-radius: 9px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .1);
    gap: 10px;
    top: 58px;
}

.accounting-more span {
    font-size: 10.5px;
    font-weight: 500;
}

.transaction-table {
    border: 0;
    border-radius: 0;
    min-width: 0;
    overflow: visible;
}

.transaction-grid {
    grid-template-columns: 135px 155px 185px 126px 104px 90px 120px 130px 112px 98px 46px;
}

.transaction-header {
    background: #fcfcfd;
    border-bottom-color: #eaecf0;
    color: #667085;
    font-size: 10.5px;
    font-weight: 600;
    height: 38px;
    padding: 0 12px;
}

.transaction-row {
    border-bottom-color: #f2f4f7;
    color: #475467;
    font-size: 11.5px;
    font-weight: 400;
    min-height: 47px;
    padding: 7px 12px;
}

.transaction-row:hover {
    background: #fafcff;
}

.transaction-number {
    color: #101828;
    font-size: 11.5px;
    font-weight: 600;
}

.transaction-description {
    color: #101828;
    font-size: 11.5px;
    font-weight: 500;
}

.transaction-counterparty,
.transaction-category,
.transaction-method,
.transaction-date {
    color: #475467;
    font-size: 11px;
    font-weight: 400;
}

.transaction-order {
    color: var(--brand-blue);
    font-size: 11px;
    font-weight: 550;
}

.transaction-order.muted {
    color: #667085;
    font-weight: 400;
}

.amount {
    font-size: 11.5px;
    font-weight: 600;
}

.amount-revenue { color: #039855; }
.amount-expense { color: #d92d20; }
.amount-refund { color: #b42318; }
.amount-adjustment { color: #7f56d9; }

.accounting-type,
.accounting-status {
    border-radius: 999px;
    font-size: 10px;
    font-weight: 550;
    min-height: 22px;
    padding: 0 8px;
}

.type-revenue { background: #ecfdf3; color: #027a48; }
.type-expense { background: #fef3f2; color: #b42318; }
.type-refund { background: #f4ebff; color: #6941c6; }
.type-adjustment { background: var(--brand-blue-soft); color: #175cd3; }
.status-posted { background: #ecfdf3; color: #027a48; }
.status-reconciled { background: var(--brand-blue-soft); color: #175cd3; }
.status-pending { background: #fff6e5; color: #b54708; }
.status-voided { background: #f2f4f7; color: #475467; }

.transaction-row .icon-action {
    align-items: center;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 6px;
    color: #344054;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.transaction-row .icon-action:hover {
    background: #f8fafc;
}

.transaction-row .icon-action .app-icon {
    height: 15px;
    width: 15px;
}

.transaction-table .orders-footer {
    border-top: 1px solid #eaecf0;
    min-height: 52px;
    padding: 0 12px;
}

.transaction-detail-modal,
.add-expense-modal {
    border: 1px solid #eaecf0;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .2);
    padding: 0;
}

.transaction-detail-modal header,
.add-expense-modal header {
    border-bottom: 1px solid #eaecf0;
    min-height: 58px;
    padding: 0 18px;
}

.transaction-detail-modal h2,
.add-expense-modal h2 {
    color: #101828;
    font-size: 18px;
    font-weight: 650;
    margin: 0;
}

.transaction-detail-modal header button,
.add-expense-modal header button {
    align-items: center;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.transaction-detail-modal header button .app-icon,
.add-expense-modal header button .app-icon {
    height: 18px;
    width: 18px;
}

.transaction-detail-modal p {
    color: #475467;
    font-size: 12.5px;
    margin: 12px 18px;
}

.expense-form {
    gap: 12px;
    margin: 16px 18px 0;
}

.expense-form span {
    color: #475467;
    font-size: 11px;
    font-weight: 500;
}

.expense-form input,
.expense-form select,
.expense-form textarea {
    border-color: #d0d5dd;
    border-radius: 7px;
    color: #101828;
    font-size: 12px;
    min-height: 38px;
}

.add-expense-modal footer {
    border-top: 1px solid #eaecf0;
    margin-top: 16px;
    padding: 14px 18px;
}

.add-expense-modal footer button {
    border-color: #d0d5dd;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    height: 38px;
}

@media (max-width: 1500px) {
    .orders-main {
        padding-left: 28px;
        padding-right: 28px;
    }

    .orders-main-header {
        grid-template-columns: minmax(280px, 1fr) minmax(600px, 680px);
    }

    .header-actions {
        gap: 12px;
    }

    .kpi-item {
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .kpi-item span {
        font-size: 10px;
    }

    .kpi-item strong {
        font-size: 16px;
    }

    .new-order-button {
        min-width: 124px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .accounting-main {
        padding-left: 28px;
        padding-right: 28px;
    }

    .accounting-kpi-grid,
    .accounting-analytics-grid,
    .accounting-insights,
    .accounting-ledger-surface {
        min-width: 1060px;
    }

    .accounting-card {
        height: 258px;
    }

    .rev-chart {
        grid-template-rows: 20px 166px 18px;
        height: 212px;
    }

    .rev-chart svg {
        height: 166px;
    }

    .cash-card {
        height: 258px;
    }

    .expense-breakdown-body {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .expense-donut {
        height: 128px;
        width: 128px;
    }

    .expense-donut::after {
        height: 78px;
        width: 78px;
    }

    .transaction-grid {
        grid-template-columns: 126px 145px 165px 116px 96px 82px 112px 118px 102px 90px 42px;
    }
}

/* Overlay layering guard: Leaflet ships high z-index panes/controls. */
.dispatch-map-card,
.dispatch-map {
    isolation: isolate;
    position: relative;
    z-index: 0;
}

.dispatch-map .leaflet-pane,
.dispatch-map .leaflet-top,
.dispatch-map .leaflet-bottom,
.dispatch-map .leaflet-control {
    z-index: 1 !important;
}

.dispatch-map .leaflet-popup-pane {
    z-index: 2 !important;
}

.modal-backdrop,
.journey-overlay {
    z-index: 5000;
}

.modal-backdrop > *,
.journey-overlay > * {
    position: relative;
    z-index: 5001;
}

.order-modal-backdrop {
    align-items: center;
    justify-content: center;
}

.order-detail-modal {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.22);
    color: #101828;
    display: grid;
    max-height: calc(100vh - 56px);
    overflow: hidden;
    width: min(760px, calc(100vw - 40px));
}

.order-edit-modal {
    width: min(1120px, calc(100vw - 40px));
}

.order-detail-modal header,
.order-detail-modal footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 18px 22px;
}

.order-detail-modal header {
    border-bottom: 1px solid #eaecf0;
}

.order-detail-modal header span,
.order-modal-summary span,
.order-edit-grid label > span,
.order-edit-items h3,
.order-modal-items h3 {
    color: #667085;
    font-size: 11px;
    font-weight: 650;
}

.order-detail-modal h2 {
    color: #101828;
    font-size: 22px;
    line-height: 1.2;
    margin: 3px 0 0;
}

.order-detail-modal header button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.order-detail-modal header button:hover {
    background: #f2f4f7;
}

.order-detail-modal footer {
    border-top: 1px solid #eaecf0;
    gap: 10px;
    justify-content: flex-end;
}

.order-detail-modal footer button {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #344054;
    font-size: 12.5px;
    font-weight: 700;
    height: 38px;
    padding: 0 14px;
}

.order-detail-modal footer .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.order-modal-loading,
.order-modal-body,
.order-edit-modal > .validation-panel,
.order-edit-grid,
.order-edit-items,
.order-detail-modal .order-modal-totals {
    margin-left: 22px;
    margin-right: 22px;
}

.order-modal-loading {
    color: #667085;
    font-size: 13px;
    padding: 28px 0;
}

.order-modal-body {
    overflow-y: auto;
    padding: 18px 0;
}

.order-modal-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-modal-summary > div {
    border: 1px solid #eaecf0;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 12px;
}

.order-modal-summary strong {
    color: #101828;
    font-size: 13px;
    font-weight: 750;
}

.order-modal-summary em {
    color: #667085;
    font-size: 11.5px;
    font-style: normal;
}

.emergency-banner {
    align-items: center;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
    color: #b42318;
    display: flex;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    margin-top: 12px;
    padding: 10px 12px;
}

.order-modal-items,
.order-edit-items {
    margin-top: 18px;
}

.order-modal-items h3,
.order-edit-items h3 {
    margin: 0 0 8px;
}

.order-modal-item,
.order-edit-item {
    align-items: center;
    border-top: 1px solid #f2f4f7;
    display: grid;
    gap: 10px;
    min-height: 48px;
    padding: 8px 0;
}

.order-modal-item {
    grid-template-columns: 28px minmax(0, 1fr) 90px 70px 110px;
}

.order-modal-item > div {
    display: grid;
    min-width: 0;
}

.order-modal-item strong,
.order-modal-item em,
.order-modal-item span,
.order-modal-item b {
    font-size: 12px;
}

.order-modal-item strong {
    color: #101828;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-modal-item em,
.order-modal-item span {
    color: #667085;
    font-style: normal;
}

.order-modal-item b {
    color: #101828;
    justify-self: end;
}

.order-modal-totals {
    border-top: 1px solid #eaecf0;
    display: grid;
    gap: 8px;
    margin-top: 16px !important;
    padding-top: 14px;
}

.order-modal-totals div {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.order-modal-totals span {
    color: #667085;
    font-size: 12px;
}

.order-modal-totals strong {
    color: #101828;
    font-size: 13px;
}

.order-modal-totals .grand-total {
    background: #f5f8ff;
    border-radius: 8px;
    margin-top: 4px;
    padding: 12px;
}

.order-modal-totals .grand-total strong {
    font-size: 18px;
}

.order-edit-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 18px;
}

.order-edit-grid label {
    display: grid;
    gap: 6px;
}

.order-edit-grid input,
.order-edit-grid select,
.order-edit-item input,
.order-edit-item select,
.turnaround-edit-control input {
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #101828;
    font-size: 12.5px;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
}

.turnaround-edit-control {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.turnaround-edit-control button {
    align-items: center;
    background: #f5f8ff;
    border: 1px solid #c7d7fe;
    border-radius: 7px;
    color: var(--blue);
    display: inline-flex;
    font-weight: 850;
    height: 38px;
    justify-content: center;
}

.order-edit-check {
    align-content: center;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    grid-template-columns: 16px minmax(0, 1fr);
    min-height: 58px;
    padding: 0 12px;
}

.order-edit-check input {
    height: 16px;
    padding: 0;
}

.order-edit-check.emergency {
    border-color: #fecdca;
    color: #b42318;
}

.order-edit-items {
    overflow-x: auto;
    padding-bottom: 4px;
}

.order-edit-items-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-edit-items-title h3 {
    margin: 0;
}

.order-edit-items-title button {
    align-items: center;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
}

.order-edit-head,
.order-edit-item {
    grid-template-columns: 130px minmax(170px, 1.1fr) minmax(190px, 1.1fr) 120px 118px 130px 34px;
    min-width: 900px;
}

.order-edit-head {
    color: #475467;
    font-size: 11px;
    font-weight: 750;
    padding: 0 0 6px;
}

.order-edit-item {
    padding: 8px 0;
}

@media (max-width: 760px) {
    .order-modal-summary,
    .order-edit-grid,
    .order-modal-item,
    .order-edit-item {
        grid-template-columns: 1fr;
    }
}

.workspace-main {
    min-height: calc(100vh - 64px);
    padding: 28px 36px 36px;
}

.workspace-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.workspace-header h1 {
    color: #101828;
    font-size: 28px;
    line-height: 1.15;
    margin: 0 0 6px;
}

.workspace-header p {
    color: #667085;
    font-size: 13px;
    margin: 0;
}

.workspace-actions {
    display: flex;
    gap: 10px;
}

.workspace-actions button,
.workspace-panel header button,
.stock-row button {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #344054;
    display: inline-flex;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    height: 38px;
    padding: 0 13px;
}

.workspace-actions .primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.workspace-kpis {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.workspace-kpi {
    align-items: center;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 9px;
    display: grid;
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 102px;
    padding: 16px;
}

.workspace-kpi > span {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.workspace-kpi small,
.workspace-kpi em {
    color: #667085;
    display: block;
    font-size: 11.5px;
    font-style: normal;
}

.workspace-kpi strong {
    color: #101828;
    display: block;
    font-size: 24px;
    line-height: 1.15;
    margin: 3px 0;
}

.kpi-blue > span { background: var(--brand-blue-soft); color: var(--blue); }
.kpi-green > span { background: #ecfdf3; color: #039855; }
.kpi-amber > span { background: #fffaeb; color: #dc6803; }
.kpi-red > span { background: #fef3f2; color: #d92d20; }
.kpi-purple > span { background: #f4f3ff; color: #7a5af8; }

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1.05fr .95fr;
}

.workspace-panel {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 9px;
    padding: 16px;
}

.workspace-panel.wide {
    grid-column: span 2;
}

.workspace-panel header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.workspace-panel h2 {
    color: #101828;
    font-size: 15px;
    margin: 0;
}

.queue-list,
.alert-list,
.activity-list {
    display: grid;
    gap: 8px;
}

.queue-item,
.dashboard-alert {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 68px;
    padding: 12px;
    text-align: left;
}

.queue-item span,
.dashboard-alert span {
    color: #667085;
    font-size: 12px;
}

.queue-item strong,
.dashboard-alert strong {
    color: #101828;
    font-size: 20px;
}

.queue-item em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
}

.queue-red,
.alert-red { border-color: #fecdca; background: #fffafa; }
.queue-amber,
.alert-amber { border-color: #fedf89; background: #fffcf5; }
.queue-green,
.alert-green { border-color: #abefc6; background: #f6fef9; }
.queue-purple { border-color: #d9d6fe; background: #fbfaff; }
.queue-blue { border-color: #b2ccff; background: #f5f8ff; }

.mini-bars {
    align-items: end;
    border-top: 1px solid #eaecf0;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 178px;
    padding-top: 18px;
}

.mini-bars div {
    align-items: end;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr 1fr;
}

.mini-bars em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
    grid-column: span 2;
    justify-self: center;
}

.bar {
    border-radius: 5px 5px 0 0;
    display: block;
    min-height: 12px;
}

.bar.revenue { background: var(--blue); }
.bar.expense { background: #ef4444; }

.activity-item {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 10px minmax(0, 1fr);
    min-height: 42px;
}

.activity-item > span {
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

.activity-blue > span { background: var(--blue); }
.activity-red > span { background: #ef4444; }

.activity-item strong,
.activity-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-item strong {
    color: #101828;
    font-size: 12.5px;
}

.activity-item em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
}

.empty-state {
    color: #667085;
    font-size: 12.5px;
    padding: 14px 0;
}

/* Dashboard */
.dashboard-workspace {
    background: #f7f9fc;
    color: #14243b;
    padding: 30px clamp(18px, 2.6vw, 42px) 42px;
}

.dashboard-heading { margin-bottom: 24px; }
.dashboard-eyebrow { color: var(--brand-blue); font-size: 10px; font-weight: 800; }
.dashboard-heading h1 { margin-top: 5px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dashboard-tone-blue { --dashboard-accent: var(--brand-blue); --dashboard-soft: var(--brand-blue-soft); }
.dashboard-tone-green { --dashboard-accent: #079455; --dashboard-soft: #e8f7ef; }
.dashboard-tone-red { --dashboard-accent: #e14141; --dashboard-soft: #fff0f0; }
.dashboard-tone-amber { --dashboard-accent: #df870a; --dashboard-soft: #fff5e6; }
.dashboard-tone-purple { --dashboard-accent: #7856cc; --dashboard-soft: #f2edff; }
.dashboard-kpi {
    min-width: 0;
    min-height: 158px;
    padding: 17px 18px 15px;
    background: #fff;
    border: 1px solid #dfe6ef;
    border-top: 3px solid var(--dashboard-accent);
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.dashboard-kpi:hover { border-color: var(--dashboard-accent); box-shadow: 0 7px 20px #213e6512; transform: translateY(-2px); }
.dashboard-kpi:focus-visible, .dashboard-surface a:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.dashboard-kpi-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 31px; color: #52627a; font-size: 12px; font-weight: 700; }
.dashboard-kpi-icon { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; background: var(--dashboard-soft); border-radius: 6px; color: var(--dashboard-accent); }
.dashboard-kpi-icon .app-icon { width: 17px; height: 17px; }
.dashboard-kpi > strong { display: block; margin-top: 4px; color: #101d33; font-size: 29px; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.dashboard-kpi-detail { color: #62738b; font-size: 11px; line-height: 1.35; }
.dashboard-kpi-link { color: var(--dashboard-accent); font-size: 11px; font-weight: 750; margin-top: auto; padding-top: 10px; }
.dashboard-content { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, 1fr); gap: 16px; align-items: stretch; }
.dashboard-surface { min-width: 0; background: #fff; border: 1px solid #dfe6ef; border-radius: 7px; padding: 20px; }
.dashboard-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dashboard-section-head h2 { color: #14243b; font-size: 16px; line-height: 1.25; margin: 0 0 4px; }
.dashboard-section-head p { color: #738197; font-size: 11.5px; margin: 0; }
.dashboard-section-head a { color: var(--brand-blue); font-size: 11.5px; font-weight: 750; text-decoration: none; white-space: nowrap; padding-top: 3px; }
.dashboard-section-head a:hover { text-decoration: underline; }
.dashboard-pipeline-list { display: grid; }
.dashboard-pipeline-row { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto minmax(75px, 24%); align-items: center; gap: 13px; min-height: 61px; padding: 8px 0; color: inherit; text-decoration: none; border-top: 1px solid #edf1f5; }
.dashboard-pipeline-row:hover .dashboard-pipeline-copy strong { color: var(--brand-blue); }
.dashboard-pipeline-marker { width: 7px; height: 30px; border-radius: 4px; background: var(--dashboard-accent); }
.dashboard-pipeline-copy { min-width: 0; display: grid; gap: 3px; }
.dashboard-pipeline-copy strong { font-size: 12.5px; font-weight: 750; }
.dashboard-pipeline-copy small { color: #738197; font-size: 10.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dashboard-pipeline-count { color: #14243b; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-pipeline-track { height: 7px; border-radius: 7px; background: #edf1f5; overflow: hidden; }
.dashboard-pipeline-track > span { display: block; height: 100%; border-radius: inherit; background: var(--dashboard-accent); }
.dashboard-attention-count { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: #b42318; background: #fff0f0; font-size: 12px; font-weight: 800; }
.dashboard-attention-list { display: grid; }
.dashboard-attention-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 67px; padding: 11px 0; border-top: 1px solid #edf1f5; color: inherit; text-decoration: none; }
.dashboard-attention-row:hover strong { color: var(--brand-blue); }
.dashboard-attention-dot, .dashboard-activity-dot { width: 8px; height: 8px; background: var(--dashboard-accent); border-radius: 50%; }
.dashboard-attention-row strong, .dashboard-attention-row small { display: block; }
.dashboard-attention-row strong { font-size: 12.5px; margin-bottom: 4px; }
.dashboard-attention-row small { color: #738197; font-size: 11px; }
.dashboard-attention-arrow { color: #8493aa; font-size: 17px; }
.dashboard-attention-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 165px; gap: 6px; color: #738197; font-size: 11.5px; }
.dashboard-attention-empty .app-icon { color: #079455; width: 26px; height: 26px; }
.dashboard-attention-empty strong { color: #14243b; font-size: 13px; }
.dashboard-chart-legend { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; color: #52627a; font-size: 11px; }
.dashboard-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.dashboard-chart-legend i.revenue { background: var(--brand-blue); }
.dashboard-chart-legend i.expense { background: #26a477; }
.dashboard-chart-legend em { margin-left: auto; font-style: normal; color: #8996a8; }
.dashboard-chart { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; height: 190px; }
.dashboard-chart-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 0 0 20px; color: #8996a8; font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.dashboard-chart-plot { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.dashboard-chart-grid { position: absolute; z-index: 0; inset: 0 0 20px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.dashboard-chart-grid span { border-top: 1px solid #edf1f5; }
.dashboard-chart-month { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; }
.dashboard-chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0; }
.dashboard-chart-bar { width: min(28%, 30px); min-width: 5px; border-radius: 3px 3px 0 0; }
.dashboard-chart-bar.revenue { background: var(--brand-blue); }
.dashboard-chart-bar.expense { background: #26a477; }
.dashboard-chart-label { height: 20px; display: grid; place-items: end center; color: #738197; font-size: 10.5px; }
.dashboard-activity-list { display: grid; }
.dashboard-activity-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 45px; border-top: 1px solid #edf1f5; }
.dashboard-activity-row > div { min-width: 0; display: grid; gap: 2px; }
.dashboard-activity-row strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-activity-row div > span { color: #738197; font-size: 10.5px; }
.dashboard-activity-row time { color: #738197; font-size: 10px; white-space: nowrap; }
@media (max-width: 1050px) {
    .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-content { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .dashboard-workspace { padding: 18px 14px 26px; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
    .dashboard-heading h1 { font-size: 24px; }
    .dashboard-kpis { gap: 8px; }
    .dashboard-kpi { min-height: 150px; padding: 12px; }
    .dashboard-kpi > strong { font-size: 25px; }
    .dashboard-kpi-heading { font-size: 11px; }
    .dashboard-surface { padding: 15px; }
    .dashboard-pipeline-row { grid-template-columns: 6px minmax(0, 1fr) auto; gap: 9px; }
    .dashboard-pipeline-track { display: none; }
    .dashboard-activity-row { grid-template-columns: 8px minmax(0, 1fr); }
    .dashboard-activity-row time { grid-column: 2; margin-top: -6px; margin-bottom: 7px; }
}
@media (max-width: 380px) { .dashboard-kpis { grid-template-columns: 1fr; } }

.stock-toolbar {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, 1fr) 180px 180px;
    margin-bottom: 14px;
}

.stock-toolbar label {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr);
    height: 42px;
    padding: 0 12px;
}

.stock-toolbar input,
.stock-toolbar select {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #101828;
    font-size: 12.5px;
    height: 42px;
    min-width: 0;
    padding: 0 12px;
}

.stock-toolbar label input {
    border: 0;
    height: 38px;
    padding: 0;
}

.stock-table {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 9px;
    overflow: hidden;
}

.stock-row {
    align-items: center;
    border-top: 1px solid #f2f4f7;
    display: grid;
    gap: 10px;
    grid-template-columns: 130px minmax(150px, 1fr) 90px 110px 78px 78px 100px minmax(130px, 1fr) 72px;
    min-height: 52px;
    padding: 0 14px;
}

.stock-head {
    background: #f8fafc;
    border-top: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 750;
    min-height: 40px;
}

.stock-row strong,
.stock-row span,
.stock-row b {
    font-size: 12px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-row strong {
    color: #101828;
}

.stock-row span {
    color: #344054;
}

.stock-ok { color: #039855; }
.stock-low { color: #dc6803; }
.stock-zero { color: #d92d20; }

.stock-editor-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.22);
    width: min(720px, calc(100vw - 40px));
}

.stock-editor-modal header,
.stock-editor-modal footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 18px 22px;
}

.stock-editor-modal header {
    border-bottom: 1px solid #eaecf0;
}

.stock-editor-modal h2 {
    font-size: 20px;
    margin: 0;
}

.stock-editor-modal header button {
    background: transparent;
    border: 0;
    color: #344054;
}

.stock-editor-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 18px 22px;
}

.stock-editor-grid label {
    display: grid;
    gap: 6px;
}

.stock-editor-grid label span {
    color: #667085;
    font-size: 11px;
    font-weight: 650;
}

.stock-editor-grid input,
.stock-editor-grid select {
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
}

.stock-active-check {
    align-content: center;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    grid-template-columns: 16px minmax(0, 1fr);
    min-height: 58px;
    padding: 0 12px;
}

.stock-active-check input {
    height: 16px;
    padding: 0;
}

.stock-editor-modal footer {
    border-top: 1px solid #eaecf0;
    gap: 10px;
    justify-content: flex-end;
}

.stock-editor-modal footer button {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    height: 38px;
    padding: 0 14px;
}

.stock-editor-modal footer .confirm {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

@media (max-width: 1100px) {
    .workspace-kpis,
    .dashboard-grid,
    .stock-toolbar {
        grid-template-columns: 1fr;
    }

    .workspace-panel.wide {
        grid-column: auto;
    }

    .stock-table {
        overflow-x: auto;
    }

    .stock-row {
        min-width: 1040px;
    }

    .stock-editor-grid {
        grid-template-columns: 1fr;
    }
}
#blazor-error-ui{display:none;position:fixed;bottom:0;left:0;right:0;padding:12px 20px;background:#fff3cd;color:#362b05;z-index:2000;box-shadow:0 -2px 8px #0002}
#components-reconnect-modal{display:none;position:fixed;bottom:16px;left:50%;transform:translateX(-50%);max-width:min(92vw,520px);padding:10px 16px;border:1px solid #cbd8ee;border-radius:6px;background:#fff;color:#18305c;box-shadow:0 8px 24px #001b4426;z-index:3000;text-align:center}
#components-reconnect-modal.components-reconnect-show,#components-reconnect-modal.components-reconnect-retrying,#components-reconnect-modal.components-reconnect-failed,#components-reconnect-modal.components-reconnect-rejected{display:block}
.order-id-cell .order-short-code{color:var(--brand-blue);font-weight:700}
/* Invoices and receipts */
.document-workspace,.document-page{background:#f7f9fc;color:#10213b;min-height:calc(100vh - 64px);padding:clamp(20px,3vw,42px)}
.document-workspace{max-width:1600px;margin:auto}.document-workspace-header{display:flex;align-items:end;justify-content:space-between;margin-bottom:24px}
.document-eyebrow{display:block;color:#64748b;font-size:11px;font-weight:750;text-transform:uppercase}
.document-workspace h1{font-size:28px;margin:6px 0}.document-workspace-header p{color:#52627a;margin:0}
.document-search{display:flex;align-items:center;gap:10px;max-width:540px;background:#fff;border:1px solid #d9e1eb;border-radius:6px;padding:0 14px;margin-bottom:20px}
.document-search .app-icon{width:17px;height:17px;color:#53708f}.document-search input{flex:1;min-width:0;border:0;outline:0;height:44px;background:transparent;color:#10213b}
.document-list{background:#fff;border:1px solid #dce4ee;border-radius:6px;overflow:hidden}.document-list-head,.document-list-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(130px,1.2fr) minmax(105px,.8fr) minmax(100px,.8fr) minmax(135px,1fr) minmax(130px,1fr);gap:14px;align-items:center;padding:14px 18px}
.document-list-head{background:#f2f5f9;color:#53647b;font-size:11px;font-weight:750;text-transform:uppercase}.document-list-row{border-top:1px solid #edf1f5;font-size:13px}.document-list-row small{color:#66788e}.document-list-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.document-list-actions a,.document-payment-row a{color:var(--brand-blue);font-weight:700;text-decoration:none}.document-list-actions a:hover,.document-payment-row a:hover{text-decoration:underline}.document-list-actions span{font-size:11px;color:#64748b}.document-empty{padding:28px;color:#64748b}
.document-page{display:flex;flex-direction:column;align-items:center;gap:20px}.document-toolbar{display:flex;align-items:center;justify-content:space-between;width:min(100%,850px);gap:12px}.document-toolbar a,.document-toolbar button{display:inline-flex;align-items:center;gap:8px;text-decoration:none;border:1px solid #cbd5e1;background:#fff;color:#163054;border-radius:6px;padding:10px 13px;font-size:13px;font-weight:700;cursor:pointer}.document-toolbar a:hover,.document-toolbar button:hover{border-color:var(--brand-blue);color:var(--brand-blue)}.document-toolbar .app-icon{width:16px;height:16px}
.document-sheet{width:min(100%,850px);min-height:950px;background:#fff;border:1px solid #dce4ee;box-shadow:0 8px 30px rgba(20,40,70,.06);padding:clamp(24px,4vw,52px);display:flex;flex-direction:column;gap:34px}.document-sheet-header{display:flex;justify-content:space-between;gap:28px;border-bottom:2px solid #10213b;padding-bottom:28px}.document-sheet-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;color:#52627a;font-size:12px}.document-sheet-brand img{width:132px;height:auto;max-height:64px;object-fit:contain;object-position:left center}.document-sheet-title{text-align:right}.document-sheet-title>span{font-size:12px;font-weight:800;color:var(--brand-blue)}.document-sheet-title h1{font-size:25px;margin:4px 0;overflow-wrap:anywhere}.document-sheet-title p{margin:0;color:#64748b;font-size:12px}
.document-sheet-parties{display:grid;grid-template-columns:1fr 1fr;gap:30px}.document-sheet-parties>div{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:13px;overflow-wrap:anywhere}.document-sheet-parties strong{font-size:15px}.document-sheet-parties span:not(.document-eyebrow){color:#52627a}
.document-sheet-lines{width:100%}.document-line-head,.document-line{display:flex;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid #e5eaf0}.document-line-head{color:#64748b;font-size:11px;font-weight:800;border-top:1px solid #e5eaf0}.document-line{font-size:13px}.document-line>div{display:flex;flex-direction:column;gap:4px;min-width:0}.document-line>div span{color:#64748b;overflow-wrap:anywhere}.document-line>strong{white-space:nowrap}
.document-sheet-totals{width:min(100%,330px);align-self:flex-end;font-size:13px}.document-sheet-totals>div{display:flex;justify-content:space-between;gap:15px;padding:9px 0}.document-sheet-total{font-size:16px;font-weight:800;border-top:1px solid #cbd5e1;margin-top:5px}.document-sheet-balance{color:var(--brand-blue);font-weight:800;border-top:2px solid var(--brand-blue)}.document-sheet-note{color:#8a4b0a;background:#fff9ed;padding:12px;font-size:12px}.document-sheet-footer{margin-top:auto;padding-top:18px;border-top:1px solid #dce4ee;display:flex;justify-content:space-between;gap:15px;color:#64748b;font-size:11px}
.document-payments{width:min(100%,850px);background:#fff;border:1px solid #dce4ee;border-radius:6px;padding:24px}.document-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 14px}.document-section-head h2{font-size:17px;margin:0}.document-section-head span,.document-payments p{color:#64748b;font-size:12px}.document-section-head:not(:first-child){margin-top:28px}.document-payment-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:14px;padding:12px 0;border-bottom:1px solid #e5eaf0;font-size:13px}.document-payment-form{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.document-payment-form label{display:flex;flex-direction:column;gap:6px;color:#475569;font-size:12px;font-weight:700}.document-payment-form input,.document-payment-form select{border:1px solid #cbd5e1;border-radius:5px;padding:10px;min-height:39px;color:#10213b;background:#fff}.document-payment-form button{background:var(--brand-blue);color:#fff;border:0;border-radius:5px;padding:10px 14px;min-height:39px;font-weight:700;cursor:pointer}.document-payment-form button:disabled{opacity:.55;cursor:wait}.document-error{color:#bc2c2c!important}.receipt-amount{background:#e8f7ee;border-left:4px solid #149a54;padding:24px;display:flex;justify-content:space-between;align-items:center;gap:18px}.receipt-amount span{font-size:12px;font-weight:800;color:#13653b}.receipt-amount strong{font-size:27px;white-space:nowrap}.receipt-meta>div{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid #e5eaf0}.receipt-meta span{color:#64748b}.receipt-meta strong{overflow-wrap:anywhere;text-align:right}.document-row-link{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid #d0d5dd;border-radius:6px;color:var(--brand-blue);text-decoration:none;background:#fff}.document-row-link .app-icon{width:15px;height:15px}.document-modal-link{color:var(--brand-blue);text-decoration:none;font-weight:700;margin-right:auto}
@media(max-width:850px){.document-list-head{display:none}.document-list-row{grid-template-columns:1fr 1fr}.document-list-row>span:nth-child(3){display:none}.document-payment-form{grid-template-columns:1fr 1fr}.document-payment-form button{grid-column:1/-1}.document-payment-row{grid-template-columns:1fr 1fr}.document-sheet{min-height:0}.document-sheet-header{gap:12px}}
@media(max-width:520px){.document-page,.document-workspace{padding:14px}.document-list-row{gap:8px}.document-sheet{padding:20px;gap:25px}.document-sheet-title h1{font-size:18px}.document-sheet-brand img{width:90px}.document-sheet-parties{grid-template-columns:1fr 1fr;gap:12px}.document-sheet-footer{flex-direction:column}.receipt-amount{flex-direction:column;align-items:flex-start}.receipt-amount strong{font-size:24px}.document-payment-form{grid-template-columns:1fr}}
@media print{.top-nav,.cn-nav,.cn-footer,.document-toolbar,.document-payments,.no-print,#blazor-error-ui{display:none!important}.app-shell,.cn-site,.document-page,.public-document-page{display:block!important;background:#fff!important;min-height:0!important;margin:0!important;padding:0!important}.document-sheet{width:100%!important;min-height:calc(297mm - 24mm)!important;box-shadow:none!important;border:0!important;margin:0!important;padding:0!important;break-inside:avoid}.document-line,.receipt-meta>div{break-inside:avoid}body{background:#fff!important}@page{size:A4;margin:12mm}}
/* Keep every destination reachable as the navigation grows. */
.top-nav .brand-zone{flex:0 0 210px;width:210px}.top-nav .main-nav{flex:1 1 auto;gap:12px;min-width:0;overflow-x:auto;overflow-y:hidden;padding-left:14px;scrollbar-width:thin}.top-nav .nav-entry{flex:0 0 auto;gap:5px;font-size:12px;white-space:nowrap}.top-nav .nav-icon .app-icon{width:15px;height:15px}.top-nav .nav-account{flex:0 0 auto;margin-left:0}
@media(max-width:700px){.top-nav{height:auto;flex-wrap:wrap}.top-nav .brand-zone{flex:1 1 auto;width:auto;min-width:0;height:56px;padding-left:12px}.top-nav .app-brand{height:56px}.top-nav .app-brand-wordmark{font-size:13px}.top-nav .nav-account{height:56px;gap:6px;padding-right:10px}.top-nav .nav-account .user-copy{display:none}.top-nav .main-nav{order:3;flex:0 0 100%;height:47px;border-top:1px solid #e5eaf0;padding-left:10px;padding-right:10px}.top-nav .nav-entry{height:47px}}
/* Team handoff and printable order labels */
.dispatch-header-tools{display:flex;align-items:center;gap:10px}.dispatch-header-tools>a,.driver-portal-link{display:inline-flex;align-items:center;gap:7px;padding:10px 13px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:var(--brand-blue);font-size:13px;font-weight:700;text-decoration:none}.dispatch-header-tools .app-icon{width:16px;height:16px}.order-modal-tracking{display:flex;align-items:center;gap:18px;border-top:1px solid #e5eaf0;padding:18px 0}.order-modal-tracking img{width:112px;height:112px}.order-modal-tracking>div{display:flex;flex-direction:column;gap:5px}.order-modal-tracking strong{font-size:22px;color:#10213b}.order-modal-tracking a{font-size:12px;color:var(--brand-blue);text-decoration:none}
.order-label-page,.workflow-page,.driver-admin-page{min-height:calc(100vh - 64px);background:#f7f9fc;color:#10213b;padding:clamp(18px,3vw,42px)}.order-label-page{display:flex;flex-direction:column;align-items:center;gap:22px}.order-label-toolbar{display:flex;align-items:center;justify-content:space-between;width:min(100%,600px)}.order-label-toolbar a,.order-label-toolbar button{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:var(--brand-blue);text-decoration:none;font-weight:700}.order-label-toolbar .app-icon{width:15px;height:15px}.order-label{width:min(100%,600px);background:#fff;border:1px solid #cbd5e1;padding:32px;display:flex;flex-direction:column;align-items:center;gap:12px;box-shadow:0 8px 24px #182d4412}.order-label-logo{width:148px;height:auto}.order-label-code{font-size:36px;line-height:1.2;color:#10213b}.order-label-qr{width:min(100%,250px);aspect-ratio:1;object-fit:contain}.order-label>span{font-weight:800}.order-label>small{color:#64748b}.order-label-help{text-align:center;color:#64748b}.order-label-help a{color:var(--brand-blue)}
.workflow-page{max-width:1500px;margin:auto}.workflow-page>header{margin-bottom:25px}.workflow-page h1{font-size:26px;margin:4px 0}.workflow-page p{color:#58697e}.workflow-lookup{display:flex;align-items:end;flex-wrap:wrap;gap:10px;padding:18px;border:1px solid #dce4ee;background:#fff;border-radius:6px}.workflow-lookup label{display:grid;gap:5px;font-size:12px;font-weight:700;min-width:190px;flex:1}.workflow-lookup input,.workflow-operator input{height:40px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:5px;min-width:0}.workflow-lookup button,.workflow-image-scan{min-height:40px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:var(--brand-blue);padding:8px 13px;font-weight:700;cursor:pointer}.workflow-lookup button:first-of-type,.workflow-next{background:var(--brand-blue);color:#fff;border-color:var(--brand-blue)}.workflow-image-scan{display:flex!important;align-items:center;justify-content:center;flex:0 0 auto!important;min-width:0!important;margin:0;position:relative;overflow:hidden}.workflow-image-scan input{position:absolute;inset:0;opacity:0;cursor:pointer}.workflow-page #team-qr-scanner{max-width:420px;margin:15px auto}.workflow-order{margin-top:20px;background:#fff;border:1px solid #dce4ee;border-radius:6px;padding:22px}.workflow-order-title{display:flex;justify-content:space-between;gap:20px;align-items:start}.workflow-order-title h2{margin:5px 0;font-size:20px}.workflow-order-title a{color:var(--brand-blue);font-weight:700;text-decoration:none}.workflow-stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:20px 0}.workflow-stages>div{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #dce4ee;border-radius:5px;min-width:0;font-size:12px}.workflow-stages>div.current{border-color:var(--brand-blue);background:var(--brand-blue-soft)}.workflow-stages>div.completed{border-color:#b5dfc5;background:#f0faf3}.workflow-stages strong{font-size:11px;text-transform:uppercase;color:#64748b}.workflow-stages small{overflow-wrap:anywhere}.workflow-operator{display:grid;gap:5px;max-width:280px;font-size:12px;font-weight:700}.workflow-next{border:0;border-radius:5px;padding:10px 16px;font-weight:700;margin-top:12px}.workflow-next:disabled{opacity:.6}
.driver-admin-page{max-width:1100px;margin:auto}.driver-admin-page>header{position:relative}.driver-admin-page>header>a:first-child{display:inline-flex;align-items:center;gap:7px;color:var(--brand-blue);text-decoration:none;font-size:12px}.driver-admin-page>header h1{font-size:27px;margin:10px 0 4px}.driver-admin-page>header p{color:#64748b;max-width:650px}.driver-admin-list{margin-top:20px;background:#fff;border:1px solid #dce4ee;border-radius:6px}.driver-admin-list article{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 20px;border-bottom:1px solid #e5eaf0}.driver-admin-list article:last-child{border:0}.driver-admin-list article>div{display:grid;gap:4px}.driver-admin-list span{font-size:12px;color:#64748b}.driver-admin-list button,.driver-pin-form button{padding:8px 12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:var(--brand-blue);font-weight:700}.driver-pin-form{background:#fff;border:1px solid #dce4ee;border-radius:6px;padding:20px;margin-top:20px}.driver-pin-form h2{font-size:18px}.driver-pin-form p{font-size:12px;color:#64748b}.driver-pin-form label{display:grid;gap:6px;max-width:260px;font-size:12px;font-weight:700}.driver-pin-form input{padding:9px;border:1px solid #cbd5e1;border-radius:5px}.driver-pin-form>div{display:flex;gap:9px;margin-top:16px}.driver-pin-form button.primary{background:var(--brand-blue);color:#fff;border-color:var(--brand-blue)}
.create-dispatch-modal{display:flex;flex-direction:column;max-height:calc(100vh - 32px);border-radius:8px}.create-dispatch-modal header,.create-dispatch-modal footer{flex:0 0 auto}.create-dispatch-body{gap:18px;min-height:0;overflow-y:auto}.dispatch-driver-select{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}.dispatch-driver-select label,.dispatch-driver-fields label{display:grid;gap:6px;margin:0}.dispatch-driver-select span,.dispatch-driver-fields span{color:#34436d;font-size:11px;font-weight:900}.dispatch-driver-select select,.dispatch-driver-fields input{width:100%;min-width:0;height:40px;padding:0 10px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.dispatch-secondary{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 13px;border:1px solid #a8bee0;border-radius:6px;background:#eef5ff;color:var(--brand-blue);font-weight:800}.dispatch-secondary .app-icon{width:16px;height:16px}.dispatch-new-driver{padding:16px 0;border-top:1px solid #dce4ee;border-bottom:1px solid #dce4ee}.dispatch-new-driver p{margin:3px 0 14px;color:#5b6b81;font-size:13px}.dispatch-driver-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.dispatch-code-notice{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border-left:4px solid #0a9b75;background:#eaf8f2;color:#154e3e}.dispatch-code-notice strong{font-size:19px;letter-spacing:0}.dispatch-code-notice small{flex-basis:100%}.dispatch-timing-modes{display:inline-flex;gap:0;margin-bottom:12px;border:1px solid #b9cbe4;border-radius:6px;overflow:hidden}.dispatch-timing-modes button{min-width:100px;padding:8px 15px;border:0;background:#fff;color:#274361;font-weight:800}.dispatch-timing-modes button+button{border-left:1px solid #b9cbe4}.dispatch-timing-modes button.selected{background:var(--brand-blue);color:#fff}.dispatch-timing .create-grid{grid-template-columns:minmax(0,1fr) repeat(2,minmax(100px,140px))}
.driver-balances{margin:18px 0 24px;border-top:1px solid #dce4ee;border-bottom:1px solid #dce4ee;padding:18px 0}.driver-balances-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.driver-balances-heading h2{font-size:18px;margin:0 0 3px}.driver-balances-heading p{margin:0;color:#617188;font-size:13px}.driver-balances-heading>strong{white-space:nowrap;color:#0a765d;font-size:18px}.driver-balances-empty{padding:16px 0;color:#617188;font-size:13px}.driver-balances-list{margin-top:14px;border-top:1px solid #e2e8f0}.driver-balances-list article{display:grid;grid-template-columns:minmax(120px,1fr) minmax(175px,1fr) auto;align-items:center;gap:16px;padding:11px 0;border-bottom:1px solid #e2e8f0}.driver-balances-list article>div{display:grid;gap:2px;min-width:0}.driver-balances-list small{color:#617188;font-size:12px}.driver-balance-amount strong{color:#10213b}.driver-balances-list button,.driver-settlement-fields button{min-height:38px;padding:7px 12px;border:1px solid #aac2e5;border-radius:6px;background:#eef5ff;color:var(--brand-blue);font-weight:800}.driver-settlement-panel{padding:18px 0}.driver-settlement-panel h3{margin:0;font-size:17px}.driver-settlement-panel>p{margin:3px 0 14px;color:#617188}.driver-settlement-panel h4{font-size:14px;margin:16px 0 8px}.driver-settlement-panel .icon-action{border:0;background:transparent}.driver-settlement-fields{display:grid;grid-template-columns:minmax(110px,160px) minmax(120px,150px) minmax(170px,1fr) auto;align-items:end;gap:10px}.driver-settlement-fields label{display:grid;gap:5px;color:#34436d;font-size:12px;font-weight:800}.driver-settlement-fields input,.driver-settlement-fields select{width:100%;min-width:0;height:38px;padding:0 8px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.driver-ledger>div{display:grid;grid-template-columns:145px 85px minmax(0,1fr) 115px;gap:10px;padding:8px 0;border-top:1px solid #e2e8f0;font-size:12px}.driver-ledger b{text-align:right}.driver-ledger small{grid-column:3 / -1;color:#617188}
@media(max-width:760px){.dispatch-driver-select{grid-template-columns:1fr}.dispatch-driver-fields{grid-template-columns:1fr}.dispatch-timing .create-grid{grid-template-columns:1fr}.driver-balances-heading{align-items:start;flex-direction:column}.driver-balances-list article{grid-template-columns:minmax(0,1fr) auto}.driver-balances-list button{grid-column:1 / -1}.driver-settlement-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.driver-settlement-fields label:nth-child(3),.driver-settlement-fields button{grid-column:1 / -1}.driver-ledger>div{grid-template-columns:1fr auto}.driver-ledger small{grid-column:1 / -1}}
@media(max-width:760px){.deliveries-shell{grid-template-columns:minmax(0,1fr)}.deliveries-shell>.delivery-sidebar{display:none}.deliveries-main{padding:16px;overflow-x:hidden}.deliveries-header{flex-direction:column;gap:12px}.dispatch-header-tools{width:100%;justify-content:space-between}.dispatch-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-live-grid{grid-template-columns:minmax(0,1fr)}.dispatch-map-card header{grid-template-columns:minmax(0,1fr) auto}.dispatch-filters{grid-template-columns:minmax(0,1fr)}.dispatch-queue-surface{overflow-x:auto}.dispatch-driver-select{grid-template-columns:1fr}.dispatch-driver-fields{grid-template-columns:1fr}.dispatch-timing .create-grid{grid-template-columns:1fr}.driver-balances-heading{align-items:start;flex-direction:column}.driver-balances-list article{grid-template-columns:minmax(0,1fr) auto}.driver-balances-list button{grid-column:1 / -1}.driver-settlement-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.driver-settlement-fields label:nth-child(3),.driver-settlement-fields button{grid-column:1 / -1}.driver-ledger>div{grid-template-columns:1fr auto}.driver-ledger small{grid-column:1 / -1}}
@media(max-width:700px){.dispatch-header-tools{flex-wrap:wrap}.workflow-stages{grid-template-columns:repeat(2,minmax(0,1fr))}.workflow-order-title{flex-direction:column}.order-label-code{font-size:29px}.order-label{padding:20px}}
@media print{.order-label-page{background:#fff!important;min-height:0!important;padding:0!important}.order-label-toolbar,.order-label-help{display:none!important}.order-label{border:0!important;box-shadow:none!important;width:100mm!important;height:120mm!important;padding:8mm!important;margin:0!important;break-inside:avoid}.order-label-qr{width:66mm!important;height:66mm!important}@page{size:A4;margin:10mm}}
.order-detail-modal .order-modal-tracking{flex:none;border-top:0;border-bottom:1px solid #e5eaf0;padding:16px 22px;background:#fff}
.order-detail-modal .order-modal-tracking img{width:156px;height:156px;flex:none;image-rendering:pixelated}
.order-detail-modal .order-modal-tracking strong{font-size:24px}
@media(max-width:480px){.order-detail-modal .order-modal-tracking{gap:12px;padding:12px}.order-detail-modal .order-modal-tracking img{width:148px;height:148px}}

/* Keep order actions inside the row, then switch to readable cards when the table gets tight. */
.orders-management-shell .orders-main { overflow-x: visible; }
.orders-management-shell .orders-list { min-width: 0; width: 100%; }
.orders-management-shell .order-grid {
    grid-template-columns: 140px 155px minmax(220px, 1fr) 80px 110px 78px 115px 206px;
}
.orders-management-shell .order-id-cell strong { overflow-wrap: anywhere; }
.orders-management-shell .action-cell { gap: 6px; justify-content: flex-end; min-width: 0; }
.orders-management-shell .action-cell > button { flex: 0 0 auto; }
.orders-management-shell .action-cell > a {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    color: #175cd3;
    display: inline-flex;
    flex: 0 0 32px;
    height: 30px;
    justify-content: center;
}
.orders-management-shell .action-cell > a .app-icon { height: 16px; width: 16px; }
.orders-management-shell .action-cell :is(button,a):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 1439px) {
    .orders-management-shell .orders-main-header { grid-template-columns: minmax(0, 1fr); }
    .orders-management-shell .header-actions { grid-template-columns: minmax(0, 1fr) auto; }
    .orders-management-shell .filter-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .orders-management-shell .search-field { grid-column: span 2; }
    .orders-management-shell .orders-header { display: none; }
    .orders-management-shell .order-row.order-grid {
        align-items: start;
        column-gap: 18px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }
    .orders-management-shell .order-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
    .orders-management-shell .order-row > :nth-child(7) { grid-column: 2; grid-row: 1; }
    .orders-management-shell .order-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
    .orders-management-shell .order-row > :nth-child(3) { grid-column: 2; grid-row: 2; }
    .orders-management-shell .order-row > :nth-child(4) { grid-column: 1; grid-row: 3; }
    .orders-management-shell .order-row > :nth-child(5) { grid-column: 2; grid-row: 3; }
    .orders-management-shell .order-row > :nth-child(6) { grid-column: 1; grid-row: 4; }
    .orders-management-shell .order-row > :nth-child(8) { grid-column: 1 / -1; grid-row: 5; }
    .orders-management-shell .order-cell[data-label]::before {
        color: #667085;
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 650;
        margin-bottom: 4px;
        text-transform: uppercase;
    }
    .orders-management-shell .order-cell[data-label] { align-items: flex-start; flex-direction: column; }
    .orders-management-shell .action-cell {
        border-top: 1px solid #eaecf0;
        flex-direction: row !important;
        justify-content: flex-start;
        padding-top: 12px;
    }
    .orders-management-shell .action-cell > button { height: 36px; }
    .orders-management-shell .action-cell > a { height: 36px; }
    .orders-management-shell .order-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; width: 100%; }
    .orders-management-shell .order-tabs button { min-width: 0; padding-inline: 8px; }
}

@media (max-width: 900px) {
    .orders-management-shell { grid-template-columns: minmax(0, 1fr); }
    .orders-management-shell .orders-sidebar {
        border-bottom: 1px solid #eaecf0;
        border-right: 0;
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-height: 0;
        padding: 12px 16px;
    }
    .orders-management-shell .sidebar-section.with-border { border: 0; margin: 0; padding: 0; }
    .orders-management-shell .orders-main { padding: 20px 16px 28px; }
    .orders-management-shell .filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .orders-management-shell .orders-sidebar { display: block; padding: 10px 12px; }
    .orders-management-shell .sidebar-section { display: flex; flex-wrap: wrap; gap: 6px; }
    .orders-management-shell .sidebar-section h2 { flex: 0 0 100%; margin-bottom: 0; }
    .orders-management-shell .sidebar-section .side-item { flex: 1 1 145px; }
    .orders-management-shell .sidebar-section.with-border { border-top: 1px solid #eaecf0; margin-top: 8px; padding-top: 8px; }
    .orders-management-shell .header-actions { grid-template-columns: minmax(0, 1fr); }
    .orders-management-shell .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .orders-management-shell .kpi-item:nth-child(3) { border-left: 0; }
    .orders-management-shell .kpi-item:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .orders-management-shell .new-order-button { justify-content: center; width: 100%; }
    .orders-management-shell .order-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
    .orders-management-shell .order-tabs button { min-height: 44px; }
    .orders-management-shell .filter-toolbar > * { min-width: 0; }
    .orders-management-shell .more-filters { width: 100%; }
    .orders-management-shell .order-row.order-grid { column-gap: 12px; }
    .orders-management-shell .order-row > :nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
    .orders-management-shell .order-row > :nth-child(7) { grid-column: 1 / -1; grid-row: 2; }
    .orders-management-shell .order-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 3; }
    .orders-management-shell .order-row > :nth-child(3) { grid-column: 1 / -1; grid-row: 4; }
    .orders-management-shell .order-row > :nth-child(4) { grid-column: 1; grid-row: 5; }
    .orders-management-shell .order-row > :nth-child(5) { grid-column: 2; grid-row: 5; }
    .orders-management-shell .order-row > :nth-child(6) { grid-column: 1 / -1; grid-row: 6; }
    .orders-management-shell .order-row > :nth-child(8) { grid-column: 1 / -1; grid-row: 7; }
    .orders-management-shell .action-cell { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .orders-management-shell .action-cell > button,
    .orders-management-shell .action-cell > a { min-width: 0; width: 100%; }
    .orders-management-shell .orders-footer { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
    .orders-management-shell .pagination-controls { flex-wrap: wrap; justify-content: center; }
}

/* Operations dashboard */
.dashboard-v2 { background: #f6f8f9; color: #182830; }
.dashboard-v2 .dashboard-heading { margin-bottom: 22px; }
.dashboard-v2 .dashboard-eyebrow { color: #246b63; letter-spacing: 0; }
.dashboard-v2 .dashboard-heading h1 { color: #17262e; }
.dashboard-v2 .dashboard-heading p { color: #66777d; }
.dashboard-v2 .dashboard-heading p span { margin: 0 5px; }
.dashboard-focus { display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(0, 1fr)); min-height: 175px; margin-bottom: 29px; background: #1e3033; border-radius: 6px; color: #f4f7f5; overflow: hidden; }
.dashboard-focus-lead { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 23px 26px; }
.dashboard-focus-label { color: #9fc9c0; font-size: 10px; font-weight: 800; }
.dashboard-focus-lead > div { display: flex; align-items: baseline; gap: 12px; }
.dashboard-focus-lead strong { font-size: 55px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-focus-lead > div span { color: #b4c5c4; font-size: 13px; }
.dashboard-focus-lead a { color: #91dcce; font-size: 12px; font-weight: 750; text-decoration: none; }
.dashboard-focus-stat { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 8px; padding: 23px; border-left: 1px solid #ffffff20; color: inherit; text-decoration: none; }
.dashboard-focus-stat > span { color: #d5e1dc; font-size: 12px; font-weight: 700; }
.dashboard-focus-stat strong { font-size: 33px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-focus-stat small { color: #afbfbd; font-size: 11px; line-height: 1.3; }
.dashboard-focus-overdue strong { color: #ffa89b; }
.dashboard-focus-due strong { color: #f2cb83; }
.dashboard-focus-dispatch strong { color: #92ddca; }
.dashboard-focus-dispatch:hover { background: #ffffff0c; }
.dashboard-metrics-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.dashboard-metrics-heading h2 { margin: 0 0 3px; color: #17262e; font-size: 17px; }
.dashboard-metrics-heading p { margin: 0; color: #697a80; font-size: 12px; }
.dashboard-range { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid #dce4e5; border-radius: 6px; background: #eaf0ef; }
.dashboard-range button { min-height: 30px; padding: 5px 11px; border: 0; border-radius: 4px; background: transparent; color: #52676c; font-size: 11px; font-weight: 750; cursor: pointer; }
.dashboard-range button.active { background: #fff; color: #183d3b; box-shadow: 0 1px 4px #153a3719; }
.dashboard-range button:focus-visible, .dashboard-v2 button:focus-visible, .dashboard-v2 a:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.dashboard-pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.dashboard-pulse a { display: flex; flex-direction: column; min-width: 0; min-height: 113px; padding: 15px 18px; border: 1px solid #dce4e5; border-radius: 6px; background: #fff; color: #17262e; text-decoration: none; }
.dashboard-pulse a:hover { border-color: #6db9a9; }
.dashboard-pulse a > span { color: #61757a; font-size: 11px; font-weight: 750; }
.dashboard-pulse a strong { margin-top: 12px; font-size: 25px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-pulse a small { margin-top: auto; padding-top: 6px; color: #87979a; font-size: 10px; }
.dashboard-board { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, 1fr); gap: 0 24px; border-top: 1px solid #dbe4e5; }
.dashboard-panel { min-width: 0; padding: 23px 0 25px; border-bottom: 1px solid #dbe4e5; }
.dashboard-panel:nth-child(even) { border-left: 1px solid #dbe4e5; padding-left: 24px; }
.dashboard-panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 17px; }
.dashboard-panel-head h2 { margin: 4px 0 4px; color: #192b31; font-size: 17px; line-height: 1.25; }
.dashboard-panel-head p { margin: 0; color: #79898d; font-size: 11px; }
.dashboard-panel-eyebrow { color: #28796e; font-size: 10px; font-weight: 850; }
.dashboard-panel-head > a, .dashboard-pipeline-footer { color: #206c64; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.dashboard-panel-head > a:hover, .dashboard-pipeline-footer:hover { text-decoration: underline; }
.dashboard-priority-table { width: 100%; }
.dashboard-priority-header, .dashboard-priority-row { display: grid; grid-template-columns: minmax(130px, 1.45fr) minmax(90px, .82fr) minmax(86px, .75fr) minmax(65px, .55fr) minmax(66px, .65fr); align-items: center; gap: 9px; }
.dashboard-priority-header { min-height: 28px; color: #8b999c; font-size: 9px; font-weight: 800; }
.dashboard-priority-row { min-height: 64px; border-top: 1px solid #e4eaeb; font-size: 11px; }
.dashboard-order-identity { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.dashboard-order-identity button { width: fit-content; max-width: 100%; padding: 0; border: 0; background: none; color: #1e5754; font-size: 11px; font-weight: 800; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.dashboard-order-identity > span { color: #6f8185; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-order-identity em { margin-left: 4px; color: #c45645; font-size: 9px; font-style: normal; font-weight: 800; }
.dashboard-status { width: fit-content; max-width: 100%; padding: 4px 7px; border-radius: 4px; background: #e7eeec; color: #46605d; font-size: 10px; font-weight: 750; line-height: 1.25; }
.dashboard-deadline { display: flex; flex-direction: column; gap: 3px; }
.dashboard-deadline strong { font-size: 11px; font-weight: 800; }
.dashboard-deadline small { color: #75878a; font-size: 10px; }
.dashboard-deadline.late strong, .dashboard-deadline.late small { color: #be4b3d; }
.dashboard-deadline.today strong, .dashboard-deadline.today small { color: #a46b11; }
.dashboard-amount { color: #24363a; font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-row-action { justify-self: start; padding: 5px 0; border: 0; background: none; color: #206c64; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.dashboard-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 175px; gap: 7px; color: #829196; font-size: 11px; }
.dashboard-empty .app-icon { color: #31927c; width: 25px; height: 25px; }
.dashboard-empty strong { color: #253b3d; font-size: 12px; }
.dashboard-v2 .dashboard-pipeline-row { grid-template-columns: 5px minmax(0, 1fr) auto minmax(40px, 23%); min-height: 56px; }
.dashboard-v2 .dashboard-pipeline-marker { width: 5px; height: 28px; }
.dashboard-v2 .dashboard-pipeline-copy strong { color: #21383a; }
.dashboard-v2 .dashboard-pipeline-count { font-size: 16px; }
.dashboard-v2 .dashboard-pipeline-track { height: 6px; }
.dashboard-pipeline-footer { display: inline-block; margin-top: 16px; }
.dashboard-finance-layout { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 24px; }
.dashboard-v2 .dashboard-chart { height: 225px; }
.dashboard-v2 .dashboard-chart-bar.revenue, .dashboard-v2 .dashboard-chart-legend i.revenue { background: #277b70; }
.dashboard-v2 .dashboard-chart-bar.expense, .dashboard-v2 .dashboard-chart-legend i.expense { background: #e4a661; }
.dashboard-finance-summary { display: grid; align-content: center; }
.dashboard-finance-summary > div { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid #dce4e5; }
.dashboard-finance-summary > div:first-child { border-top: 1px solid #dce4e5; }
.dashboard-finance-summary span { display: flex; justify-content: space-between; gap: 5px; color: #62787b; font-size: 11px; font-weight: 700; }
.dashboard-finance-summary small { color: #8fa0a2; font-size: 9px; font-weight: 500; white-space: nowrap; }
.dashboard-finance-summary strong { color: #1e3c3b; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-finance-summary strong.negative { color: #c44f41; }
.dashboard-activity-list { display: grid; }
.dashboard-v2 .dashboard-activity-row { width: 100%; min-height: 48px; padding: 6px 0; grid-template-columns: 7px minmax(0, 1fr) auto; border: 0; border-top: 1px solid #e4eaeb; border-radius: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.dashboard-v2 .dashboard-activity-row:hover strong { color: #206c64; }
.dashboard-v2 .dashboard-activity-row > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.dashboard-v2 .dashboard-activity-row strong { font-size: 11px; }
.dashboard-v2 .dashboard-activity-row small { color: #809093; font-size: 10px; }
.dashboard-v2 .dashboard-activity-row time { color: #8b999c; font-size: 9px; }
.dashboard-updated { margin: 14px 0 0; color: #89989b; font-size: 10px; text-align: right; }
@media (max-width: 1120px) {
    .dashboard-focus { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dashboard-focus-lead { padding: 18px; }
    .dashboard-focus-stat { padding: 18px; }
    .dashboard-board { grid-template-columns: 1fr; }
    .dashboard-panel:nth-child(even) { border-left: 0; padding-left: 0; }
}
@media (max-width: 720px) {
    .dashboard-focus { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-focus-lead { grid-column: 1 / -1; border-bottom: 1px solid #ffffff20; }
    .dashboard-focus-stat:first-of-type { border-left: 0; }
    .dashboard-focus-stat { min-height: 116px; }
    .dashboard-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-priority-header { display: none; }
    .dashboard-priority-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 11px 0; }
    .dashboard-order-identity { grid-column: 1; }
    .dashboard-status { grid-column: 2; grid-row: 1; }
    .dashboard-deadline { grid-column: 1; grid-row: 2; }
    .dashboard-amount { grid-column: 2; grid-row: 2; text-align: right; }
    .dashboard-row-action { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 480px) {
    .dashboard-metrics-heading { align-items: start; flex-direction: column; }
    .dashboard-focus-stat { gap: 7px; padding: 13px 10px; }
    .dashboard-focus-stat > span { font-size: 10px; }
    .dashboard-focus-stat strong { font-size: 27px; }
    .dashboard-focus-stat small { font-size: 9px; }
    .dashboard-pulse a { min-height: 103px; padding: 12px; }
    .dashboard-pulse a strong { font-size: 19px; }
    .dashboard-finance-layout { grid-template-columns: 1fr; gap: 8px; }
    .dashboard-finance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .dashboard-finance-summary > div, .dashboard-finance-summary > div:first-child { border-top: 1px solid #dce4e5; }
    .dashboard-finance-summary span { display: block; font-size: 9px; }
    .dashboard-finance-summary small { display: block; margin-top: 2px; }
    .dashboard-finance-summary strong { font-size: 13px; overflow-wrap: anywhere; }
}

.dispatch-header-tools .dispatch-balance-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid #b8d2c7; border-radius: 6px; background: #edf7f2; color: #175d4a; font-size: 12px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.dispatch-header-tools .dispatch-balance-trigger:hover { background: #dff1e8; }
.dispatch-header-tools .dispatch-balance-trigger strong { margin-left: 4px; color: #104f3d; font-size: 14px; font-variant-numeric: tabular-nums; }
.dispatch-balance-trigger .app-icon { width: 17px; height: 17px; }
.driver-balance-overlay { padding: 16px; }
.driver-balance-modal { display: flex; flex-direction: column; width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: hidden; border: 1px solid #dbe4e7; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px #12283a33; color: #172b36; }
.driver-balance-modal > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex: 0 0 auto; padding: 22px 24px 19px; border-bottom: 1px solid #dfe7e9; }
.driver-balance-modal > header span { color: #23755c; font-size: 10px; font-weight: 850; }
.driver-balance-modal > header h2 { margin: 4px 0 5px; font-size: 22px; line-height: 1.15; }
.driver-balance-modal > header p { margin: 0; color: #6c7d84; font-size: 12px; }
.driver-balance-modal-actions { display: flex; align-items: center; gap: 16px; }
.driver-balance-modal-actions strong { color: #145c45; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.driver-balance-modal-actions button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #d7e0e3; border-radius: 5px; background: #fff; color: #49606a; cursor: pointer; }
.driver-balance-modal-actions .app-icon { width: 17px; height: 17px; }
.driver-balance-modal-body { min-height: 0; overflow-y: auto; padding: 4px 24px 24px; }
.driver-balance-modal .driver-balances-list { margin: 0; border-top: 0; }
.driver-balance-modal .driver-balances-list article { display: block; padding: 0; border-bottom: 1px solid #e0e8ea; }
.driver-balance-modal .driver-balances-list article.selected { background: #f8fbfa; }
.driver-balance-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr) auto; align-items: center; gap: 14px; min-height: 74px; padding: 10px 4px; }
.driver-balance-person, .driver-balance-amount { display: grid; gap: 4px; min-width: 0; }
.driver-balance-person strong { color: #21343e; font-size: 14px; }
.driver-balance-person small, .driver-balance-amount small { color: #71838c; font-size: 11px; line-height: 1.3; }
.driver-balance-amount strong { color: #135e47; font-size: 15px; font-variant-numeric: tabular-nums; }
.driver-balance-modal .driver-balances-list button { min-width: 105px; background: #f1f7f4; border-color: #bbd7c9; color: #195a49; cursor: pointer; }
.driver-balance-modal .driver-balances-list button:hover { background: #e3f1e9; }
.driver-balance-modal .driver-settlement-panel { margin: 0 4px 14px; padding: 17px 16px; border: 1px solid #d9e8e0; border-radius: 6px; background: #fff; }
.driver-balance-modal .driver-settlement-panel h3 { margin: 17px 0 8px; font-size: 13px; }
.driver-balance-modal .driver-settlement-panel h3:first-child { margin-top: 0; }
.driver-balance-modal .driver-settlement-fields { grid-template-columns: minmax(110px, 150px) minmax(120px, 150px) minmax(130px, 1fr) auto; }
.driver-balance-modal .driver-settlement-fields button { min-width: 128px; background: #0a6c53; border-color: #0a6c53; color: #fff; }
.driver-balance-modal .driver-settlement-fields button:disabled { opacity: .6; cursor: wait; }
.driver-balance-message { margin: 0 0 12px; padding: 9px 11px; border-radius: 4px; font-size: 12px; }
.driver-balance-message.error { background: #fff0ef; color: #af3429; }
.driver-balance-message.success { background: #e9f7ef; color: #176746; }
@media (max-width: 760px) {
    .dispatch-header-tools .dispatch-balance-trigger { flex: 1 1 auto; justify-content: center; }
    .driver-balance-modal > header { padding: 17px 16px; }
    .driver-balance-modal-body { padding: 4px 16px 20px; }
    .driver-balance-modal-actions { gap: 8px; }
    .driver-balance-modal-actions strong { font-size: 16px; }
    .driver-balance-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
    .driver-balance-person { grid-column: 1; }
    .driver-balance-amount { grid-column: 2; text-align: right; }
    .driver-balance-row button { grid-column: 1 / -1; width: 100%; }
    .driver-balance-modal .driver-settlement-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .driver-balance-modal .driver-settlement-fields label:nth-child(3), .driver-balance-modal .driver-settlement-fields button { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .driver-balance-modal > header { flex-wrap: wrap; }
    .driver-balance-modal-actions { width: 100%; justify-content: space-between; }
    .driver-balance-modal > header h2 { font-size: 20px; }
    .driver-balance-amount small { max-width: 150px; }
}

.driver-admin-page .validation-panel { background: #fff1f1; border: 1px solid #fca5a5; color: #b42318; margin-top: 18px; }
.driver-error-toast { position: fixed; z-index: 1100; top: 82px; right: 18px; display: flex; align-items: center; gap: 10px; width: min(430px, calc(100vw - 36px)); padding: 12px 14px; border: 1px solid #f49b97; border-left: 5px solid #d92d20; border-radius: 6px; background: #fff1f0; color: #a5241b; box-shadow: 0 12px 30px #5f161b25; font-size: 13px; font-weight: 700; }
.driver-error-toast > span { flex: 1; }
.driver-error-toast .app-icon { width: 18px; height: 18px; }
.driver-error-toast button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.catalog-item-picker { margin: 12px 0 2px; }
.catalog-item-picker label { display: grid; gap: 5px; max-width: 480px; color: #475467; font-size: 12px; font-weight: 700; }
.catalog-item-picker select { width: 100%; min-height: 38px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; color: #101828; padding: 0 11px; font: inherit; }
.dispatch-reassign-modal { width: min(100% - 32px, 460px); background: #fff; border: 1px solid #d0d5dd; border-radius: 8px; padding: 24px; box-shadow: 0 20px 60px #10182830; color: #101828; }
.dispatch-reassign-modal h2 { font-size: 20px; margin: 0 0 8px; }
.dispatch-reassign-modal p { color: #475467; font-size: 13px; line-height: 1.5; }
.dispatch-reassign-modal label { display: grid; gap: 7px; margin-top: 20px; font-size: 13px; font-weight: 700; }
.dispatch-reassign-modal select { min-height: 42px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #101828; padding: 0 10px; }
.dispatch-reassign-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.dispatch-reassign-actions button { min-height: 38px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #101828; font-weight: 700; }
.dispatch-reassign-actions button.primary { background: #155eef; color: #fff; border-color: #155eef; }
@media (max-width: 1550px) {
    .new-order-main .intake-grid { grid-template-columns: minmax(0, 1fr); }
    .new-order-main .summary-column { position: static; }
}
@media (max-width: 800px) {
    .new-order-shell { grid-template-columns: minmax(0, 1fr); }
    .new-order-shell .orders-sidebar { display: none; }
    .new-order-shell .new-order-main { padding: 16px; }
    .new-order-shell .new-order-header { flex-wrap: wrap; gap: 8px; }
    .new-order-shell .section-with-action { flex-wrap: wrap; }
    .new-order-main .item-editor-head { display: none; }
    .new-order-main .item-editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .new-order-main .item-editor-row > * { min-width: 0; }
    .new-order-main .line-price-input { width: 100%; }
    .new-order-main .trash-button { min-height: 37px; }
}
.orders-management-shell .order-status-stack { align-items: flex-start; flex-direction: column; gap: 5px; }
.order-payment-tag { display: inline-block; max-width: 100%; color: #475467; font-size: 10px; font-weight: 700; line-height: 1.2; }
.order-payment-tag.is-paid { color: #087443; }
.order-payment-tag.is-cod { color: #175cd3; }
.order-modal-delivery { border-top: 1px solid #e5eaf0; padding: 16px 22px; }
.order-modal-delivery h3 { font-size: 14px; margin: 0 0 7px; }
.order-modal-delivery p { font-size: 13px; margin: 0 0 8px; }
.order-modal-delivery a { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.order-modal-delivery .app-icon { width: 16px; height: 16px; }
.historical-label {
  display: inline-block;
  color: #70510a;
  background: #fff1bc;
  border: 1px solid #dec66a;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.historical-invoice-disabled {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9099a8 !important;
  opacity: .7;
  cursor: not-allowed;
  text-decoration: none;
}
