:root {
    --ink: #241918;
    --muted: #746c68;
    --line: #eadfd6;
    --paper: #ffffff;
    --soft: #fff8ef;
    --nav: #211b1a;
    --green: #18a99a;
    --green-dark: #128678;
    --red: #c91823;
    --red-dark: #96131c;
    --orange: #f26822;
    --gold: #d8aa42;
    --blue: #2f7fba;
    --violet: #6f5ef8;
    --sky: #e6f2fb;
    --shadow: 0 14px 34px rgba(81, 34, 18, .11);
    --glass-shadow: 0 22px 52px rgba(29, 18, 16, .2);
    --page-gutter: clamp(10px, 2.4vw, 22px);
    --ui-font: "Segoe UI", Tahoma, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", sans-serif;
    --print-font: Tahoma, "Segoe UI", "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", sans-serif;
    --sidebar-bg:
        radial-gradient(circle at 12% -6%, rgba(255, 255, 255, .96), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(239, 190, 101, .34), transparent 34%),
        radial-gradient(circle at 16% 86%, rgba(247, 175, 116, .24), transparent 38%),
        radial-gradient(circle at 82% 92%, rgba(255, 235, 179, .32), transparent 32%),
        linear-gradient(155deg, rgba(255, 252, 243, .9) 0%, rgba(255, 244, 222, .84) 52%, rgba(250, 238, 212, .88) 100%);
    --sidebar-glass: rgba(255, 255, 255, .42);
    --sidebar-glass-strong: rgba(255, 255, 255, .64);
    --sidebar-hairline: rgba(255, 255, 255, .72);
    --sidebar-highlight: rgba(255, 255, 255, .9);
    --sidebar-neutral-accent: #c58a24;
    --admin-glass-page-bg:
        radial-gradient(circle at 12% 5%, rgba(255, 255, 255, .94), transparent 26%),
        radial-gradient(circle at 86% 12%, rgba(239, 190, 101, .24), transparent 34%),
        radial-gradient(circle at 18% 88%, rgba(247, 175, 116, .18), transparent 36%),
        radial-gradient(circle at 82% 82%, rgba(255, 235, 179, .24), transparent 30%),
        linear-gradient(135deg, #fff8ea 0%, #fffdf4 48%, #f7ead1 100%);
    --admin-glass-panel: rgba(255, 255, 255, .68);
    --admin-glass-panel-strong: rgba(255, 255, 255, .78);
    --admin-glass-panel-soft: rgba(255, 255, 255, .44);
    --admin-glass-border: rgba(255, 255, 255, .62);
    --admin-glass-shadow:
        0 18px 44px rgba(116, 77, 30, .12),
        inset 0 1px 0 rgba(255, 255, 255, .74);
    --workspace-main-bg: var(--admin-glass-page-bg);
    --workspace-panel-accent: #b8872f;
    --workspace-accent-soft: color-mix(in srgb, var(--workspace-panel-accent) 12%, white 88%);
    --workspace-accent-softer: color-mix(in srgb, var(--workspace-panel-accent) 7%, white 93%);
    --workspace-accent-border: color-mix(in srgb, var(--workspace-panel-accent) 34%, var(--line) 66%);
    --workspace-accent-text: color-mix(in srgb, var(--workspace-panel-accent) 72%, var(--ink) 28%);
    --workspace-accent-strong: color-mix(in srgb, var(--workspace-panel-accent) 82%, var(--ink) 18%);
}

/* Online B2C payment choice and post-checkout instructions */
.checkout-payment-options {
    border: 0;
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.checkout-payment-options legend {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 7px;
}

.checkout-payment-option {
    align-items: center;
    background: #f8faf9;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 11px;
    padding: 11px 12px;
}

.checkout-payment-option:has(input:checked) {
    background: #eef8f5;
    border-color: #75b9a9;
    box-shadow: inset 0 0 0 1px #75b9a9;
}

.checkout-payment-option input {
    accent-color: #0f766e;
    flex: 0 0 18px;
    height: 18px;
    margin: 0;
    min-height: 18px;
    width: 18px;
}

.checkout-payment-option > span {
    display: grid;
    gap: 2px;
}

.checkout-payment-option strong {
    color: #173f38;
    font-size: 13px;
}

.checkout-payment-option small {
    color: #65736d;
    font-size: 11px;
    line-height: 1.35;
}

.shop-payment-confirmation {
    background: linear-gradient(135deg, #153f38, #0f766e);
    border: 1px solid #4d9b8c;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 61, 54, .2);
    color: #fff;
    margin-bottom: 18px;
    overflow: hidden;
    padding: 20px;
}

.shop-payment-heading {
    max-width: 760px;
}

.shop-payment-heading h1 {
    color: #fff;
    font-size: clamp(24px, 4vw, 36px);
    margin: 7px 0 6px;
}

.shop-payment-heading p {
    color: #d4e7e2;
    line-height: 1.55;
    margin: 0;
}

.shop-payment-status {
    align-items: center;
    color: #b8f3d5;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    gap: 7px;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.shop-payment-grid {
    align-items: stretch;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    margin-top: 18px;
}

.shop-payment-details {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 4px 15px;
}

.shop-payment-details > div {
    border-bottom: 1px solid rgba(255, 255, 255, .13);
    display: grid;
    gap: 3px;
    padding: 11px 4px;
}

.shop-payment-details > div:last-child,
.shop-payment-details > div:nth-last-child(2) {
    border-bottom: 0;
}

.shop-payment-details dt {
    color: #a9cbc3;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.shop-payment-details dd {
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    margin: 0;
    overflow-wrap: anywhere;
}

.shop-payment-qr {
    align-items: center;
    background: #fff;
    border-radius: 14px;
    color: #173f38;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 13px;
    text-align: center;
}

.shop-payment-qr img {
    aspect-ratio: 1;
    max-width: 190px;
    object-fit: contain;
    width: 100%;
}

.shop-payment-qr strong {
    margin-top: 8px;
}

.shop-payment-qr small {
    color: #65736d;
    margin-top: 3px;
}

.shop-payment-ledger-note {
    align-items: flex-start;
    background: rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #d4e7e2;
    display: flex;
    font-size: 11px;
    gap: 8px;
    line-height: 1.45;
    margin: 14px 0 0;
    padding: 10px 11px;
}

.shop-payment-ledger-note .icon {
    flex: 0 0 17px;
    margin-top: 1px;
}

@media (max-width: 700px) {
    .shop-payment-grid {
        grid-template-columns: 1fr;
    }

    .shop-payment-qr {
        justify-self: stretch;
    }

    .shop-payment-qr img {
        max-width: 220px;
    }

    .shop-payment-details {
        grid-template-columns: 1fr;
    }

    .shop-payment-details > div:nth-last-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, .13);
    }
}

* {
    box-sizing: border-box;
}


body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, #fffaf3 0, #fff4e7 36%, #fff8ef 100%);
    font-family: var(--ui-font);
    font-size: 14px;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

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

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
    height: auto;
}

.app-shell {
    min-height: 100vh;
    display: block;
    width: min(100%, 100%);
    overflow-x: hidden;
}

.admin-shell .app-shell {
    min-height: 100vh;
    display: block;
    width: min(100%, 100%);
    overflow-x: hidden;
}

.admin-shell {
    background: var(--admin-glass-page-bg);
    --workspace-main-bg: var(--admin-glass-page-bg);
    --workspace-panel-accent: #b8872f;
    --workspace-accent-soft: color-mix(in srgb, var(--workspace-panel-accent) 12%, white 88%);
    --workspace-accent-softer: color-mix(in srgb, var(--workspace-panel-accent) 7%, white 93%);
    --workspace-accent-border: color-mix(in srgb, var(--workspace-panel-accent) 34%, var(--line) 66%);
    --workspace-accent-text: color-mix(in srgb, var(--workspace-panel-accent) 72%, var(--ink) 28%);
    --workspace-accent-strong: color-mix(in srgb, var(--workspace-panel-accent) 82%, var(--ink) 18%);
    --workspace-panel-bg: var(--admin-glass-panel);
    --workspace-doc-bg: var(--admin-glass-panel-strong);
}

.admin-shell.workspace-overview,
.admin-shell.workspace-sales,
.admin-shell.workspace-distribution,
.admin-shell.workspace-finance,
.admin-shell.workspace-catalog,
.admin-shell.workspace-admin {
    --workspace-main-bg: var(--admin-glass-page-bg);
    --workspace-panel-accent: #b8872f;
    --workspace-panel-bg: var(--admin-glass-panel);
    --workspace-doc-bg: var(--admin-glass-panel-strong);
}

.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(26px) saturate(165%);
    -webkit-backdrop-filter: blur(26px) saturate(165%);
    border-right: 1px solid var(--sidebar-hairline);
    box-shadow:
        20px 0 54px rgba(116, 77, 30, .16),
        inset -1px 0 0 rgba(255, 255, 255, .48),
        inset 1px 0 0 rgba(255, 255, 255, .78);
    color: #3d3022;
    isolation: isolate;
    padding: 20px 16px;
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    height: 100dvh;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, .26) transparent;
    z-index: 90;
}

.sidebar::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .48), transparent 20%),
        linear-gradient(90deg, rgba(255, 255, 255, .34), transparent 34%);
    content: "";
    inset: 0;
    opacity: .82;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.sidebar::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(36, 49, 58, .2);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-nav-toggle,
.mobile-nav-overlay {
    display: none;
}

.brand {
    display: block;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 20px;
}

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

.sidebar .brand-lockup {
    align-items: flex-start;
    background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .055));
    border: 1px solid var(--sidebar-hairline);
    border-radius: 8px;
    box-shadow:
        0 14px 30px rgba(18, 10, 8, .16),
        inset 0 1px 0 var(--sidebar-highlight);
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
}

.brand-logo {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-name,
.brand-domain {
    display: block;
    overflow-wrap: anywhere;
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
}

.brand-domain {
    color: #9a6a1d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.btn .icon,
summary .icon {
    margin-right: 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.nav-module-heading {
    align-items: center;
    color: #6f5123;
    display: flex;
    font-size: 11px;
    font-weight: 900;
    justify-content: space-between;
    letter-spacing: .08em;
    margin: 3px 2px -3px;
    text-transform: uppercase;
}

.nav-module-heading small {
    color: #98702f;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.nav-search {
    align-items: center;
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    background: rgba(255, 255, 255, .48);
    border: 1px solid var(--sidebar-hairline);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    color: #8d682b;
    display: flex;
    gap: 7px;
    min-height: 38px;
    padding: 0 9px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.nav-search:focus-within {
    background: rgba(255, 255, 255, .7);
    border-color: rgba(184, 135, 47, .58);
    box-shadow:
        0 0 0 3px rgba(197, 138, 36, .12),
        inset 0 1px 0 rgba(255, 255, 255, .84);
}

.nav-search .icon {
    height: 16px;
    margin: 0;
    width: 16px;
}

.nav-search input {
    background: transparent;
    border: 0;
    color: #3d3022;
    font: inherit;
    font-size: 12px;
    min-width: 0;
    outline: 0;
    padding: 9px 0;
    width: 100%;
}

.nav-search input::placeholder {
    color: #907b5c;
}

.nav-search input::-webkit-search-cancel-button {
    display: none;
}

.nav-search button {
    align-items: center;
    background: rgba(197, 138, 36, .12);
    border: 0;
    border-radius: 999px;
    color: #75551f;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    padding: 3px;
}

.nav-search button .icon {
    height: 13px;
    width: 13px;
}

.nav-search button[hidden],
.nav-search-empty[hidden] {
    display: none;
}

.nav-search-empty {
    background: rgba(255, 255, 255, .38);
    border: 1px dashed rgba(184, 135, 47, .4);
    border-radius: 8px;
    color: #725a34;
    font-size: 12px;
    margin: 0;
    padding: 10px;
    text-align: center;
}

.shop-brand {
    align-items: center;
    background: #fffaf0;
    border: 1px solid #ead8bb;
    border-radius: 8px;
    flex: 1 1 auto;
    gap: 14px;
    margin-bottom: 0;
    min-width: 0;
    padding: 8px 12px;
    width: fit-content;
}

.shop-brand .brand-logo {
    background: #fffaf0;
    border-radius: 8px;
    height: auto;
    width: 118px;
}

.shop-brand .brand-name {
    color: #17110f;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-brand .brand-domain,
.login-brand .brand-domain {
    color: #17110f;
}

.login-logo {
    width: 220px;
}

.login-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.login-brand .brand-name {
    color: var(--ink);
}

.login-app-download {
    margin-top: 14px;
    width: 100%;
}

.nav-link {
    background: rgba(255, 255, 255, .22);
    border: 1px solid transparent;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(36, 49, 58, .86);
    font: inherit;
    min-width: 0;
    position: relative;
    text-align: left;
    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        color .18s ease,
        transform .18s ease;
    width: 100%;
}

.app-download-nav {
    background: linear-gradient(135deg, rgba(196, 138, 36, .2), rgba(255, 255, 255, .5));
    border-color: rgba(184, 135, 47, .35);
    color: #5b3b13;
    font-weight: 800;
}

.app-download-nav:hover {
    border-color: rgba(184, 135, 47, .62);
}

.nav-link.active,
.nav-link:hover {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--nav-group-accent, var(--gold)) 32%, rgba(255, 255, 255, .18) 68%), rgba(255, 255, 255, .09));
    border-color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 42%, rgba(255, 255, 255, .22) 58%);
    box-shadow:
        inset 3px 0 0 color-mix(in srgb, var(--nav-group-accent, var(--gold)) 78%, white 22%),
        inset 0 1px 0 rgba(255, 255, 255, .24),
        0 10px 24px color-mix(in srgb, var(--nav-group-accent, var(--gold)) 22%, rgba(13, 7, 6, .18) 78%);
    color: #3b2712;
    transform: translateY(-1px);
}

.nav-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-children {
    border-left: 1px solid color-mix(in srgb, var(--nav-group-accent, var(--gold)) 44%, rgba(255, 255, 255, .16) 56%);
    display: grid;
    gap: 2px;
    margin: -1px 0 5px 19px;
    padding-left: 8px;
}

.nav-child-link {
    align-items: center;
    border-radius: 7px;
    border: 1px solid transparent;
    color: color-mix(in srgb, #4a3828 84%, var(--nav-group-accent, var(--sidebar-neutral-accent)) 16%);
    display: flex;
    font-size: 12px;
    gap: 7px;
    min-height: 30px;
    min-width: 0;
    padding: 6px 8px;
    text-decoration: none;
    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        color .18s ease,
        transform .18s ease;
}

.nav-child-link .icon {
    color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 64%, white 36%);
    flex: 0 0 auto;
    height: 15px;
    width: 15px;
}

.nav-child-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-child-link.active,
.nav-child-link:hover {
    background: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 24%, rgba(255, 255, 255, .08) 76%);
    border-color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 38%, rgba(255, 255, 255, .16) 62%);
    box-shadow:
        inset 3px 0 0 color-mix(in srgb, var(--nav-group-accent, var(--gold)) 78%, white 22%),
        inset 0 1px 0 rgba(255, 255, 255, .18);
    color: #3b2712;
    transform: translateY(-1px);
}

.nav-link:focus-visible,
.nav-child-link:focus-visible,
.nav-group-toggle:focus-visible,
.mobile-nav-toggle:focus-visible {
    outline: 2px solid rgba(197, 138, 36, .48);
    outline-offset: 2px;
}

.sidebar details {
    max-width: none;
}

.nav-group {
    --nav-group-accent: var(--sidebar-neutral-accent);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    border: 1px solid var(--sidebar-hairline);
    border-radius: 8px;
    background:
        linear-gradient(150deg, var(--sidebar-glass-strong), var(--sidebar-glass));
    box-shadow:
        0 12px 28px rgba(16, 9, 8, .12),
        inset 0 1px 0 rgba(255, 255, 255, .2);
    overflow: hidden;
    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.nav-group[data-nav-group="overview"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="master"],
.nav-group[data-nav-group="catalog"],
.nav-group[data-nav-group="inventory"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="sales"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="fulfillment"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="finance"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="workforce"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[data-nav-group="system"] {
    --nav-group-accent: var(--sidebar-neutral-accent);
}

.nav-group[open] {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .36));
    box-shadow:
        0 16px 34px rgba(116, 77, 30, .14),
        inset 0 1px 0 rgba(255, 255, 255, .74);
}

.nav-group[data-nav-active="true"] {
    background:
        radial-gradient(circle at 18% 0, color-mix(in srgb, var(--nav-group-accent, var(--gold)) 28%, transparent 72%), transparent 48%),
        linear-gradient(150deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .4));
    border-color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 54%, rgba(255, 255, 255, .22) 46%);
    box-shadow:
        0 18px 36px color-mix(in srgb, var(--nav-group-accent, var(--gold)) 18%, rgba(16, 9, 8, .2) 82%),
        inset 0 1px 0 rgba(255, 255, 255, .28),
        inset 0 0 0 1px color-mix(in srgb, var(--nav-group-accent, var(--gold)) 16%, transparent 84%);
}

.nav-group[data-nav-active="true"] .nav-group-toggle {
    background: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 22%, rgba(255, 255, 255, .08) 78%);
    color: #3b2712;
}

.nav-group-toggle {
    align-items: center;
    background: transparent;
    color: #4a3828;
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 38px;
    padding: 9px 10px;
    transition:
        background .18s ease,
        color .18s ease;
    user-select: none;
    width: 100%;
}

.nav-group-toggle::-webkit-details-marker {
    display: none;
}

.nav-group-toggle::after {
    color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 76%, white 24%);
    content: "›";
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    transition: transform .16s ease;
}

.nav-group[open] .nav-group-toggle::after {
    transform: rotate(90deg);
}

.nav-group-title {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    min-width: 0;
    text-transform: uppercase;
}

.nav-group-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.nav-group-description {
    color: #816c4c;
    display: block;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.25;
    padding-left: 29px;
}

.nav-group-title .icon {
    background: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 18%, rgba(255, 255, 255, .1) 82%);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    color: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 70%, white 30%);
    height: 22px;
    margin-right: 0;
    padding: 3px;
    width: 22px;
}

.nav-group-count,
.nav-group-badge {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    margin-left: auto;
    padding: 3px 7px;
}

.nav-group-count {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #7a5a2a;
}

.nav-group[data-nav-active="true"] .nav-group-count,
.nav-group[data-nav-active="true"] .nav-group-badge {
    background: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 34%, rgba(255, 255, 255, .08) 66%);
    color: #3b2712;
}

.nav-group-badge {
    background: color-mix(in srgb, var(--nav-group-accent, var(--gold)) 34%, rgba(255, 255, 255, .12) 66%);
    border: 1px solid color-mix(in srgb, var(--nav-group-accent, var(--gold)) 38%, rgba(255, 255, 255, .14) 62%);
    color: #3b2712;
}

.nav-group-items {
    display: grid;
    gap: 3px;
    padding: 0 6px 7px;
}

.nav-section-label {
    align-items: center;
    color: #8a6b38;
    display: flex;
    font-size: 9px;
    font-weight: 900;
    gap: 6px;
    letter-spacing: .08em;
    margin: 5px 6px 1px;
    text-transform: uppercase;
}

.nav-section-label::after {
    background: linear-gradient(90deg, rgba(184, 135, 47, .35), transparent);
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

.nav-item-block {
    display: grid;
    gap: 3px;
}

.nav-group[hidden],
.nav-item-block[hidden],
.nav-section-label[hidden] {
    display: none;
}

.nav-group-admin {
    border-color: color-mix(in srgb, var(--nav-group-accent, var(--sidebar-neutral-accent)) 48%, rgba(255, 255, 255, .18) 52%);
    box-shadow:
        0 16px 34px color-mix(in srgb, var(--nav-group-accent, var(--sidebar-neutral-accent)) 12%, rgba(0, 0, 0, .22) 88%),
        inset 0 0 0 1px color-mix(in srgb, var(--nav-group-accent, var(--sidebar-neutral-accent)) 12%, transparent 88%);
}

.nav-group-admin .nav-group-toggle {
    background: color-mix(in srgb, var(--nav-group-accent, var(--sidebar-neutral-accent)) 18%, rgba(255, 255, 255, .06) 82%);
}

.nav-link.admin-only {
    color: #4a3828;
}

.nav-link.admin-only .icon {
    color: #9a6a1d;
}

.module-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.module-tab {
    align-items: center;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    background: var(--admin-glass-panel-strong);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .62);
    color: var(--ink);
    display: inline-flex;
    font-weight: 800;
    gap: 7px;
    min-height: 40px;
    padding: 9px 12px;
}

.module-tab.active,
.module-tab:hover {
    background: var(--workspace-accent-soft);
    border-color: var(--workspace-accent-border);
    color: var(--workspace-accent-text);
}

.main {
    padding: var(--page-gutter);
    background: var(--workspace-main-bg);
    min-width: 0;
    margin-left: 248px;
    min-height: 100vh;
}

.main-inner {
    width: min(100%, 1520px);
    margin-inline: auto;
}

.mobile-full-width,
.main-inner > * {
    width: 100%;
}

.alert,
.dashboard-panel,
.panel,
.topbar,
.table-wrap,
.filter-form,
.form-grid,
.grid,
.location-map,
.order-line-builder,
.order-line-row,
.sales-cycle,
.contact-section {
    min-width: 0;
}

.is-mobile-safe {
    width: min(100%, 100%);
}

.topbar,
.panel,
.shop-panel {
    background: var(--workspace-panel-bg, var(--paper));
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    box-shadow: var(--admin-glass-shadow);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-title {
    margin: 0 0 4px;
    font-size: clamp(19px, 2.6vw, 24px);
}

.page-subtitle,
.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 14px;
}

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

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel {
    padding: 16px;
}

.filter-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.filter-form label {
    min-width: 0;
}

.filter-form .filter-search {
    grid-column: span 2;
}

.lookup-select-wrapper {
    display: block;
    min-width: 0;
}

.lookup-select {
    position: relative;
}

.lookup-select [data-lookup-text] {
    padding-right: 36px;
}

.lookup-select .lookup-clear {
    position: absolute;
    right: 8px;
    top: 6px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 3;
}

.lookup-select .lookup-clear:hover {
    color: var(--workspace-accent-text);
    background: var(--workspace-accent-softer);
}

.lookup-select .lookup-results {
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid var(--admin-glass-border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--admin-glass-shadow);
    display: none;
    margin-top: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--admin-glass-panel-strong);
    z-index: 20;
}

.lookup-select .lookup-results:not([hidden]) {
    display: grid;
    gap: 6px;
}

.lookup-results .lookup-option,
.lookup-loading,
.lookup-empty {
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, .58);
    cursor: pointer;
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.lookup-option:hover {
    background: var(--workspace-accent-softer);
}

.lookup-option span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.lookup-loading,
.lookup-empty {
    background: transparent;
    cursor: default;
}

.lookup-empty {
    color: var(--muted);
}

.lookup-select [data-lookup-secondary] {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

.filter-per-page select {
    min-width: 118px;
}

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

.filter-status {
    align-items: flex-start;
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 12px;
}

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

.filter-state {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-state.active {
    color: var(--workspace-accent-text);
}

.filter-chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.filter-chip {
    align-items: center;
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--admin-glass-border);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    min-height: 30px;
    padding: 5px 9px;
}

.filter-chip span {
    color: var(--muted);
    font-weight: 700;
}

.filter-clear {
    min-height: 30px;
    padding: 5px 9px;
}

.sales-cycle {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cycle-step {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    min-height: 168px;
    padding: 12px;
    position: relative;
}

.cycle-step:not(:last-child)::after {
    color: var(--workspace-accent-text);
    content: "→";
    font-size: 20px;
    font-weight: 900;
    position: absolute;
    right: -15px;
    top: 22px;
    z-index: 1;
}

.cycle-step span {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    margin-bottom: 10px;
    width: 28px;
}

.cycle-step strong {
    display: block;
    line-height: 1.25;
    margin-bottom: 7px;
}

.cycle-step p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
}

.order-line-builder {
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    padding: 12px;
}

.location-picker {
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-column: 1 / -1;
    padding: 10px;
}

.location-picker-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.location-map {
    background: #f4ece2;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 320px;
    overflow: hidden;
    width: 100%;
}

.map-panel {
    display: grid;
    gap: 10px;
}

.map-panel .location-map {
    min-height: 420px;
}

.map-popup-title {
    font-weight: 900;
    margin-bottom: 3px;
}

.map-popup-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.order-line-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-line-header h3 {
    margin: 0;
}

.order-line-list {
    display: grid;
    gap: 8px;
}

.order-line-row {
    align-items: end;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(240px, 1fr) minmax(130px, 180px) auto;
    padding: 10px;
}

.order-line-row label {
    margin: 0;
}

.order-line-remove {
    min-height: 42px;
}

.product-list-name {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 220px;
}

.product-list-name img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 54px;
    object-fit: contain;
    padding: 4px;
    width: 54px;
}

.panel h2,
.panel h3 {
    margin: 0 0 12px;
    font-size: 17px;
}

.panel-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panel-title-row h2,
.panel-title-row h3 {
    margin: 0;
}

.metric {
    border-left: 4px solid var(--workspace-panel-accent);
}

.metric strong {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}

.form-grid.compact {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.panel,
.main > .panel,
.section,
.table-wrap,
.panel > .table-wrap,
.panel > .filter-form {
    min-width: 0;
}

table th,
table td {
    overflow-wrap: anywhere;
}

label span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

input,
select,
textarea {
    width: 100%;
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, .58);
    color: var(--ink);
    min-height: 39px;
}

textarea {
    min-height: 78px;
    resize: vertical;
}

.checkbox-line {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 39px;
    color: var(--muted);
}

.checkbox-line input {
    width: auto;
    min-height: 0;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 9px 13px;
    background: var(--workspace-panel-accent);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    white-space: nowrap;
}

.btn:hover {
    background: var(--workspace-accent-strong);
}

.btn.secondary {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: rgba(255, 255, 255, .52);
    color: var(--ink);
    border: 1px solid var(--admin-glass-border);
}

.btn.danger {
    background: var(--red);
}

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

.btn.blue {
    background: var(--blue);
}

.btn.gold {
    background: var(--gold);
}

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

.table-wrap {
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    background: var(--admin-glass-panel);
    overflow-x: auto;
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    box-shadow: var(--admin-glass-shadow);
}

.pagination-links {
    margin-top: 12px;
}

.pagination-links .relative,
.pagination-links nav,
.pagination-links .flex,
.pagination-links .justify-between,
.pagination-links > * {
    max-width: 100%;
}

.pagination-links .pagination,
.pagination-links nav > div,
.pagination-links > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-links a,
.pagination-links span {
    align-items: center;
    background: rgba(255, 255, 255, .5);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    padding: 6px 10px;
}

.pagination-links span[aria-current] {
    background: var(--admin-glass-panel-strong);
    border-color: var(--admin-glass-border);
    color: var(--workspace-accent-text);
}

.pagination-links nav .hidden {
    display: none;
}

.pagination-wrap svg,
.pagination-links svg {
    flex: 0 0 18px;
    height: 18px;
    max-width: 18px;
    width: 18px;
}

tr:target,
details:target,
.edit-box:target,
.panel:target {
    outline: 2px solid var(--workspace-panel-accent);
    outline-offset: 2px;
    scroll-margin-top: 18px;
}

.order-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

th,
td {
    border-bottom: 1px solid rgba(255, 255, 255, .52);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: rgba(255, 255, 255, .48);
    color: #40515a;
    font-size: 12px;
    text-transform: uppercase;
}

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

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--admin-glass-border);
    color: #42535c;
    white-space: nowrap;
}

.badge.good {
    background: #e2f8f5;
    color: #0f746a;
}

.badge.warn {
    background: #fff1cf;
    color: #7d5400;
}

.badge.bad {
    background: #fbe5e1;
    color: #923126;
}

.badge.neutral {
    background: #eef1f4;
    color: #46535f;
}

.badge.draft {
    background: #fff2e0;
    color: #8e5a00;
}

.badge.tone-good {
    background: #e2f8f5;
    color: #0f746a;
}

.badge.tone-warn,
.badge.tone-warning {
    background: #fff1cf;
    color: #7d5400;
}

.badge.tone-bad {
    background: #fbe5e1;
    color: #923126;
}

.badge.tone-neutral {
    background: #eef1f4;
    color: #46535f;
}

.badge.tone-draft {
    background: #fff2e0;
    color: #8e5a00;
}

.workflow-row {
    transition: background-color .2s ease, border-left-color .2s ease;
}

.workflow-row.order-planning {
    background: #fffaf2;
    border-left: 3px solid #d8aa42;
}

.workflow-row.order-confirmed {
    background: #eef8ff;
    border-left: 3px solid #2f7fba;
}

.workflow-row.order-dispatch {
    background: #f0f7ff;
    border-left: 3px solid #4a84c5;
}

.workflow-row.order-loaded {
    background: #f0fffb;
    border-left: 3px solid #18a99a;
}

.workflow-row.order-dispatched {
    background: #e6f4ff;
    border-left: 3px solid #46a0d0;
}

.workflow-row.order-warehouse {
    background: #f7f1dd;
    border-left: 3px solid #c89f2f;
}

.workflow-row.order-payment-open {
    background: #fff4d5;
    border-left: 3px solid #e39e20;
}

.workflow-row.order-complete,
.workflow-row.order-delivered {
    background: #eaf7f4;
    border-left: 3px solid #18a99a;
}

.workflow-row.order-returned {
    background: #f4d6ca;
    border-left: 3px solid #f26822;
}

.workflow-row.order-failed {
    background: #f0d4d4;
    border-left: 3px solid #c91823;
}

.workflow-row.order-cancelled {
    background: #f2f2f2;
    border-left: 3px solid #888;
    opacity: .95;
}

.workflow-row.order-draft {
    background: #fff9f1;
    border-left: 3px solid #f9a23b;
}

.order-process-overview {
    display: grid;
    gap: 10px;
}

.order-flow-mini {
    align-items: center;
    display: flex;
    gap: 4px;
    min-width: 118px;
}

.flow-dot {
    background: #d7dee2;
    border: 1px solid #c4ced4;
    border-radius: 999px;
    display: inline-block;
    height: 9px;
    width: 18px;
}

.flow-dot.complete {
    background: #18a99a;
    border-color: #128e82;
}

.flow-dot.current {
    background: #f3b64c;
    border-color: #c88418;
}

.flow-dot.bad {
    background: #c91823;
    border-color: #a7141c;
}

.flow-dot.blocked {
    background: #8b9297;
    border-color: #737b80;
}

.order-workspace {
    padding: 14px;
}

.order-workspace-head {
    align-items: flex-start;
    margin-bottom: 10px;
}

.order-workspace-head > div:first-child {
    min-width: 240px;
}

.order-workspace-head > div:first-child > .muted {
    font-size: 12px;
    line-height: 1.35;
    max-width: 720px;
}

.order-workspace-tabs {
    gap: 6px;
}

.order-workspace-tabs .btn {
    font-size: 12px;
    gap: 5px;
    min-height: 34px;
    padding: 6px 10px;
}

.order-workspace-tabs .badge {
    font-size: 10px;
    padding: 2px 6px;
}

.order-stage-strip {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.order-stage-card {
    align-items: center;
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: rgba(255, 255, 255, .46);
    border: 1px solid var(--admin-glass-border);
    border-left: 3px solid var(--workspace-panel-accent);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 1px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 7px 10px;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.order-stage-card:hover,
.order-stage-card.active {
    background: color-mix(in srgb, var(--workspace-panel-accent) 10%, rgba(255, 255, 255, .68));
    border-color: color-mix(in srgb, var(--workspace-panel-accent) 42%, var(--admin-glass-border));
    transform: translateY(-1px);
}

.order-stage-card > .muted {
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-stage-card > strong {
    align-self: center;
    color: var(--ink);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    grid-column: 2;
    grid-row: 1 / 3;
}

.order-stage-card > small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-filter-panel {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    margin-top: 9px;
    overflow: hidden;
}

.order-filter-panel > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    min-height: 42px;
    padding: 7px 11px;
    user-select: none;
}

.order-filter-panel > summary::-webkit-details-marker {
    display: none;
}

.order-filter-summary-title,
.order-filter-summary-state {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.order-filter-summary-title {
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
}

.order-filter-summary-state {
    font-size: 11px;
}

.order-filter-summary-state > .icon {
    height: 15px;
    transition: transform .16s ease;
    width: 15px;
}

.order-filter-panel[open] .order-filter-summary-state > .icon {
    transform: rotate(180deg);
}

.admin-shell .order-filter-panel .order-filter-form {
    background: transparent;
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--admin-glass-border);
    box-shadow: none;
    margin: 0;
    padding: 10px;
}

.order-workspace > .filter-status {
    align-items: center;
    margin-top: 8px;
    padding: 7px 10px;
}

.order-workspace > .filter-status .filter-status-copy {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.order-workspace > .filter-status .filter-state {
    font-size: 10px;
}

.order-workspace > .filter-status .filter-chip {
    font-size: 10px;
    min-height: 26px;
    padding: 3px 8px;
}

.order-list-table-wrap {
    margin-top: 8px;
}

.order-list-table {
    min-width: 1120px;
}

.order-list-table th,
.order-list-table td {
    font-size: 12px;
    overflow-wrap: normal;
    padding: 7px 6px;
    vertical-align: middle;
}

.order-list-table th {
    font-size: 10px;
    letter-spacing: .02em;
    white-space: nowrap;
}

.order-list-table .order-row-number {
    color: var(--muted);
    text-align: center;
    width: 30px;
}

.order-list-table .order-number-cell {
    min-width: 190px;
}

.order-primary-line,
.order-meta-line {
    align-items: center;
    display: flex;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

.order-primary-line {
    min-height: 23px;
}

.order-meta-line {
    font-size: 10px;
    margin-top: 2px;
}

.order-number-cell .order-date {
    color: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.order-number-cell .badge,
.order-customer-cell .badge,
.order-status-cell .badge {
    font-size: 9px;
    min-height: 20px;
    padding: 2px 6px;
}

.order-customer-cell {
    min-width: 225px;
}

.order-customer-cell .order-primary-line > strong {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-delivery-cell {
    min-width: 100px;
    white-space: nowrap;
}

.order-workspace .order-link {
    color: var(--workspace-accent-strong);
    display: inline-block;
    font-weight: 850;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
}

.order-workspace .order-link:hover {
    color: var(--workspace-panel-accent);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.order-stage-link {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    gap: 4px;
    margin-left: 2px;
    text-decoration: none;
    white-space: nowrap;
}

.order-stage-link::after {
    content: "→";
    transition: transform .16s ease;
}

.order-stage-link:hover {
    color: var(--workspace-accent-text);
}

.order-stage-link:hover::after {
    transform: translateX(2px);
}

.order-list-table .order-amount-heading,
.order-list-table .order-amount-cell {
    min-width: 158px;
    text-align: right;
    white-space: nowrap;
}

.order-amount-total {
    color: var(--ink);
    display: block;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.order-payment-summary {
    color: var(--muted);
    display: flex;
    font-size: 9px;
    gap: 8px;
    justify-content: flex-end;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
}

.order-payment-summary b {
    color: #596971;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.order-status-cell {
    min-width: 225px;
    white-space: nowrap;
}

.order-list-table .order-readiness-heading,
.order-list-table .order-readiness-cell {
    text-align: center;
}

.order-readiness-cell {
    min-width: 54px;
}

.order-readiness {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: 0;
    justify-content: center;
    text-decoration: none;
}

.order-readiness-ring {
    --readiness-color: #8d9aa0;
    align-items: center;
    aspect-ratio: 1;
    background: conic-gradient(
        var(--readiness-color) var(--order-progress),
        rgba(119, 137, 145, .18) 0
    );
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(44, 61, 70, .08);
    display: inline-flex;
    flex: 0 0 38px;
    justify-content: center;
    padding: 3px;
    transition: transform .16s ease;
}

.order-readiness-ring.partial {
    --readiness-color: #d79a2c;
}

.order-readiness-ring.complete {
    --readiness-color: #18a99a;
}

.order-readiness-ring.low {
    --readiness-color: #c85f45;
}

.order-readiness-ring > span {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    color: #33464f;
    display: flex;
    font-size: 8px;
    font-variant-numeric: tabular-nums;
    font-weight: 850;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.order-readiness-copy {
    display: grid;
    gap: 1px;
    text-align: left;
}

.order-readiness-copy strong {
    color: #40515a;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.order-readiness-copy small {
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.order-readiness:hover .order-readiness-ring {
    transform: scale(1.05);
}

.order-readiness:focus-visible {
    border-radius: 999px;
    outline: 2px solid var(--workspace-panel-accent);
    outline-offset: 3px;
}

.order-actions {
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 170px;
}

.order-actions .btn {
    border-radius: 999px;
    font-size: 10px;
    gap: 3px;
    min-height: 30px;
    padding: 4px 8px;
}

.order-actions .btn .icon {
    height: 13px;
    width: 13px;
}

.order-actions .order-icon-action {
    min-width: 30px;
    padding: 4px;
}

.order-actions .order-next-action {
    max-width: 105px;
}

.order-actions .order-next-action > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-detail-card {
    margin-top: 14px;
    padding: 14px;
}

.order-detail-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.order-detail-title {
    min-width: 200px;
}

.order-detail-title-line {
    align-items: center;
    display: flex;
    gap: 8px;
}

.order-detail-title-line h2 {
    font-size: 18px;
    margin: 0;
}

.order-detail-title > .muted {
    font-size: 11px;
    margin-top: 3px;
}

.order-detail-actions {
    gap: 5px;
    justify-content: flex-end;
}

.order-detail-actions .btn {
    font-size: 11px;
    gap: 4px;
    min-height: 32px;
    padding: 5px 9px;
}

.order-detail-actions .icon {
    height: 14px;
    width: 14px;
}

.order-print-menu {
    position: relative;
}

.order-print-menu > summary {
    list-style: none;
}

.order-print-menu > summary::-webkit-details-marker {
    display: none;
}

.order-print-menu > summary .icon:last-child {
    height: 12px;
    transition: transform .16s ease;
    width: 12px;
}

.order-print-menu[open] > summary .icon:last-child {
    transform: rotate(180deg);
}

.order-print-menu-items {
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
    display: grid;
    gap: 3px;
    min-width: 160px;
    padding: 5px;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 30;
}

.order-print-menu-items a {
    align-items: center;
    border-radius: 6px;
    color: var(--ink);
    display: flex;
    font-size: 11px;
    font-weight: 750;
    gap: 7px;
    padding: 7px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.order-print-menu-items a:hover {
    background: var(--workspace-accent-softer);
    color: var(--workspace-accent-text);
}

.order-print-menu-items .icon {
    height: 14px;
    width: 14px;
}

.order-detail-finance {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 10px;
}

.order-detail-finance > div {
    align-items: center;
    background: rgba(255, 255, 255, .5);
    border: 1px solid var(--admin-glass-border);
    border-left: 3px solid var(--workspace-panel-accent);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 48px;
    padding: 7px 10px;
}

.order-detail-finance > div.warn {
    border-left-color: #d79a2c;
}

.order-detail-finance > div.good {
    border-left-color: #18a99a;
}

.order-detail-finance span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.order-detail-finance strong {
    color: var(--ink);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-detail-facts {
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.5fr);
    margin-top: 8px;
    overflow: hidden;
}

.order-detail-fact {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 10px;
}

.order-detail-fact + .order-detail-fact {
    border-left: 1px solid var(--admin-glass-border);
}

.order-detail-fact-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.order-detail-fact > strong {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-fact > .muted {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.order-detail-badges .badge {
    font-size: 9px;
    min-height: 20px;
    padding: 2px 6px;
}

.order-next-step {
    align-items: center;
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 8px;
    min-height: 48px;
    padding: 7px 9px 7px 11px;
}

.order-next-step-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.order-next-step-copy > span {
    color: var(--workspace-accent-text);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.order-next-step-copy > strong {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-next-step-actions {
    flex: 0 0 auto;
    gap: 5px;
}

.order-next-step-actions .btn {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 9px;
}

.order-danger-zone,
.order-detail-section,
.order-detail-lower-grid {
    margin-top: 10px;
}

.order-danger-zone {
    border-color: rgba(201, 24, 35, .35);
    padding: 9px 11px;
}

.order-danger-zone > details > summary {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 9px;
}

.order-detail-section {
    padding: 12px;
}

.order-detail-section-head {
    margin-bottom: 8px;
}

.order-detail-section-head h2 {
    font-size: 15px;
}

.order-detail-section-head .btn {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 9px;
}

.order-items-summary {
    align-items: center;
    display: flex;
    font-size: 11px;
    gap: 7px;
}

.order-items-summary > strong {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.order-items-table {
    min-width: 760px;
}

.order-items-table th,
.order-items-table td,
.order-payment-table th,
.order-payment-table td {
    font-size: 11px;
    padding: 7px 8px;
    vertical-align: middle;
}

.order-items-table th {
    font-size: 10px;
    white-space: nowrap;
}

.order-item-identity {
    min-width: 330px;
    white-space: nowrap;
}

.order-item-identity > strong {
    font-size: 11px;
}

.order-item-identity > .muted {
    font-size: 9px;
}

.order-item-quantity,
.order-items-table .num,
.order-payment-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-items-table .num,
.order-payment-table .num {
    text-align: right;
}

.order-receipt-totals {
    align-items: stretch;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    padding-top: 7px;
}

.order-receipt-totals > div {
    align-items: baseline;
    background: rgba(255, 255, 255, .44);
    border: 1px solid var(--admin-glass-border);
    border-radius: 7px;
    display: flex;
    font-size: 10px;
    gap: 10px;
    min-width: 130px;
    padding: 5px 8px;
}

.order-receipt-totals > div.grand-total {
    border-color: var(--workspace-accent-border);
    font-size: 11px;
    padding-top: 5px;
}

.order-receipt-totals strong {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-correction-history {
    padding: 0;
}

.order-correction-history > details > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    list-style: none;
    min-height: 44px;
    padding: 7px 11px;
}

.order-correction-history > details > summary::-webkit-details-marker {
    display: none;
}

.order-correction-history > details > summary > span:first-child {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    gap: 6px;
    margin-right: auto;
}

.order-correction-history > details > summary > .icon {
    height: 14px;
    transition: transform .16s ease;
    width: 14px;
}

.order-correction-history > details[open] > summary > .icon {
    transform: rotate(180deg);
}

.order-correction-history .table-wrap {
    border-width: 1px 0 0;
    border-radius: 0 0 8px 8px;
}

.order-detail-lower-grid {
    gap: 10px;
}

.order-payment-table {
    min-width: 540px;
}

.order-detail-process-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-detail-process-list .process-check {
    gap: 6px;
    min-height: 58px;
    padding: 7px;
}

.order-detail-process-list .process-check .icon {
    height: 15px;
    width: 15px;
}

.order-detail-process-list .process-check strong {
    font-size: 10px;
}

.order-detail-process-list .process-check small {
    font-size: 9px;
    line-height: 1.2;
}

.customer-workspace {
    margin-top: 14px;
    padding: 14px;
}

.customer-workspace-head {
    align-items: center;
    margin-bottom: 8px;
}

.customer-workspace-title {
    align-items: baseline;
    display: flex;
    gap: 8px;
}

.customer-workspace-title h2 {
    margin: 0;
}

.customer-workspace-title > .muted {
    font-size: 11px;
    white-space: nowrap;
}

.customer-workspace-actions {
    gap: 5px;
}

.customer-workspace-actions .btn {
    font-size: 11px;
    gap: 4px;
    min-height: 32px;
    padding: 5px 9px;
}

.customer-workspace-actions .icon {
    height: 14px;
    width: 14px;
}

.compact-filter-panel {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: var(--admin-glass-panel-soft);
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
}

.compact-filter-panel > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    min-height: 40px;
    padding: 6px 10px;
    user-select: none;
}

.compact-filter-panel > summary::-webkit-details-marker {
    display: none;
}

.compact-filter-panel[open] .order-filter-summary-state > .icon {
    transform: rotate(180deg);
}

.admin-shell .compact-filter-panel .filter-form {
    background: transparent;
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--admin-glass-border);
    box-shadow: none;
    margin: 0;
    padding: 10px;
}

.customer-workspace > .filter-status {
    align-items: center;
    margin-top: 7px;
    padding: 6px 9px;
}

.customer-workspace > .filter-status .filter-status-copy {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.customer-workspace > .filter-status .filter-state {
    font-size: 10px;
}

.customer-workspace > .filter-status .filter-chip {
    font-size: 10px;
    min-height: 25px;
    padding: 3px 7px;
}

.customer-table-wrap {
    margin-top: 7px;
}

.customer-compact-table {
    min-width: 930px;
}

.customer-compact-table th,
.customer-compact-table td {
    font-size: 12px;
    overflow-wrap: normal;
    padding: 8px 7px;
    vertical-align: middle;
}

.customer-compact-table th {
    font-size: 11px;
    letter-spacing: .02em;
    white-space: nowrap;
}

.customer-row-number {
    color: var(--muted);
    text-align: center;
    width: 30px;
}

.customer-name-cell {
    min-width: 260px;
    width: 29%;
}

.customer-route-cell {
    min-width: 145px;
    width: 17%;
}

.customer-contact-cell {
    min-width: 195px;
    max-width: 230px;
    width: 23%;
}

.customer-credit-cell {
    min-width: 205px;
    width: 24%;
}

.customer-actions-cell {
    width: 40px;
}

.customer-primary-line,
.customer-meta-line,
.customer-badge-line,
.customer-credit-line {
    align-items: center;
    display: flex;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

.customer-primary-line {
    min-height: 22px;
}

.customer-primary-line > strong {
    font-size: 12.5px;
}

.customer-primary-line > strong,
.customer-primary-line > .muted {
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-name-cell .customer-primary-line > strong {
    max-width: 180px;
}

.customer-route-cell .customer-primary-line > strong {
    max-width: 82px;
}

.customer-contact-cell .customer-primary-line > .muted {
    max-width: 105px;
}

.customer-meta-line {
    color: var(--muted);
    font-size: 10.5px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-contact-cell .customer-meta-line > span:first-child {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-identity-details {
    border-top: 1px solid rgba(178, 145, 89, .18);
    margin-top: 5px;
    padding-top: 4px;
}

.customer-badge-line {
    flex-wrap: wrap;
    min-height: 22px;
}

.customer-compact-table .badge {
    font-size: 10px;
    gap: 3px;
    min-height: 20px;
    padding: 2px 6px;
}

.customer-compact-table .badge .icon {
    height: 11px;
    width: 11px;
}

.customer-credit-line {
    color: var(--muted);
    font-size: 10.5px;
    justify-content: space-between;
}

.customer-credit-line strong {
    color: var(--ink);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.customer-contract-inline {
    color: #775515;
    display: flex;
    font-size: 10.5px;
    font-weight: 700;
    gap: 4px;
    margin-top: 2px;
    white-space: nowrap;
}

.customer-credit-line .warn,
.customer-credit-line .warn strong {
    color: #9a6100;
}

.customer-row-actions {
    flex-wrap: nowrap;
    gap: 4px;
}

.customer-row-actions .btn {
    border-radius: 999px;
    min-height: 30px;
    min-width: 30px;
    padding: 4px;
}

.customer-row-actions .icon {
    height: 13px;
    width: 13px;
}

.order-process-card {
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
}

.order-process-card-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.order-process-steps {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(88px, 1fr));
}

.process-step {
    align-items: center;
    background: #eef2f4;
    border: 1px solid #d6e0e5;
    border-radius: 8px;
    color: #394b55;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    min-height: 42px;
    padding: 8px 9px;
}

.process-step span {
    align-items: center;
    background: rgba(255, 255, 255, .78);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.process-step.complete {
    background: #e2f8f5;
    border-color: #a8ddd6;
    color: #0f746a;
}

.process-step.current {
    background: #fff1cf;
    border-color: #e4bd62;
    color: #7d5400;
}

.process-step.bad {
    background: #fbe5e1;
    border-color: #e3aaa2;
    color: #923126;
}

.process-step.blocked {
    background: #eef1f4;
    border-color: #c8d1d7;
    color: #5b666c;
}

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

.process-check {
    align-items: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    padding: 10px;
}

.process-check svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

.process-check span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.process-check small {
    color: var(--muted);
    line-height: 1.35;
}

.process-check.complete {
    border-color: #a8ddd6;
}

.process-check.complete svg {
    color: #0f746a;
}

.process-check.required {
    border-color: #e4bd62;
    background: #fffaf0;
}

.process-check.required svg {
    color: #a66f00;
}

.process-check.optional svg {
    color: var(--muted);
}

.workflow-row.delivery-good,
.workflow-row.customer-good {
    background: #edf9f6;
}

.workflow-row.delivery-warn,
.workflow-row.customer-warn {
    background: #fff8e8;
}

.workflow-row.delivery-bad,
.workflow-row.customer-bad {
    background: #fde5e2;
}

.workflow-row.delivery-neutral {
    background: #f5f7f8;
}

.settlement-hero {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    position: relative;
    z-index: 2;
}

.settlement-status-card {
    background: #f5f7f8;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.settlement-status-card.good {
    background: #edf9f6;
    border-color: #a8ddd6;
}

.settlement-status-card.warn {
    background: #fff8e8;
    border-color: #e4bd62;
}

.settlement-status-card.bad {
    background: #fde5e2;
    border-color: #e3aaa2;
}

.settlement-status-card strong {
    font-size: 20px;
    line-height: 1.2;
}

.delivery-command {
    align-items: stretch;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
}

.delivery-command-copy {
    align-content: start;
    display: grid;
    gap: 10px;
}

.delivery-command-copy h2 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0;
}

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

.delivery-focus-item,
.delivery-lane {
    color: var(--ink);
    text-decoration: none;
}

.delivery-focus-item {
    background: #f5f7f8;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 104px;
    padding: 12px;
}

.delivery-focus-item strong {
    font-size: 26px;
    line-height: 1;
}

.delivery-focus-item span,
.delivery-focus-item small {
    color: var(--muted);
}

.delivery-focus-item.good {
    background: #edf9f6;
    border-color: #a8ddd6;
}

.delivery-focus-item.warn {
    background: #fff8e8;
    border-color: #e4bd62;
}

.delivery-focus-item.bad {
    background: #fde5e2;
    border-color: #e3aaa2;
}

.delivery-focus-item.neutral {
    background: #edf4fa;
    border-color: #bfd3e2;
}

.delivery-lanes {
    align-items: stretch;
}

.delivery-lane {
    border-left: 4px solid var(--workspace-panel-accent);
    display: grid;
    gap: 7px;
    min-height: 142px;
}

.delivery-lane:hover,
.delivery-focus-item:hover {
    border-color: var(--workspace-panel-accent);
    box-shadow: 0 10px 24px rgba(35, 16, 10, .08);
}

.delivery-lane.danger {
    border-left-color: var(--red);
}

.delivery-lane-step {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.delivery-lane.danger .delivery-lane-step {
    background: var(--red);
}

.delivery-lane strong {
    font-size: 16px;
}

.delivery-lane small {
    color: var(--muted);
    line-height: 1.35;
}

.delivery-source-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.delivery-source-summary span {
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 999px;
    color: var(--workspace-accent-text);
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
}

.delivery-table th:first-child,
.delivery-table td:first-child {
    text-align: center;
    width: 52px;
}

.delivery-flow {
    align-items: center;
    display: flex;
    gap: 5px;
    margin-bottom: 7px;
    min-width: 130px;
}

.delivery-flow-dot {
    align-items: center;
    background: #e5eaed;
    border: 1px solid #cbd5da;
    border-radius: 999px;
    color: #5d6b72;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.delivery-flow-dot.complete {
    background: #e2f8f5;
    border-color: #a8ddd6;
    color: #0f746a;
}

.delivery-flow-dot.current {
    background: #fff1cf;
    border-color: #e4bd62;
    color: #7d5400;
}

.delivery-flow-dot.problem {
    background: #fbe5e1;
    border-color: #e3aaa2;
    color: #923126;
}

.delivery-edit-summary {
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.delivery-edit-summary span {
    color: var(--muted);
}

.delivery-form-extra {
    border: 1px solid var(--line);
    border-radius: 8px;
    grid-column: 1 / -1;
    padding: 10px;
}

.delivery-form-extra summary {
    cursor: pointer;
    font-weight: 900;
}

.delivery-form-extra .form-grid {
    margin-top: 10px;
}

.delivery-ops {
    display: grid;
    gap: 12px;
}

.delivery-ops-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.delivery-ops-head h2 {
    font-size: 20px;
    margin: 0 0 4px;
}

.delivery-ops-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.delivery-compact-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.delivery-compact-stat {
    background: #f5f7f8;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 3px;
    min-height: 72px;
    padding: 10px;
    text-decoration: none;
}

.delivery-compact-stat span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.delivery-compact-stat strong {
    font-size: 22px;
    line-height: 1;
}

.delivery-compact-stat.good {
    background: #edf9f6;
    border-color: #a8ddd6;
}

.delivery-compact-stat.warn {
    background: #fff8e8;
    border-color: #e4bd62;
}

.delivery-compact-stat.bad {
    background: #fde5e2;
    border-color: #e3aaa2;
}

.delivery-compact-stat.neutral {
    background: #edf4fa;
    border-color: #bfd3e2;
}

.delivery-filter-panel {
    display: grid;
    gap: 12px;
}

.delivery-filter-panel summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.delivery-filter-panel summary span:first-child {
    display: grid;
    gap: 2px;
}

.delivery-filter-panel summary small {
    color: var(--muted);
}

.delivery-main-cell,
.delivery-badges {
    display: grid;
    gap: 3px;
}

.delivery-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.delivery-table-compact td {
    vertical-align: top;
}

.delivery-flow.compact {
    margin: 7px 0;
}

.delivery-flow.compact .delivery-flow-dot {
    height: 20px;
    width: 20px;
}

.report-hub {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.report-hub-copy {
    display: grid;
    gap: 6px;
}

.report-hub-copy h2 {
    font-size: 22px;
    margin: 0;
}

.report-hub-copy p {
    margin: 0;
}

.report-hub-actions,
.report-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.report-card {
    align-content: start;
    display: grid;
    gap: 12px;
    min-height: 250px;
}

.report-card-icon {
    align-items: center;
    background: var(--workspace-accent-soft);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    color: var(--workspace-accent-text);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.report-card h2 {
    margin-bottom: 6px;
}

.report-card p {
    line-height: 1.45;
    margin: 0;
}

.report-card-actions {
    justify-content: flex-start;
    margin-top: auto;
}

.report-guide {
    display: grid;
    gap: 12px;
}

.report-flow {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-flow-step {
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.report-flow-step span {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.report-flow-step small {
    color: var(--muted);
    line-height: 1.35;
}

.product-modal.report-modal {
    max-height: min(92vh, 980px);
    max-width: min(1320px, calc(100vw - 28px));
    overflow: auto;
    width: 1320px;
}

.report-modal > .grid {
    margin-top: 12px;
}

.report-command-center {
    background:
        linear-gradient(0deg, var(--workspace-accent-softer), var(--workspace-accent-softer)),
        var(--workspace-panel-bg);
}

.report-core-card {
    color: inherit;
    display: grid;
    gap: 7px;
    min-height: 150px;
    text-decoration: none;
}

.report-core-card .report-card-icon {
    margin-bottom: 2px;
}

.report-core-card strong {
    line-height: 1.1;
}

.report-core-card small {
    color: var(--muted);
    line-height: 1.35;
}

.report-core-card.tone-good,
.report-action-row.tone-good {
    border-left-color: var(--green);
}

.report-core-card.tone-warn,
.report-action-row.tone-warn {
    border-left-color: var(--gold);
}

.report-core-card.tone-bad,
.report-action-row.tone-bad {
    border-left-color: var(--red);
}

.report-core-card.tone-neutral,
.report-action-row.tone-neutral {
    border-left-color: var(--blue);
}

.report-action-list {
    display: grid;
    gap: 8px;
}

.report-action-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--workspace-panel-accent);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 9px 11px;
    text-decoration: none;
}

.report-action-row strong {
    white-space: nowrap;
}

.report-status-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-status-grid h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.report-status-grid .badge {
    margin: 0 4px 6px 0;
}

.report-detail {
    background: var(--workspace-panel-bg, var(--paper));
    border: 1px solid color-mix(in srgb, var(--workspace-panel-accent) 22%, var(--line) 78%);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 14px 16px;
}

.report-detail > .grid,
.report-detail > .filter-form,
.report-detail > [wire\:id] {
    margin-top: 14px;
}

.settlement-steps {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.settlement-step {
    background: #eef2f4;
    border: 1px solid #d6e0e5;
    border-radius: 8px;
    color: #394b55;
    display: grid;
    gap: 5px;
    min-height: 106px;
    padding: 10px;
    position: relative;
}

.settlement-step:not(:last-child)::after {
    color: #9aa8af;
    content: "→";
    font-size: 18px;
    font-weight: 900;
    position: absolute;
    right: -13px;
    top: 22px;
    z-index: 1;
}

.settlement-step span {
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border-radius: 999px;
    display: inline-flex;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.settlement-step strong {
    line-height: 1.25;
}

.settlement-step small {
    color: var(--muted);
    line-height: 1.35;
}

.settlement-step.complete {
    background: #e2f8f5;
    border-color: #a8ddd6;
    color: #0f746a;
}

.settlement-step.current {
    background: #fff1cf;
    border-color: #e4bd62;
    color: #7d5400;
}

.settlement-step.pending {
    color: #65727a;
}

.settlement-action-panel {
    background: #fff;
    border: 2px solid var(--workspace-accent-border);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
    position: relative;
    z-index: 1;
}

.settlement-action-panel.done {
    background: #edf9f6;
    border-color: #a8ddd6;
}

.settlement-action-head {
    align-items: start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.settlement-action-head h2 {
    margin: 0 0 4px;
}

.settlement-action-number {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

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

.settlement-check {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

.settlement-check strong {
    display: block;
    margin-top: 2px;
}

.workflow-row.customer-paused {
    background: #fff5de;
}

.focus-row {
    box-shadow: inset 0 0 0 2px var(--workspace-panel-accent), inset 4px 0 0 var(--workspace-panel-accent);
    scroll-margin-top: 18px;
}

.alert {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    background: var(--admin-glass-panel-strong);
    padding: 11px 13px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--admin-glass-border);
}

.alert.success {
    background: color-mix(in srgb, var(--green) 12%, var(--admin-glass-panel-strong) 88%);
    border-color: color-mix(in srgb, var(--green) 26%, var(--admin-glass-border) 74%);
}

.alert.error {
    background: color-mix(in srgb, var(--red) 10%, var(--admin-glass-panel-strong) 90%);
    border-color: color-mix(in srgb, var(--red) 24%, var(--admin-glass-border) 76%);
}

details {
    max-width: 680px;
}

details.panel,
details.create-panel {
    max-width: none;
}

summary {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--blue);
}

.create-panel {
    margin-bottom: 14px;
}

.create-panel > form {
    margin-top: 14px;
}

.create-panel-summary {
    justify-content: space-between;
    width: 100%;
    color: var(--ink);
    font-weight: 800;
}

.create-panel-summary span:first-child {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.create-panel-summary .muted {
    font-size: 13px;
    font-weight: 600;
}

.create-panel-summary::-webkit-details-marker {
    display: none;
}

.create-panel-summary::after {
    color: var(--muted);
    content: "+";
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-left: 12px;
}

.create-panel-summary.icon-summary::after {
    content: none;
}

.summary-action-icon {
    align-items: center;
    background: rgba(255, 255, 255, .44);
    border: 1px solid var(--admin-glass-border);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    transition: transform .18s ease, color .18s ease, border-color .18s ease, background-color .18s ease;
    width: 32px;
}

.summary-action-icon .icon {
    height: 18px;
    width: 18px;
}

details[open] > .create-panel-summary .summary-action-icon {
    background: var(--admin-glass-panel-strong);
    border-color: var(--admin-glass-border);
    color: var(--workspace-accent-text);
    transform: rotate(180deg);
}

.create-panel[open] .create-panel-summary::after {
    content: "-";
}

.edit-box {
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    background: var(--admin-glass-panel-soft);
}

.agent-wizard {
    display: grid;
    gap: 14px;
}

.wizard-step {
    display: grid;
    gap: 14px;
}

.wizard-step-heading,
.wizard-submit {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.wizard-step-heading {
    justify-content: flex-start;
}

.wizard-step-heading > span {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 34px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.wizard-step-heading h2,
.wizard-submit h2 {
    margin: 0 0 3px;
}

.wizard-step-heading p {
    margin: 0;
}

.wizard-checkbox {
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    padding: 9px 10px;
}
/* =========================================================
   SHOP HEADER — ONE PREMIUM HEADER BOX
   Replace old .shop-header / .shop-header-inner /
   .shop-brand shop styles with this section
   ========================================================= */
/* =========================================================
   SHOP HEADER — CLEAN SINGLE BOX
   ========================================================= */

.shop-header {
    position: sticky;
    top: 0;
    z-index: 20;

    padding: 10px var(--page-gutter);
    background: rgba(255, 248, 239, .82);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.shop-header-inner,
.shop-main {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.shop-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    min-height: 108px;
    padding: 10px 12px 10px 14px;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, .98),
        rgba(255, 248, 239, .96)
    );

    border: 1px solid #ead8bb;
    border-radius: 14px;

    box-shadow:
        0 12px 30px rgba(81, 34, 18, .10),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* Brand area */
.shop-header .shop-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    flex: 1 1 auto;
    min-width: 0;

    margin: 0;
    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    text-decoration: none;
}

/* Transparent logo: no background, no border */
.shop-header .shop-brand .brand-logo {
    display: block;
    flex: 0 0 auto;

    width: 92px;
    height: 92px;
    max-width: 92px;
    max-height: 92px;

    object-fit: contain;
    margin: 0;
    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Brand text */
.shop-header .shop-brand .brand-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shop-header .shop-brand .brand-name {
    color: #211918;
    font-size: clamp(16px, 2vw, 19px);
    font-weight: 900;
    line-height: 1.15;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-header .shop-brand .brand-domain {
    color: #8b6a35;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cart / login / management buttons */
.shop-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.shop-header-actions .btn {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 800;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.shop-header-actions .btn:hover {
    box-shadow: 0 8px 18px rgba(81, 34, 18, .14);
    transform: translateY(-1px);
}

.shop-header-actions .btn.secondary {
    background: #fffaf0;
    border: 1px solid #ead8bb;
    color: #33231d;
}

.shop-header-actions .btn.secondary:hover {
    background: #fff2dc;
    border-color: #d8aa42;
}

/* Mobile */
@media (max-width: 640px) {
    .shop-header {
        padding: 8px 10px;
    }

    .shop-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;

        min-height: 0;
        padding: 12px;
        border-radius: 12px;
    }

    .shop-header .shop-brand {
        width: 100%;
    }

    .shop-header .shop-brand .brand-logo {
        width: 92px;
        height: 92px;
        max-width: 92px;
        max-height: 92px;
    }

    .shop-header .shop-brand .brand-name {
        font-size: 16px;
    }

    .shop-header-actions {
        width: 100%;
    }

    .shop-header-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 9px 10px;
    }
}

@media (max-width: 380px) {
    .shop-header-actions .btn {
        font-size: 13px;
    }

    .shop-header-actions .btn .icon {
        margin-right: 4px;
    }
}

.shop-hero {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--hero-image, url("/images/nomun-ad-hero-light.png"));
    background-size: cover;
    background-position: center;
    min-height: 430px;
    margin-bottom: 18px;
    box-shadow: 0 22px 54px rgba(120, 62, 25, .12);
}

.hero-content {
    width: min(620px, 100%);
    padding: 44px;
    color: #17110f;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-eyebrow {
    display: inline-flex;
    width: fit-content;
    border: 1px solid #d8b064;
    border-radius: 999px;
    padding: 6px 11px;
    margin-bottom: 16px;
    color: #7a241c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content h1 {
    margin: 0 0 8px;
    font-size: 42px;
    line-height: 1.08;
}

.hero-content p {
    color: #4d3930;
    font-size: 16px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.hero-visual {
    border-radius: 8px;
    background: url("/images/shop-hero.png");
    background-size: cover;
    background-position: center;
    min-height: 220px;
    border: 1px solid var(--line);
}


.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 14px 34px rgba(98, 38, 20, .08);
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: "";
    display: block;
    height: 5px;
    background: var(--flavor, var(--red));
}

.product-media {
    position: relative;
    height: 318px;
    background:
        linear-gradient(180deg, #fffdf8 0%, #fff8ec 100%);
    display: grid;
    place-items: center;
    color: #5d6b72;
    font-size: 36px;
    font-weight: 800;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 8px;
}

.product-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    z-index: 2;
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.product-stock-badge.low {
    background: var(--orange);
}

.product-stock-badge.empty {
    background: var(--red);
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
}

.product-body {
    background: #fff;
    padding: 14px;
    display: flex;
    flex: 1;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.product-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-title {
    font-size: 20px;
    line-height: 1.22;
    margin: 12px 0 8px;
}

.product-copy {
    flex: 1;
    line-height: 1.45;
    margin: 0;
}

.product-labels {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 0;
}

.product-labels div,
.region-contact-card div,
.contact-list div {
    background: #fbf7f0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
}

.product-labels dt,
.region-contact-card span,
.contact-list span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
}

.product-labels dd,
.region-contact-card strong,
.contact-list strong {
    display: block;
    font-weight: 800;
    margin: 0;
    overflow-wrap: anywhere;
}

.product-detail-trigger {
    justify-content: center;
    margin-top: 12px;
    width: 100%;
}

.product-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(38, 23, 16, .3);
    color: var(--ink);
    max-height: min(82vh, 760px);
    max-width: min(760px, calc(100vw - 28px));
    overflow: auto;
    padding: 0;
    width: 760px;
}

.product-modal.region-create-modal {
    max-width: min(980px, calc(100vw - 28px));
    width: 980px;
}

.product-modal.form-modal-wide {
    max-width: min(980px, calc(100vw - 28px));
    width: 980px;
}

.product-modal.list-edit-modal {
    max-height: min(86vh, 920px);
    max-width: min(980px, calc(100vw - 28px));
    overflow: auto;
    width: 980px;
}

.list-edit-modal .edit-box {
    border: 0;
    margin: 0;
    padding: 18px;
}

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

.row-actions .btn {
    min-height: 36px;
    padding: 9px 12px;
}

.region-modal-actions,
.form-modal-actions {
    grid-column: 1 / -1;
}

.product-modal::backdrop {
    background: rgba(30, 22, 18, .58);
}

.product-modal > summary {
    display: none;
}

.product-modal-header {
    align-items: start;
    background: #fff7eb;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 18px;
}

.product-modal-header h2 {
    font-size: 24px;
    line-height: 1.2;
    margin: 4px 0 0;
}

.icon-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: inline-grid;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.product-modal-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: 220px minmax(0, 1fr);
    padding: 18px 18px 0;
}

.product-modal-summary img {
    background: #fff7eb;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 180px;
    object-fit: contain;
    padding: 10px;
    width: 100%;
}

.product-modal .label-block {
    margin: 16px 18px 0;
}

.product-modal .label-block:last-child {
    margin-bottom: 18px;
}

.label-block {
    border-top: 1px solid var(--line);
    margin-top: 9px;
    padding-top: 9px;
}

.label-block p {
    color: var(--muted);
    line-height: 1.45;
    margin: 5px 0 0;
    white-space: pre-line;
}

.price {
    font-size: 18px;
    font-weight: 800;
    color: var(--red);
    text-align: right;
    white-space: nowrap;
}

.product-actions {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    margin-top: 16px;
}

.quantity-field input {
    text-align: center;
}

.product-cart {
    width: 100%;
}

.shop-toolbar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.toolbar-copy {
    display: grid;
    gap: 4px;
}

.toolbar-copy strong {
    font-size: 20px;
}

.toolbar-kicker,
.section-kicker {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.toolbar-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.region-form {
    display: grid;
    min-width: min(320px, 100%);
}

.product-category-nav {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    margin: 0 0 18px;
}

.product-category-link {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--category-accent, #765846);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 9px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 10px 11px;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.product-category-link:hover,
.product-category-link.is-active {
    border-color: var(--category-accent, #765846);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--category-accent, #765846) 18%, transparent);
    transform: translateY(-1px);
}

.product-category-link.is-active {
    background: color-mix(in srgb, var(--category-accent, #765846) 8%, #fff);
}

.product-category-icon {
    align-items: center;
    background: color-mix(in srgb, var(--category-accent, #765846) 12%, #fff);
    border-radius: 8px;
    color: var(--category-accent, #765846);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.product-category-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.product-category-copy strong {
    font-size: 14px;
    line-height: 1.25;
}

.product-category-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.product-category-count {
    align-items: center;
    background: #f6efe6;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 25px;
    justify-content: center;
    min-width: 25px;
    padding: 0 7px;
}

.product-category-badge {
    border-color: color-mix(in srgb, var(--category-accent, #765846) 42%, var(--line));
    color: var(--category-accent, #765846);
}

.product-admin-category-strip {
    display: flex;
    gap: 8px;
    margin: 10px 0 14px;
    overflow-x: auto;
    padding: 2px 0 5px;
    scrollbar-width: thin;
}

.product-admin-category {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    gap: 7px;
    min-height: 38px;
    padding: 7px 10px;
    text-decoration: none;
}

.product-admin-category .icon {
    color: var(--category-accent, #765846);
}

.product-admin-category strong {
    align-items: center;
    background: #f4eee7;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 6px;
}

.product-admin-category:hover,
.product-admin-category.is-active {
    border-color: var(--category-accent, var(--red));
    box-shadow: 0 5px 14px rgba(85, 47, 29, .09);
}

.product-admin-category.is-active {
    background: #fff8ec;
    font-weight: 800;
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 12px;
}

.catalog-heading h2 {
    font-size: 24px;
    line-height: 1.2;
    margin: 4px 0 0;
}

.empty-state {
    grid-column: 1 / -1;
}

.chat-shell {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    min-height: min(720px, calc(100vh - 150px));
}

.chat-sidebar,
.chat-room {
    display: grid;
    gap: 14px;
    min-height: 0;
}

.chat-sidebar {
    align-content: start;
}

.chat-block {
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
}

.chat-block-head,
.chat-room-head,
.chat-room-meta,
.chat-message-meta {
    align-items: center;
    display: flex;
    gap: 8px;
}

.chat-block-head,
.chat-room-head {
    justify-content: space-between;
}

.chat-block-head h2,
.chat-room-head h2 {
    font-size: 16px;
    margin: 0;
}

.chat-block-head span,
.chat-room-meta span,
.chat-message-meta span {
    color: var(--muted);
    font-size: 12px;
}

.chat-conversation-list {
    display: grid;
    gap: 8px;
    max-height: 450px;
    overflow: auto;
    padding-right: 2px;
}

.chat-conversation {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 9px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 8px;
}

.chat-conversation.active,
.chat-conversation:hover {
    background: var(--workspace-accent-soft);
    border-color: var(--workspace-accent-border);
}

.chat-avatar {
    align-items: center;
    background: var(--workspace-panel-accent);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.chat-conversation-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chat-conversation-copy strong,
.chat-conversation-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-conversation-copy small {
    color: var(--muted);
}

.chat-unread {
    align-items: center;
    background: var(--red);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    min-width: 24px;
    padding: 0 7px;
}

.chat-mini-form {
    display: grid;
    gap: 8px;
}

.chat-group-create summary,
.chat-group-manage summary {
    cursor: pointer;
    font-weight: 900;
}

.chat-management-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.chat-management-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.chat-group-note {
    color: var(--muted);
    font-size: 12px;
}

.chat-delete-form {
    display: flex;
    justify-content: flex-end;
}

.chat-room {
    grid-template-rows: auto minmax(320px, 1fr) auto;
}

.chat-room-meta {
    flex-wrap: wrap;
    margin-top: 5px;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 9px;
}

.status-pill.info {
    background: var(--workspace-accent-soft);
    color: var(--workspace-accent-text);
}

.chat-message-list {
    align-content: start;
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    overflow: auto;
    padding: 12px;
    scroll-behavior: smooth;
}

.chat-message {
    display: grid;
    gap: 5px;
    justify-items: start;
    max-width: min(680px, 88%);
}

.chat-message.mine {
    justify-self: end;
    justify-items: end;
}

.chat-message-meta {
    flex-wrap: wrap;
}

.chat-message-meta strong {
    font-size: 12px;
}

.chat-bubble,
.chat-attachment {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(81, 34, 18, .06);
    overflow-wrap: anywhere;
    padding: 9px 11px;
}

.chat-message.mine .chat-bubble {
    background: var(--workspace-panel-accent);
    border-color: var(--workspace-panel-accent);
    color: #fff;
}

.chat-attachment {
    display: grid;
    gap: 6px;
    max-width: 360px;
    padding: 8px;
}

.chat-attachment img {
    border-radius: 8px;
    display: block;
    max-height: 260px;
    object-fit: contain;
    width: 100%;
}

.chat-attachment audio {
    width: min(320px, 72vw);
}

.chat-attachment a {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    font-weight: 800;
}

.chat-composer {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.chat-composer.is-sending {
    opacity: .72;
    pointer-events: none;
}

.chat-composer textarea {
    min-height: 52px;
}

.chat-file {
    align-items: center;
    border: 1px dashed var(--workspace-accent-border);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    gap: 7px;
    min-height: 42px;
    padding: 9px 11px;
}

.chat-file input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.contact-section {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    margin-top: 22px;
}

.contact-card h2,
.contact-form h2 {
    font-size: 24px;
    line-height: 1.2;
    margin: 5px 0 14px;
}

.contact-list,
.region-contact-card {
    display: grid;
    gap: 10px;
}

.region-contact-picker {
    display: block;
    margin: 14px 0 10px;
}

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

.message-field {
    grid-column: 1 / -1;
}

@media (max-width: 1300px) {
    .grid.five {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .grid.four {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .sidebar {
        width: 230px;
    }
}

@media (max-width: 840px) {
    [style*="grid-column:span"],
    [style*="grid-column: span"] {
        grid-column: 1 / -1 !important;
    }

    [style*="grid-template-columns:"] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .topbar .actions {
        width: 100%;
        align-items: flex-start;
    }

    .topbar form {
        width: auto;
    }

    .topbar .actions .btn {
        min-width: 0;
    }

    .actions {
        row-gap: 7px;
    }

    .topbar .actions .btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .dashboard-panel,
    .panel,
    .table-wrap,
    .mobile-hero-panel,
    .mobile-search,
    .mobile-order-card,
    .mobile-section,
    .sales-cycle {
        width: 100%;
    }

    .filter-form,
    .form-grid,
    .contact-form-grid,
    .location-picker-toolbar,
    .module-tabs,
    .actions {
        width: 100%;
    }

    .main-inner {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .delivery-command {
        grid-template-columns: 1fr;
    }

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

    .delivery-compact-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .report-hub,
    .delivery-ops-head {
        align-items: stretch;
        flex-direction: column;
    }

    .report-hub-actions,
    .delivery-ops-actions {
        justify-content: flex-start;
    }

    .order-process-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .order-line-row {
        grid-template-columns: minmax(170px, 1fr) minmax(130px, 1fr) auto;
    }

    .sales-cycle {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .delivery-focus,
    .delivery-lanes {
        grid-template-columns: 1fr;
    }

    .delivery-compact-stats,
    .report-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delivery-source-summary {
        justify-content: flex-start;
    }

    .delivery-flow {
        min-width: 0;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar > div:first-child,
    .topbar .page-subtitle {
        min-width: 0;
    }

    .topbar .page-title,
    .topbar .page-subtitle {
        overflow-wrap: anywhere;
    }

    .topbar .actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn,
    input,
    select,
    textarea {
        font-size: 16px;
        min-height: 42px;
    }
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        bottom: 0;
        box-shadow:
            18px 0 54px rgba(25, 16, 14, .32),
            inset -1px 0 0 rgba(255, 255, 255, .08);
        height: 100dvh;
        left: 0;
        max-width: calc(100vw - 74px);
        padding-bottom: 92px;
        position: fixed;
        top: 0;
        transform: translateX(-106%);
        transition: transform .22s ease;
        width: min(310px, calc(100vw - 74px));
        z-index: 120;
    }

    .main {
        margin-left: 0;
        min-height: 100vh;
    }

    body.nav-open {
        overflow: hidden;
    }

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

    .mobile-nav-toggle {
        align-items: center;
        backdrop-filter: blur(18px) saturate(170%);
        -webkit-backdrop-filter: blur(18px) saturate(170%);
        background:
            linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(255, 231, 185, .82));
        border: 1px solid rgba(255, 255, 255, .72);
        border-radius: 999px;
        bottom: 18px;
        box-shadow:
            0 18px 42px rgba(116, 77, 30, .2),
            inset 0 1px 0 rgba(255, 255, 255, .86);
        color: #3b2712;
        cursor: pointer;
        display: inline-flex;
        font-weight: 800;
        gap: 7px;
        min-height: 48px;
        padding: 12px 16px;
        position: fixed;
        right: 16px;
        z-index: 140;
    }

    .mobile-nav-toggle .icon {
        margin: 0;
    }

    .mobile-nav-icon-close {
        display: none;
    }

    body.nav-open .mobile-nav-icon-open {
        display: none;
    }

    body.nav-open .mobile-nav-icon-close {
        display: inline-flex;
    }

    .mobile-nav-overlay {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background:
            radial-gradient(circle at 78% 18%, rgba(216, 170, 66, .18), transparent 34%),
            rgba(29, 20, 18, .48);
        display: block;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        transition: opacity .2s ease;
        z-index: 110;
    }

    body.nav-open .mobile-nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .form-grid,
    .form-grid.compact,
    .grid.two,
    .grid.three,
    .grid.four,
    .grid.five,
    .product-grid,
    .chat-shell {
        grid-template-columns: 1fr;
    }

    .chat-shell {
        min-height: auto;
    }

    .chat-conversation-list {
        max-height: 270px;
    }

    .chat-room {
        grid-template-rows: auto minmax(360px, 58vh) auto;
    }

    .chat-composer {
        grid-template-columns: 1fr;
    }

    .chat-file,
    .chat-composer .btn {
        width: 100%;
    }

    .order-line-row {
        grid-template-columns: 1fr;
    }

    .filter-form .filter-search {
        grid-column: auto;
    }

    .filter-status {
        flex-direction: column;
    }

    .filter-chips {
        justify-content: flex-start;
    }

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

    .cycle-step:not(:last-child)::after {
        display: none;
    }

    .main {
        padding: 14px 14px 86px;
    }

    .main-inner {
        width: 100%;
    }

    .module-tabs {
        flex-wrap: nowrap;
        margin-left: -14px;
        margin-right: -14px;
        overflow-x: auto;
        padding: 0 14px 4px;
    }

    .module-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .shop-hero,
    .hero-content {
        min-height: 360px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .shop-header-inner,
    .shop-main {
        width: min(1180px, calc(100% - 24px));
    }

    .shop-header-inner {
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
    }


    .shop-header .actions {
        gap: 6px;
        justify-self: start;
        width: auto;
    }

    .shop-header .btn {
        font-size: 14px;
        height: auto;
        min-height: 38px;
        padding: 8px 10px;
        width: auto;
    }

    .shop-header .btn .icon {
        margin-right: 7px;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .product-category-nav {
        display: flex;
        margin-left: -14px;
        margin-right: -14px;
        overflow-x: auto;
        padding: 2px 14px 8px;
        scroll-snap-type: x proximity;
    }

    .product-category-link {
        flex: 0 0 min(260px, 78vw);
        scroll-snap-align: start;
    }

    .contact-section,
    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .catalog-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-media {
        height: 300px;
    }

    .product-meta {
        flex-direction: column;
        gap: 8px;
    }

    .product-labels {
        grid-template-columns: 1fr;
    }

    .price {
        text-align: left;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .product-modal-summary {
        grid-template-columns: 1fr;
    }

    .product-modal-summary img {
        height: 220px;
    }
}

@media (max-width: 640px) {
    .order-process-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .order-process-steps,
    .process-checklist,
    .delivery-compact-stats,
    .report-flow,
    .settlement-hero,
    .settlement-steps,
    .settlement-checks {
        grid-template-columns: 1fr;
    }

    .settlement-step:not(:last-child)::after {
        content: "↓";
        left: 20px;
        right: auto;
        top: auto;
        bottom: -17px;
    }

    .settlement-action-head {
        align-items: stretch;
        flex-direction: column;
    }

    .order-flow-mini {
        min-width: 0;
    }

    .flow-dot {
        flex: 1 1 12px;
        min-width: 12px;
        width: auto;
    }

    .sales-cycle {
        grid-template-columns: 1fr;
    }

    .shop-hero {
        background: var(--hero-image, url("/images/nomun-ad-hero-light.png"));
        background-position: 58% center;
        background-size: cover;
    }

    .hero-content p {
        max-width: 30ch;
        text-shadow: none;
    }

    .shop-header-inner {
        display: grid;
        grid-template-columns: 1fr;
    }

    .shop-brand {
        max-width: 100%;
        width: fit-content;
    }

    .shop-header .actions {
        justify-self: start;
        width: auto;
    }

    .shop-header .actions .btn {
        font-size: 14px;
        height: auto;
        min-height: 38px;
        padding: 8px 10px;
        width: auto;
    }

    .shop-header .actions .btn .icon {
        margin-right: 7px;
    }
}

.mobile-app-body {
    background: #fff8ef;
    min-height: 100vh;
    padding-bottom: 78px;
}

.mobile-app-header {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.mobile-app-brand {
    align-items: center;
    display: flex;
    gap: 9px;
    min-width: 0;
}

.mobile-app-brand img {
    border-radius: 8px;
    height: 44px;
    object-fit: cover;
    width: 44px;
}

.mobile-app-brand span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mobile-app-brand strong {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-app-brand small {
    color: var(--muted);
}

.mobile-icon-button {
    align-items: center;
    background: #fff1df;
    border: 1px solid #efd4b6;
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.mobile-app-main {
    display: grid;
    gap: 14px;
    margin: 0 auto;
    max-width: 720px;
    padding: 14px;
}

.mobile-hero-panel {
    background: linear-gradient(135deg, #8f171c, #ef5b24 56%, #d8aa42);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: #fff;
    padding: 18px;
}

.mobile-hero-panel h1 {
    font-size: 26px;
    line-height: 1.15;
    margin: 6px 0 7px;
}

.mobile-hero-panel p {
    color: #fff5e6;
    line-height: 1.45;
    margin: 0;
}

.mobile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

.mobile-metrics div,
.mobile-info-grid div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(98, 38, 20, .07);
    display: grid;
    gap: 3px;
    padding: 12px;
}

.mobile-metrics span,
.mobile-info-grid span {
    color: var(--muted);
    font-size: 12px;
}

.mobile-metrics strong,
.mobile-info-grid strong {
    font-size: 19px;
    overflow-wrap: anywhere;
}

.mobile-section {
    display: grid;
    gap: 12px;
}

.mobile-section-title,
.mobile-detail-head,
.mobile-total-row {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.mobile-section-title h2,
.mobile-page-title {
    font-size: 21px;
    line-height: 1.2;
    margin: 0;
}

.mobile-section-title a {
    color: var(--red);
    font-weight: 800;
}

.mobile-order-list {
    display: grid;
    gap: 10px;
}

.mobile-order-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(98, 38, 20, .07);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 12px;
}

.mobile-order-card span:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mobile-order-card small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.mobile-order-total {
    color: var(--red);
    flex: 0 0 auto;
    font-weight: 800;
    text-align: right;
}

.mobile-search {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

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

.mobile-sticky-actions {
    background: rgba(255, 248, 239, .96);
    border-top: 1px solid var(--line);
    bottom: 58px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    left: 0;
    padding: 10px 14px;
    position: sticky;
}

.mobile-bottom-nav {
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--line);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 0;
    padding: 6px 10px max(6px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 40;
}

.mobile-bottom-nav a {
    align-items: center;
    border-radius: 8px;
    color: var(--muted);
    display: grid;
    font-size: 12px;
    gap: 3px;
    justify-items: center;
    padding: 6px 4px;
}

.mobile-bottom-nav a.active {
    background: #fff1df;
    color: var(--red);
    font-weight: 800;
}

.receipt-body {
    background: #f4eee6;
    font-family: var(--print-font);
}

.receipt-page {
    margin: 0 auto;
    max-width: 430px;
    padding: 14px;
}

.receipt-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.receipt-paper {
    background: #fff;
    border: 1px solid #ddd3c9;
    border-radius: 8px;
    color: #1d1d1d;
    font-family: var(--print-font);
    padding: 14px;
}

.receipt-header {
    border-bottom: 1px dashed #b8ada4;
    display: grid;
    gap: 4px;
    justify-items: center;
    padding-bottom: 10px;
    text-align: center;
}

.receipt-header img {
    border-radius: 8px;
    max-width: 100px;
}

.receipt-header h1 {
    font-size: 17px;
    margin: 0;
}

.receipt-header p,
.receipt-footer p {
    margin: 0;
}

.receipt-meta {
    border-bottom: 1px dashed #b8ada4;
    display: grid;
    gap: 6px;
    padding: 10px 0;
}

.receipt-meta div,
.receipt-totals div {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.receipt-meta span,
.receipt-totals span {
    color: #5d5752;
}

.receipt-lines {
    display: grid;
    gap: 8px;
}

.receipt-paper .receipt-lines {
    border-bottom: 1px dashed #b8ada4;
    padding: 10px 0;
}

.receipt-line {
    align-items: start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.receipt-line span {
    display: grid;
    gap: 2px;
}

.receipt-line small {
    color: #5d5752;
}

.receipt-line strong {
    white-space: nowrap;
}

.receipt-totals {
    display: grid;
    gap: 7px;
    padding-top: 10px;
}

.grand-total {
    border-top: 1px solid #211b1a;
    font-size: 18px;
    padding-top: 8px;
}

.receipt-footer {
    border-top: 1px dashed #b8ada4;
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    text-align: center;
}

@media (max-width: 460px) {
    .mobile-info-grid {
        grid-template-columns: 1fr;
    }

    .mobile-search {
        grid-template-columns: 1fr;
    }
}

@media print {
    body.receipt-body {
        background: #fff;
        color: #000;
        font-family: var(--print-font);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .receipt-page {
        max-width: none;
        padding: 0;
    }

    .receipt-paper {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        color: #000;
        font-family: var(--print-font);
        margin: 0;
        width: 80mm;
    }

    .receipt-paper table,
    .receipt-paper th,
    .receipt-paper td,
    .receipt-paper span,
    .receipt-paper strong,
    .receipt-paper small,
    .receipt-paper p,
    .receipt-paper h1 {
        font-family: var(--print-font);
    }
}

/* Pre-seller route workspace */
.workspace-presell {
    --workspace-panel-accent: #0f766e;
    --workspace-accent-soft: #ccfbf1;
    --workspace-accent-softer: #f0fdfa;
    --workspace-accent-border: #99f6e4;
    --workspace-accent-text: #0f766e;
    --workspace-accent-strong: #115e59;
}

.presell-mobile-nav,
.presell-customer-cards,
.presell-history-cards {
    display: none;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.presell-route-hero {
    align-items: center;
    background:
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, .19), transparent 25%),
        linear-gradient(135deg, #134e4a, #0f766e 55%, #14b8a6);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 118, 110, .18);
    color: #fff;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 14px;
    overflow: hidden;
    padding: 22px 24px;
}

.presell-route-hero.compact {
    padding: 18px 22px;
}

.presell-route-hero.danger {
    background: linear-gradient(135deg, #7f1d1d, #b91c1c 58%, #ef4444);
}

.presell-route-hero h2 {
    color: inherit;
    font-size: clamp(22px, 3vw, 32px);
    margin: 3px 0 5px;
}

.presell-route-hero p {
    color: rgba(255, 255, 255, .8);
    margin: 0;
}

.presell-route-hero > strong {
    font-size: 38px;
}

.presell-eyebrow {
    color: var(--workspace-accent-text);
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}

.presell-route-hero .presell-eyebrow {
    color: rgba(255, 255, 255, .7);
}

.presell-day-status {
    align-items: center;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
    gap: 7px;
    padding: 9px 13px;
}

.presell-day-status::before {
    background: #86efac;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(134, 239, 172, .15);
    content: "";
    height: 8px;
    width: 8px;
}

.presell-day-status.closed::before {
    background: #fde68a;
}

.presell-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.presell-metric-card {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 16px;
}

.presell-metric-card.primary {
    background: linear-gradient(145deg, #ecfdf5, #ccfbf1);
    border-color: #5eead4;
}

.presell-metric-card.danger {
    background: #fff1f2;
    border-color: #fecdd3;
}

.presell-metric-card span,
.presell-metric-card small {
    color: var(--muted);
    font-size: 12px;
}

.presell-metric-card strong {
    font-size: clamp(19px, 2vw, 26px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.presell-quick-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.presell-quick-actions > a {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 3px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 13px;
}

.presell-quick-actions > a > span {
    align-items: center;
    background: #ccfbf1;
    border-radius: 12px;
    color: #0f766e;
    display: inline-flex;
    grid-row: span 2;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.presell-quick-actions > a.primary {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.presell-quick-actions > a.primary > span {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.presell-quick-actions small {
    color: var(--muted);
}

.presell-quick-actions > a.primary small {
    color: rgba(255, 255, 255, .72);
}

.presell-dashboard-grid {
    margin-bottom: 14px;
}

.presell-sales-chart {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    height: 150px;
    padding-top: 12px;
}

.presell-sales-bar {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-rows: 1fr auto;
    height: 100%;
    justify-items: center;
}

.presell-sales-bar > span {
    align-self: end;
    background: linear-gradient(#2dd4bf, #0f766e);
    border-radius: 8px 8px 3px 3px;
    min-height: 6px;
    width: min(28px, 72%);
}

.presell-sales-bar small {
    color: var(--muted);
    font-size: 11px;
}

.presell-close-summary,
.presell-exception-info {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.presell-close-summary > div,
.presell-exception-info > div {
    background: var(--workspace-accent-softer);
    border-radius: 11px;
    display: grid;
    gap: 3px;
    padding: 10px;
}

.presell-close-summary span,
.presell-exception-info span {
    color: var(--muted);
    font-size: 11px;
}

.presell-close-form {
    display: grid;
    gap: 10px;
}

.presell-card-list {
    display: grid;
    gap: 8px;
}

.presell-list-card {
    align-items: center;
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--line);
    border-radius: 13px;
    color: inherit;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 13px;
}

.presell-list-card.danger {
    background: #fff7f7;
    border-color: #fecaca;
}

.presell-list-card > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.presell-list-card small {
    color: var(--muted);
}

.presell-card-value {
    flex: 0 0 auto;
    text-align: right;
}

.presell-empty-state {
    align-items: center;
    color: var(--muted);
    display: grid;
    gap: 6px;
    justify-items: center;
    min-height: 120px;
    padding: 20px;
    text-align: center;
}

.presell-empty-state .icon {
    color: #0f766e;
    height: 30px;
    width: 30px;
}

.presell-empty-state.success {
    color: #166534;
    margin-top: 14px;
}

.presell-customer-search {
    display: grid;
    gap: 12px;
}

.presell-customer-search h2 {
    margin: 3px 0 0;
}

.presell-search-form {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto;
}

.presell-customer-filters {
    grid-template-columns: minmax(240px, 1fr) minmax(145px, auto) minmax(165px, auto) auto;
}

.presell-search-input {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    gap: 8px;
    padding: 0 11px;
}

.presell-search-input:focus-within {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
}

.presell-search-input .icon {
    color: #0f766e;
    flex: 0 0 auto;
}

.presell-search-input input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
    padding-left: 0;
    width: 100%;
}

.presell-search-result {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.presell-route-customer-list,
.presell-other-day-results,
.presell-route-map {
    margin-top: 14px;
}

.presell-other-day-results {
    background: #f0fdfa;
    border-color: #99f6e4;
    display: grid;
    gap: 13px;
}

.presell-other-day-results h2,
.presell-other-day-results p {
    margin: 3px 0 0;
}

.presell-route-empty > span {
    font-size: 13px;
    max-width: 520px;
}

.presell-customer-modal-form {
    padding: 18px;
}

.presell-store-photo-field {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed var(--workspace-accent-border);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 112px;
    padding: 12px;
}

.presell-store-photo-field label {
    margin: 0;
}

.presell-store-photo-field input[type="file"] {
    background: #fff;
}

.presell-store-photo-field > img {
    border-radius: 12px;
    height: 92px;
    object-fit: cover;
    width: 112px;
}

.presell-customer-store-photo {
    background: #eef2f1;
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: 12px;
    flex: 0 0 auto;
    height: 48px;
    object-fit: cover;
    width: 48px;
}

.presell-customer-store-photo.small {
    border-radius: 9px;
    height: 38px;
    width: 38px;
}

.presell-customer-table-identity {
    align-items: center;
    display: flex;
    gap: 9px;
}

.presell-customer-modal .product-modal-header {
    background: #f0fdfa;
    border-color: #ccfbf1;
    position: sticky;
    top: 0;
    z-index: 500;
}

.presell-modal-wide-field {
    grid-column: 1 / -1;
}

.presell-new-customer-ready {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 14px;
    color: #166534;
    display: flex;
    gap: 11px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.presell-new-customer-ready > span:nth-child(2) {
    display: grid;
    gap: 2px;
    margin-right: auto;
}

.presell-new-customer-ready small {
    color: #47745a;
}

.presell-install-button {
    align-items: center;
    background: #111827;
    border: 1px solid rgba(250, 204, 21, .45);
    border-radius: 16px;
    bottom: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .26);
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 9px 13px 9px 9px;
    position: fixed;
    right: 18px;
    text-align: left;
    z-index: 145;
}

.presell-install-button[hidden] {
    display: none;
}

.presell-install-button > span:first-child {
    align-items: center;
    background: linear-gradient(145deg, #fcd34d, #b7791f);
    border-radius: 11px;
    color: #111827;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.presell-install-button > span:last-child {
    display: grid;
    gap: 1px;
}

.presell-install-button strong {
    font-size: 13px;
}

.presell-install-button small {
    color: #cbd5e1;
    font-size: 10px;
}

.presell-install-dialog {
    max-width: min(500px, calc(100vw - 28px));
    width: 500px;
}

.presell-install-guide {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.presell-install-guide > img {
    border-radius: 20px;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .18);
}

.presell-install-guide h3 {
    margin: 0 0 8px;
}

.presell-install-guide ol {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 22px;
}

.presell-install-guide p {
    margin: 0;
}

.presell-install-guide .btn {
    justify-content: center;
    width: 100%;
}

.presell-payment-profile {
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    color: #854d0e;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 14px;
}

.presell-payment-profile.credit-ready {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.presell-payment-profile-icon {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border-radius: 11px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.presell-payment-profile > span:nth-child(2) {
    display: grid;
    gap: 2px;
}

.presell-payment-profile small {
    color: currentColor;
    opacity: .78;
}

.presell-credit-summary {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.presell-credit-summary[hidden] {
    display: none;
}

.presell-credit-summary > span {
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(22, 101, 52, .12);
    border-radius: 10px;
    display: grid;
    gap: 3px;
    padding: 9px 10px;
}

.presell-credit-summary strong {
    font-size: 15px;
}

.presell-closed-banner,
.presell-duplicate-alert {
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    color: #854d0e;
    display: flex;
    gap: 11px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.presell-duplicate-alert {
    justify-content: space-between;
    margin: 0;
}

.presell-duplicate-alert[hidden] {
    display: none;
}

.presell-duplicate-alert > span {
    display: grid;
    gap: 2px;
    margin-right: auto;
}

.presell-product-builder {
    display: grid;
    gap: 12px;
}

.presell-product-builder .order-line-header h3 {
    margin-bottom: 3px;
}

.presell-product-picker {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.presell-product-choice {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    display: grid;
    gap: 11px;
    padding: 12px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.presell-product-choice.selected {
    border-color: var(--workspace-accent);
    box-shadow: 0 0 0 2px var(--workspace-accent-softer);
    transform: translateY(-1px);
}

.presell-product-choice-main {
    align-items: center;
    display: grid;
    gap: 11px;
    grid-template-columns: 68px minmax(0, 1fr);
}

.presell-product-choice-main > img,
.presell-product-placeholder {
    align-items: center;
    background: #f5f7f6;
    border-radius: 12px;
    display: flex;
    height: 68px;
    justify-content: center;
    object-fit: contain;
    padding: 5px;
    width: 68px;
}

.presell-product-placeholder {
    color: var(--muted);
}

.presell-product-choice-main > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.presell-product-choice-main strong {
    line-height: 1.3;
}

.presell-product-choice-main small {
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presell-product-choice-main b {
    color: var(--workspace-accent-strong);
    font-size: 14px;
}

.presell-quantity-control {
    align-items: stretch;
    display: grid;
    grid-template-columns: 46px minmax(80px, 1fr) 46px;
}

.presell-quantity-control > button {
    align-items: center;
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    color: var(--workspace-accent-strong);
    cursor: pointer;
    display: flex;
    font-size: 24px;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
}

.presell-quantity-control > button:first-child {
    border-radius: 12px 0 0 12px;
}

.presell-quantity-control > button:last-child {
    border-radius: 0 12px 12px 0;
}

.presell-quantity-control > label {
    align-items: center;
    border-bottom: 1px solid var(--workspace-accent-border);
    border-top: 1px solid var(--workspace-accent-border);
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 0;
    padding: 0 6px;
}

.presell-quantity-control input {
    appearance: textfield;
    background: transparent;
    border: 0;
    font-size: 18px;
    font-weight: 800;
    min-width: 0;
    padding: 0;
    text-align: right;
    width: 58px;
}

.presell-quantity-control input::-webkit-inner-spin-button,
.presell-quantity-control input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.presell-quantity-control label small,
.presell-product-packaging {
    color: var(--muted);
    font-size: 11px;
}

.presell-product-summary {
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px;
}

.presell-product-summary > span {
    display: grid;
    gap: 2px;
}

.presell-product-summary small {
    color: var(--muted);
}

.presell-product-summary strong {
    color: var(--workspace-accent-strong);
}

.presell-order-submit {
    align-items: center;
    background: var(--workspace-accent-softer);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.presell-order-submit > span {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 7px;
}

.presell-exception-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.presell-exception-card {
    margin: 0;
}

.presell-exception-head,
.presell-exception-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.presell-exception-head h2 {
    margin: 7px 0 3px;
}

.presell-exception-head p {
    color: var(--muted);
    margin: 0;
}

.presell-exception-info {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
}

.presell-exception-info strong {
    overflow-wrap: anywhere;
}

.presell-exception-reason {
    background: #fff7ed;
    border-left: 3px solid #f97316;
    border-radius: 8px;
    margin-top: 12px;
    padding: 10px 12px;
}

.presell-exception-reason p {
    margin: 4px 0 0;
}

.presell-return-lines {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.presell-return-lines > div {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 0;
}

.presell-return-lines > div > span {
    display: grid;
    gap: 2px;
}

.presell-return-lines small {
    color: var(--muted);
}

.presell-exception-actions {
    justify-content: flex-start;
    margin-top: 12px;
}

@media (max-width: 980px) {
    .presell-metrics,
    .presell-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .presell-exception-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body.workspace-presell {
        background: #f6faf9;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    body.workspace-presell .main {
        padding: 10px 10px calc(94px + env(safe-area-inset-bottom));
    }

    body.workspace-presell .main-inner {
        max-width: 680px;
    }

    body.workspace-presell .sidebar,
    body.workspace-presell .mobile-nav-toggle,
    body.workspace-presell .mobile-nav-overlay {
        display: none;
    }

    body.workspace-presell .topbar {
        align-items: center;
        background: rgba(246, 250, 249, .92);
        margin: -10px -10px 10px;
        padding: max(10px, env(safe-area-inset-top)) 12px 9px;
        position: sticky;
        top: 0;
        z-index: 35;
    }

    body.workspace-presell .topbar .page-title {
        font-size: 20px;
    }

    body.workspace-presell .topbar .page-subtitle,
    body.workspace-presell .topbar .actions > a,
    body.workspace-presell .topbar .actions > .badge {
        display: none;
    }

    body.workspace-presell .topbar .actions {
        flex: 0 0 auto;
        width: auto;
    }

    body.workspace-presell .topbar form,
    body.workspace-presell .topbar form .btn {
        min-height: 40px;
        width: auto;
    }

    body.workspace-presell .topbar form .btn {
        font-size: 0;
        padding: 9px 11px;
    }

    body.workspace-presell .topbar form .btn .icon {
        margin: 0;
    }

    .presell-desktop-nav {
        display: none;
    }

    .presell-mobile-nav {
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid rgba(15, 118, 110, .15);
        bottom: 0;
        box-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 0;
        padding: 7px 7px max(7px, env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 150;
    }

    .presell-install-button {
        bottom: calc(82px + env(safe-area-inset-bottom));
        right: 10px;
        z-index: 140;
    }

    .presell-install-button > span:first-child {
        height: 36px;
        width: 36px;
    }

    .product-modal.presell-install-dialog {
        border-radius: 20px 20px 0 0;
        margin: auto 0 0;
        max-height: min(88dvh, 760px);
        max-width: 100%;
        width: 100%;
    }

    .presell-mobile-nav > a {
        align-items: center;
        border-radius: 12px;
        color: #64748b;
        display: grid;
        font-size: 10px;
        gap: 3px;
        justify-items: center;
        min-width: 0;
        padding: 5px 2px;
    }

    .presell-mobile-nav > a.active {
        color: #0f766e;
        font-weight: 900;
    }

    .presell-mobile-nav .presell-mobile-primary {
        color: #0f766e;
        margin-top: -22px;
    }

    .presell-mobile-nav .presell-mobile-primary .icon {
        background: #0f766e;
        border: 5px solid #f6faf9;
        border-radius: 50%;
        box-sizing: content-box;
        color: #fff;
        height: 25px;
        padding: 9px;
        width: 25px;
    }

    .presell-route-hero {
        align-items: flex-start;
        border-radius: 16px;
        padding: 17px;
    }

    .presell-route-hero h2 {
        font-size: 22px;
    }

    .presell-route-hero .presell-day-status {
        font-size: 0;
        padding: 9px;
    }

    .presell-metrics {
        gap: 8px;
    }

    .presell-metric-card {
        border-radius: 14px;
        padding: 13px 12px;
    }

    .presell-metric-card strong {
        font-size: 19px;
    }

    .presell-quick-actions {
        gap: 8px;
    }

    .presell-quick-actions > a {
        border-radius: 14px;
        padding: 11px;
    }

    .presell-quick-actions > a > span {
        height: 36px;
        width: 36px;
    }

    .presell-sales-chart {
        height: 130px;
    }

    .presell-search-form {
        grid-template-columns: 1fr;
    }

    .presell-customer-search .panel-title-row {
        align-items: stretch;
    }

    .presell-customer-search .panel-title-row > div:first-child,
    .presell-customer-search .panel-title-row > .actions {
        flex: 1 1 100%;
    }

    .presell-customer-search .panel-title-row > .actions {
        justify-content: space-between;
    }

    .presell-customer-search .panel-title-row > .actions .btn {
        flex: 1;
    }

    .presell-search-form .btn {
        width: 100%;
    }

    .presell-search-result {
        align-items: stretch;
        flex-direction: column;
    }

    .presell-search-result .btn {
        width: 100%;
    }

    .presell-route-customer-list .panel-title-row {
        align-items: center;
    }

    .presell-customer-cards,
    .presell-history-cards {
        display: grid;
        gap: 9px;
    }

    .presell-customer-card,
    .presell-history-card {
        background: #fff;
        border: 1px solid rgba(15, 118, 110, .13);
        border-radius: 14px;
        box-shadow: 0 7px 22px rgba(15, 23, 42, .05);
        padding: 12px;
    }

    .presell-customer-card-head {
        align-items: center;
        display: flex;
        gap: 10px;
    }

    .presell-customer-card-head > span:last-child {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .presell-customer-card small,
    .presell-history-card small,
    .presell-history-card p {
        color: var(--muted);
    }

    .presell-customer-avatar {
        align-items: center;
        background: #ccfbf1;
        border-radius: 12px;
        color: #0f766e;
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 18px;
        font-weight: 900;
        height: 42px;
        justify-content: center;
        width: 42px;
    }

    .presell-customer-card p {
        align-items: flex-start;
        color: var(--muted);
        display: flex;
        font-size: 12px;
        gap: 6px;
        margin: 11px 0;
    }

    .presell-customer-card p .icon {
        flex: 0 0 auto;
    }

    .presell-customer-card-actions {
        display: grid;
        gap: 7px;
        grid-template-columns: 1fr 1fr;
    }

    .presell-customer-card-actions .btn {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .presell-customer-cards + .table-wrap,
    .presell-history-cards + .table-wrap {
        display: none;
    }

    .presell-other-day-results .presell-list-card {
        gap: 10px;
    }

    .presell-other-day-results .presell-list-card,
    .presell-new-customer-ready {
        align-items: stretch;
        flex-direction: column;
    }

    .presell-other-day-results .btn,
    .presell-new-customer-ready .badge {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .product-modal.presell-customer-modal {
        border-radius: 20px 20px 0 0;
        height: auto;
        margin: auto 0 0;
        max-height: min(92dvh, 920px);
        max-width: 100%;
        width: 100%;
    }

    .presell-customer-modal-form {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .presell-store-photo-field {
        grid-template-columns: 1fr;
    }

    .presell-store-photo-field > img {
        height: 150px;
        width: 100%;
    }

    .presell-customer-modal .location-picker-toolbar,
    .presell-customer-modal .form-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .presell-customer-modal .location-picker-toolbar .actions,
    .presell-customer-modal .form-modal-actions,
    .presell-customer-modal .form-modal-actions .btn {
        width: 100%;
    }

    .presell-customer-modal .location-map {
        min-height: 230px;
    }

    .presell-history-card > div {
        align-items: center;
        display: flex;
        gap: 8px;
        justify-content: space-between;
    }

    .presell-history-card h3 {
        margin: 11px 0 3px;
    }

    .presell-history-card p {
        font-size: 12px;
        margin: 0 0 12px;
    }

    .presell-list-card {
        align-items: flex-start;
    }

    .presell-card-value {
        max-width: 42%;
    }

    .presell-duplicate-alert,
    .presell-order-submit,
    .presell-exception-head,
    .presell-exception-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .presell-payment-profile {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .presell-payment-profile > .badge {
        grid-column: 1 / -1;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .presell-credit-summary {
        grid-template-columns: 1fr 1fr;
    }

    .presell-product-picker,
    .presell-product-summary {
        grid-template-columns: 1fr;
    }

    .presell-product-summary {
        gap: 6px;
    }

    .presell-product-summary > span {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }

    .presell-duplicate-alert .btn,
    .presell-order-submit .btn,
    .presell-exception-head .btn,
    .presell-exception-actions .btn {
        width: 100%;
    }

    .presell-order-submit > span {
        align-items: flex-start;
    }

    .presell-close-summary,
    .presell-exception-info {
        grid-template-columns: 1fr 1fr;
    }

    .presell-exception-info > div:nth-child(2) {
        grid-column: 1 / -1;
    }

    .presell-return-lines > div {
        align-items: flex-start;
    }

    .presell-order-create .order-line-header {
        align-items: stretch;
        flex-direction: column;
    }

    .presell-order-create .order-line-header .btn {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .presell-metrics,
    .presell-quick-actions {
        grid-template-columns: 1fr;
    }

    .presell-route-hero p {
        font-size: 12px;
    }
}

/* ── Payment Entry: Open Invoices Table ── */
.open-invoices-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.open-invoices-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.open-invoices-search {
    display: flex;
    gap: 6px;
    align-items: center;
}

.open-invoices-search input {
    min-width: 220px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    background: var(--paper);
    color: var(--ink);
}

.open-invoices-table {
    font-size: 13px;
}

.open-invoices-table th {
    position: sticky;
    top: 0;
    background: var(--soft);
    z-index: 2;
    white-space: nowrap;
}

.open-invoices-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.open-invoices-table .invoice-row {
    cursor: pointer;
    transition: background .15s;
}

.open-invoices-table .invoice-row:hover {
    background: var(--workspace-accent-softer);
}

.open-invoices-table .invoice-row.selected {
    background: var(--workspace-accent-soft);
    outline: 2px solid var(--workspace-panel-accent);
    outline-offset: -2px;
}

.open-invoices-table .invoice-row.selected td:first-child {
    position: relative;
}

.open-invoices-table .invoice-row.selected td:first-child::before {
    content: '✓';
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-weight: 700;
    font-size: 14px;
}

/* ── Selected Order Info Bar ── */
.selected-order-info {
    background: var(--workspace-accent-soft);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.selected-order-info.hidden {
    display: none;
}

.selected-order-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.selected-order-badge .btn {
    margin-left: auto;
}

/* ── Payment Order Display ── */
.payment-order-display {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    min-height: 38px;
    font-size: 14px;
}

/* ── Tone helpers for status badges ── */
.tone-bad {
    color: var(--red);
    font-weight: 600;
}

.tone-warn {
    color: var(--orange);
    font-weight: 600;
}

.tone-neutral {
    color: var(--muted);
    font-weight: 500;
}

.tone-good {
    color: var(--green);
    font-weight: 600;
}

/* Driver payment progress indicators */
.tone-good-row {
    transition: background .3s;
}

.tone-warn-row {
    transition: background .3s;
}

.payment-badge-method {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--workspace-accent-soft);
    border: 1px solid var(--workspace-accent-border);
    color: var(--workspace-accent-text);
    white-space: nowrap;
}

.payment-badge-method.is-cash {
    background: color-mix(in srgb, var(--green) 12%, white 88%);
    border-color: color-mix(in srgb, var(--green) 30%, var(--line) 70%);
    color: var(--green-dark);
}

.payment-badge-method.is-qpay {
    background: color-mix(in srgb, var(--muted) 10%, white 90%);
    border-color: var(--line);
    color: var(--muted);
}

.payment-badge-method.is-bank {
    background: color-mix(in srgb, var(--orange) 12%, white 88%);
    border-color: color-mix(in srgb, var(--orange) 30%, var(--line) 70%);
    color: var(--orange);
}

.payment-collect-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

.payment-collect-summary .method-total {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.summary-metric-today {
    font-size: 1.1em;
    color: var(--green);
    font-weight: 700;
}

/* Driver collection progress bar animation */
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

.progress-bar-fill {
    transition: width .5s ease;
}

td.driver-payment-cell {
    vertical-align: top;
    min-width: 220px;
}

.admin-shell .dashboard-panel,
.admin-shell .metric,
.admin-shell .filter-form,
.admin-shell .create-panel,
.admin-shell .edit-box,
.admin-shell .order-process-card,
.admin-shell .process-check,
.admin-shell .settlement-status-card,
.admin-shell .settlement-action-panel,
.admin-shell .settlement-check,
.admin-shell .settlement-step,
.admin-shell .delivery-command,
.admin-shell .delivery-compact-stat,
.admin-shell .delivery-source-summary,
.admin-shell .report-hub,
.admin-shell .report-detail,
.admin-shell .report-flow-step,
.admin-shell .report-action-row,
.admin-shell .report-command-center,
.admin-shell .product-modal,
.admin-shell .product-modal-header,
.admin-shell .product-modal-summary,
.admin-shell .product-modal .label-block,
.admin-shell .open-invoices-table,
.admin-shell .selected-order-info,
.admin-shell .payment-order-display,
.admin-shell .mobile-metrics div,
.admin-shell .mobile-section,
.admin-shell .mobile-order-card {
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    background: var(--admin-glass-panel-soft);
    border-color: var(--admin-glass-border);
    box-shadow:
        0 12px 30px rgba(15, 23, 42, .07),
        inset 0 1px 0 rgba(255, 255, 255, .56);
}

.admin-shell .filter-form {
    border: 1px solid var(--admin-glass-border);
    border-radius: 8px;
    padding: 12px;
}

.admin-shell .panel .filter-form,
.admin-shell .panel .table-wrap {
    box-shadow: none;
}

.sales-process-dashboard {
    overflow: hidden;
}

.sales-process-head {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.sales-process-head h2,
.sales-alert-panel h3,
.sales-active-panel h3 {
    margin: 2px 0 4px;
}

.sales-process-health {
    background: linear-gradient(135deg, #0c756d, #16a394);
    border-radius: 12px;
    color: #fff;
    display: grid;
    flex: 0 0 180px;
    gap: 2px;
    padding: 14px 16px;
}

.sales-process-health .muted,
.sales-process-health small {
    color: rgba(255, 255, 255, .8);
}

.sales-process-health strong {
    font-size: 28px;
    line-height: 1.1;
}

.sales-process-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}

.sales-process-summary a {
    background: #f6f9fa;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: inherit;
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    text-decoration: none;
}

.sales-process-summary a:hover {
    border-color: var(--workspace-accent-border);
    transform: translateY(-1px);
}

.sales-process-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.sales-process-summary strong {
    font-size: 19px;
}

.sales-system-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.sales-system-links a {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    padding: 7px 10px;
    text-decoration: none;
}

.sales-system-links a:hover {
    background: var(--workspace-accent-soft);
    border-color: var(--workspace-accent-border);
}

.sales-process-flow {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(8, minmax(112px, 1fr));
    margin-top: 14px;
    overflow-x: auto;
    padding: 2px 1px 8px;
}

.sales-process-stage {
    background: #f3f6f7;
    border: 1px solid #d7e0e4;
    border-radius: 10px;
    color: #344851;
    display: grid;
    gap: 6px;
    min-height: 164px;
    padding: 11px;
    position: relative;
    text-decoration: none;
}

.sales-process-stage:not(:last-child)::after {
    background: var(--workspace-accent);
    border-radius: 999px;
    content: "";
    height: 2px;
    position: absolute;
    right: -9px;
    top: 30px;
    width: 9px;
    z-index: 2;
}

.sales-process-stage:hover {
    box-shadow: 0 8px 20px rgba(25, 53, 65, .12);
    transform: translateY(-2px);
}

.sales-process-stage.current {
    background: #fff5dc;
    border-color: #e5bf66;
    color: #765006;
}

.sales-process-stage.complete {
    background: #e4f7f3;
    border-color: #a9ddd4;
    color: #0e7067;
}

.sales-process-stage.pending {
    color: #64747b;
}

.sales-process-step,
.sales-process-icon {
    align-items: center;
    background: rgba(255, 255, 255, .8);
    border-radius: 999px;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.sales-process-step {
    font-size: 12px;
    font-weight: 900;
}

.sales-process-icon {
    position: absolute;
    right: 10px;
    top: 10px;
}

.sales-process-count {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.sales-process-count small,
.sales-process-stage > small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.sales-alert-panel,
.sales-active-panel {
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 0;
    padding: 13px;
}

.sales-alert-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.sales-alert-item {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid #dda126;
    border-radius: 8px;
    color: inherit;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 10px;
    text-decoration: none;
}

.sales-alert-item.bad {
    border-left-color: #c91823;
}

.sales-alert-item span {
    display: grid;
    gap: 2px;
}

.sales-alert-item small {
    color: var(--muted);
}

.sales-alert-item b {
    font-size: 20px;
}

@media (max-width: 1100px) {
    .sales-process-flow {
        grid-template-columns: repeat(8, minmax(150px, 1fr));
    }

    .sales-process-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .sales-process-head {
        display: grid;
    }

    .sales-process-health {
        width: 100%;
    }

    .sales-process-summary,
    .sales-monitor-grid {
        grid-template-columns: 1fr;
    }

    .sales-system-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-system-links a {
        border-radius: 8px;
    }
}

/* Route editor */
.admin-shell .route-edit-modal {
    background: #f5f7f8;
    border: 1px solid rgba(36, 25, 24, .1);
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(28, 20, 18, .28);
    max-height: min(90dvh, 840px);
    max-width: min(900px, calc(100vw - 32px));
    overflow: hidden;
    width: 900px;
}

.admin-shell .route-edit-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.admin-shell .route-edit-modal::backdrop {
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    background: rgba(30, 24, 22, .56);
}

.admin-shell .route-edit-header {
    align-items: flex-start;
    background:
        radial-gradient(circle at 92% 0, rgba(216, 170, 66, .16), transparent 34%),
        linear-gradient(180deg, #fff 0%, #fbfaf8 100%);
    border-bottom: 1px solid #e3e7e9;
    box-shadow: none;
    padding: 22px 26px 20px;
}

.route-edit-heading {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.route-edit-heading .section-kicker {
    color: var(--workspace-accent-strong);
    font-size: 11px;
    letter-spacing: 1.25px;
}

.route-edit-header h2 {
    color: #211c1a;
    font-size: clamp(21px, 2.5vw, 28px);
    letter-spacing: -.35px;
    margin: 0;
    overflow-wrap: anywhere;
}

.route-edit-meta {
    align-items: center;
    color: #657178;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px 14px;
    margin-top: 3px;
}

.route-edit-meta > span:not(.badge) {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.route-edit-meta .icon {
    height: 14px;
    width: 14px;
}

.route-edit-meta .badge {
    font-size: 11px;
    min-height: 24px;
    padding: 4px 9px;
}

.route-edit-header .modal-close {
    border-color: #dfe4e7;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(31, 41, 45, .08);
    flex: 0 0 40px;
    height: 40px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 40px;
}

.route-edit-header .modal-close:hover {
    border-color: var(--workspace-accent-border);
    box-shadow: 0 7px 18px rgba(31, 41, 45, .12);
    transform: translateY(-1px);
}

.route-edit-body {
    background: #f5f7f8;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.route-edit-scroll {
    min-height: 0;
    overflow: auto;
    padding: 22px 26px 20px;
    scrollbar-gutter: stable;
}

.route-edit-form {
    display: grid;
    gap: 16px;
}

.route-edit-section {
    background: #fff;
    border: 1px solid #e1e6e8;
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(30, 42, 48, .055);
    padding: 18px;
}

.route-edit-section-head {
    align-items: center;
    border-bottom: 1px solid #edf0f1;
    display: flex;
    gap: 11px;
    margin-bottom: 16px;
    padding-bottom: 13px;
}

.route-edit-section-head > span {
    align-items: center;
    background: var(--workspace-accent-soft);
    border: 1px solid var(--workspace-accent-border);
    border-radius: 10px;
    color: var(--workspace-accent-strong);
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 11px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    letter-spacing: .6px;
}

.route-edit-section-head div {
    display: grid;
    gap: 2px;
}

.route-edit-section-head strong {
    color: #29353a;
    font-size: 14px;
}

.route-edit-section-head small {
    color: #7a858a;
    font-size: 12px;
    line-height: 1.35;
}

.route-edit-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.route-edit-grid > label {
    min-width: 0;
}

.route-edit-grid > label > span:first-child,
.route-edit-grid > label:not(.route-edit-status) > span {
    color: #556269;
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 6px;
}

.route-edit-grid input:not([type="checkbox"]),
.route-edit-grid select {
    background: #fff;
    border: 1px solid #d8dfe2;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(20, 30, 34, .03);
    min-height: 44px;
    padding: 10px 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.route-edit-grid input:not([type="checkbox"]):focus,
.route-edit-grid select:focus {
    border-color: var(--workspace-panel-accent);
    box-shadow: 0 0 0 3px var(--workspace-accent-soft);
    outline: 0;
}

.route-edit-code {
    grid-column: span 4;
}

.route-edit-name {
    grid-column: span 8;
}

.route-edit-notes {
    grid-column: 1 / -1;
}

.route-edit-region {
    grid-column: span 5;
}

.route-edit-owner {
    grid-column: span 7;
}

.route-edit-help {
    color: #7a858a;
    display: block;
    font-size: 11.5px;
    line-height: 1.4;
    margin-top: 6px;
}

.route-edit-status {
    align-items: center;
    background: #f4faf8;
    border: 1px solid #cfe7e1;
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    gap: 11px;
    grid-column: 1 / -1;
    min-height: 58px;
    padding: 11px 13px;
}

.route-edit-status input {
    accent-color: var(--green);
    flex: 0 0 18px;
    height: 18px;
    min-height: 18px;
    width: 18px;
}

.route-edit-status > span {
    display: grid;
    gap: 2px;
    margin: 0;
}

.route-edit-status strong {
    color: #245b53;
    font-size: 13px;
}

.route-edit-status small {
    color: #688079;
    font-size: 11.5px;
    line-height: 1.35;
}

.route-edit-actions {
    align-items: center;
    background: #fff;
    border-top: 1px solid #dfe5e7;
    box-shadow: 0 -8px 24px rgba(30, 42, 48, .06);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 26px;
    position: relative;
    z-index: 2;
}

.route-edit-actions p {
    align-items: flex-start;
    color: #6b777c;
    display: flex;
    font-size: 11.5px;
    gap: 7px;
    line-height: 1.4;
    margin: 0;
    max-width: 48ch;
}

.route-edit-actions p .icon {
    color: var(--green-dark);
    flex: 0 0 16px;
    height: 16px;
    margin-top: 1px;
    width: 16px;
}

.route-edit-actions .actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    width: auto;
}

.route-edit-actions .btn {
    border-radius: 10px;
    min-height: 42px;
    padding: 10px 16px;
}

.route-edit-danger-zone {
    align-items: center;
    background: #fff8f8;
    border: 1px solid #f0d1d3;
    border-radius: 13px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-top: 18px;
    padding: 14px 16px;
}

.route-edit-danger-zone > div {
    display: grid;
    gap: 3px;
}

.route-edit-danger-zone strong {
    color: #81212a;
    font-size: 13px;
}

.route-edit-danger-zone small {
    color: #88676a;
    font-size: 11.5px;
    line-height: 1.4;
}

.route-edit-danger-zone .btn.danger {
    background: #fff;
    border: 1px solid #dc9ea4;
    border-radius: 10px;
    color: var(--red);
    min-height: 39px;
}

.route-edit-danger-zone .btn.danger:hover:not(:disabled) {
    background: #fff0f1;
    border-color: var(--red);
}

.route-edit-danger-zone .btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

@media (max-width: 720px) {
    .admin-shell .route-edit-modal {
        border-radius: 16px;
        inset-inline: 8px;
        max-height: 94dvh;
        max-width: none;
        width: auto;
    }

    .admin-shell .route-edit-header {
        padding: 18px;
    }

    .route-edit-header h2 {
        font-size: 21px;
    }

    .route-edit-meta {
        gap: 6px 10px;
    }

    .route-edit-scroll {
        padding: 14px;
    }

    .route-edit-actions {
        padding: 14px;
    }

    .route-edit-section {
        padding: 15px;
    }

    .route-edit-grid {
        grid-template-columns: 1fr;
    }

    .route-edit-code,
    .route-edit-name,
    .route-edit-notes,
    .route-edit-region,
    .route-edit-owner,
    .route-edit-status {
        grid-column: 1;
    }

    .route-edit-actions,
    .route-edit-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .route-edit-actions .actions {
        display: grid;
        grid-template-columns: 1fr 1.35fr;
        width: 100%;
    }

    .route-edit-actions .btn,
    .route-edit-danger-zone .btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .route-edit-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .route-edit-actions .actions {
        grid-template-columns: 1fr;
    }
}

/* Unified loading, delivery and settlement process navigation */
.distribution-process-nav {
    background: #fff;
    border: 1px solid #dde3e5;
    border-radius: 17px;
    box-shadow: 0 12px 30px rgba(35, 46, 51, .075);
    margin-bottom: 14px;
    overflow: hidden;
}

.distribution-process-head {
    align-items: center;
    background:
        linear-gradient(115deg, rgba(255, 250, 239, .94), rgba(255, 255, 255, .98) 54%, rgba(239, 248, 246, .9));
    border-bottom: 1px solid #e5e9ea;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 17px 20px;
}

.distribution-process-head h2 {
    color: #273338;
    font-size: 18px;
    margin: 2px 0 3px;
}

.distribution-process-head p {
    color: #728087;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.distribution-channel-switch {
    align-items: center;
    background: #f2f5f6;
    border: 1px solid #dde3e5;
    border-radius: 11px;
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 4px;
}

.distribution-channel-switch a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #5e6a70;
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 750;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.distribution-channel-switch a:hover,
.distribution-channel-switch a.active {
    background: #fff;
    border-color: #d2dadd;
    box-shadow: 0 4px 12px rgba(35, 46, 51, .08);
    color: #8b5d16;
}

.distribution-channel-switch .icon {
    height: 15px;
    width: 15px;
}

.distribution-process-context {
    align-items: center;
    background: #f7faf9;
    border-bottom: 1px solid #e5e9ea;
    color: #718087;
    display: flex;
    font-size: 11.5px;
    gap: 9px;
    padding: 8px 20px;
}

.distribution-process-context strong {
    color: #2c3a40;
    font-size: 12px;
}

.distribution-process-steps {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.distribution-process-steps li {
    border-right: 1px solid #e6eaec;
    min-width: 0;
    position: relative;
}

.distribution-process-steps li:last-child {
    border-right: 0;
}

.distribution-process-steps a {
    align-items: center;
    color: #55636a;
    display: grid;
    gap: 8px;
    grid-template-columns: 26px 28px minmax(0, 1fr) 14px;
    min-height: 82px;
    padding: 12px 11px;
    text-decoration: none;
    transition: background .18s ease, box-shadow .18s ease, color .18s ease;
}

.distribution-process-steps a:hover {
    background: #faf6ed;
}

.distribution-process-number,
.distribution-process-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
}

.distribution-process-number {
    background: #f0f3f4;
    color: #7a878d;
    font-size: 10px;
    font-weight: 900;
    height: 26px;
    letter-spacing: .5px;
    width: 26px;
}

.distribution-process-icon {
    color: #7a878d;
    height: 28px;
    width: 28px;
}

.distribution-process-icon .icon {
    height: 18px;
    width: 18px;
}

.distribution-process-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.distribution-process-copy strong {
    color: #344147;
    font-size: 12px;
    line-height: 1.25;
}

.distribution-process-copy small {
    color: #879197;
    font-size: 10.5px;
    line-height: 1.3;
}

.distribution-process-arrow {
    color: #b1b9bd;
    height: 14px;
    width: 14px;
}

.distribution-process-steps li.active a {
    background: linear-gradient(135deg, #fff8e9, #fffdf8);
    box-shadow: inset 0 -3px 0 var(--workspace-panel-accent);
}

.distribution-process-steps li.active .distribution-process-number {
    background: var(--workspace-panel-accent);
    color: #fff;
}

.distribution-process-steps li.active .distribution-process-icon,
.distribution-process-steps li.active .distribution-process-copy strong {
    color: var(--workspace-accent-strong);
}

.distribution-process-steps li.complete a {
    background: #f5faf8;
}

.distribution-process-steps li.complete .distribution-process-number {
    background: #dff1ec;
    color: #267365;
}

.distribution-process-steps li.complete .distribution-process-icon {
    color: #298171;
}

.batch-next-action {
    align-items: flex-start;
    display: grid;
    gap: 7px;
    min-width: 185px;
}

.batch-next-action > span,
.batch-command-primary > span {
    color: #8a9499;
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: .65px;
    text-transform: uppercase;
}

.batch-next-action .btn {
    justify-content: flex-start;
    min-height: 38px;
    white-space: nowrap;
}

.batch-secondary-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.batch-secondary-actions a {
    align-items: center;
    color: #66747a;
    display: inline-flex;
    font-size: 10.5px;
    font-weight: 700;
    gap: 4px;
    text-decoration: none;
}

.batch-secondary-actions a:hover {
    color: var(--workspace-accent-strong);
}

.batch-secondary-actions .icon {
    height: 13px;
    width: 13px;
}

.batch-command-bar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
    position: relative;
    z-index: 5;
}

.batch-command-primary {
    align-items: flex-start;
    display: grid;
    gap: 5px;
}

.batch-command-primary .btn {
    min-height: 40px;
}

.batch-document-menu {
    position: relative;
}

.batch-document-menu[open] {
    z-index: 60;
}

.batch-document-menu > summary {
    align-items: center;
    background: #fff;
    border: 1px solid #d9e0e2;
    border-radius: 9px;
    color: #4d5b61;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 750;
    gap: 7px;
    min-height: 40px;
    padding: 9px 12px;
}

.batch-document-menu > summary::marker {
    content: "";
}

.batch-document-menu > div {
    background: #fff;
    border: 1px solid #dce2e4;
    border-radius: 11px;
    box-shadow: 0 16px 34px rgba(31, 42, 47, .16);
    display: grid;
    min-width: 255px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 70;
}

.batch-document-menu > div a {
    align-items: center;
    border-radius: 7px;
    color: #4f5d63;
    display: flex;
    font-size: 11.5px;
    font-weight: 700;
    gap: 8px;
    padding: 9px 10px;
    text-decoration: none;
}

.batch-document-menu > div a:hover {
    background: #f7f2e7;
    color: var(--workspace-accent-strong);
}

.batch-document-menu > div .icon {
    color: #8d692d;
    height: 15px;
    width: 15px;
}

@media (max-width: 1050px) {
    .distribution-process-steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .distribution-process-steps li {
        flex: 0 0 215px;
        scroll-snap-align: start;
    }
}

@media (max-width: 720px) {
    .distribution-process-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .distribution-channel-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .distribution-channel-switch a {
        justify-content: center;
    }

    .distribution-process-context {
        flex-wrap: wrap;
        padding-inline: 15px;
    }

    .distribution-process-steps li {
        flex-basis: 205px;
    }

    .distribution-process-steps a {
        min-height: 76px;
    }

    .batch-command-bar {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .batch-command-primary .btn,
    .batch-command-bar > .btn,
    .batch-document-menu > summary {
        justify-content: center;
        width: 100%;
    }

    .batch-document-menu > div {
        margin-top: 6px;
        min-width: 0;
        position: static;
        width: 100%;
    }
}

/* Delivery monitoring: compact filters, bulk settlement and scan-friendly rows */
.delivery-filter-panel {
    background: #fff;
    border: 1px solid #dde3e5;
    border-radius: 15px;
    box-shadow: 0 9px 24px rgba(31, 42, 47, .06);
    gap: 0;
    margin-top: 14px;
    overflow: hidden;
    padding: 0;
}

.delivery-filter-summary {
    align-items: center;
    display: flex;
    justify-content: space-between;
    list-style: none;
    min-height: 70px;
    padding: 13px 16px;
}

.delivery-filter-summary::-webkit-details-marker {
    display: none;
}

.delivery-filter-title {
    align-items: center;
    display: flex;
    gap: 11px;
}

.delivery-filter-title > span:last-child {
    display: grid;
    gap: 3px;
}

.delivery-filter-title strong {
    color: #303d43;
    font-size: 14px;
}

.delivery-filter-title small {
    color: #7c888e;
    font-size: 11.5px;
}

.delivery-filter-icon {
    align-items: center;
    background: #f4eee1;
    border: 1px solid #e3d2ae;
    border-radius: 10px;
    color: #98691c;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.delivery-filter-result {
    align-items: center;
    background: #f4f7f8;
    border: 1px solid #dfe5e7;
    border-radius: 10px;
    color: #647178;
    display: flex;
    gap: 5px;
    min-height: 38px;
    padding: 7px 10px;
}

.delivery-filter-result strong {
    color: #29363c;
    font-size: 14px;
}

.delivery-filter-result small {
    font-size: 11px;
}

.delivery-filter-result .icon {
    height: 14px;
    margin-left: 3px;
    transition: transform .18s ease;
    width: 14px;
}

.delivery-filter-panel[open] .delivery-filter-result .icon {
    transform: rotate(180deg);
}

.admin-shell .delivery-filter-form {
    background: #f7f9fa;
    border: 0;
    border-radius: 0;
    border-top: 1px solid #e3e8ea;
    box-shadow: none;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 15px 16px;
}

.delivery-filter-form .delivery-filter-search {
    grid-column: span 2;
}

.delivery-filter-form label > span {
    color: #6f7b81;
    font-size: 10.5px;
    font-weight: 800;
    margin-bottom: 5px;
}

.delivery-filter-form input,
.delivery-filter-form select {
    background: #fff;
    border-color: #d9e0e2;
    border-radius: 9px;
    min-height: 40px;
}

.delivery-filter-actions {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: 82px minmax(76px, 1fr) auto;
}

.delivery-filter-actions .filter-per-page select {
    min-width: 0;
}

.delivery-filter-actions .btn {
    font-size: 10.5px;
    justify-content: center;
    min-height: 40px;
    padding: 8px 9px;
    white-space: nowrap;
}

.delivery-active-filters {
    background: #fff;
    border-top: 1px solid #e4e9eb;
    padding: 10px 16px;
}

.delivery-active-filters .filter-status {
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.delivery-active-filters .filter-status-copy {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.delivery-active-filters .filter-state {
    font-size: 9.5px;
}

.delivery-active-filters .filter-chip {
    background: #f5f7f8;
    border-color: #dfe5e7;
    font-size: 10.5px;
    min-height: 26px;
    padding: 4px 8px;
}

.delivery-list-panel {
    background: #fff;
    border: 1px solid #dde3e5;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(31, 42, 47, .07);
    margin-top: 14px;
    padding: 16px;
}

.delivery-list-panel > .panel-title-row {
    margin-bottom: 12px;
}

.delivery-list-panel > .panel-title-row h2 {
    font-size: 18px;
}

.delivery-bulk-bar {
    align-items: center;
    background: linear-gradient(120deg, #f8faf9, #fffaf0);
    border: 1px solid #dfe5e5;
    border-radius: 13px;
    display: grid;
    gap: 10px 18px;
    grid-template-columns: minmax(290px, .9fr) minmax(520px, 1.45fr);
    margin: 0 0 13px;
    padding: 12px 14px;
}

.delivery-bulk-head {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
}

.delivery-bulk-head > div {
    display: grid;
    gap: 3px;
}

.delivery-bulk-head strong {
    color: #303d43;
    font-size: 13px;
}

.delivery-bulk-head small {
    color: #758187;
    font-size: 10.5px;
    line-height: 1.35;
}

.delivery-bulk-icon {
    align-items: center;
    background: #e3f4ef;
    border: 1px solid #b9dfd6;
    border-radius: 10px;
    color: #197565;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.delivery-selected-count {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe2e4;
    border-radius: 10px;
    color: #7c888d;
    display: grid;
    justify-items: center;
    min-width: 58px;
    padding: 5px 8px;
}

.delivery-selected-count strong {
    color: #94671d;
    font-size: 16px;
    line-height: 1;
}

.delivery-selected-count span {
    font-size: 9px;
}

.delivery-bulk-controls {
    align-items: end;
    display: grid;
    gap: 9px;
    grid-template-columns: minmax(150px, 1fr) minmax(135px, .8fr) auto;
}

.delivery-bulk-controls label {
    display: grid;
    gap: 4px;
}

.delivery-bulk-controls label > span {
    color: #6c797f;
    font-size: 10px;
    font-weight: 800;
}

.delivery-bulk-controls input,
.delivery-bulk-controls select {
    background: #fff;
    border: 1px solid #d7dfe1;
    border-radius: 8px;
    min-height: 38px;
    padding: 8px 10px;
}

.delivery-bulk-actions {
    align-items: center;
    display: flex;
    gap: 7px;
}

.delivery-bulk-actions .btn {
    justify-content: center;
    min-height: 38px;
    padding: 8px 11px;
    white-space: nowrap;
}

.delivery-bulk-actions .btn:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.delivery-bulk-note {
    align-items: center;
    color: #718087;
    display: flex;
    font-size: 10.5px;
    gap: 6px;
    grid-column: 1 / -1;
}

.delivery-bulk-note .icon {
    color: #2a8273;
    height: 14px;
    width: 14px;
}

.delivery-table-wrap {
    border: 1px solid #e0e5e7;
    border-radius: 12px;
    overflow: auto;
}

.delivery-table-compact {
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1120px;
    table-layout: fixed;
    width: 100%;
}

.delivery-table-compact thead th {
    background: #f3f6f7;
    border-bottom: 1px solid #dce3e5;
    color: #526168;
    font-size: 10.5px;
    letter-spacing: .35px;
    padding: 11px 12px;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 3;
}

.delivery-table-compact th:nth-child(1) {
    width: 62px;
}

.delivery-table-compact th:nth-child(2) {
    width: 18%;
}

.delivery-table-compact th:nth-child(3) {
    width: 22%;
}

.delivery-table-compact th:nth-child(4) {
    width: 17%;
}

.delivery-table-compact th:nth-child(5) {
    width: 24%;
}

.delivery-table-compact th:nth-child(6) {
    width: 15%;
}

.delivery-table-compact tbody td {
    background: #fff;
    border-bottom: 1px solid #e7ebed;
    padding: 13px 12px;
    transition: background .16s ease, box-shadow .16s ease;
    vertical-align: top;
}

.delivery-table-compact tbody tr:last-child td {
    border-bottom: 0;
}

.delivery-table-compact tbody tr:hover td {
    background: #fcfbf7;
}

.delivery-table-compact tbody tr.is-selected td {
    background: #fff8e9;
}

.delivery-table-compact tbody tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 #c68e2d;
}

.delivery-table-compact tbody tr.has-return td {
    background: #fff4f3;
}

.delivery-select-all,
.delivery-row-selector {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
}

.delivery-select-all {
    font-size: 9px;
    text-transform: none;
}

.delivery-select-all input,
.delivery-row-selector input,
.delivery-return-toggle input {
    accent-color: #b98224;
    border: 0;
    flex: 0 0 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    width: 16px;
}

.delivery-row-selector span,
.delivery-row-number {
    color: #758188;
    font-size: 11px;
    font-weight: 800;
}

.delivery-main-cell {
    gap: 4px;
}

.delivery-main-cell .order-link {
    font-size: 12.5px;
    font-weight: 850;
}

.delivery-main-cell > span {
    color: #303d43;
    font-size: 12px;
    font-weight: 750;
}

.delivery-main-cell small,
.delivery-driver-cell small {
    color: #7c888d;
    font-size: 10.5px;
    line-height: 1.35;
}

.delivery-badges {
    gap: 4px;
    margin-top: 7px;
}

.delivery-badges .badge {
    font-size: 9.5px;
    min-height: 22px;
    padding: 3px 7px;
}

.delivery-reference-line,
.delivery-status-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.delivery-reference-line strong {
    color: #2e3a40;
    font-size: 12px;
}

.delivery-reference-line a {
    background: #f1f4f5;
    border-radius: 6px;
    color: #617077;
    font-size: 9.5px;
    font-weight: 750;
    padding: 3px 6px;
    text-decoration: none;
}

.delivery-flow.compact {
    gap: 4px;
    margin: 8px 0 7px;
    min-width: 0;
}

.delivery-flow.compact .delivery-flow-dot {
    box-shadow: 0 0 0 2px #fff;
    font-size: 9px;
    height: 19px;
    width: 19px;
}

.delivery-status-line small,
.delivery-location {
    color: #7b878d;
    font-size: 10px;
}

.delivery-location {
    display: block;
    line-height: 1.35;
    margin-top: 5px;
}

.delivery-return-control {
    background: #fff8f7;
    border: 1px solid #efd4d1;
    border-radius: 9px;
    margin-top: 8px;
    overflow: hidden;
}

.delivery-return-toggle {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 7px;
    padding: 7px 8px;
}

.delivery-return-toggle > span {
    display: grid;
    gap: 1px;
}

.delivery-return-toggle strong {
    color: #864047;
    font-size: 10.5px;
}

.delivery-return-toggle small {
    color: #a07276;
    font-size: 9px;
}

.delivery-return-control [data-delivery-return-fields] {
    border-top: 1px solid #efd4d1;
    padding: 7px;
}

.delivery-return-control [data-delivery-return-fields][hidden] {
    display: none;
}

.delivery-return-control input[type="text"],
.delivery-return-control input:not([type]) {
    background: #fff;
    border: 1px solid #e1c8c6;
    border-radius: 7px;
    font-size: 10.5px;
    min-height: 34px;
    padding: 7px 8px;
}

.delivery-driver-cell {
    display: grid;
    gap: 5px;
}

.delivery-driver-cell strong {
    color: #303c42;
    font-size: 12px;
}

.delivery-driver-cell .badge {
    justify-self: start;
    margin: 2px 0;
}

.delivery-payment-summary {
    align-items: flex-start;
    display: grid;
    gap: 5px;
    justify-items: start;
}

.delivery-payment-summary strong {
    color: #2d393f;
    font-size: 12.5px;
}

.delivery-payment-summary .badge {
    font-size: 9.5px;
}

.delivery-payment-fields {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.delivery-payment-fields label {
    display: grid;
    gap: 4px;
}

.delivery-payment-fields label > span {
    color: #7b878d;
    font-size: 9.5px;
    font-weight: 750;
}

.delivery-payment-fields input,
.delivery-payment-fields select {
    background: #fff;
    border: 1px solid #d8dfe1;
    border-radius: 7px;
    font-size: 10.5px;
    min-height: 35px;
    padding: 7px 8px;
}

.delivery-next-action {
    display: grid;
    gap: 3px;
}

.delivery-next-action span {
    color: #899398;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.delivery-next-action strong {
    color: #344147;
    font-size: 11.5px;
}

.delivery-row-actions {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr;
    margin-top: 8px;
}

.delivery-row-actions .btn {
    font-size: 10.5px;
    justify-content: flex-start;
    min-height: 34px;
    padding: 7px 9px;
    width: 100%;
}

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

@media (max-width: 900px) {
    .admin-shell .delivery-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delivery-filter-form .delivery-filter-search {
        grid-column: span 2;
    }

    .delivery-bulk-controls {
        grid-template-columns: 1fr 1fr;
    }

    .delivery-bulk-actions {
        grid-column: 1 / -1;
    }
}

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

    .delivery-compact-stat {
        min-height: 64px;
    }

    .delivery-filter-summary {
        min-height: 62px;
        padding: 11px 12px;
    }

    .delivery-filter-title small {
        max-width: 220px;
    }

    .delivery-filter-icon {
        display: none;
    }

    .delivery-filter-result small {
        display: none;
    }

    .admin-shell .delivery-filter-form {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .delivery-filter-form .delivery-filter-search {
        grid-column: 1;
    }

    .delivery-filter-actions {
        grid-template-columns: 1fr 1fr;
    }

    .delivery-filter-actions .filter-per-page {
        grid-column: 1 / -1;
    }

    .delivery-active-filters {
        padding: 9px 12px;
    }

    .delivery-active-filters .filter-status,
    .delivery-active-filters .filter-chips {
        align-items: flex-start;
        flex-direction: column;
    }

    .delivery-list-panel {
        padding: 11px;
    }

    .delivery-bulk-head {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .delivery-selected-count {
        grid-column: 1 / -1;
        grid-template-columns: auto auto;
        justify-content: center;
        justify-items: initial;
        min-height: 34px;
    }

    .delivery-bulk-controls {
        grid-template-columns: 1fr;
    }

    .delivery-bulk-actions {
        display: grid;
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .delivery-table-wrap {
        border: 0;
        overflow: visible;
    }

    .delivery-table-compact {
        background: transparent;
        min-width: 0;
    }

    .delivery-table-compact thead {
        display: none;
    }

    .delivery-table-compact,
    .delivery-table-compact tbody,
    .delivery-table-compact tr,
    .delivery-table-compact td {
        display: block;
        width: 100%;
    }

    .delivery-table-compact tbody tr {
        background: #fff;
        border: 1px solid #dfe5e7;
        border-radius: 13px;
        box-shadow: 0 7px 20px rgba(31, 42, 47, .06);
        margin-bottom: 11px;
        overflow: hidden;
    }

    .delivery-table-compact tbody td {
        border-bottom: 1px solid #edf0f1;
        padding: 11px 12px;
    }

    .delivery-table-compact tbody td::before {
        color: #8a9499;
        content: attr(data-label);
        display: block;
        font-size: 8.5px;
        font-weight: 850;
        letter-spacing: .5px;
        margin-bottom: 6px;
        text-transform: uppercase;
    }

    .delivery-table-compact tbody td:first-child {
        align-items: center;
        background: #f5f7f8;
        display: flex;
        justify-content: space-between;
        min-height: 40px;
        padding-block: 8px;
    }

    .delivery-table-compact tbody td:first-child::before {
        margin: 0;
    }

    .delivery-table-compact tbody td:last-child {
        border-bottom: 0;
    }

    .delivery-table-compact tbody tr.is-selected td:first-child {
        background: #fff0ce;
    }

    .delivery-row-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* Delivery control room: dense KPIs, compact tools and scan-first table */
.delivery-command-panel {
    gap: 10px;
    padding: 13px 15px;
}

.delivery-command-panel .delivery-ops-head {
    align-items: center;
}

.delivery-ops-copy {
    min-width: 250px;
}

.delivery-command-panel .delivery-ops-copy .section-kicker {
    font-size: 9px;
}

.delivery-command-panel .delivery-ops-copy h2 {
    font-size: 17px;
    margin-bottom: 2px;
}

.delivery-command-panel .delivery-ops-copy .muted {
    font-size: 10.5px;
    line-height: 1.35;
}

.delivery-command-panel .delivery-ops-actions {
    gap: 6px;
}

.delivery-command-panel .delivery-ops-actions .btn {
    font-size: 10.5px;
    min-height: 33px;
    padding: 7px 9px;
}

.delivery-kpi-board {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr);
}

.delivery-kpi-group {
    align-items: center;
    background: rgba(248, 250, 250, .9);
    border: 1px solid #e0e6e7;
    border-radius: 10px;
    display: grid;
    gap: 7px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 6px;
}

.delivery-kpi-attention {
    background: linear-gradient(105deg, #fff7f3, #fffdfa);
    border-color: #efd3c9;
}

.delivery-kpi-label {
    align-items: center;
    color: #748087;
    display: inline-flex;
    font-size: 9px;
    font-weight: 900;
    gap: 4px;
    letter-spacing: .4px;
    padding: 0 5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.delivery-kpi-attention .delivery-kpi-label {
    color: #9a493e;
}

.delivery-kpi-label .icon {
    height: 13px;
    width: 13px;
}

.delivery-kpi-strip {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-kpi-flow .delivery-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.delivery-kpi-chip {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe5e7;
    border-radius: 8px;
    color: #344148;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    min-height: 38px;
    padding: 6px 8px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.delivery-kpi-chip:hover {
    border-color: #bdc8cc;
    box-shadow: 0 5px 12px rgba(43, 55, 60, .08);
    transform: translateY(-1px);
}

.delivery-kpi-chip span {
    color: #6f7b81;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.15;
}

.delivery-kpi-chip strong {
    color: #29363c;
    font-size: 17px;
    line-height: 1;
}

.delivery-kpi-chip.bad {
    background: #fff0ed;
    border-color: #e8bbb3;
}

.delivery-kpi-chip.bad strong {
    color: #a4382e;
}

.delivery-kpi-chip.warn,
.delivery-kpi-chip.today {
    background: #fff8e9;
    border-color: #e8cf93;
}

.delivery-kpi-chip.warn strong,
.delivery-kpi-chip.today strong {
    color: #916318;
}

.delivery-kpi-chip.good {
    background: #edf8f5;
    border-color: #b7ded5;
}

.delivery-kpi-chip.good strong {
    color: #147263;
}

.delivery-kpi-chip.neutral {
    background: #eff5f9;
    border-color: #c9dce7;
}

.delivery-filter-panel {
    margin-top: 10px;
}

.delivery-filter-summary {
    min-height: 54px;
    padding: 8px 12px;
}

.delivery-filter-icon {
    border-radius: 8px;
    height: 32px;
    width: 32px;
}

.delivery-filter-result {
    min-height: 32px;
    padding: 5px 8px;
}

.delivery-list-panel {
    margin-top: 10px;
    padding: 12px;
}

.delivery-list-panel > .panel-title-row {
    margin-bottom: 8px;
}

.delivery-list-panel > .panel-title-row h2 {
    font-size: 16px;
}

.delivery-list-panel > .panel-title-row .muted {
    font-size: 10.5px;
}

.delivery-source-summary {
    gap: 5px;
}

.delivery-source-summary span {
    font-size: 10px;
    padding: 4px 7px;
}

.delivery-bulk-bar {
    background: #f8faf9;
    display: block;
    margin-bottom: 8px;
    padding: 0;
}

.delivery-bulk-panel {
    overflow: hidden;
}

.delivery-bulk-summary {
    cursor: pointer;
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    list-style: none;
    min-height: 46px;
    padding: 6px 9px;
}

.delivery-bulk-summary::-webkit-details-marker {
    display: none;
}

.delivery-bulk-summary .delivery-bulk-icon {
    border-radius: 8px;
    height: 30px;
    width: 30px;
}

.delivery-bulk-summary .delivery-bulk-icon .icon {
    height: 15px;
    width: 15px;
}

.delivery-bulk-summary .delivery-selected-count {
    border-radius: 8px;
    grid-template-columns: auto auto;
    gap: 3px;
    min-width: 66px;
    padding: 4px 7px;
}

.delivery-bulk-summary .delivery-selected-count strong {
    font-size: 14px;
}

.delivery-bulk-chevron {
    color: #7b878c;
    display: inline-flex;
}

.delivery-bulk-chevron .icon {
    height: 15px;
    transition: transform .18s ease;
    width: 15px;
}

.delivery-bulk-panel[open] .delivery-bulk-chevron .icon {
    transform: rotate(180deg);
}

.delivery-bulk-body {
    border-top: 1px solid #e1e7e8;
    display: grid;
    gap: 7px;
    padding: 8px 9px 9px;
}

.delivery-bulk-controls {
    grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) auto;
}

.delivery-bulk-controls input,
.delivery-bulk-controls select,
.delivery-bulk-actions .btn {
    min-height: 34px;
}

.delivery-bulk-note {
    font-size: 9.5px;
    line-height: 1.35;
}

.delivery-table-compact thead th {
    padding: 8px 9px;
}

.delivery-table-compact tbody td {
    padding: 9px;
}

.delivery-main-cell {
    gap: 2px;
}

.delivery-main-cell small,
.delivery-driver-cell small {
    font-size: 10px;
    line-height: 1.25;
}

.delivery-badges {
    margin-top: 4px;
}

.delivery-flow.compact {
    margin: 5px 0;
}

.delivery-status-line,
.delivery-reference-line {
    gap: 4px;
}

.delivery-location {
    margin-top: 3px;
}

.delivery-return-control {
    margin-top: 5px;
}

.delivery-driver-cell,
.delivery-payment-summary {
    gap: 3px;
}

.delivery-payment-fields {
    gap: 4px;
    margin-top: 5px;
}

.delivery-payment-fields label {
    gap: 2px;
}

.delivery-payment-fields input,
.delivery-payment-fields select {
    min-height: 31px;
    padding: 5px 7px;
}

.delivery-next-action {
    gap: 1px;
}

.delivery-row-actions {
    gap: 4px;
    margin-top: 5px;
}

.delivery-row-actions .btn {
    min-height: 30px;
    padding: 5px 7px;
}

@media (max-width: 980px) {
    .delivery-kpi-board {
        grid-template-columns: 1fr;
    }

    .delivery-command-panel .delivery-ops-head {
        align-items: stretch;
    }

    .delivery-bulk-controls {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .delivery-command-panel {
        padding: 10px;
    }

    .delivery-command-panel .delivery-ops-copy .muted {
        display: none;
    }

    .delivery-command-panel .delivery-ops-actions {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .delivery-command-panel .delivery-ops-actions .btn {
        flex: 0 0 auto;
        width: auto;
    }

    .delivery-kpi-group {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .delivery-kpi-label {
        padding: 1px 3px;
    }

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

    .delivery-kpi-chip {
        min-height: 36px;
    }

    .delivery-filter-summary {
        min-height: 50px;
        padding: 7px 10px;
    }

    .delivery-list-panel {
        padding: 9px;
    }

    .delivery-list-panel > .panel-title-row .muted {
        display: none;
    }

    .delivery-bulk-summary {
        grid-template-columns: 28px minmax(0, 1fr) auto 14px;
        padding: 6px 7px;
    }

    .delivery-bulk-summary .delivery-bulk-icon {
        height: 28px;
        width: 28px;
    }

    .delivery-bulk-summary small {
        display: none;
    }

    .delivery-bulk-summary .delivery-selected-count {
        grid-column: auto;
        min-height: 30px;
    }

    .delivery-bulk-body {
        padding: 8px;
    }

    .delivery-bulk-controls {
        grid-template-columns: 1fr;
    }

    .delivery-bulk-actions {
        grid-column: 1;
    }
}

.settlement-handoff-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--workspace-accent-border);
    border-radius: 16px;
    background: var(--workspace-accent-softer);
}

.settlement-handoff-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
}

.settlement-reported-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid color-mix(in srgb, var(--workspace-panel-accent) 24%, var(--line) 76%);
    border-radius: 12px;
    background: var(--workspace-accent-softer);
    color: var(--muted);
    font-size: .76rem;
}

.settlement-reported-strip strong {
    color: var(--workspace-accent-text);
}

.settlement-finance-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--workspace-accent-border);
}

@media (max-width: 760px) {
    .settlement-handoff-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .settlement-handoff-card .btn {
        grid-column: 1 / -1;
        justify-content: center;
    }
}
.order-location-status {
    align-items: center;
    background: #f5f7f5;
    border: 1px solid #dce3df;
    border-radius: 10px;
    color: #5d6b65;
    display: flex;
    font-size: 12px;
    gap: 8px;
    grid-column: 1 / -1;
    margin: 0;
    padding: 9px 11px;
}

.order-location-status.is-loading {
    background: #fff7e6;
    border-color: #f2cf80;
    color: #8a5a00;
}

.order-location-status.is-ready {
    background: #edf9f1;
    border-color: #a9d6b5;
    color: #126a31;
}

.order-location-status.is-warning {
    background: #fff7e6;
    border-color: #f2cf80;
    color: #8a5a00;
}

.order-location-status.is-error {
    background: #fff0f0;
    border-color: #e8abab;
    color: #a01818;
}

@media (max-width: 840px) {
    .order-workspace {
        padding: 10px;
    }

    .order-workspace-head > div:first-child > .muted {
        display: none;
    }

    .order-workspace-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        width: 100%;
    }

    .order-workspace-tabs .btn {
        flex: 0 0 auto;
    }

    .order-stage-strip {
        grid-auto-columns: minmax(138px, 1fr);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .order-stage-card {
        min-height: 52px;
    }

    .order-filter-panel > summary {
        min-height: 40px;
    }

    .order-filter-summary-state > .muted {
        display: none;
    }

    .order-workspace > .filter-status {
        align-items: flex-start;
    }

    .order-detail-card {
        padding: 10px;
    }

    .order-detail-head {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .order-detail-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .order-detail-actions > * {
        flex: 0 0 auto;
    }

    .order-detail-finance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-detail-facts {
        grid-template-columns: 1fr;
    }

    .order-detail-fact + .order-detail-fact {
        border-left: 0;
        border-top: 1px solid var(--admin-glass-border);
    }

    .order-next-step {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }

    .order-next-step-copy > strong {
        white-space: normal;
    }

    .order-next-step-actions,
    .order-next-step-actions .btn {
        width: 100%;
    }

    .order-receipt-totals {
        flex-wrap: wrap;
    }

    .order-receipt-totals > div {
        flex: 1 1 130px;
    }

    .order-detail-process-list {
        grid-template-columns: 1fr;
    }

    .customer-workspace {
        padding: 10px;
    }

    .customer-workspace-head {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-workspace-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .customer-export-action > span {
        display: none;
    }

    .customer-export-action {
        min-width: 32px;
        padding-inline: 6px;
    }

    .compact-filter-panel > summary {
        min-height: 38px;
    }

    .compact-filter-panel .order-filter-summary-state > .muted {
        display: none;
    }

    .customer-workspace > .filter-status {
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .order-detail-finance {
        grid-template-columns: 1fr;
    }

    .order-detail-title-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* Unified admin modal system */
@keyframes admin-modal-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-shell dialog.product-modal:not(.route-edit-modal):not(.presell-install-dialog) {
    background: rgba(252, 252, 250, .98);
    border: 1px solid rgba(183, 157, 111, .28);
    border-radius: 17px;
    box-shadow:
        0 32px 85px rgba(45, 32, 25, .3),
        0 2px 9px rgba(45, 32, 25, .12);
    max-height: min(90dvh, 900px);
    max-width: min(680px, calc(100vw - 28px));
    overscroll-behavior: contain;
    scrollbar-color: #c8bda9 transparent;
    scrollbar-width: thin;
    width: 680px;
}

.admin-shell dialog.product-modal:not(.route-edit-modal):not(.presell-install-dialog)[open] {
    animation: admin-modal-enter .18s ease-out;
}

.admin-shell dialog.product-modal.form-modal-wide:not(.route-edit-modal),
.admin-shell dialog.product-modal.list-edit-modal:not(.route-edit-modal) {
    max-width: min(1040px, calc(100vw - 28px));
    width: 1040px;
}

.admin-shell dialog.product-modal.list-edit-modal:not(.route-edit-modal) {
    max-height: min(92dvh, 940px);
}

.admin-shell dialog.product-modal.admin-modal-compact {
    max-width: min(580px, calc(100vw - 28px));
    width: 580px;
}

.admin-shell dialog.product-modal:not(.route-edit-modal)::backdrop {
    -webkit-backdrop-filter: blur(8px) saturate(115%);
    backdrop-filter: blur(8px) saturate(115%);
    background: rgba(29, 25, 22, .58);
}

.admin-shell .product-modal-header:not(.route-edit-header) {
    align-items: center;
    background:
        radial-gradient(circle at 92% -20%, rgba(215, 167, 74, .2), transparent 38%),
        linear-gradient(180deg, rgba(255, 253, 248, .98), rgba(249, 246, 238, .98));
    border-bottom: 1px solid #e5dfd2;
    box-shadow: 0 6px 18px rgba(55, 44, 35, .055);
    gap: 16px;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.admin-shell .product-modal-header:not(.route-edit-header) > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-shell .product-modal-header:not(.route-edit-header) .section-kicker {
    color: #9a6b20;
    font-size: 9px;
    letter-spacing: .9px;
}

.admin-shell .product-modal-header:not(.route-edit-header) h2 {
    color: #2d2925;
    font-size: clamp(18px, 2.2vw, 22px);
    letter-spacing: -.2px;
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-shell .product-modal-header:not(.route-edit-header) .muted {
    font-size: 10.5px;
    line-height: 1.35;
    margin-top: 1px;
}

.admin-shell .product-modal-header:not(.route-edit-header) .modal-close {
    background: rgba(255, 255, 255, .84);
    border-color: #ddd5c7;
    border-radius: 10px;
    box-shadow: 0 3px 9px rgba(45, 35, 29, .075);
    flex: 0 0 34px;
    height: 34px;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
    width: 34px;
}

.admin-shell .product-modal-header:not(.route-edit-header) .modal-close:hover {
    background: #fff;
    border-color: #c5aa77;
    transform: translateY(-1px);
}

.admin-shell .product-modal-header:not(.route-edit-header) .modal-close .icon {
    height: 16px;
    width: 16px;
}

.admin-shell .product-modal form {
    min-width: 0;
}

.admin-shell .product-modal .admin-modal-body,
.admin-shell .product-modal .admin-modal-form {
    padding: 14px 16px;
}

.admin-shell .product-modal form.form-grid,
.admin-shell .product-modal form .form-grid {
    align-items: start;
    gap: 11px;
}

.admin-shell .product-modal form label {
    min-width: 0;
}

.admin-shell .product-modal form label > span {
    color: #66747a;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .12px;
    margin-bottom: 5px;
}

.admin-shell .product-modal form input,
.admin-shell .product-modal form select,
.admin-shell .product-modal form textarea {
    background: rgba(255, 255, 255, .92);
    border: 1px solid #d9dfe0;
    border-radius: 9px;
    box-shadow: inset 0 1px 2px rgba(43, 52, 56, .025);
    min-height: 39px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.admin-shell .product-modal form input:focus,
.admin-shell .product-modal form select:focus,
.admin-shell .product-modal form textarea:focus {
    background: #fff;
    border-color: #bd8a34;
    box-shadow: 0 0 0 3px rgba(189, 138, 52, .13);
    outline: 0;
}

.admin-shell .product-modal form textarea {
    min-height: 76px;
}

.admin-shell .product-modal form small {
    line-height: 1.35;
}

.admin-shell .product-modal form .panel,
.admin-shell .product-modal form .edit-box,
.admin-shell .product-modal form details {
    background: #f8f9f8;
    border: 1px solid #e1e5e5;
    border-radius: 11px;
    box-shadow: none;
}

.admin-shell .product-modal form details > summary {
    align-items: center;
    color: #46545a;
    cursor: pointer;
    display: flex;
    font-size: 11px;
    font-weight: 850;
    justify-content: space-between;
    list-style: none;
    min-height: 38px;
    padding: 8px 10px;
}

.admin-shell .product-modal form details > summary::-webkit-details-marker {
    display: none;
}

.admin-shell .product-modal form details > summary::after {
    color: #8b6a30;
    content: "⌄";
    font-size: 15px;
    transition: transform .15s ease;
}

.admin-shell .product-modal form details[open] > summary::after {
    transform: rotate(180deg);
}

.admin-shell .product-modal .table-wrap {
    background: #fff;
    border: 1px solid #e0e5e6;
    border-radius: 10px;
    box-shadow: none;
}

.admin-shell .product-modal .table-wrap thead th {
    background: #f3f5f5;
    color: #58666c;
    font-size: 10px;
    letter-spacing: .25px;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 2;
}

.admin-shell .product-modal .table-wrap th,
.admin-shell .product-modal .table-wrap td {
    padding: 8px 9px;
}

.admin-shell .product-modal .form-modal-actions,
.admin-shell .product-modal form > .actions:last-child {
    align-items: center;
    background: rgba(251, 250, 246, .96);
    border-top: 1px solid #e1ddd4;
    box-shadow: 0 -7px 18px rgba(46, 38, 31, .055);
    gap: 7px;
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 3px;
    padding: 10px 16px;
    position: sticky;
    bottom: 0;
    z-index: 12;
}

.admin-shell .product-modal .form-modal-actions .btn,
.admin-shell .product-modal form > .actions:last-child .btn {
    font-size: 11px;
    min-height: 35px;
    padding: 7px 11px;
}

.admin-shell .product-modal .alert {
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.4;
    padding: 9px 10px;
}

/* Distribution planning workspace and modal workflow */
.distribution-planning-workspace {
    margin-top: 10px;
    padding: 13px 15px;
}

.distribution-planning-head {
    align-items: flex-start;
    margin-bottom: 0;
}

.distribution-planning-head h2 {
    font-size: 18px;
    margin: 2px 0 3px;
}

.distribution-planning-description {
    font-size: 10.5px;
    line-height: 1.4;
}

.distribution-planning-scope {
    align-items: center;
    color: #68757b;
    display: flex;
    font-size: 10px;
    gap: 5px;
    margin-top: 5px;
}

.distribution-planning-scope .icon {
    color: #a17125;
    flex: 0 0 13px;
    height: 13px;
    width: 13px;
}

.distribution-planning-actions {
    gap: 6px;
    justify-content: flex-end;
}

.distribution-planning-actions .btn {
    font-size: 10.5px;
    min-height: 34px;
    padding: 7px 9px;
}

.distribution-planning-summary {
    gap: 7px;
    margin-top: 10px;
}

.distribution-planning-card {
    align-items: center;
    background: rgba(250, 250, 248, .76);
    border-color: #e1e4e3;
    display: grid;
    gap: 9px;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 62px;
    padding: 8px 9px;
}

.distribution-planning-card.active {
    background: #fff8e9;
    border-color: #dfbf7d;
    box-shadow: inset 3px 0 0 #bd872c;
}

.distribution-planning-card-icon {
    align-items: center;
    background: #f0f3f3;
    border: 1px solid #dce2e3;
    border-radius: 9px;
    color: #617077;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.distribution-planning-card.active .distribution-planning-card-icon {
    background: #f7e7c5;
    border-color: #ddbe82;
    color: #95671d;
}

.distribution-planning-card-icon .icon {
    height: 15px;
    width: 15px;
}

.distribution-planning-card strong {
    color: #344147;
    font-size: 11.5px;
}

.distribution-planning-card .muted {
    font-size: 9.5px;
    line-height: 1.3;
    margin-top: 2px;
}

.admin-shell dialog.product-modal.distribution-batch-modal {
    max-height: min(94dvh, 980px);
    max-width: min(1180px, calc(100vw - 24px));
    overflow: hidden;
    width: 1180px;
}

.admin-shell dialog.product-modal.distribution-batch-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.distribution-batch-modal > form {
    display: grid;
    gap: 0;
    grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.distribution-modal-steps {
    background: #f7f8f7;
    border-bottom: 1px solid #e2e6e6;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 8px 16px;
}

.distribution-modal-steps li {
    align-items: center;
    color: #78858a;
    display: flex;
    font-size: 9.5px;
    font-weight: 800;
    gap: 6px;
    min-width: 0;
}

.distribution-modal-steps li span {
    align-items: center;
    background: #e6eaeb;
    border-radius: 999px;
    color: #637077;
    display: inline-flex;
    flex: 0 0 22px;
    height: 22px;
    justify-content: center;
}

.distribution-modal-steps li.active {
    color: #78541b;
}

.distribution-modal-steps li.active span {
    background: #c38d31;
    color: #fff;
}

.distribution-batch-settings {
    background: #fff;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 11px 16px 9px;
}

.distribution-driver-add {
    font-size: 10px;
    margin-top: 6px;
    min-height: 32px;
    padding: 6px 8px;
}

.distribution-batch-toolbar {
    background: #f8f9f8;
    border-block: 1px solid #e3e7e7;
    gap: 7px;
    padding: 8px 16px;
}

.distribution-batch-toolbar-title {
    color: #38464c;
    font-size: 11px;
    margin-right: 3px;
}

.distribution-batch-toolbar label > span {
    font-size: 9px;
    margin-bottom: 3px;
}

.distribution-batch-toolbar select,
.distribution-batch-toolbar .btn {
    font-size: 10px;
    min-height: 32px;
    padding-block: 6px;
}

.distribution-selection-status {
    background: #fff4d9;
    border: 1px solid #e3c783;
    border-radius: 999px;
    color: #805a19;
    font-size: 9.5px;
    font-weight: 850;
    margin-left: auto;
    padding: 5px 8px;
    white-space: nowrap;
}

.admin-shell .distribution-batch-order-table {
    border: 0;
    border-radius: 0;
    min-height: 0;
    overflow: auto;
}

.distribution-batch-order-table table {
    min-width: 1000px;
}

.distribution-batch-order-table thead th {
    top: 0;
}

.distribution-batch-order-table tbody td {
    font-size: 10.5px;
    line-height: 1.3;
    vertical-align: top;
}

.distribution-batch-order-table input[type="checkbox"] {
    accent-color: #b98224;
    height: 16px;
    min-height: 16px;
    width: 16px;
}

.distribution-batch-footer {
    flex-wrap: nowrap;
    margin: 0;
    padding: 10px 16px;
    position: static;
}

.distribution-batch-footer > .muted {
    font-size: 9.5px;
    margin-right: auto;
}

.admin-shell dialog.product-modal.distribution-map-modal {
    max-height: min(92dvh, 880px);
    max-width: min(1160px, calc(100vw - 24px));
    overflow: hidden;
    width: 1160px;
}

.admin-shell dialog.product-modal.distribution-map-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.distribution-map-modal-body {
    display: grid;
    gap: 9px;
    grid-template-rows: auto minmax(320px, 1fr);
    min-height: 0;
}

.distribution-map-toolbar {
    justify-content: space-between;
}

.distribution-map-canvas {
    min-height: min(62vh, 620px);
}

@media (max-width: 1000px) {
    .distribution-batch-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .distribution-batch-toolbar-title {
        flex-basis: 100%;
    }
}

@media (max-width: 720px) {
    .admin-shell dialog.product-modal:not(.route-edit-modal):not(.presell-install-dialog),
    .admin-shell dialog.product-modal.form-modal-wide:not(.route-edit-modal),
    .admin-shell dialog.product-modal.list-edit-modal:not(.route-edit-modal),
    .admin-shell dialog.product-modal.admin-modal-compact,
    .admin-shell dialog.product-modal.distribution-batch-modal,
    .admin-shell dialog.product-modal.distribution-map-modal {
        border-radius: 14px;
        inset-inline: 6px;
        max-height: 96dvh;
        max-width: none;
        width: auto;
    }

    .admin-shell .product-modal-header:not(.route-edit-header) {
        padding: 11px 12px;
    }

    .admin-shell .product-modal-header:not(.route-edit-header) h2 {
        font-size: 18px;
    }

    .admin-shell .product-modal-header:not(.route-edit-header) .muted {
        display: none;
    }

    .admin-shell .product-modal form.form-grid,
    .admin-shell .product-modal form .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell .product-modal form [style*="grid-column:span 2"],
    .admin-shell .product-modal form [style*="grid-column:1 / -1"],
    .admin-shell .product-modal form [style*="grid-column:1/-1"] {
        grid-column: 1 !important;
    }

    .admin-shell .product-modal .form-modal-actions,
    .admin-shell .product-modal form > .actions:last-child {
        padding: 9px 12px;
    }

    .distribution-planning-workspace {
        padding: 11px;
    }

    .distribution-planning-head {
        align-items: stretch;
        flex-direction: column;
    }

    .distribution-planning-actions {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        width: 100%;
    }

    .distribution-planning-actions .btn {
        flex: 0 0 auto;
        width: auto;
    }

    .distribution-planning-summary {
        grid-template-columns: 1fr;
    }

    .distribution-modal-steps {
        padding-inline: 12px;
    }

    .distribution-modal-steps li {
        font-size: 0;
    }

    .distribution-modal-steps li span {
        font-size: 9.5px;
    }

    .distribution-batch-settings {
        grid-template-columns: 1fr;
        max-height: 34vh;
        overflow: auto;
        padding: 10px 12px;
    }

    .distribution-batch-modal > form {
        grid-template-rows: auto minmax(0, auto) auto minmax(100px, 1fr) auto;
    }

    .distribution-batch-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 12px;
    }

    .distribution-batch-toolbar > * {
        flex: 0 0 auto;
    }

    .distribution-batch-toolbar-title {
        display: none;
    }

    .distribution-selection-status {
        margin-left: 0;
    }

    .distribution-batch-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 9px 12px;
    }

    .distribution-batch-footer > .muted {
        display: none;
    }

    .distribution-map-modal-body {
        padding: 10px;
    }

    .distribution-map-toolbar .muted {
        display: none;
    }

    .distribution-map-toolbar .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-shell .product-modal .form-modal-actions,
    .admin-shell .product-modal form > .actions:last-child {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-shell .product-modal .form-modal-actions .btn,
    .admin-shell .product-modal form > .actions:last-child .btn {
        width: 100%;
    }
}

/* Audited administrator override for exceptional order quantities */
.admin-quantity-correction-disclosure {
    background: #fff9ed;
    border: 1px solid #e5c98f;
    border-radius: 10px;
    margin-top: 12px;
    overflow: hidden;
}

.admin-quantity-correction-disclosure > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    min-height: 44px;
    padding: 8px 11px;
}

.admin-quantity-correction-disclosure > summary::-webkit-details-marker {
    display: none;
}

.admin-quantity-correction-disclosure > summary > span:first-child {
    align-items: center;
    color: #79520f;
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    gap: 6px;
}

.admin-quantity-correction-disclosure > summary > .muted {
    font-size: 10px;
}

.admin-quantity-correction-disclosure > summary > .icon {
    height: 14px;
    transition: transform .18s ease;
    width: 14px;
}

.admin-quantity-correction-disclosure[open] > summary {
    border-bottom: 1px solid #ead9b5;
}

.admin-quantity-correction-disclosure[open] > summary > .icon {
    transform: rotate(180deg);
}

.admin-quantity-correction-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.admin-quantity-correction-disclosure > .admin-quantity-correction-form {
    margin-top: 0;
    padding: 11px;
}

.admin-quantity-correction-note {
    align-items: flex-start;
    display: flex;
    gap: 5px 10px;
    margin: 0;
    padding: 8px 10px;
}

.admin-quantity-correction-note strong {
    flex: 0 0 auto;
    font-size: 11px;
}

.admin-quantity-correction-note span {
    font-size: 10.5px;
    line-height: 1.35;
}

.admin-quantity-correction-table table {
    min-width: 700px;
}

.admin-quantity-correction-table th,
.admin-quantity-correction-table td {
    font-size: 11px;
    padding: 7px 8px;
    vertical-align: middle;
}

.admin-quantity-correction-table input {
    min-width: 96px;
    width: 110px;
}

.admin-quantity-correction-reason {
    display: block;
}

.admin-quantity-correction-actions {
    align-items: center;
    justify-content: space-between;
}

.admin-quantity-correction-actions > .muted {
    font-size: 10px;
}

@media (max-width: 720px) {
    .admin-quantity-correction-disclosure > summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-quantity-correction-disclosure > summary > .muted {
        display: none;
    }

    .admin-quantity-correction-note {
        display: grid;
    }

    .admin-quantity-correction-actions {
        align-items: stretch;
        display: grid;
    }

    .admin-quantity-correction-actions .btn {
        width: 100%;
    }
}

/* Customer modal: structured identity, contract, credit and location workflow */
.admin-shell dialog.product-modal.customer-form-modal {
    max-height: min(94dvh, 980px);
    max-width: min(1120px, calc(100vw - 24px));
    width: 1120px;
}

.customer-edit-modal-body {
    background: #f5f7f7;
    padding: 0;
}

.admin-shell .customer-modal-form {
    align-items: start;
    gap: 8px 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 11px 14px 0;
}

.customer-modal-section-heading {
    align-items: center;
    border-bottom: 1px solid #e2e6e6;
    display: flex;
    gap: 8px;
    grid-column: 1 / -1;
    margin-top: 3px;
    min-height: 36px;
    padding: 4px 2px 6px;
}

.customer-modal-section-heading:first-of-type {
    margin-top: 0;
}

.customer-modal-section-heading > span {
    align-items: center;
    background: #f4ead7;
    border: 1px solid #e2cda6;
    border-radius: 8px;
    color: #946720;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
}

.customer-modal-section-heading > span .icon {
    height: 14px;
    width: 14px;
}

.customer-modal-section-heading > div {
    display: grid;
    gap: 1px;
}

.customer-modal-section-heading strong {
    color: #38464c;
    font-size: 11px;
}

.customer-modal-section-heading small {
    color: #849096;
    font-size: 9px;
}

.customer-inline-action {
    align-self: end;
}

.customer-inline-action .btn {
    font-size: 10px;
    min-height: 36px;
    padding: 6px 8px;
    width: 100%;
}

.customer-code-control {
    align-items: stretch;
    display: grid;
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.customer-code-control .btn {
    font-size: 10px;
    gap: 4px;
    min-height: 36px;
    padding: 5px 8px;
}

.customer-code-control .btn .icon {
    height: 13px;
    width: 13px;
}

.customer-code-status {
    display: block;
    font-size: 9.5px;
    line-height: 1.3;
    margin-top: 3px;
}

.admin-shell .product-modal form .customer-contract-panel {
    background:
        radial-gradient(circle at 96% 0, rgba(53, 133, 117, .12), transparent 35%),
        linear-gradient(135deg, #f3faf7, #fffaf0);
    border-color: #bcd9d1;
    border-radius: 12px;
    grid-column: 1 / -1;
    padding: 11px 12px 12px;
}

.customer-contract-panel[hidden] {
    display: none;
}

.customer-contract-panel-head {
    align-items: flex-start;
    margin-bottom: 8px;
}

.customer-contract-panel-head h3 {
    color: #27443e;
    font-size: 14px;
    margin: 1px 0 2px;
}

.customer-contract-panel-head p {
    font-size: 9.5px;
    line-height: 1.35;
    margin: 0;
}

.customer-contract-panel-head .badge {
    flex: 0 0 auto;
    font-size: 9px;
}

.customer-contract-flow {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 8px;
}

.customer-contract-flow > span {
    align-items: center;
    background: rgba(255, 255, 255, .74);
    border: 1px solid #d7e3df;
    border-radius: 8px;
    color: #61716d;
    display: flex;
    font-size: 9px;
    font-weight: 800;
    gap: 5px;
    min-height: 29px;
    padding: 4px 7px;
}

.customer-contract-flow strong {
    align-items: center;
    background: #2f8272;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 18px;
    font-size: 8px;
    height: 18px;
    justify-content: center;
}

.admin-shell .product-modal form .customer-contract-fields.form-grid.compact {
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-contract-summary {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.customer-contract-summary > div {
    background: rgba(255, 255, 255, .8);
    border: 1px solid #d8e4e0;
    border-radius: 8px;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
}

.customer-contract-summary dt {
    color: #7b8985;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.customer-contract-summary dd {
    color: #29443e;
    font-size: 10.5px;
    font-weight: 800;
    margin: 0;
    overflow-wrap: anywhere;
}

.customer-contract-note {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px dashed #b9d2cb;
    border-radius: 9px;
    color: #63736f;
    display: flex;
    font-size: 9.5px;
    gap: 7px;
    margin-top: 7px;
    padding: 7px 8px;
}

.customer-contract-note > .icon {
    color: #2d7a6b;
    flex: 0 0 14px;
    height: 14px;
    width: 14px;
}

.customer-contract-note > span {
    flex: 1 1 auto;
}

.customer-contract-note .btn {
    flex: 0 0 auto;
    font-size: 9.5px;
    min-height: 30px;
    padding: 5px 7px;
}

.customer-contract-missing {
    margin-bottom: 7px;
}

.customer-location-picker {
    margin-top: 1px;
}

.customer-location-picker .location-picker-toolbar {
    font-size: 10.5px;
}

.customer-location-picker .location-picker-toolbar .btn {
    font-size: 9.5px;
    min-height: 30px;
    padding: 5px 7px;
}

.customer-location-picker .location-map {
    min-height: 250px;
}

.customer-modal-footer {
    grid-column: 1 / -1;
    margin-inline: -14px;
    margin-top: 3px;
}

.customer-modal-footer > .muted {
    font-size: 9px;
    margin-right: auto;
}

.customer-modal-danger {
    background: #fff8f7;
    border: 1px solid #ecd3d0;
    border-radius: 10px;
    margin: 9px 14px 14px;
    overflow: hidden;
}

.customer-modal-danger > summary {
    align-items: center;
    color: #92453d;
    cursor: pointer;
    display: flex;
    font-size: 10px;
    font-weight: 850;
    gap: 6px;
    list-style: none;
    min-height: 34px;
    padding: 7px 9px;
}

.customer-modal-danger > summary::-webkit-details-marker {
    display: none;
}

.customer-modal-danger > summary .icon {
    height: 14px;
    width: 14px;
}

.customer-modal-danger > form {
    align-items: center;
    border-top: 1px solid #ecd3d0;
    display: flex;
    gap: 9px;
    justify-content: space-between;
    padding: 8px 9px;
}

.customer-modal-danger > form .muted {
    font-size: 9px;
}

.customer-modal-danger > form .btn {
    flex: 0 0 auto;
    font-size: 9.5px;
    min-height: 31px;
    padding: 5px 8px;
}

@media (max-width: 920px) {
    .admin-shell .customer-modal-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell .product-modal form .customer-contract-fields.form-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-contract-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-shell dialog.product-modal.customer-form-modal {
        inset-inline: 6px;
        max-height: 96dvh;
        max-width: none;
        width: auto;
    }

    .admin-shell .customer-modal-form,
    .admin-shell .product-modal form .customer-contract-fields.form-grid.compact {
        grid-template-columns: 1fr;
    }

    .customer-modal-section-heading {
        grid-column: 1;
    }

    .customer-contract-flow,
    .customer-contract-summary {
        grid-template-columns: 1fr;
    }

    .customer-contract-flow {
        gap: 4px;
    }

    .customer-contract-note {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-contract-note .btn {
        width: 100%;
    }

    .customer-modal-footer {
        margin-inline: -14px;
    }

    .customer-modal-danger > form {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-modal-danger > form .btn {
        width: 100%;
    }
}
