:root {
    --ink: #102B3F;
    --ink-2: #214358;
    --muted: #657780;
    --line: #dce8ee;
    --soft: #F5F7FA;
    --panel: #ffffff;
    --blue: #0868C9;
    --blue-dark: #07508f;
    --green: #168575;
    --mint: #edf7f4;
    --danger: #b42318;
    --shadow-soft: 0 18px 50px rgba(14, 48, 69, .08);
    --shadow-lift: 0 24px 70px rgba(14, 48, 69, .14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 13px;
    color: var(--ink);
    background: #fbfdfe;
    outline: none;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: progress;
    opacity: .7;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
p {
    margin: 0;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .65fr);
    min-height: 100vh;
    gap: 28px;
    padding: 32px;
}

.auth-panel,
.login-card,
.panel,
.metric-card,
.sidebar-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 8px;
    padding: clamp(28px, 7vw, 86px);
    background:
        linear-gradient(135deg, rgba(3, 105, 201, .12), rgba(53, 200, 90, .18)),
        #ffffff;
}

.brand-mark {
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 14px 34px rgba(3, 105, 201, .18);
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 12px;
}

.eyebrow {
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-panel h1 {
    max-width: 760px;
    margin-top: 12px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1;
}

.auth-copy {
    max-width: 580px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.proof-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.proof-grid span,
mark {
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--blue-dark);
    background: #edf7ff;
    font-size: 12px;
    font-weight: 800;
}

.login-card {
    align-self: center;
    border-radius: 8px;
    padding: 26px;
}

.login-card h2 {
    font-size: 28px;
    line-height: 1.1;
}

.login-card p,
.muted,
.panel-heading span,
.plan-row span,
.metric-card small,
.sidebar span,
.sidebar-card small,
.table-row small {
    color: var(--muted);
}

.login-card p {
    margin: 8px 0 22px;
}

label {
    display: block;
    margin: 14px 0 7px;
    color: #40525b;
    font-size: 12px;
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 13px;
    color: var(--ink);
    background: #fbfdfe;
    outline: none;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(3, 105, 201, .12);
}

.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input {
    padding-right: 82px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 32px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    padding: 0 9px;
    color: var(--blue-dark);
    background: #edf7ff;
    font-size: 11px;
    font-weight: 800;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #dcefff;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.primary-button,
.ghost-button,
.danger-button {
    min-height: 44px;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 800;
}

.primary-button {
    width: 100%;
    margin-top: 18px;
    color: white;
    background: var(--blue);
}

.ghost-button {
    color: var(--blue-dark);
    background: #edf7ff;
}

.danger-button {
    color: var(--danger);
    background: #fff0ed;
}

.demo-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.space-top {
    width: 100%;
    margin-top: 10px;
}

.alert {
    margin-top: 14px;
    border-radius: 8px;
    padding: 11px;
    color: var(--danger);
    background: #fff0ed;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    padding: 24px;
    color: #f4fbff;
    background:
        linear-gradient(180deg, rgba(12, 45, 62, .96), rgba(5, 28, 40, .98)),
        #071c29;
    box-shadow: 18px 0 50px rgba(5, 28, 40, .14);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, .06);
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand strong {
    color: #ffffff;
    letter-spacing: 0;
}

.sidebar span,
.sidebar-card small {
    color: rgba(244, 251, 255, .72);
}

.sidebar nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-section {
    grid-column: 1 / -1;
    margin: 16px 0 4px;
    color: rgba(192, 230, 241, .72);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sidebar nav button {
    border: 0;
    text-align: left;
    border-radius: 10px;
    padding: 10px 12px;
    color: rgba(244, 251, 255, .80);
    background: transparent;
    font-weight: 800;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar nav button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    transform: translateX(2px);
}

.sidebar nav button.active {
    color: #042736;
    background: linear-gradient(135deg, #ffffff, #dffbed);
    box-shadow: 0 12px 28px rgba(53, 200, 90, .20);
}

.sidebar-nav-group {
    display: grid;
    gap: 5px;
    margin-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    padding-top: 7px;
}

.sidebar-nav-group summary {
    padding: 8px 10px;
    color: rgba(192, 230, 241, .78);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    list-style-position: inside;
}

.sidebar-nav-group button {
    width: 100%;
}

.sidebar-card {
    margin-top: auto;
    border-color: rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 16px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(3, 105, 201, .32), rgba(53, 200, 90, .20)),
        rgba(255, 255, 255, .07);
    box-shadow: none;
}

.sidebar-card strong {
    display: block;
    margin: 6px 0;
    font-size: 20px;
}

.dashboard-main {
    min-width: 0;
    overflow-x: hidden;
    padding: 30px;
    background: linear-gradient(180deg, #ffffff, var(--soft) 360px);
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(215, 230, 237, .84);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.dashboard-header h1 {
    margin: 5px 0;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0;
}

.header-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.header-status span {
    border: 1px solid rgba(3, 105, 201, .12);
    border-radius: 999px;
    padding: 7px 10px;
    color: #245164;
    background: rgba(237, 247, 255, .88);
    font-size: 12px;
    font-weight: 850;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-toggle {
    display: flex;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px;
    background: #ffffff;
}

.language-toggle button {
    min-width: 40px;
    min-height: 34px;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-weight: 900;
}

.language-toggle button.active {
    color: var(--blue-dark);
    background: var(--mint);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.executive-kpi-grid .metric-card {
    min-height: 132px;
}

.executive-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(420px, .95fr);
    gap: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(3, 105, 201, .16);
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(3, 105, 201, .1), rgba(53, 200, 90, .13)), #ffffff;
    box-shadow: var(--shadow-lift);
}

.executive-main {
    display: grid;
    align-content: center;
    gap: 8px;
}

.executive-main h2 {
    max-width: 760px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.04;
}

.executive-main span {
    max-width: 780px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.executive-proof {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.executive-proof div {
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 12px 26px rgba(14, 48, 69, .06);
}

.executive-proof strong,
.executive-proof span {
    display: block;
}

.executive-proof strong {
    font-size: 28px;
    line-height: 1;
}

.executive-proof span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ownership-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ownership-grid.compact {
    margin-bottom: 18px;
}

.ownership-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 150px;
    border: 1px solid rgba(3, 105, 201, .14);
    border-radius: 14px;
    padding: 15px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ownership-card:hover {
    border-color: rgba(53, 200, 90, .32);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.ownership-card span {
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ownership-card strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.ownership-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.metric-card {
    border-radius: 16px;
    padding: 18px;
    border-color: #d7e6ed;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 253, 254, .98));
    box-shadow: var(--shadow-soft);
}

.metric-card span,
.metric-card small,
.metric-card strong {
    display: block;
}

.metric-card span {
    color: #4c5f68;
    font-size: 12px;
    font-weight: 800;
}

.metric-card strong {
    margin: 8px 0 2px;
    font-size: 32px;
    line-height: 1;
}

.work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr);
    gap: 14px;
    margin-top: 14px;
}

.panel {
    border-radius: 16px;
    padding: 18px;
    border-color: #d7e6ed;
    box-shadow: var(--shadow-soft);
}

.panel.wide {
    grid-row: span 2;
}

.demo-control-panel {
    margin-bottom: 16px;
    border: 1px solid rgba(3, 105, 201, .18);
    background:
        linear-gradient(135deg, rgba(234, 251, 241, .92), rgba(255, 255, 255, .96) 52%, rgba(232, 243, 250, .92));
}

.demo-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-control-actions button {
    min-width: 148px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-heading.compact {
    display: block;
}

.panel-heading h2 {
    font-size: 20px;
}

.panel-heading strong {
    align-self: flex-start;
    border-radius: 999px;
    padding: 7px 11px;
    color: #0d6835;
    background: var(--mint);
    font-size: 12px;
}

.order-table {
    display: grid;
    gap: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: 1.35fr 1fr .9fr .9fr;
    align-items: center;
    gap: 12px;
    border: 1px solid #e7eef2;
    border-radius: 12px;
    padding: 12px;
    background: #fbfdfe;
}

.table-head {
    color: var(--muted);
    background: transparent;
    border: 0;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 12px;
    font-weight: 900;
}

.table-row span,
.table-row small {
    min-width: 0;
}

.table-row small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

mark {
    display: inline-block;
    color: #0b5d96;
}

.plan-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f5;
    padding: 13px 0;
}

.plan-row div:last-child {
    text-align: right;
}

.plan-row strong,
.plan-row span {
    display: block;
}

.empty-state {
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #f8fbfd;
}

.checklist {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.checklist span {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: #51646d;
    background: #fbfdfe;
    font-weight: 800;
}

.checklist span.done {
    color: #0d6835;
    background: var(--mint);
}

.inline-alert {
    margin-bottom: 14px;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 8px;
}

.order-command-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .6fr);
    gap: 14px;
    margin-bottom: 14px;
}

.order-toggle {
    align-self: end;
    min-height: 48px;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.inline-actions button {
    min-height: 34px;
    border-radius: 8px;
    padding: 0 10px;
    color: var(--blue-dark);
    background: #edf7ff;
    font-size: 12px;
    font-weight: 800;
}

.kanban-column {
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kanban-header strong {
    font-size: 16px;
}

.kanban-header span {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #edf7ff;
    font-weight: 900;
}

.order-card {
    display: grid;
    gap: 8px;
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fbfdfe;
}

.order-card-top,
.order-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.order-card span {
    font-weight: 800;
}

.order-card small {
    color: var(--muted);
}

.order-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 4px;
}

.order-actions button {
    min-height: 34px;
    border-radius: 8px;
    padding: 0 10px;
    color: white;
    background: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.data-list {
    display: grid;
    gap: 10px;
}

.customer-row,
.driver-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) 100px 90px;
    align-items: center;
    gap: 14px;
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 13px;
    background: #fbfdfe;
}

.customer-row strong,
.customer-row span,
.driver-row strong,
.driver-row span {
    display: block;
}

.customer-row span,
.driver-row span {
    color: var(--muted);
}

.onboarding-row {
    grid-template-columns: minmax(180px, 1fr) minmax(210px, 1.15fr) minmax(160px, .8fr) auto;
    align-items: start;
}

.onboarding-row > mark {
    justify-self: end;
}

.onboarding-row > button {
    width: 100%;
}

.onboarding-row > button:first-of-type {
    grid-column: 1;
}

.onboarding-documents {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding-top: 4px;
}

.onboarding-document-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(280px, 1.1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #dbe6eb;
    border-radius: 8px;
    background: #fff;
}

.onboarding-document-copy {
    min-width: 0;
}

.onboarding-document-copy span,
.onboarding-document-copy small {
    overflow-wrap: anywhere;
}

.onboarding-document-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.onboarding-document-copy .document-review-note {
    color: #334e5a;
}

.document-state {
    white-space: nowrap;
}

.onboarding-document-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 8px;
    min-width: 0;
}

.onboarding-document-actions input {
    min-width: 0;
}

.onboarding-document-actions button {
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .onboarding-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .onboarding-row > mark {
        justify-self: start;
    }

    .onboarding-row > button:first-of-type {
        grid-column: auto;
    }

    .onboarding-document-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .onboarding-document-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .onboarding-row,
    .onboarding-document-card,
    .onboarding-document-actions {
        grid-template-columns: 1fr;
    }

    .onboarding-row > mark,
    .document-state {
        justify-self: start;
    }

    .onboarding-document-actions {
        grid-column: auto;
    }
}

.invoice-row {
    grid-template-columns: minmax(220px, 1.15fr) minmax(180px, 1fr) minmax(120px, .65fr) 90px;
}

.plans-grid,
.billing-grid,
.drivers-grid,
.route-layout,
.automation-grid,
.saas-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 14px;
}

.drivers-grid,
.route-layout {
    grid-template-columns: minmax(300px, .65fr) minmax(0, 1.35fr);
}

.route-layout {
    grid-template-columns: minmax(300px, .55fr) minmax(320px, .9fr) minmax(0, 1.15fr);
}

.automation-grid {
    grid-template-columns: minmax(320px, 1.05fr) minmax(280px, .8fr) minmax(260px, .75fr);
}

.saas-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr);
    align-items: start;
    margin-top: 14px;
}

.saas-layout .wide {
    grid-row: span 2;
}

.tenant-table,
.saas-plan-list {
    display: grid;
    gap: 10px;
}

.tenant-row {
    display: grid;
    grid-template-columns: minmax(210px, 1.25fr) minmax(170px, .9fr) minmax(150px, .8fr) minmax(150px, .8fr) 100px;
    align-items: center;
    gap: 14px;
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 13px;
    background: #fbfdfe;
}

.tenant-row strong,
.tenant-row span,
.tenant-row small {
    display: block;
    min-width: 0;
}

.tenant-row small {
    margin-top: 4px;
    color: var(--muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tenant-head {
    border: 0;
    padding-top: 0;
    padding-bottom: 0;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
}

.saas-plan-card {
    display: grid;
    gap: 8px;
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 14px;
    background: #fbfdfe;
}

.saas-plan-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.saas-plan-card span {
    color: var(--blue-dark);
    font-weight: 900;
}

.saas-plan-card small {
    color: var(--muted);
    line-height: 1.45;
}

.command-strip {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(280px, 1.05fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 16px;
    border: 1px solid rgba(3, 105, 201, .16);
    border-radius: 8px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(3, 105, 201, .10), rgba(53, 200, 90, .13)),
        #ffffff;
    box-shadow: 0 22px 60px rgba(14, 48, 69, .10);
}

.command-strip h2 {
    max-width: 760px;
    margin: 8px 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.02;
}

.command-strip span {
    color: var(--muted);
    line-height: 1.45;
}

.command-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.command-stats div {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 96px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    padding: 13px;
    background: rgba(255, 255, 255, .76);
}

.command-stats span,
.command-stats small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.command-stats strong {
    font-size: 30px;
    line-height: 1;
}

.production-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 14px;
    align-items: start;
}

.production-main {
    min-width: 0;
}

.production-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.stage-lane {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    border: 1px solid #dce8ee;
    border-radius: 8px;
    padding: 10px;
    background: #f8fbfd;
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    border-bottom: 1px solid #e7eef2;
    padding-bottom: 8px;
}

.stage-header span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.stage-header strong {
    min-width: 28px;
    border-radius: 999px;
    padding: 5px 8px;
    color: var(--blue-dark);
    background: #eaf5ff;
    text-align: center;
    font-size: 12px;
}

.stage-lane.stage-received { border-top: 4px solid #7a93a5; }
.stage-lane.stage-sorted { border-top: 4px solid #6474d8; }
.stage-lane.stage-washing { border-top: 4px solid var(--blue); }
.stage-lane.stage-drying { border-top: 4px solid #13a3b8; }
.stage-lane.stage-folding { border-top: 4px solid #7c5cc4; }
.stage-lane.stage-ready { border-top: 4px solid var(--green); }

.stage-empty {
    min-height: 86px;
    display: grid;
    place-items: center;
    border: 1px dashed #cddde5;
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.production-card {
    display: grid;
    gap: 8px;
    border: 1px solid #dce8ee;
    border-left: 4px solid #aab8c0;
    border-radius: 8px;
    padding: 11px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(14, 48, 69, .07);
}

.production-card.is-active { border-left-color: var(--blue); }
.production-card.is-complete { border-left-color: var(--green); }
.production-card.is-blocked {
    border-left-color: var(--danger);
    background: #fffafa;
}

.production-card > strong,
.production-card > span,
.production-card > p {
    min-width: 0;
}

.production-card > strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.production-card > span,
.production-card > p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.production-card-top,
.production-signals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.production-card-top {
    justify-content: space-between;
}

.production-card-top span,
.production-signals small {
    border-radius: 999px;
    padding: 5px 8px;
    color: #536871;
    background: #eef5f8;
    font-size: 11px;
    font-weight: 900;
}

.attention-rail {
    display: grid;
    gap: 10px;
}

.attention-row {
    display: grid;
    gap: 5px;
    border: 1px solid #dce8ee;
    border-left: 4px solid #aab8c0;
    border-radius: 8px;
    padding: 12px;
    background: #fbfdfe;
}

.attention-row.is-active { border-left-color: var(--blue); }
.attention-row.is-complete { border-left-color: var(--green); }
.attention-row.is-blocked {
    border-left-color: var(--danger);
    background: #fffafa;
}

.attention-row span,
.attention-row small {
    color: var(--muted);
    font-size: 12px;
}

.guardrail-list,
.contract-principles {
    display: grid;
    gap: 8px;
}

.completion-rule {
    display: grid;
    gap: 6px;
    border: 1px solid rgba(3, 105, 201, .18);
    border-radius: 10px;
    padding: 12px;
    background:
        linear-gradient(135deg, rgba(3, 105, 201, .08), rgba(53, 200, 90, .08)),
        #ffffff;
}

.completion-rule small,
.contract-principles small {
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.completion-rule span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.guardrail-list div,
.contract-principles article {
    border: 1px solid #dce8ee;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--blue-dark);
    background: #f8fbfd;
}

.guardrail-list strong,
.guardrail-list span,
.contract-principles strong,
.contract-principles span {
    display: block;
    min-width: 0;
}

.guardrail-list strong,
.contract-principles strong {
    font-size: 13px;
    font-weight: 900;
}

.guardrail-list span,
.contract-principles span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.partner-command-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .38fr);
    gap: 14px;
    align-items: start;
}

.partner-command-layout .wide {
    grid-column: 1 / -1;
}

.contract-band {
    background:
        linear-gradient(135deg, rgba(3, 105, 201, .08), rgba(53, 200, 90, .10)),
        #ffffff;
}

.contract-principles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.partner-health-list,
.claim-list,
.tenant-command-list {
    display: grid;
    gap: 10px;
}

.partner-health-row,
.claim-row,
.tenant-command-row {
    display: grid;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid #dce8ee;
    border-left: 4px solid #aab8c0;
    border-radius: 8px;
    padding: 12px;
    background: #fbfdfe;
}

.partner-health-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(90px, .55fr) minmax(115px, .7fr) minmax(80px, .45fr) minmax(92px, .4fr);
}

.claim-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(120px, .7fr) minmax(80px, .4fr) minmax(82px, .35fr) minmax(82px, .35fr);
}

.partner-health-row.is-healthy,
.tenant-command-row.is-healthy { border-left-color: var(--green); }
.partner-health-row.is-watch,
.tenant-command-row.is-watch { border-left-color: #d89614; }
.partner-health-row.is-risk,
.tenant-command-row.is-risk { border-left-color: var(--danger); background: #fffafa; }

.partner-health-row strong,
.partner-health-row span,
.partner-health-row small,
.claim-row strong,
.claim-row span,
.tenant-command-row strong,
.tenant-command-row span,
.tenant-command-row small {
    display: block;
    min-width: 0;
}

.partner-health-row span,
.partner-health-row small,
.claim-row span,
.tenant-command-row span,
.tenant-command-row small {
    color: var(--muted);
    font-size: 12px;
}

.tenant-command-row {
    grid-template-columns: minmax(180px, 1.25fr) minmax(95px, .55fr) minmax(90px, .45fr) minmax(105px, .55fr) minmax(150px, .7fr);
}

.tenant-signal {
    display: grid;
    gap: 4px;
}

.tenant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.tenant-actions button {
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--blue-dark);
    background: #eef7ff;
    font-size: 12px;
    font-weight: 900;
}

.hq-side-panel {
    position: sticky;
    top: 16px;
}

.automation-hero h2 {
    margin: 8px 0 10px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1;
}

.full-width {
    width: 100%;
}

.automation-result {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.automation-result div {
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 13px;
    background: #fbfdfe;
}

.automation-result strong,
.automation-result span {
    display: block;
}

.automation-result strong {
    font-size: 28px;
    line-height: 1;
}

.automation-result span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.rule-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.rule-list span {
    border-left: 3px solid var(--green);
    border-radius: 8px;
    padding: 9px 11px;
    color: #40525b;
    background: #f6fbf8;
    font-size: 13px;
    font-weight: 800;
}

.route-list {
    display: grid;
    gap: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(260px, .65fr);
    gap: 14px;
}

.notification-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 12px;
}

.notification-card,
.timeline-item {
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 14px;
    background: #fbfdfe;
}

.notification-card span,
.notification-card small,
.timeline-item span,
.timeline-item small {
    display: block;
}

.notification-card span,
.timeline-item span {
    margin-top: 8px;
    font-weight: 800;
}

.notification-card small,
.timeline-item small {
    margin-top: 6px;
    color: var(--muted);
}

.operations-timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.route-card {
    border: 1px solid #e7eef2;
    border-radius: 8px;
    padding: 13px;
    background: #fbfdfe;
}

.route-map {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid #e7eef2;
    border-radius: 8px;
    background: #eef7f9;
}

.route-map-fallback {
    background:
        linear-gradient(90deg, rgba(3, 105, 201, .08) 1px, transparent 1px),
        linear-gradient(rgba(3, 105, 201, .08) 1px, transparent 1px),
        #eef7f9;
    background-size: 46px 46px;
}

.fallback-track {
    position: absolute;
    inset: 18%;
    border: 4px solid rgba(3, 105, 201, .35);
    border-left-color: rgba(53, 200, 90, .45);
    border-bottom-color: rgba(53, 200, 90, .45);
    border-radius: 46% 54% 40% 60%;
    transform: rotate(-12deg);
}

.map-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(14, 48, 69, .22);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.driver-pin {
    background: var(--green);
}

.stop-pin {
    background: var(--blue);
}

.map-empty {
    display: grid;
    place-items: center;
    min-height: 420px;
    color: var(--muted);
    font-weight: 800;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.map-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.driver-dot {
    background: var(--green);
}

.stop-dot {
    background: var(--blue);
}

.route-card-top,
.stop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.route-card span,
.route-card small {
    display: block;
}

.route-card small {
    color: var(--muted);
}

.stop-row {
    display: grid;
    grid-template-columns: 28px 130px minmax(0, 1fr);
    margin-top: 9px;
    border-top: 1px solid #edf2f5;
    padding-top: 9px;
}

.stop-row strong {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #edf7ff;
    font-size: 12px;
}

.stop-row small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.plan-editor .primary-button {
    margin-top: 14px;
}

.split-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    margin-top: 14px;
}

.toggle-row input {
    width: 18px;
    min-height: 18px;
}

.billing-number {
    margin: 18px 0 8px;
    font-size: 46px;
    line-height: 1;
    font-weight: 900;
}

.document-preview {
    max-height: 360px;
    overflow: auto;
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbfd;
    color: var(--ink);
    font: 13px/1.55 Consolas, "Courier New", monospace;
    white-space: pre-wrap;
}

.loading-screen {
    display: grid;
    place-items: center;
    min-height: 100vh;
    gap: 12px;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #d8e9f2;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#blazor-error-ui {
    display: none;
}

.payout-confirmation {
    display: grid;
    gap: 8px;
    min-width: min(240px, 100%);
}

.payout-confirmation input {
    min-width: 0;
}

.custody-inputs {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.custody-inputs label {
    display: grid;
    gap: 4px;
}

.custody-inputs label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.custody-inputs input {
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;
}

@media (max-width: 1180px) {
    .dashboard-shell {
        grid-template-columns: 248px minmax(0, 1fr);
    }

    .sidebar {
        gap: 14px;
        padding: 18px;
    }

    .dashboard-main {
        padding: 24px;
    }

    .executive-strip {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .executive-main h2 {
        max-width: 680px;
        font-size: 32px;
    }

    .executive-proof {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .executive-proof div {
        min-height: 96px;
    }

    .ownership-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .auth-shell,
    .dashboard-shell,
    .work-grid,
    .executive-strip,
    .route-layout,
    .drivers-grid,
    .automation-grid,
    .settings-grid,
    .notification-grid,
    .saas-layout,
    .command-strip,
    .production-layout,
    .partner-command-layout {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        padding: 16px;
    }

    .login-card {
        order: 1;
    }

    .auth-panel {
        order: 2;
        min-height: auto;
        padding: 30px;
    }

    .auth-panel h1 {
        font-size: clamp(34px, 10vw, 48px);
    }

    .auth-copy {
        margin-top: 14px;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .10);
    }

    .sidebar nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .metric-grid,
    .executive-kpi-grid,
    .ownership-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-strip {
        grid-template-columns: 1fr;
    }

    .executive-proof {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hq-side-panel {
        position: static;
    }

    .partner-health-row,
    .claim-row,
    .tenant-command-row {
        grid-template-columns: 1fr 1fr;
    }

    .tenant-actions {
        justify-content: flex-start;
    }
}

/* Dedicated laundry operations surface */
.laundry-login-page,
.staff-invite-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 36px);
    background:
        radial-gradient(circle at 8% 10%, rgba(8, 110, 184, .08), transparent 34%),
        radial-gradient(circle at 92% 90%, rgba(47, 167, 90, .08), transparent 28%),
        #edf3f5;
}

.laundry-login-panel {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .78fr);
    overflow: hidden;
    border: 1px solid #c8d6dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(15, 42, 54, .13);
}

.laundry-login-copy {
    min-height: 570px;
    display: flex;
    flex-direction: column;
    padding: 46px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(47, 167, 90, .10), transparent 45%),
        #0c2b38;
}

.laundry-login-copy img,
.laundry-ops-brand img,
.staff-invite-brand img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 7px;
}

.laundry-login-brand { display: flex; align-items: center; gap: 12px; }
.laundry-login-brand > div { display: grid; gap: 2px; }
.laundry-login-brand strong { font-size: 17px; letter-spacing: -.01em; }
.laundry-login-brand span { color: #a9c1ca; font-size: 11px; }
.laundry-login-message { margin-top: auto; }
.laundry-login-copy .eyebrow { color: #77df94; }
.laundry-login-copy h1 {
    max-width: 560px;
    margin: 10px 0 17px;
    font-size: clamp(38px, 4.2vw, 48px);
    font-weight: 650;
    line-height: 1.03;
    letter-spacing: -.025em;
}
.laundry-login-copy p:last-child { max-width: 540px; color: #bfd0d8; font-size: 16px; line-height: 1.6; }
.laundry-login-proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.12); list-style: none; }
.laundry-login-proof li { position: relative; padding-left: 15px; color: #bcd0d8; font-size: 11px; font-weight: 650; }
.laundry-login-proof li::before { position: absolute; top: .45em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #52cc78; content: ""; }

.laundry-login-form,
.staff-invite-form {
    display: grid;
    align-content: center;
    gap: 15px;
    padding: clamp(34px, 4vw, 50px);
}

.laundry-login-form-heading { display: grid; gap: 7px; margin-bottom: 7px; }
.laundry-login-form-heading h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 650; line-height: 1.08; letter-spacing: -.02em; }
.laundry-login-form-heading > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.5; }

.laundry-login-form label,
.staff-invite-form label,
.laundry-detail-grid label {
    display: grid;
    gap: 7px;
    margin: 0;
    color: #28424e;
    font-size: 13px;
    font-weight: 700;
}

.laundry-login-form label span,
.staff-invite-form label span,
.laundry-detail-grid label span { color: var(--muted); font-weight: 500; }

.laundry-login-form input,
.staff-invite-form input,
.laundry-queue-toolbar input,
.laundry-detail-grid input,
.laundry-detail-grid textarea,
.laundry-exception-editor textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #ccdbe2;
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
}
.laundry-detail-grid input:disabled,
.laundry-detail-grid textarea:disabled { color: #63747c; background: #f2f5f6; cursor: not-allowed; }

.laundry-detail-grid textarea { resize: vertical; }
.laundry-login-form input:focus,
.staff-invite-form input:focus,
.laundry-queue-toolbar input:focus,
.laundry-detail-grid input:focus,
.laundry-detail-grid textarea:focus,
.laundry-exception-editor textarea:focus { border-color: #2480c8; box-shadow: 0 0 0 3px rgba(3, 105, 201, .12); }
.laundry-login-form .primary-button { min-height: 46px; margin-top: 3px; border-radius: 6px; }
.laundry-login-language { justify-self: center; padding: 5px 9px; text-align: center; }
.laundry-login-form .primary-button:focus-visible,
.laundry-detail-actions .primary-button:focus-visible,
.laundry-ops-sidebar-actions .text-button:focus-visible,
.laundry-login-language:focus-visible { outline: 3px solid rgba(8,110,184,.22); outline-offset: 2px; }

.text-button {
    color: #1767a5;
    background: transparent;
    font-weight: 700;
    text-align: left;
}

.inline-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 650;
}
.inline-alert.error { color: #8b1e16; border-color: #e7b8b2; background: #fff3f1; }
.inline-alert.success { color: #176234; border-color: #acd9bb; background: #effbf3; }
.inline-alert button { color: inherit; background: transparent; text-decoration: underline; font-weight: 800; }

.staff-invite-panel {
    width: min(560px, 100%);
    display: grid;
    gap: 14px;
    padding: 38px;
    border: 1px solid #cad9e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 32, 39, .12);
}
.staff-invite-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 800; }
.staff-invite-panel h1 { font-size: 34px; line-height: 1.12; letter-spacing: 0; }
.staff-invite-panel > p { color: var(--muted); line-height: 1.55; }
.staff-invite-form { padding: 12px 0 0; }

.laundry-ops-shell {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    overflow: hidden;
    color: #15272f;
    background: #edf2f4;
}

.laundry-ops-sidebar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 17px;
    padding: 20px 15px 16px;
    color: #e8f1f4;
    background: linear-gradient(180deg, rgba(47, 167, 90, .08), transparent 190px), #0b2936;
}

.laundry-ops-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 14px; border-bottom: 1px solid rgba(255,255,255,.11); }
.laundry-ops-brand div { display: grid; gap: 2px; }
.laundry-ops-brand strong { font-size: 17px; letter-spacing: -.01em; }
.laundry-ops-brand span { color: #9db5c0; font-size: 11px; }

.laundry-ops-identity {
    display: grid;
    gap: 3px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    background: rgba(255,255,255,.05);
}
.laundry-ops-identity span,
.laundry-ops-identity small { color: #a9c0ca; font-size: 11px; }
.laundry-ops-identity strong { font-size: 14px; }

.laundry-ops-sidebar nav { display: grid; gap: 5px; }
.laundry-ops-sidebar nav button {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #bfd0d8;
    background: transparent;
    text-align: left;
}
.laundry-ops-sidebar nav button:hover { background: rgba(255,255,255,.06); }
.laundry-ops-sidebar nav button:focus-visible { outline: 2px solid #8fd5aa; outline-offset: 2px; }
.laundry-ops-sidebar nav button.active { color: #fff; border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.105); box-shadow: inset 3px 0 #35a75b; }
.laundry-ops-sidebar nav button strong { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

.laundry-settlement-brief {
    display: grid;
    gap: 4px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 11px;
    background: rgba(255,255,255,.06);
}
.laundry-settlement-brief span { color: #8ee2a5; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.laundry-settlement-brief strong { color: #fff; font-size: 20px; font-variant-numeric: tabular-nums; }
.laundry-settlement-brief small { color: #acc1ca; font-size: 10px; line-height: 1.35; }

.laundry-ops-sidebar-actions { margin-top: auto; display: grid; gap: 10px; }
.laundry-ops-sidebar-actions .text-button { min-height: 30px; color: #b9d0da; }
.laundry-action-label-compact { display: none; }

.laundry-ops-main {
    width: 100%;
    max-width: 1920px;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 11px;
    margin: 0 auto;
    padding: 14px 16px 16px;
    overflow: hidden;
}
.laundry-ops-notices { min-width: 0; display: grid; gap: 8px; }

.laundry-ops-header {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 80px;
    padding: 12px 14px 12px 16px;
    border: 1px solid #d4dfe4;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(12, 39, 51, .055);
}
.laundry-ops-header-copy { min-width: 0; }
.laundry-ops-header h1 { margin: 3px 0 5px; font-size: clamp(24px, 2.2vw, 30px); font-weight: 650; line-height: 1.06; letter-spacing: -.025em; }
.laundry-ops-header p:last-child { color: var(--muted); font-size: 13px; }
.laundry-ops-header-actions { display: flex; align-items: center; gap: 12px; }

.laundry-app-bridge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 9px 12px;
    border: 1px solid #cfdae0;
    border-left: 3px solid #35a75b;
    border-radius: 8px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 2px 8px rgba(12, 39, 51, .035);
}
.laundry-app-bridge-copy { min-width: 0; display: grid; gap: 2px; }
.laundry-app-bridge-copy strong { font-size: 14px; }
.laundry-app-bridge-copy span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.laundry-app-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.laundry-app-link {
    display: inline-flex;
    min-width: 132px;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #cbd9df;
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.laundry-app-link:hover { border-color: #1775b9; background: #f3f8fa; }
.laundry-app-link:focus-visible { outline: 3px solid rgba(8,110,184,.22); outline-offset: 2px; }
.laundry-app-link > span:last-child { display: grid; gap: 1px; }
.laundry-app-link strong { font-size: 12px; }
.laundry-app-link small { color: var(--muted); font-size: 10px; }
.laundry-app-mark {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 5px;
    color: #075b9d;
    background: #eaf4fa;
    font-size: 9px;
    font-weight: 850;
}

.laundry-ops-summary { display: grid; grid-template-columns: repeat(3, minmax(76px, 1fr)); gap: 6px; }
.laundry-ops-summary div { min-width: 78px; display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #d8e2e6; border-radius: 6px; background: #f8fafb; }
.laundry-ops-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.laundry-ops-summary strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.laundry-ops-summary .is-blocked strong { color: #9b3027; }
.laundry-ops-summary .is-ready strong { color: #267445; }

.secondary-button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #bfd0d8;
    border-radius: 6px;
    color: #214756;
    background: #fff;
    font-weight: 750;
}

.laundry-ops-workbench {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(310px, 390px) minmax(500px, 1fr);
    gap: 12px;
    overflow: hidden;
    background: transparent;
}
.secondary-button:hover { border-color: #7fa6b8; background: #f7fafb; }
.secondary-button:focus-visible,
.laundry-search-clear:focus-visible,
.laundry-file-picker:focus-within { outline: 3px solid rgba(8,110,184,.20); outline-offset: 2px; }
.laundry-refresh-button { min-width: 92px; }

.laundry-queue-panel,
.laundry-detail-panel { min-width: 0; min-height: 0; border: 1px solid #d4dfe4; border-radius: 9px; background: #fff; box-shadow: 0 4px 16px rgba(12, 39, 51, .055); }
.laundry-queue-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; background: #f7fafb; }
.laundry-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 11px; background: #fff; }
.laundry-queue-heading h2 { margin-top: 3px; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.laundry-queue-total { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #d8e2e6; border-radius: 5px; color: var(--muted); background: #f7fafb; font-size: 10px; }
.laundry-queue-total strong { margin-right: 3px; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.laundry-queue-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 12px 12px; border-bottom: 1px solid #d7e1e5; background: #fff; }
.laundry-search-field { min-width: 0; margin: 0; }
.laundry-queue-toolbar input { min-height: 38px; padding-left: 11px; background: #f9fbfc; }
.laundry-search-clear { min-height: 34px; padding: 0 7px; color: #1767a5; background: transparent; font-size: 11px; font-weight: 750; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.laundry-queue-list { min-height: 0; overflow-y: auto; }

.laundry-queue-item {
    width: 100%;
    min-height: 72px;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr) minmax(100px, auto);
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-bottom: 1px solid #e0e8ec;
    color: var(--ink);
    background: transparent;
    text-align: left;
}
.laundry-queue-item:hover { background: #fff; }
.laundry-queue-item:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(8,110,184,.20); outline-offset: -3px; }
.laundry-queue-item.active { background: linear-gradient(90deg, #edf7f1, #fff 72%); box-shadow: inset 3px 0 #35a75b; }
.laundry-queue-item > span:not(.stage-mark) { min-width: 0; display: grid; gap: 3px; }
.laundry-queue-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.laundry-queue-item small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.laundry-queue-state { justify-items: end; text-align: right; }
.laundry-queue-state small { display: flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #8497a0; }
.status-dot.pending { background: #a77b12; }
.status-dot.inprogress { background: #1474b8; }
.status-dot.completed { background: #2c8a4c; }
.status-dot.blocked { background: #b83a2f; }
.status-dot.cancelled { background: #7c8790; }
.stage-mark { width: 4px; height: 34px; border-radius: 2px; background: #86a2ae; }
.stage-mark.received { background: #2c78b8; }
.stage-mark.sorted, .stage-mark.washing { background: #8467b5; }
.stage-mark.drying, .stage-mark.folding { background: #c78b2a; }
.stage-mark.readyfordelivery { background: #35a75b; }

.laundry-empty,
.laundry-detail-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.laundry-detail-panel { display: flex; flex-direction: column; overflow-y: auto; padding: 20px; scrollbar-gutter: stable; }
.laundry-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #e0e7ea; }
.laundry-detail-header h2 { margin: 3px 0; font-size: 27px; font-weight: 650; letter-spacing: -.02em; }
.laundry-detail-header span { color: var(--muted); font-size: 13px; }
.laundry-next-action {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #c9dbe5;
    border-left: 4px solid #0878c9;
    border-radius: 7px;
    background: linear-gradient(135deg, #eef8fd, #f9fcfe);
}
.laundry-next-action > span { color: #176da8; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.laundry-next-action > strong { font-size: 16px; }
.laundry-next-action > p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.laundry-handoff-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 11px 13px;
    border: 1px solid #d7e1e5;
    border-radius: 7px;
    background: #fafcfd;
}
.laundry-handoff-card > div { min-width: 0; display: grid; gap: 2px; }
.laundry-handoff-card strong { font-size: 14px; }
.laundry-handoff-card span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.laundry-handoff-card a { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 11px; font-size: 11px; }
.status-pill { flex: 0 0 auto; padding: 5px 9px; border: 1px solid; border-radius: 999px; font-size: 11px !important; font-weight: 750; }
.status-pill.pending { color: #6a5518; border-color: #dbc977; background: #fff9df; }
.status-pill.inprogress { color: #14588b; border-color: #9ec6e3; background: #eef8ff; }
.status-pill.completed { color: #176234; border-color: #acd9bb; background: #effbf3; }
.status-pill.blocked { color: #8b1e16; border-color: #e7b8b2; background: #fff3f1; }
.status-pill.cancelled { color: #53636b; border-color: #cbd5da; background: #f3f5f6; }

.laundry-stage-line { display: grid; grid-template-columns: repeat(6, 1fr); margin: 16px 0 18px; border: 1px solid #d7e1e5; border-radius: 6px; overflow: hidden; }
.laundry-stage-line span { position: relative; min-width: 0; padding: 9px 4px; border-right: 1px solid #d7e1e5; color: #748992; background: #f8fafb; font-size: 10px; font-weight: 650; text-align: center; }
.laundry-stage-line span:last-child { border-right: 0; }
.laundry-stage-line span.done { color: #25653c; background: #eff8f2; }
.laundry-stage-line span.current { color: #fff; background: #176da8; font-weight: 800; }

.laundry-detail-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.laundry-detail-section-heading > div { min-width: 0; display: grid; gap: 3px; }
.laundry-detail-section-heading strong { font-size: 14px; }
.laundry-detail-section-heading span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.laundry-edit-state { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #d6e0e4; border-radius: 5px; color: #697c85 !important; background: #f7f9fa; font-size: 9px !important; font-weight: 750; text-transform: uppercase; }
.laundry-edit-state.is-editable { color: #176234 !important; border-color: #b8d9c3; background: #eff8f2; }

.laundry-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.laundry-detail-grid .full { grid-column: 1 / -1; }
.laundry-exception-editor { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); gap: 14px; align-items: center; margin-top: 14px; padding: 12px 14px; border: 1px solid #e5c4bd; border-left: 3px solid #b42318; border-radius: 6px; background: #fff8f6; }
.laundry-exception-editor > div { display: grid; gap: 3px; }
.laundry-exception-editor strong { color: #7f251f; font-size: 13px; }
.laundry-exception-editor span { color: #7f5f5a; font-size: 11px; line-height: 1.4; }
.laundry-exception-editor textarea { min-height: 58px; resize: vertical; }
.laundry-evidence-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; padding: 13px; border: 1px solid #d7e1e5; border-radius: 6px; background: #f8fafb; }
.laundry-evidence-row > div { min-width: 0; display: grid; gap: 3px; }
.laundry-evidence-row span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.laundry-file-picker { position: relative; display: inline-flex; min-height: 40px; align-items: center; justify-content: center; margin: 0; padding: 0 15px; border: 1px solid #b9cbd2; border-radius: 5px; color: #102f3a; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.laundry-file-picker:hover { border-color: #176da8; background: #f3f8fa; }
.laundry-file-picker.disabled { opacity: .55; pointer-events: none; }
.laundry-file-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.laundry-blocked-note { display: grid; gap: 4px; margin-top: 13px; padding: 11px 12px; border-left: 3px solid #b42318; color: #7f251f; background: #fff3f1; }
.laundry-blocked-note span { font-size: 12px; }
.laundry-detail-actions { position: sticky; bottom: -20px; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: auto -20px -20px; padding: 13px 20px; border-top: 1px solid #d7e1e5; background: rgba(255,255,255,.97); box-shadow: 0 -8px 18px rgba(16,32,39,.05); }
.laundry-detail-actions .primary-button,
.laundry-detail-actions .secondary-button { width: auto; min-height: 42px; margin-top: 0; }
.laundry-detail-actions .primary-button { min-width: 172px; }
.laundry-detail-actions .secondary-button.danger { color: #8b1e16; border-color: #dfb4ae; background: #fff8f6; }
.laundry-action-help { margin: 11px 0 8px; padding: 9px 11px; border-left: 3px solid #c48a20; color: #73571c; background: #fffaf0; font-size: 12px; line-height: 1.45; }
.completed-message { color: #25653c; font-size: 13px; font-weight: 750; }

@media (max-width: 1180px) and (min-width: 801px) {
    .laundry-ops-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
    .laundry-ops-sidebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; }
    .laundry-ops-brand { min-width: 170px; padding: 0; border: 0; }
    .laundry-ops-brand img { width: 38px; height: 38px; }
    .laundry-ops-identity,
    .laundry-settlement-brief { display: none; }
    .laundry-ops-sidebar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
    .laundry-ops-sidebar nav button { flex: 1 0 auto; min-height: 38px; padding-inline: 10px; font-size: 12px; white-space: nowrap; }
    .laundry-ops-sidebar nav button.active { box-shadow: inset 0 -3px #35a75b; }
    .laundry-ops-sidebar-actions { display: flex; gap: 8px; margin: 0; }
    .laundry-ops-sidebar-actions .text-button { min-height: 34px; padding: 0 5px; white-space: nowrap; }
    .laundry-ops-main { padding: 11px 12px 12px; }
    .laundry-ops-header { min-height: 72px; gap: 10px; padding: 9px 11px; }
    .laundry-ops-header h1 { font-size: 23px; }
    .laundry-ops-header p:last-child { font-size: 11px; }
    .laundry-ops-header-actions { gap: 8px; }
    .laundry-ops-summary { grid-template-columns: repeat(3, minmax(58px, 1fr)); gap: 4px; }
    .laundry-ops-summary div { min-width: 58px; padding: 7px 8px; }
    .laundry-ops-summary strong { font-size: 18px; }
    .laundry-app-bridge { gap: 10px; padding: 8px 10px; }
    .laundry-app-bridge-copy span { display: none; }
    .laundry-app-link { min-width: 84px; padding: 6px 7px; }
    .laundry-app-link small { display: none; }
    .laundry-app-mark { width: 25px; height: 25px; }
    .laundry-ops-workbench { grid-template-columns: minmax(280px, 34%) minmax(0, 1fr); }
    .laundry-detail-panel { padding: 16px; }
    .laundry-detail-actions { bottom: -16px; margin: auto -16px -16px; padding: 12px 16px; }
}

@media (max-width: 800px) {
    .laundry-ops-shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
    .laundry-ops-sidebar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.10); }
    .laundry-ops-brand { padding: 0; border: 0; }
    .laundry-ops-brand img { width: 36px; height: 36px; }
    .laundry-ops-brand span { display: none; }
    .laundry-ops-identity,
    .laundry-settlement-brief { display: none; }
    .laundry-ops-sidebar nav { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
    .laundry-ops-sidebar nav::-webkit-scrollbar { display: none; }
    .laundry-ops-sidebar nav button { flex: 0 0 auto; min-width: 104px; min-height: 36px; padding-inline: 9px; font-size: 11px; white-space: nowrap; }
    .laundry-ops-sidebar nav button.active { box-shadow: inset 0 -3px #35a75b; }
    .laundry-ops-sidebar-actions { display: flex; gap: 4px; margin: 0; }
    .laundry-ops-sidebar-actions .text-button { min-height: 34px; padding: 0 5px; white-space: nowrap; }
    .laundry-action-label { display: none; }
    .laundry-action-label-compact { display: inline; }
    .laundry-ops-main { min-height: calc(100vh - 54px); min-height: calc(100dvh - 54px); padding: 11px; overflow: visible; }
    .laundry-ops-header { grid-template-columns: 1fr; }
    .laundry-ops-header-actions { justify-content: space-between; }
    .laundry-ops-workbench { grid-template-columns: 1fr; gap: 11px; overflow: visible; }
    .laundry-queue-panel { max-height: 350px; }
    .laundry-detail-panel { min-height: 500px; overflow: visible; }
}

@media (max-width: 640px) {
    .laundry-login-panel { grid-template-columns: 1fr; }
    .laundry-login-copy { min-height: 260px; padding: 28px; }
    .laundry-login-message { margin-top: 48px; }
    .laundry-login-copy h1 { max-width: 440px; font-size: 32px; }
    .laundry-login-proof { margin-top: 20px; }
    .laundry-login-form, .staff-invite-form { padding: 28px; }
    .staff-invite-form { padding: 12px 0 0; }
    .laundry-app-bridge { grid-template-columns: 1fr; }
    .laundry-app-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; }
    .laundry-app-link { min-width: 0; }
    .laundry-handoff-card { align-items: flex-start; flex-direction: column; }
    .laundry-handoff-card a { width: 100%; }
    .laundry-detail-grid { grid-template-columns: 1fr; }
    .laundry-detail-grid .full { grid-column: auto; }
    .laundry-exception-editor { grid-template-columns: 1fr; }
    .laundry-stage-line { grid-template-columns: repeat(3, 1fr); gap: 1px; border: 0; background: #d7e1e5; }
    .laundry-stage-line span { border: 0; }
    .laundry-evidence-row { align-items: stretch; flex-direction: column; }
    .laundry-file-picker { width: 100%; margin: 0; }
    .laundry-detail-actions { align-items: stretch; flex-direction: column; }
    .laundry-detail-actions .primary-button,
    .laundry-detail-actions .secondary-button { width: 100%; }
}

@media (max-width: 480px) {
    .laundry-login-page { padding: 10px; }
    .laundry-login-panel { border-radius: 8px; }
    .laundry-login-copy { min-height: 230px; padding: 22px; }
    .laundry-login-brand img { width: 40px; height: 40px; }
    .laundry-login-message { margin-top: 34px; }
    .laundry-login-copy h1 { margin-bottom: 11px; font-size: 28px; }
    .laundry-login-copy p:last-child { font-size: 13px; line-height: 1.5; }
    .laundry-login-proof { display: none; }
    .laundry-login-form { gap: 13px; padding: 23px 20px 25px; }
    .laundry-login-form-heading h2 { font-size: 25px; }
    .laundry-ops-brand > div { display: none; }
    .laundry-ops-sidebar { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 6px; padding-inline: 8px; }
    .laundry-ops-sidebar nav button { min-width: 98px; padding-inline: 8px; }
    .laundry-ops-main { gap: 9px; padding: 9px; }
    .laundry-ops-header { gap: 10px; padding: 12px; }
    .laundry-ops-header h1 { font-size: 23px; }
    .laundry-ops-header-copy > p:last-child { display: none; }
    .laundry-ops-header-actions { gap: 7px; }
    .laundry-ops-summary { flex: 1 1 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .laundry-ops-summary div { min-width: 0; padding: 6px; }
    .laundry-ops-summary span { font-size: 8px; }
    .laundry-ops-summary strong { font-size: 17px; }
    .laundry-refresh-button { min-width: 76px; padding-inline: 9px; font-size: 11px; }
    .laundry-app-bridge-copy > span { display: none; }
    .laundry-app-links { gap: 4px; }
    .laundry-app-link { justify-content: center; padding: 6px 4px; }
    .laundry-app-link small { display: none; }
    .laundry-app-mark { width: 24px; height: 24px; }
    .laundry-queue-heading { padding: 12px 12px 9px; }
    .laundry-queue-toolbar { padding: 0 10px 10px; }
    .laundry-queue-item { grid-template-columns: 4px minmax(0, 1fr) minmax(84px, auto); gap: 8px; padding-inline: 10px; }
    .laundry-queue-item strong { font-size: 12px; }
    .laundry-queue-state small { font-size: 10px; }
    .laundry-detail-panel { min-height: 460px; padding: 15px; }
    .laundry-detail-header { gap: 10px; padding-bottom: 13px; }
    .laundry-detail-header h2 { font-size: 23px; }
    .laundry-detail-section-heading { align-items: stretch; flex-direction: column; }
    .laundry-edit-state { align-self: flex-start; }
    .laundry-detail-actions { bottom: -15px; margin: auto -15px -15px; padding: 11px 15px calc(11px + env(safe-area-inset-bottom)); }
}

@media (max-width: 680px) {
    .dashboard-main {
        padding: 16px;
    }

    .dashboard-header,
    .panel-heading {
        display: block;
    }

    .header-actions {
        margin-top: 14px;
    }

    .metric-grid,
    .executive-kpi-grid,
    .ownership-grid,
    .executive-proof,
    .command-stats,
    .contract-principles,
    .partner-health-row,
    .claim-row,
    .tenant-command-row,
    .sidebar nav,
    .table-row,
    .tenant-row {
        grid-template-columns: 1fr;
    }

    .demo-control-actions button {
        width: 100%;
    }

    .table-head,
    .tenant-head {
        display: none;
    }
}

/* CleanLoop enterprise visual system */
:root {
    --ink: #102B3F;
    --ink-2: #214358;
    --muted: #596D7D;
    --line: #dce4eb;
    --soft: #F5F7FA;
    --blue: #0868C9;
    --blue-dark: #0756a5;
    --green: #168575;
    --mint: #edf7f4;
    --shadow-soft: 0 1px 2px rgba(15, 38, 48, .06);
    --shadow-lift: 0 4px 14px rgba(15, 38, 48, .08);
}

html,
body {
    background: var(--soft);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

button { border-radius: 6px; font-weight: 600; }

.auth-panel,
.login-card,
.panel,
.metric-card,
.sidebar-card,
.dashboard-header,
.executive-strip,
.executive-proof div,
.ownership-card {
    border-radius: 14px;
    box-shadow: none;
}

.auth-panel {
    background: #f7f9fa;
}

.auth-panel h1 {
    max-width: 760px;
    font-size: clamp(38px, 5vw, 66px);
    font-weight: 600;
    line-height: 1.02;
}

.login-card { padding: 24px; }

.proof-grid span,
mark,
.header-status span,
.panel-heading strong,
.stage-header strong,
.production-card-top span,
.production-signals small {
    border-radius: 4px;
    font-weight: 600;
}

.dashboard-shell { grid-template-columns: 260px minmax(0, 1fr); }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    gap: 14px;
    padding: 20px 16px;
    background: var(--ink);
    box-shadow: none;
}

.sidebar-brand {
    border-radius: 6px;
    padding: 9px;
    background: transparent;
}

.sidebar-brand strong { font-weight: 700; }
.sidebar nav { gap: 3px; }

.nav-section {
    margin: 13px 0 3px;
    font-weight: 650;
    letter-spacing: .06em;
}

.sidebar nav button {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 8px 10px;
    font-weight: 600;
}

.sidebar nav button:hover {
    background: rgba(255,255,255,.06);
    transform: none;
}

.sidebar nav button.active {
    border-color: rgba(255,255,255,.14);
    border-left: 3px solid var(--green);
    color: #fff;
    background: rgba(255,255,255,.11);
    box-shadow: none;
}

.sidebar-card {
    border-radius: 6px;
    padding: 13px;
    background: rgba(255,255,255,.06);
}

.dashboard-main {
    padding: 24px;
    background: var(--soft);
}

.dashboard-header {
    margin-bottom: 14px;
    padding: 17px;
    background: #fff;
    backdrop-filter: none;
}

.dashboard-header h1 {
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.05;
}

.header-status span {
    padding: 6px 9px;
    background: #f2f6f8;
}

.language-toggle { border-radius: 6px; padding: 3px; }
.language-toggle button { min-height: 32px; border-radius: 4px; }

.executive-strip {
    gap: 14px;
    margin-bottom: 14px;
    border-left: 4px solid var(--blue);
    padding: 18px;
    background: #fff;
}

.executive-main h2 {
    max-width: 760px;
    font-size: clamp(27px, 2.6vw, 34px);
    font-weight: 600;
    line-height: 1.08;
}

.executive-main span { font-size: 14px; }

.executive-proof { gap: 8px; }

.executive-proof div {
    min-height: 86px;
    border-color: var(--line);
    padding: 12px;
    background: #f6f8f9;
}

.executive-proof strong { font-size: 25px; font-weight: 650; }
.executive-proof span { font-weight: 600; }

.ownership-grid { gap: 10px; margin-bottom: 14px; }

.ownership-card {
    min-height: 128px;
    gap: 6px;
    padding: 13px;
}

.ownership-card:hover {
    border-color: rgba(3,105,201,.26);
    box-shadow: none;
    transform: none;
}

.ownership-card span {
    font-weight: 700;
    letter-spacing: .04em;
}

.ownership-card strong { font-weight: 650; }

.metric-grid,
.executive-kpi-grid { gap: 10px; }

.executive-kpi-grid .metric-card { min-height: 108px; }

.metric-card {
    gap: 8px;
    padding: 14px;
    background: #fff;
}

.metric-card strong { font-weight: 650; }

.panel {
    border-color: var(--line);
    background: #fff;
}

@media (max-width: 1180px) {
    .dashboard-shell { grid-template-columns: 232px minmax(0, 1fr); }
    .sidebar { padding: 18px 13px; }
    .dashboard-main { padding: 20px; }
    .executive-main h2 { font-size: 28px; }
}

@media (max-width: 860px) {
    .dashboard-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        height: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 9px 10px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.10);
    }

    .sidebar-brand { display: none; }

    .sidebar nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 2px;
        scrollbar-width: thin;
    }

    .sidebar nav button {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .sidebar nav button.active {
        border-left-width: 1px;
        border-bottom: 3px solid var(--green);
    }

    .nav-section,
    .sidebar-card { display: none; }

    .dashboard-main { padding: 12px; }

    .dashboard-header {
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .header-actions { margin-top: 0; }
}

/* Shared portal refinements: usable controls and calm, responsive workspaces. */
html { color-scheme: light; }
body { line-height: 1.5; }
button, input, select, textarea { font: inherit; }
input, select, textarea { min-width: 0; max-width: 100%; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
h1, h2, strong, p, .inline-alert, .field-help { overflow-wrap: anywhere; }
h1, h2 { text-wrap: balance; }
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    transform: translateY(-180%);
    border-radius: 12px;
    padding: 12px 18px;
    color: #fff;
    background: var(--ink);
}
.skip-link:focus { transform: none; }
.primary-button, .secondary-button, .ghost-button, .danger-button {
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 650;
    line-height: 1.4;
    white-space: normal;
}
.primary-button { background: var(--blue); }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); }
.ghost-button { color: var(--blue-dark); background: #edf4fc; }
.secondary-button { border-color: var(--line); color: var(--ink); }
.password-toggle { min-height: 36px; }
.language-toggle button { min-width: 44px; min-height: 40px; }
.text-button { min-height: 44px; }
.auth-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    align-content: center;
    width: min(1200px, 100%);
    min-height: 100dvh;
    margin: auto;
    gap: 24px;
    padding: clamp(20px, 4vw, 48px);
}
.auth-panel {
    justify-content: flex-start;
    padding: clamp(28px, 4vw, 48px);
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; font-size: 23px; }
.auth-brand .brand-mark { margin: 0; }
.brand-mark, .laundry-login-copy img, .laundry-ops-brand img, .staff-invite-brand img {
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: none;
    background: #fff;
}
.auth-panel .eyebrow, .laundry-login-copy .eyebrow { color: #91d5cb; }
.auth-panel h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.12; font-weight: 650; }
.auth-panel .auth-copy { color: #cbd8e3; font-size: 16px; }
.proof-grid { gap: 8px; margin-top: 28px; }
.proof-grid span { padding: 7px 10px; border: 1px solid #4b6578; border-radius: 8px; color: #e1ecf5; background: transparent; }
.login-card { padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-soft); }
.auth-language { justify-content: flex-end; width: max-content; margin: 0 0 22px auto; }
.login-card h2, .laundry-login-form-heading h2 { font-size: 28px; line-height: 1.2; }
.login-card label { font-size: 13px; }
.login-card input, .laundry-login-form input, .staff-invite-form input { min-height: 48px; font-size: 16px; border-radius: 10px; }
.portal-switch { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--blue-dark); font-size: 13px; line-height: 1.6; }
.portal-switch:hover { text-decoration: underline; }
.laundry-login-page, .staff-invite-page { background: var(--soft); }
.laundry-login-panel { border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow-lift); }
.laundry-login-copy { background: var(--ink); }
.laundry-login-message { margin-top: 64px; }
.laundry-login-proof li::before { background: #91d5cb; }
.laundry-login-form .primary-button { min-height: 48px; border-radius: 12px; }
.laundry-login-form .portal-switch { margin-top: 0; }
.staff-invite-panel { border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow-soft); }
.recovery-link { display: flex; align-items: center; justify-content: center; text-align: center; }
.loading-screen { align-content: center; padding: 24px; text-align: center; }
.loading-screen .login-card { width: min(480px, 100%); }
.mobile-navigation { display: none; }
.sidebar-brand { border: 0; padding: 0 4px 18px; border-bottom: 1px solid #345064; border-radius: 0; }
.sidebar-brand span { font-size: 12px; }
.sidebar nav button { min-height: 44px; border-radius: 10px; }
.sidebar-card strong { font-size: 16px; }
.sidebar-nav-group summary { min-height: 44px; display: list-item; padding-top: 12px; }
.dashboard-header { align-items: center; gap: 18px; padding: 22px; }
.dashboard-header h1 { margin: 6px 0 8px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; }
.header-actions { flex-wrap: wrap; }
.header-status span { border-radius: 8px; font-size: 12px; }
.header-status .demo-badge, .environment-notice { color: #785515; border: 1px solid #e8d8af; background: #fff9ed; }
.environment-notice { border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.executive-strip { border-left: 4px solid var(--blue); }
.executive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.executive-actions .primary-button { width: auto; margin: 0; }
.executive-actions button span { margin-left: 8px; color: inherit; }
.executive-proof div { background: var(--soft); border-radius: 12px; }
.metric-card strong { font-variant-numeric: tabular-nums; font-size: clamp(24px, 2.5vw, 34px); }
.panel, .metric-card, .executive-main, .customer-row > *, .driver-row > *, .tenant-row > * { min-width: 0; }
.panel-heading { flex-wrap: wrap; align-items: flex-start; }
.panel-heading strong { border-radius: 8px; color: #12685c; }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 12px; line-height: 1.6; }
.plans-grid, .billing-grid, .notification-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.customer-row, .driver-row, .invoice-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .6fr); }
.tenant-row { grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)) minmax(0, .65fr); }
.table-row small { white-space: normal; overflow-wrap: anywhere; }
.laundry-ops-shell { color: var(--ink); background: var(--soft); }
.laundry-ops-sidebar { background: var(--ink); overflow-y: auto; }
.laundry-ops-sidebar nav button { min-height: 48px; border-radius: 10px; gap: 8px; font-size: 13px; }
.laundry-ops-sidebar nav button.active { box-shadow: inset 3px 0 #69c4b7; }
.laundry-ops-sidebar-actions .text-button { min-height: 44px; }
.laundry-settlement-brief span { color: #91d5cb; }
.laundry-ops-header, .laundry-app-bridge, .laundry-queue-panel, .laundry-detail-panel {
    border-color: var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}
.laundry-ops-header { padding: 18px; }
.laundry-ops-header h1 { line-height: 1.2; }
.laundry-app-bridge { border-left-color: var(--green); }
.laundry-app-link { min-height: 44px; border-radius: 10px; }
.laundry-ops-summary div { min-width: 0; border-color: var(--line); border-radius: 10px; }
.laundry-ops-summary span { font-size: 11px; text-transform: none; }
.laundry-ops-summary .is-ready strong { color: var(--green); }
.laundry-ops-workbench { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 16px; }
.laundry-queue-toolbar input { min-height: 44px; }
.laundry-search-clear { min-height: 44px; font-size: 12px; }
.laundry-queue-total { font-size: 12px; border-radius: 8px; }
.laundry-queue-item { min-height: 78px; }
.laundry-queue-item.active { background: #edf4fc; box-shadow: inset 3px 0 var(--blue); }
.laundry-queue-item strong { font-size: 13px; white-space: normal; }
.laundry-queue-item small { font-size: 12px; }
.laundry-empty, .laundry-detail-empty { gap: 10px; line-height: 1.6; }
.laundry-empty strong, .laundry-detail-empty strong { color: var(--ink); font-size: 18px; }
.laundry-next-action { border-radius: 12px; border-color: #cddff3; background: #f0f6fd; padding: 16px; }
.laundry-next-action > span { color: var(--blue-dark); font-size: 11px; }
.laundry-next-action > strong { font-size: 19px; }
.laundry-next-action > p, .laundry-handoff-card span, .laundry-detail-section-heading span { font-size: 13px; line-height: 1.5; }
.laundry-handoff-card, .laundry-evidence-row, .laundry-exception-editor { border-radius: 12px; }
.laundry-stage-line { border-radius: 10px; }
.laundry-stage-line span { padding: 10px 4px; font-size: 12px; color: var(--muted); }
.laundry-stage-line span.current { color: #fff; background: var(--blue); }
.laundry-stage-line span.done { color: #12685c; background: var(--mint); }
.laundry-evidence-row span { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.laundry-detail-grid input, .laundry-detail-grid textarea, .laundry-exception-editor textarea { border-radius: 10px; font-size: 16px; }
.laundry-exception-editor { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.laundry-detail-header { flex-wrap: wrap; }
.laundry-detail-actions { flex-wrap: wrap; }
.laundry-detail-actions .primary-button { min-width: 0; }
.laundry-file-picker { min-height: 44px; border-radius: 10px; }
.status-pill { border-radius: 8px; white-space: normal; }
.status-pill.completed, .inline-alert.success { color: #12685c; border-color: #b8dcd4; background: var(--mint); }
.inline-alert { flex-wrap: wrap; border-radius: 12px; }
.inline-alert button { min-height: 44px; }
#blazor-error-ui { position: fixed; inset: auto 12px 12px; z-index: 100; padding: 16px; border: 1px solid #e8d8af; border-radius: 12px; color: var(--ink); background: #fff9ed; box-shadow: var(--shadow-lift); }
#blazor-error-ui a, #blazor-error-ui button { display: inline-block; margin-left: 12px; padding: 8px; color: var(--blue-dark); background: transparent; text-decoration: underline; }

@media (max-width: 1280px) {
    .route-layout, .automation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .laundry-ops-header { grid-template-columns: minmax(0, 1fr); }
    .laundry-ops-header-actions { justify-content: space-between; flex-wrap: wrap; }
    .laundry-app-bridge { grid-template-columns: minmax(0, 1fr); }
    .laundry-app-links { justify-content: flex-start; }
}
@media (max-width: 1180px) {
    .work-grid, .order-command-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-header { align-items: flex-start; flex-direction: column; }
    .laundry-ops-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; overflow: visible; padding: 12px; }
    .laundry-ops-brand { min-width: 0; }
    .laundry-ops-brand > div { display: grid; }
    .laundry-ops-sidebar nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 6px; }
    .laundry-ops-sidebar nav button { min-width: 0; white-space: normal; padding: 8px 10px; }
    .laundry-ops-sidebar nav button.active { box-shadow: inset 0 -3px #69c4b7; }
    .laundry-ops-sidebar nav button strong { min-width: 0; }
    .laundry-ops-sidebar-actions { grid-column: 2; grid-row: 1; display: flex; margin: 0; }
    .laundry-ops-header-actions { gap: 12px; }
    .laundry-ops-summary { flex: 1 1 auto; }
}
@media (max-width: 860px) {
    .auth-shell, .laundry-login-panel { grid-template-columns: minmax(0, 1fr); }
    .auth-shell { max-width: 600px; gap: 16px; padding: 16px; }
    .auth-panel { order: 0; padding: 24px; }
    .auth-brand { margin-bottom: 20px; }
    .auth-panel h1 { font-size: 32px; }
    .auth-panel .auth-copy { font-size: 14px; }
    .auth-panel .proof-grid { display: none; }
    .sidebar { position: static; gap: 14px; padding: 16px; }
    .sidebar .sidebar-brand { display: flex; padding: 0; border: 0; }
    .sidebar nav { display: none; }
    .mobile-navigation { display: grid; gap: 6px; min-width: 0; margin: 0; color: #d4e1ec; font-size: 12px; }
    .mobile-navigation select { font-size: 16px; min-height: 48px; border-radius: 12px; }
    .dashboard-main { padding: 16px; }
    .route-layout, .automation-grid, .settings-grid, .work-grid, .order-command-grid { grid-template-columns: minmax(0, 1fr); }
    .laundry-login-copy { min-height: 0; padding: 28px; }
    .laundry-login-message { margin-top: 26px; }
    .laundry-login-copy h1 { font-size: 32px; }
    .laundry-login-proof { display: none; }
    .laundry-login-form { padding: 28px; }
    .laundry-login-panel { max-width: 560px; }
}
@media (max-width: 800px) {
    .laundry-ops-sidebar { position: static; }
    .laundry-ops-main { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 12px; }
    .laundry-ops-workbench { grid-template-columns: minmax(0, 1fr); }
    .laundry-queue-panel { max-height: 370px; }
    .laundry-queue-list { max-height: 240px; }
    .laundry-detail-panel { min-height: 280px; padding: 18px; }
    .laundry-detail-actions { position: static; margin: 18px -18px -18px; padding: 14px 18px; }
    .laundry-ops-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .laundry-ops-summary div { padding: 8px; }
}
@media (max-width: 680px) {
    .customer-row, .driver-row, .invoice-row, .tenant-row,
    .onboarding-row, .onboarding-document-card, .onboarding-document-actions,
    .partner-health-row, .claim-row, .tenant-command-row { grid-template-columns: minmax(0, 1fr); }
    .table-head, .tenant-head { display: none; }
    .panel.wide { grid-row: auto; }
    .header-actions { width: 100%; gap: 8px; }
    .header-actions .language-toggle { margin-right: auto; }
    .executive-proof, .metric-grid, .executive-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .laundry-ops-header { padding: 16px; }
    .laundry-ops-header-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
    .laundry-refresh-button { width: 100%; font-size: 14px; }
    .laundry-ops-summary strong { font-size: 22px; }
    .laundry-app-links { display: flex; flex-wrap: wrap; }
    .laundry-app-link { flex: 1 1 100px; padding: 8px; justify-content: flex-start; }
    .laundry-exception-editor { grid-template-columns: minmax(0, 1fr); }
    .laundry-stage-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .staff-invite-panel { padding: 24px; }
    .staff-invite-panel h1 { font-size: 28px; }
}
@media (max-width: 400px) {
    .auth-shell, .laundry-login-page { padding: 12px; }
    .auth-panel, .login-card, .laundry-login-copy, .laundry-login-form { padding: 20px; }
    .auth-panel h1, .laundry-login-copy h1 { font-size: 28px; }
    .dashboard-main { padding: 12px; }
    .dashboard-header, .panel, .executive-strip { padding: 16px; }
    .header-actions .language-toggle { width: max-content; margin: 0; }
    .header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .header-actions .language-toggle { grid-column: 1 / -1; }
    .executive-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .executive-proof, .metric-grid, .executive-kpi-grid, .ownership-grid { grid-template-columns: minmax(0, 1fr); }
    .laundry-ops-sidebar nav button { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 4px; padding: 8px; font-size: 12px; }
    .laundry-ops-brand { gap: 8px; }
    .laundry-ops-brand strong { font-size: 15px; }
    .laundry-queue-item { grid-template-columns: 4px minmax(0, 1fr); }
    .laundry-queue-item .stage-mark { grid-row: span 2; }
    .laundry-queue-state { grid-column: 2; justify-items: start; text-align: left; }
    .laundry-queue-item small { white-space: normal; }
}
@media (max-height: 760px) and (min-width: 801px) {
    .laundry-ops-shell { height: auto; min-height: 100dvh; overflow: visible; }
    .laundry-ops-main { overflow: visible; grid-template-rows: auto auto auto auto; }
    .laundry-ops-workbench { min-height: 460px; overflow: visible; }
    .laundry-queue-list { max-height: 600px; }
    .laundry-detail-panel { overflow: visible; }
    .laundry-detail-actions { position: static; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
