:root {
    --ink: #19332b;
    --ink-soft: #5e6e66;
    --rosewood: #8d3b2c;
    --terracotta: #c86c4f;
    --gold: #daa64d;
    --leaf: #2f7c62;
    --cream: #fff9f3;
    --mist: #f5ece1;
    --surface: #fff8f1;
    --surface-strong: #fffdf9;
    --surface-muted: #f4eadf;
    --topbar-bg: #163129;
    --topbar-copy: rgba(245, 236, 225, 0.8);
    --topbar-line: rgba(255, 255, 255, 0.1);
    --line: rgba(25, 51, 43, 0.12);
    --shadow: 0 24px 50px rgba(66, 40, 25, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --status-upcoming: #d5a03f;
    --status-upcoming-ink: #7b5713;
    --status-in-progress: #2d9fb1;
    --status-in-progress-ink: #1c6672;
    --status-completed: #4d78cf;
    --status-completed-ink: #274a93;
    --status-in-route: #c96b47;
    --status-in-route-ink: #8e452a;
    --status-delivered: #2f7c62;
    --status-delivered-ink: #1f5a46;
    --status-incidents: #ba5a4d;
    --status-incidents-ink: #7f352e;
    --payment-unpaid: #d5a03f;
    --payment-unpaid-ink: #7b5713;
    --payment-partial: #2d9fb1;
    --payment-partial-ink: #1c6672;
    --payment-paid: #4d78cf;
    --payment-paid-ink: #274a93;
    --chart-surface: linear-gradient(180deg, rgba(255, 255, 253, 0.98), rgba(244, 241, 235, 0.96));
    --chart-shadow: 0 18px 32px rgba(34, 29, 22, 0.11);
    --chart-track: rgba(23, 48, 41, 0.06);
    --chart-grid: rgba(33, 73, 62, 0.08);
    --chart-fill-start: #2a6051;
    --chart-fill-end: #6f9d8d;
    --chart-fill-solid: #2f6e5c;
    --chart-pill-bg: rgba(25, 51, 43, 0.08);
    --chart-pill-copy: #27493e;
    --ops-green-900: #123c31;
    --ops-green-800: #174a3c;
    --ops-green-700: #1f6b54;
    --ops-text: #19342b;
    --ops-muted: #68766f;
    --ops-terracotta: #b85c43;
    --ops-surface-shell: linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(248, 241, 232, 0.9));
    --ops-surface: rgba(255, 255, 255, 0.9);
    --ops-surface-solid: #fff;
    --ops-surface-muted: rgba(250, 248, 243, 0.72);
    --ops-border: rgba(25, 52, 43, 0.12);
    --ops-border-soft: rgba(25, 52, 43, 0.08);
    --ops-radius-shell: clamp(1.4rem, 2vw, 2rem);
    --ops-radius-panel: 18px;
    --ops-radius-control: 14px;
    --ops-shadow-shell:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 30px 80px rgba(33, 27, 20, 0.16);
    --ops-shadow-panel: 0 16px 38px rgba(48, 38, 29, 0.07);
    --ops-shadow-card: 0 10px 24px rgba(33, 42, 35, 0.05);
    --ops-focus: rgba(47, 124, 98, 0.34);
    --ops-soft-green: #eef5f1;
    --ops-soft-red: #fff2ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    background-color: #f6eee3;
    background-image:
        linear-gradient(180deg, rgba(36, 47, 33, 0.2) 0%, rgba(36, 47, 33, 0.08) 18%, rgba(246, 238, 227, 0.9) 100%),
        radial-gradient(circle at top left, rgba(218, 166, 77, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(255, 249, 240, 0.46), transparent 28%),
        url("../images/backgrounds/ops-bg-lilies.445d040e6d83.avif"),
        linear-gradient(180deg, #fffdf9 0%, var(--mist) 100%);
    background-position:
        center top,
        top left,
        top right,
        left top,
        center;
    background-repeat: no-repeat;
    background-size:
        cover,
        1400px 1400px,
        1200px 1200px,
        cover,
        cover;
    background-attachment: scroll;
    min-height: 100vh;
}

body.performance-lite {
    background-image:
        linear-gradient(180deg, rgba(36, 47, 33, 0.16) 0%, rgba(246, 238, 227, 0.94) 100%),
        url("../images/backgrounds/ops-bg-lilies.445d040e6d83.avif"),
        linear-gradient(180deg, #fffdf9 0%, var(--mist) 100%);
    background-size:
        cover,
        cover,
        cover;
}

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

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    max-width: calc(100vw - 1.5rem);
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 249, 243, 0.88);
    border-radius: var(--radius-sm);
    background: var(--ops-green-900);
    color: #fffdf9;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(7, 19, 15, 0.24);
    transform: translateY(calc(-100% - 1.5rem));
    transition: transform 160ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid rgba(218, 166, 77, 0.56);
    outline-offset: 3px;
}

.page-shell:focus {
    outline: none;
}

code {
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
}

.pf-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
}

.pf-icon-sm {
    width: 0.95rem;
    height: 0.95rem;
}

.pf-icon-md {
    width: 1.1rem;
    height: 1.1rem;
}

.pf-icon-lg {
    width: 1.35rem;
    height: 1.35rem;
}

.pf-icon-rotate-180 {
    transform: rotate(180deg);
}

.button .pf-icon,
.nav-link .pf-icon,
.account-menu-link .pf-icon,
.status-pill .pf-icon,
.lane-badge .pf-icon,
.metric-card .pf-icon,
.inventory-switcher-link .pf-icon,
.section-header .pf-icon,
.label-with-icon .pf-icon {
    margin-right: 0.42rem;
}

.button.icon-only .pf-icon,
.view-toggle .pf-icon,
.modal-close .pf-icon,
.route-order-button .pf-icon,
.order-copy-button .pf-icon {
    margin-right: 0;
}

.background-orb {
    display: none;
}

.background-orb-left {
    top: -120px;
    left: -80px;
    background: rgba(218, 166, 77, 0.35);
}

.background-orb-right {
    top: 120px;
    right: -110px;
    background: rgba(200, 108, 79, 0.28);
}

.topbar,
.page-shell {
    position: relative;
    z-index: 1;
}

.topbar {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    grid-template-areas: "brand nav user";
    align-items: center;
    gap: clamp(0.75rem, 1.4vw, 1.25rem);
    min-height: 72px;
    padding: 0.58rem clamp(1rem, 2.4vw, 2rem);
    position: sticky;
    top: 0;
    z-index: 20;
    background:
        linear-gradient(135deg, #123c31 0%, #0f342b 54%, #0a2a23 100%),
        var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-line);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 16px 32px rgba(7, 19, 15, 0.22);
    font-family: "Inter", "Manrope", "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease,
        box-shadow 220ms ease;
}

.topbar.is-collapsed {
    transform: translate3d(0, calc(-100% - 0.7rem), 0);
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
}

.brand-block {
    grid-area: brand;
    min-width: 0;
    max-width: 18rem;
}

.brand-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.68rem;
    min-width: 0;
    color: #fff9f3;
    transition: transform 180ms ease, opacity 180ms ease;
}

.brand-identity:hover,
.brand-identity:focus-visible {
    transform: translateY(-1px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0.12rem;
    border-radius: 50%;
    background: rgba(255, 248, 241, 0.1);
    border: 1px solid rgba(255, 249, 243, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 10px 20px rgba(4, 15, 12, 0.24);
    overflow: hidden;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.brand-identity:hover .brand-mark,
.brand-identity:focus-visible .brand-mark {
    background: rgba(255, 248, 241, 0.16);
    border-color: rgba(255, 249, 243, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 14px 24px rgba(4, 15, 12, 0.28);
}

.brand-logo-image {
    display: block;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    filter: drop-shadow(0 8px 16px rgba(8, 18, 14, 0.18));
}

.brand-name {
    display: block;
    color: #fff9f3;
    font-size: 1.28rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-copy {
    display: none;
}

.landing-page .brand-block {
    max-width: none;
}

.landing-page .brand-copy {
    display: none;
}

.topnav,
.user-block {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.nav-shell {
    grid-area: nav;
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
    justify-self: center;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--surface-strong);
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
}

.nav-toggle::after {
    display: none;
    content: none;
}

.nav-toggle .pf-icon {
    transition: transform 180ms ease;
}

.nav-shell.is-open .nav-toggle .pf-icon {
    transform: rotate(180deg);
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.topnav {
    min-width: 0;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    justify-content: center;
    justify-content: safe center;
    gap: 0.18rem;
    align-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.18rem;
    scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
    display: none;
}

.nav-link,
.user-chip {
    border: 1px solid transparent;
    border-radius: 0.72rem;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 249, 243, 0.78);
    font-weight: 600;
    white-space: nowrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.52rem 0.68rem;
    font-size: 0.84rem;
    letter-spacing: -0.01em;
}

.error-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 9rem);
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem) 3rem;
}

.error-card {
    width: min(100%, 860px);
    display: grid;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(255, 253, 249, 0.98), rgba(245, 236, 225, 0.96)),
        var(--surface-strong);
    box-shadow: 0 28px 56px rgba(66, 40, 25, 0.14);
}

.error-code-block {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.error-status-code {
    font-size: clamp(4rem, 12vw, 7rem);
    line-height: 0.92;
    color: var(--rosewood);
    letter-spacing: -0.06em;
}

.error-status-title {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(200, 108, 79, 0.12);
    color: var(--rosewood);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.error-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.02;
}

.error-copy .section-copy {
    margin-top: 0.85rem;
    max-width: 38rem;
}

.error-hint {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    line-height: 1.6;
}

.error-request-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    max-width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 18px;
    background: rgba(25, 51, 43, 0.06);
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.error-request-chip code {
    max-width: min(100%, 34rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-link {
    position: relative;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 3.05rem;
    padding: 0.34rem 0.72rem 0.34rem 0.42rem;
    line-height: 1.15;
    font-weight: 650;
}

.user-chip small {
    color: rgba(255, 249, 243, 0.62);
    font-size: 0.72rem;
    font-weight: 500;
}

.topbar .button-ghost {
    background: var(--surface-muted);
    border: 1px solid rgba(22, 49, 41, 0.08);
    box-shadow: none;
}

.user-block {
    grid-area: user;
    justify-content: flex-end;
    gap: 0.55rem;
    justify-self: end;
    align-self: center;
}

.nav-link:hover,
.topbar .button-ghost:hover {
    background: rgba(255, 249, 243, 0.08);
    color: #fff9f3;
    border-color: rgba(255, 249, 243, 0.1);
}

.account-menu {
    position: relative;
}

.account-menu summary {
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .topbar {
        transition: none;
    }
}

.user-chip-button {
    position: relative;
    cursor: pointer;
    background: rgba(255, 249, 243, 0.07);
    border-color: rgba(255, 249, 243, 0.1);
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.user-chip-button::after {
    display: none;
    content: none;
}

.user-chip-button .pf-icon {
    color: rgba(255, 249, 243, 0.74);
    transition: transform 180ms ease;
}

.account-menu[open] .user-chip-button .pf-icon {
    transform: rotate(180deg);
}

.user-chip-button:hover {
    background: rgba(255, 249, 243, 0.11);
    border-color: rgba(255, 249, 243, 0.18);
    transform: translateY(-1px);
}

.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background:
        linear-gradient(145deg, rgba(255, 249, 243, 0.18), rgba(255, 249, 243, 0.08));
    border: 1px solid rgba(255, 249, 243, 0.14);
    color: #fff9f3;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.user-chip-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.user-chip-name {
    max-width: 8.8rem;
    overflow: hidden;
    color: #fff9f3;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    width: min(20rem, calc(100vw - 1.5rem));
    padding: 0.9rem;
    border-radius: calc(var(--radius-md) + 2px);
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(247, 239, 228, 0.98));
    box-shadow: 0 24px 44px rgba(17, 30, 24, 0.22);
    display: grid;
    gap: 0.85rem;
}

.account-menu-header {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.account-menu-header strong {
    font-size: 1rem;
}

.account-menu-header span,
.account-menu-label {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.account-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(25, 51, 43, 0.05);
    border: 1px solid transparent;
    font-weight: 700;
    transition: background 180ms ease, border-color 180ms ease;
}

.account-menu-link span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.account-menu-link:hover {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(47, 124, 98, 0.14);
}

.account-menu-form {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.account-language-select {
    min-width: 100%;
}

.account-detail-grid {
    align-items: start;
}

.account-summary-panel {
    align-self: start;
    display: grid;
    gap: 0.85rem;
}

.account-summary-panel h3 {
    margin: 0;
    font-size: 1.5rem;
}

.account-workspace {
    display: grid;
    gap: 1rem;
}

.nav-link.is-active {
    background:
        linear-gradient(180deg, rgba(255, 249, 243, 0.16), rgba(255, 249, 243, 0.09));
    border-color: rgba(255, 249, 243, 0.18);
    color: #fff9f3;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 18px rgba(3, 14, 11, 0.16);
}

.page-shell {
    width: min(2160px, calc(100% - 0.9rem));
    margin: 0.9rem auto 2.2rem;
    display: grid;
    gap: 1rem;
}

.hero-panel,
.panel,
.poll-panel,
.incident-panel,
.auth-card {
    background: var(--surface);
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-panel,
.panel,
.poll-panel,
.incident-panel {
    padding: 1.15rem;
    content-visibility: visible;
    contain-intrinsic-size: auto;
}

.poll-panel {
    width: min(2240px, calc(100vw - 1.2rem));
    justify-self: center;
}

.ops-page {
    position: relative;
    width: min(1680px, calc(100vw - 4.4rem));
    margin: 0 auto;
    display: grid;
    gap: clamp(1rem, 1.35vw, 1.25rem);
    padding: clamp(0.95rem, 1.35vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: var(--ops-radius-shell);
    background: var(--ops-surface-shell);
    box-shadow: var(--ops-shadow-shell);
    color: var(--ops-text);
}

.ops-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    backdrop-filter: blur(16px) saturate(1.06);
    -webkit-backdrop-filter: blur(16px) saturate(1.06);
}

.ops-page > * {
    position: relative;
    z-index: 1;
}

.ops-page > .modal-shell {
    z-index: 80;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ops-page {
        background: rgba(255, 253, 249, 0.96);
    }
}

.ops-hero,
.ops-page > .hero-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-height: auto;
    padding: 0.15rem 0 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ops-hero h1,
.ops-page > .hero-panel h1 {
    max-width: 56rem;
    margin: 0.08rem 0 0;
    color: var(--ops-text);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0;
}

.ops-hero .section-copy,
.ops-page > .hero-panel .section-copy {
    max-width: 52rem;
    margin-top: 0.35rem;
    color: var(--ops-muted);
    font-size: 0.96rem;
    line-height: 1.45;
}

.ops-hero .hero-actions,
.ops-page > .hero-panel .hero-actions {
    justify-content: flex-end;
    padding-top: 0.35rem;
}

.ops-panel,
.ops-page :is(.panel, .poll-panel),
.ops-page :is(.order-detail-card, .order-detail-disclosure, .danger-zone-panel) {
    border: 1px solid var(--ops-border);
    border-radius: var(--ops-radius-panel);
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-panel);
}

.ops-page :is(.panel, .poll-panel) {
    padding: clamp(1rem, 1.15vw, 1.2rem);
}

.ops-metric-strip,
.ops-page > .metric-strip,
.ops-page .metric-strip.ops-metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: clamp(0.75rem, 1vw, 0.95rem);
}

.ops-metric-card,
.ops-metric-strip .metric-card,
.ops-page .metric-card {
    min-height: 5.8rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--ops-border);
    border-radius: 16px;
    background: var(--ops-surface-solid);
    box-shadow: var(--ops-shadow-card);
}

.ops-metric-strip .metric-card span,
.ops-page .metric-card span {
    color: var(--ops-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.ops-metric-strip .metric-card strong,
.ops-page .metric-card strong {
    color: var(--ops-green-900);
    font-size: clamp(1.45rem, 2vw, 1.95rem);
    letter-spacing: -0.035em;
}

.ops-grid,
.ops-page :is(.detail-grid, .product-management-grid, .customer-management-grid, .sales-analysis-grid) {
    gap: clamp(1rem, 1.2vw, 1.2rem);
}

.ops-page .section-header {
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ops-page .section-header h2 {
    margin: 0.12rem 0 0;
    color: var(--ops-text);
    font-size: 1.16rem;
    line-height: 1.16;
}

.ops-page :is(.form-input, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-color: rgba(25, 52, 43, 0.22);
    border-radius: 12px;
}

.ops-page .data-table th {
    color: var(--ops-muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.ops-page .data-table td {
    padding-block: 0.9rem;
}

.ops-page :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--ops-focus);
    outline-offset: 2px;
}

.order-capture-page.ops-page,
.dashboard-workspace.ops-page,
.order-detail-panel.ops-page,
.delivery-page.ops-page,
.route-template-detail-page.ops-page {
    border-color: rgba(255, 255, 255, 0.62);
}

.inventory-ops-page {
    width: min(1960px, calc(100vw - 1.5rem));
}

.board-workspace,
.weekly-glance-panel,
.dashboard-dispatch-panel {
    background: rgba(255, 248, 241, 0.91);
}

.dashboard-workspace {
    width: min(1960px, calc(100vw - 4.4rem));
    justify-self: center;
    display: grid;
    gap: clamp(1rem, 1.4vw, 1.45rem);
    padding: clamp(0.9rem, 1.5vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: clamp(1.4rem, 2vw, 2rem);
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(247, 240, 231, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 30px 80px rgba(33, 27, 20, 0.18);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .dashboard-workspace {
        background: rgba(255, 253, 249, 0.96);
    }
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.hero-panel h1,
.auth-card h1 {
    margin: 0.25rem 0 0.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.section-copy {
    margin: 0;
    color: var(--ink-soft);
    max-width: 48rem;
}

.hero-actions,
.form-actions,
.filter-actions,
.route-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.align-end {
    align-self: end;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.7rem;
}

.metric-card,
.message,
.empty-card,
.incident-card,
.order-card,
.delivery-card,
.tenant-card {
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(66, 40, 25, 0.08);
}

.metric-card {
    padding: 0.8rem 0.9rem;
    min-height: 6.2rem;
}

.metric-card span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-card strong {
    display: block;
    margin-top: 0.24rem;
    font-size: clamp(1.7rem, 1.8vw, 2.1rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.metric-note {
    margin: 0.32rem 0 0;
    color: var(--ink-soft);
    font-size: 0.76rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.metric-alert {
    background: linear-gradient(180deg, #fff8f3, #f8ede5);
}

.metric-card-total {
    background: linear-gradient(180deg, #fffdf9, #f4eee4);
}

.metric-card-upcoming {
    border-top: 4px solid var(--status-upcoming);
}

.metric-card-in-progress {
    border-top: 4px solid var(--status-in-progress);
}

.metric-card-completed {
    border-top: 4px solid var(--status-completed);
}

.metric-card-in-route {
    border-top: 4px solid var(--status-in-route);
}

.metric-card-delivered {
    border-top: 4px solid var(--status-delivered);
}

.metric-card-incidents {
    border-top: 4px solid var(--status-incidents);
    background: linear-gradient(180deg, #fff9f6, #f8ede7);
}

a.metric-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

a.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(66, 40, 25, 0.16);
}

a.metric-card:focus-visible {
    outline: 2px solid var(--status-completed);
    outline-offset: 2px;
}

a.metric-card.is-active {
    border-color: var(--ink-soft);
    box-shadow: 0 0 0 2px var(--ink-soft) inset, 0 16px 32px rgba(66, 40, 25, 0.14);
}

.stage-overview-panel {
    display: grid;
    gap: 0.7rem;
}

.stage-overview-shell {
    display: grid;
    gap: 0.9rem;
}

.stage-overview-bar {
    display: flex;
    width: 100%;
    min-height: 0.95rem;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2)),
        rgba(25, 51, 43, 0.07);
    border: 1px solid rgba(25, 51, 43, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.stage-overview-segment {
    display: block;
    min-width: 0;
}

.stage-overview-segment.is-upcoming,
.stage-overview-dot.is-upcoming {
    background: var(--status-upcoming);
}

.stage-overview-segment.is-in-progress,
.stage-overview-dot.is-in-progress {
    background: var(--status-in-progress);
}

.stage-overview-segment.is-completed,
.stage-overview-dot.is-completed {
    background: var(--status-completed);
}

.stage-overview-segment.is-in-route,
.stage-overview-dot.is-in-route {
    background: var(--status-in-route);
}

.stage-overview-segment.is-delivered,
.stage-overview-dot.is-delivered {
    background: var(--status-delivered);
}

.stage-overview-segment.is-incidents,
.stage-overview-dot.is-incidents {
    background: var(--status-incidents);
}

.stage-overview-legend {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    padding-top: 0.15rem;
}

.stage-overview-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.62rem;
    min-width: 0;
    padding: 0.2rem 1rem;
    border-left: 1px solid rgba(25, 51, 43, 0.14);
}

.stage-overview-item:first-child {
    border-left: 0;
    padding-left: 0.15rem;
}

.stage-overview-item:last-child {
    padding-right: 0.15rem;
}

.stage-overview-dot {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    color: #fffdf9;
    flex: 0 0 auto;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.7);
}

.stage-overview-dot .pf-icon {
    width: 0.85rem;
    height: 0.85rem;
}

.stage-overview-copy {
    min-width: 0;
}

.stage-overview-copy strong,
.stage-overview-copy small {
    display: block;
}

.stage-overview-copy strong {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-top: 0.1rem;
    font-size: 0.98rem;
    line-height: 1.1;
}

.stage-overview-copy strong span {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stage-overview-copy small {
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0;
    color: var(--rosewood);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    margin: 0.25rem 0 0;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.1rem 0;
}

.dashboard-heading > div:first-child {
    padding: 0.8rem 1rem;
    border-radius: calc(var(--radius-lg) - 8px);
    background: linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(247, 239, 228, 0.94));
    border: 1px solid rgba(25, 51, 43, 0.08);
    box-shadow: 0 12px 24px rgba(24, 43, 36, 0.08);
}

.dashboard-heading h1 {
    margin: 0.18rem 0 0;
    font-size: clamp(1.8rem, 2.8vw, 2.45rem);
    line-height: 1;
}

.dashboard-workspace .dashboard-heading {
    padding: 0.15rem 0.1rem clamp(0.85rem, 1.2vw, 1.15rem);
    border-bottom: 1px solid rgba(25, 51, 43, 0.08);
}

.dashboard-workspace .dashboard-heading > div:first-child {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-workspace .dashboard-heading h1 {
    font-size: clamp(2rem, 2.4vw, 2.55rem);
}

.dashboard-workspace .stage-overview-panel,
.dashboard-workspace .dashboard-filter-panel,
.dashboard-workspace .board-workspace,
.dashboard-workspace .weekly-glance-panel {
    width: 100%;
    justify-self: stretch;
    border-color: rgba(25, 51, 43, 0.08);
    border-radius: calc(var(--radius-lg) - 6px);
    background: rgba(255, 255, 255, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 34px rgba(66, 40, 25, 0.07);
}

.dashboard-workspace .board-workspace {
    display: grid;
    gap: clamp(0.95rem, 1.25vw, 1.2rem);
    background: rgba(255, 251, 246, 0.68);
}

.dashboard-workspace .dashboard-filter-panel {
    background: rgba(255, 255, 255, 0.58);
}

.dashboard-workspace #dashboard-board-content {
    min-width: 0;
}

.dashboard-workspace .kanban-lane,
.dashboard-workspace .lane-body,
.dashboard-workspace .order-card,
.dashboard-workspace .order-card > *,
.dashboard-workspace .card-header > div,
.dashboard-workspace .order-products-preview {
    min-width: 0;
}

.dashboard-workspace .order-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.dashboard-workspace .card-header {
    min-width: 0;
}

.dashboard-workspace .card-header > div:first-child {
    flex: 1 1 auto;
}

.dashboard-workspace .card-header-status {
    max-width: 100%;
}

.dashboard-workspace .order-card .eyebrow,
.dashboard-workspace .card-header h3,
.dashboard-workspace .card-subcopy,
.dashboard-workspace .compact-address,
.dashboard-workspace .order-products-list li span {
    overflow-wrap: anywhere;
}

.dashboard-workspace .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.dashboard-workspace .card-actions .button {
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.48rem 0.58rem;
    border-radius: 999px;
    gap: 0.36rem;
    font-size: 0.72rem;
    line-height: 1.05;
    white-space: normal;
    text-align: center;
}

.dashboard-workspace .order-copy-button {
    width: 100%;
    min-width: 0;
    padding: 0;
    aspect-ratio: auto;
}

.dashboard-workspace .card-actions .button .pf-icon,
.dashboard-workspace .quick-update-form .button .pf-icon {
    margin-right: 0;
}

.dashboard-workspace .quick-update-form {
    padding-top: 0.7rem;
}

.dashboard-workspace .quick-update-form .button.card-stage-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.05rem;
    padding: 0.72rem 1rem;
    border-top: 0;
    border-radius: 999px;
    gap: 0.48rem;
}

.dashboard-workspace .board-workspace .lane-header,
.dashboard-workspace .board-workspace .lane-header > div {
    min-width: 0;
}

.dashboard-workspace .board-workspace .lane-badge {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
}

.dashboard-context-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.dashboard-context-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.06);
    border: 1px solid rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.dashboard-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.75rem;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.12);
    border: 1px solid rgba(47, 124, 98, 0.18);
    color: var(--leaf);
    font-size: 0.76rem;
    font-weight: 800;
}

.weekly-glance-panel {
    display: grid;
    gap: 1rem;
    content-visibility: visible;
    contain-intrinsic-size: auto;
}

.weekly-glance-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.weekly-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(25, 51, 43, 0.09);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 30px rgba(25, 51, 43, 0.06);
}

.weekly-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: rgba(248, 244, 237, 0.92);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.weekly-nav-button:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 124, 98, 0.28);
    background: rgba(255, 255, 255, 0.98);
}

.weekly-nav-summary {
    display: grid;
    gap: 0.12rem;
    min-width: min(18rem, 52vw);
}

.weekly-nav-summary strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.weekly-nav-summary .section-copy {
    margin: 0;
    font-size: 0.84rem;
}

.weekly-nav-today {
    white-space: nowrap;
}

.weekly-nav-today.is-disabled {
    opacity: 0.58;
    pointer-events: none;
    cursor: default;
}

.weekly-glance-shell {
    display: grid;
    gap: 1rem;
}

.weekly-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.weekly-summary-card {
    display: grid;
    gap: 0.32rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(249, 243, 236, 0.92));
}

.weekly-summary-card span {
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.weekly-summary-card strong {
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.weekly-days-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.7rem;
}

.week-day-card-shell {
    position: relative;
}

.week-day-quick-add {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(25, 51, 43, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 20px rgba(66, 40, 25, 0.12);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.week-day-quick-add:hover {
    transform: translateY(-1px) scale(1.02);
    border-color: rgba(47, 124, 98, 0.28);
    background: rgba(255, 255, 255, 1);
}

.week-day-pill {
    display: grid;
    gap: 0.65rem;
    min-height: 10rem;
    padding: 0.95rem;
    padding-top: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: rgba(255, 253, 249, 0.6);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.week-day-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 124, 98, 0.22);
    background: rgba(255, 255, 255, 0.84);
}

.week-day-pill.is-today {
    border-color: rgba(200, 108, 79, 0.38);
    background: linear-gradient(180deg, rgba(200, 108, 79, 0.12), rgba(255, 249, 244, 0.94));
    box-shadow: inset 0 0 0 1px rgba(200, 108, 79, 0.08);
}

.week-day-pill.is-selected {
    border-color: rgba(47, 124, 98, 0.32);
    background: linear-gradient(180deg, rgba(47, 124, 98, 0.08), rgba(255, 253, 249, 0.92));
    box-shadow: inset 0 0 0 1px rgba(47, 124, 98, 0.08);
}

.week-day-pill-top,
.week-day-pill-body,
.week-day-pill-products {
    display: grid;
    gap: 0.15rem;
}

.week-day-pill-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.week-day-state-tags {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.week-day-state-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.week-day-state-tag.is-selected {
    background: rgba(47, 124, 98, 0.12);
    color: var(--leaf);
}

.week-day-state-tag.is-today {
    background: rgba(201, 107, 71, 0.12);
    color: var(--status-in-route-ink);
}

.week-day-pill-top strong {
    font-size: 1.75rem;
    line-height: 1;
}

.week-day-total {
    font-size: 1.1rem;
    font-weight: 800;
}

.week-day-pill-products {
    padding-top: 0.2rem;
}

.week-day-pill-products span {
    font-size: 0.98rem;
    font-weight: 800;
}

.week-day-pill-body small,
.week-day-pill-products small,
.week-day-pill-preview {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.week-day-pill-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
    font-weight: 700;
}

.week-day-pill-preview span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.week-day-pill-preview.is-empty {
    justify-content: flex-start;
}

.filter-form,
.form-grid {
    display: grid;
    gap: 1rem;
}

.filter-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.dashboard-filter-form {
    grid-template-columns: minmax(170px, 0.95fr) repeat(2, minmax(130px, 0.62fr)) minmax(360px, 1.45fr) minmax(170px, 0.82fr);
}

.dashboard-filter-form .filter-actions {
    grid-column: 1 / -1;
}

.board-filter-strip {
    display: grid;
    gap: 1rem;
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}

.board-filter-strip h2 {
    margin: 0.25rem 0 0;
}

.dashboard-workspace .board-filter-strip {
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    padding: 0;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-workspace .dashboard-filter-shell {
    gap: 1rem;
}

.dashboard-workspace .dashboard-filter-primary {
    gap: clamp(0.9rem, 1.2vw, 1.2rem);
}

.dashboard-workspace .dashboard-filter-actions {
    gap: 0.75rem;
}

.dashboard-workspace .kanban-board {
    gap: clamp(0.8rem, 1vw, 1rem);
    padding: 0.1rem 0.05rem 0.35rem;
}

.dashboard-filter-shell {
    display: grid;
    gap: 0.9rem;
}

.advanced-filter-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dashboard-filter-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.field-search-primary {
    margin: 0;
}

.search-input-stack-primary .form-input {
    min-height: 3.7rem;
    padding-left: 1rem;
    padding-right: 9.4rem;
    font-size: 1rem;
}

.dashboard-filter-actions {
    display: inline-flex;
    align-items: end;
    gap: 0.75rem;
    justify-content: flex-end;
}

.advanced-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 3.7rem;
    padding: 0.8rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: rgba(255, 255, 255, 0.84);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(66, 40, 25, 0.06);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    user-select: none;
    white-space: nowrap;
}

.advanced-filter-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 124, 98, 0.22);
    background: rgba(255, 255, 255, 0.98);
}

.advanced-filter-checkbox:checked ~ .dashboard-filter-primary .advanced-filter-toggle {
    border-color: rgba(47, 124, 98, 0.24);
    background: rgba(47, 124, 98, 0.08);
}

.advanced-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.14);
    color: var(--leaf);
    font-size: 0.76rem;
    font-weight: 800;
}

.advanced-filter-panel-body {
    display: none;
}

.advanced-filter-checkbox:checked ~ .advanced-filter-panel-body {
    display: block;
}

.advanced-filter-card {
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 241, 233, 0.92));
    box-shadow: 0 14px 30px rgba(66, 40, 25, 0.07);
}

.board-filter-form {
    grid-template-columns: minmax(160px, 0.9fr) repeat(2, minmax(120px, 0.6fr)) minmax(360px, 1.4fr) minmax(150px, 0.8fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.field-search-combo {
    align-self: end;
}

.search-input-stack {
    position: relative;
}

.search-input-stack .form-input {
    padding-right: 8.25rem;
}

.search-input-stack-primary .form-input {
    padding-right: 9.4rem;
}

.search-inline-toggle-primary {
    right: 0.55rem;
}

.search-inline-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.06);
    border: 1px solid rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.search-inline-toggle:hover {
    background: rgba(25, 51, 43, 0.09);
    border-color: rgba(25, 51, 43, 0.14);
}

.search-inline-toggle .checkbox-control {
    width: 0.95rem;
    height: 0.95rem;
}

.search-inline-toggle:has(.checkbox-control:checked) {
    background: rgba(47, 124, 98, 0.12);
    border-color: rgba(47, 124, 98, 0.22);
    color: var(--leaf);
}

.search-inline-toggle-static {
    position: static;
    transform: none;
    min-height: 3rem;
    width: 100%;
    justify-content: center;
}

.board-filter-form .filter-actions {
    grid-column: auto;
    align-self: end;
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding-left: 0.25rem;
}

.board-filter-form .button {
    padding-inline: 1rem;
}

.filter-actions-primary .button {
    min-height: 3.7rem;
}

.advanced-filter-actions {
    justify-content: flex-end;
}

.delivery-filter-form {
    grid-template-columns: minmax(170px, 0.9fr) repeat(2, minmax(130px, 0.7fr)) auto;
    gap: 0.85rem;
    padding: 1rem;
    margin: 0;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 241, 233, 0.88));
    box-shadow: 0 10px 22px rgba(66, 40, 25, 0.05);
}

.delivery-filter-form .filter-actions {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.platform-search {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.history-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.detail-grid,
.tenant-grid {
    display: grid;
    gap: 1rem;
}

.detail-grid {
    grid-template-columns: 1fr 1.4fr;
}

.product-workspace {
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
    align-items: start;
}

.product-create-panel,
.product-csv-panel {
    align-self: start;
}

.customer-page-flow {
    display: grid;
    gap: 1.15rem;
}

.customer-management-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
    gap: 1.15rem;
    align-items: start;
}

.customer-utility-stack {
    display: grid;
    gap: 1rem;
}

.customer-directory-panel,
.customer-tool-panel,
.customer-audit-panel,
.customer-readonly-panel {
    align-self: start;
}

.customer-directory-copy {
    margin: 0.45rem 0 0;
    max-width: 52rem;
}

.customer-csv-launcher {
    display: grid;
    gap: 1rem;
}

.customer-csv-launcher .section-copy {
    margin: 0;
    max-width: 32rem;
}

.customer-csv-launcher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.customer-csv-launcher-actions .button {
    min-width: 10.5rem;
    justify-content: center;
}

.customer-csv-pending {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(47, 124, 98, 0.16);
    border-radius: var(--radius-md);
    background: rgba(47, 124, 98, 0.07);
}

.customer-csv-pending strong {
    color: var(--leaf-deep);
    font-size: 0.92rem;
}

.customer-csv-pending span {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.customer-csv-modal-card {
    display: grid;
    gap: 1rem;
}

.customer-csv-modal-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr);
    gap: 1.25rem;
    align-items: start;
}

.customer-csv-modal-intake,
.customer-csv-modal-preview {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.customer-csv-modal-preview .csv-preview {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.product-catalog-panel {
    grid-column: 1 / -1;
}

.csv-preview {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.csv-preview-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

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

.csv-preview-summary div {
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(25, 51, 43, 0.06);
}

.csv-preview-summary span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.csv-preview-summary strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.45rem;
}

.csv-preview-table {
    max-height: 340px;
    overflow: auto;
}

.csv-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.csv-error-list {
    margin-top: 1rem;
}

.customer-csv-modal-card .csv-error-list {
    margin-top: 0;
}

.product-page-flow {
    display: grid;
    gap: 1.15rem;
}

.product-management-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(300px, 0.95fr);
    gap: 1.15rem;
    align-items: start;
}

.product-directory-panel,
.product-tool-panel,
.product-readonly-panel {
    align-self: start;
}

.product-directory-copy {
    margin: 0.45rem 0 0;
    max-width: 52rem;
}

.product-csv-launcher {
    display: grid;
    gap: 1rem;
}

.product-csv-launcher .section-copy {
    margin: 0;
    max-width: 32rem;
}

.product-csv-launcher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-csv-launcher-actions .button {
    min-width: 10.5rem;
    justify-content: center;
}

.product-csv-pending {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(47, 124, 98, 0.16);
    border-radius: var(--radius-md);
    background: rgba(47, 124, 98, 0.07);
}

.product-csv-pending strong {
    color: var(--leaf-deep);
    font-size: 0.92rem;
}

.product-csv-pending span {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.product-csv-modal-card {
    display: grid;
    gap: 1rem;
}

.product-csv-modal-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.25fr);
    gap: 1.25rem;
    align-items: start;
}

.product-csv-modal-intake,
.product-csv-modal-preview {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.product-csv-modal-preview .csv-preview {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.product-csv-modal-card .csv-error-list {
    margin-top: 0;
}

.tenant-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.field-span-2 {
    grid-column: span 2;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.order-intake-form {
    gap: 1.15rem;
}

.order-intake-shell {
    display: grid;
    gap: 1rem;
}

.order-intake-section {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 252, 248, 0.92), rgba(244, 234, 223, 0.96)),
        rgba(255, 248, 241, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.order-intake-section-collapsible {
    gap: 0.75rem;
}

.order-intake-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.order-intake-heading h2 {
    margin: 0.18rem 0 0;
    font-size: 1.45rem;
}

.order-intake-grid,
.order-payment-grid {
    display: grid;
    gap: 0.9rem;
}

.order-intake-grid-identity,
.order-payment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-payment-grid-full {
    grid-template-columns: minmax(0, 1fr);
}

.order-collapsible-panel {
    border: 1px solid rgba(214, 198, 170, 0.55);
    border-radius: 22px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(200, 108, 79, 0.12) 0%, transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 250, 243, 0.97) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 16px 32px rgba(66, 40, 25, 0.06);
    overflow: hidden;
}

.order-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
    list-style: none;
}

.order-collapsible-summary::-webkit-details-marker {
    display: none;
}

.order-collapsible-summary span {
    display: block;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
}

.order-collapsible-summary small {
    display: block;
    margin-top: 0.18rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-collapsible-summary strong {
    color: var(--leaf);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.order-collapsible-panel[open] .order-collapsible-summary {
    border-bottom: 1px solid rgba(214, 198, 170, 0.55);
}

.order-collapsible-body {
    padding: 1rem;
}

.order-field-card {
    --card-accent: var(--terracotta);
    --card-accent-soft: rgba(200, 108, 79, 0.18);
    position: relative;
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 1.25rem 1.15rem 1.2rem;
    border-radius: 22px;
    border: 1px solid rgba(214, 198, 170, 0.55);
    background:
        radial-gradient(120% 90% at 100% 0%, var(--card-accent-soft) 0%, transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 250, 243, 0.97) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 16px 32px rgba(66, 40, 25, 0.08);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.order-field-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--card-accent), var(--gold));
}

.order-field-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--card-accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 22px 40px rgba(66, 40, 25, 0.12);
}

.order-field-card-recipient {
    --card-accent: var(--leaf);
    --card-accent-soft: rgba(47, 124, 98, 0.18);
}

.order-field-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px dashed rgba(141, 59, 44, 0.18);
}

.order-field-card-header::before {
    content: "";
    flex-shrink: 0;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--card-accent);
    box-shadow: 0 0 0 4px var(--card-accent-soft);
}

.order-field-card-header strong {
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.order-field-card-wide {
    grid-column: 1 / -1;
    --card-accent: var(--gold);
    --card-accent-soft: rgba(218, 166, 77, 0.2);
}

.recurring-settings-shell {
    gap: 1rem;
}

.recurring-settings-layout {
    display: grid;
    gap: 1rem;
    grid-column: 1 / -1;
}

.recurring-settings-layout[hidden],
.recurring-rule-block[hidden],
.recurring-settings-grid > .field[hidden] {
    display: none !important;
}

.recurring-settings-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recurring-rule-block {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(214, 198, 170, 0.5);
    border-radius: 20px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(218, 166, 77, 0.1) 0%, transparent 55%),
        rgba(255, 255, 255, 0.82);
}

.recurring-rule-block-monthly {
    padding-bottom: 1.05rem;
}

.recurring-weekdays-grid .checkbox-group {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.recurring-weekdays-grid .checkbox-group > div,
.recurring-weekdays-grid .checkbox-group > li {
    margin: 0;
}

.recurring-weekdays-grid .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(25, 51, 43, 0.12);
    border-radius: 18px;
    background: rgba(47, 124, 98, 0.06);
    font-weight: 700;
    color: var(--ink);
}

.recurring-weekdays-grid .checkbox-group input {
    margin: 0;
}

.recurring-occurrence-stack {
    display: grid;
    gap: 0.9rem;
}

.recurring-occurrence-card {
    border-radius: 20px;
}

.recurring-occurrence-summary {
    align-items: flex-start;
}

.recurring-occurrence-summary-grid {
    display: grid;
    gap: 0.4rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    flex: 1;
}

.recurring-occurrence-summary-grid span,
.recurring-occurrence-summary-grid a {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.recurring-occurrence-form {
    gap: 0.85rem;
}

.order-inline-banner {
    position: relative;
    padding: 1rem 1.1rem 1rem 1.35rem;
    border-radius: 18px;
    border: 1px solid rgba(214, 198, 170, 0.55);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(218, 166, 77, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 250, 243, 0.97));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 14px 28px rgba(66, 40, 25, 0.06);
    overflow: hidden;
}

.order-inline-banner::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--terracotta));
}

.order-product-section {
    display: grid;
    gap: 0.85rem;
}

.order-section-help {
    margin: 0;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.compact-field {
    gap: 0.3rem;
}

.field label {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(25, 51, 43, 0.96);
}

.inline-action-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}

.form-input {
    width: 100%;
    border: 1px solid rgba(25, 51, 43, 0.24);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.95rem;
    font: inherit;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.72) inset,
        0 10px 18px rgba(66, 40, 25, 0.04);
}

.form-input:hover {
    border-color: rgba(25, 51, 43, 0.32);
}

.form-input:focus,
.form-input:focus-visible {
    outline: none;
    border-color: rgba(47, 124, 98, 0.72);
    box-shadow:
        0 0 0 3px rgba(47, 124, 98, 0.14),
        0 12px 22px rgba(66, 40, 25, 0.06);
}

.form-input:disabled {
    background: rgba(233, 227, 220, 0.82);
    color: var(--ink-soft);
    cursor: not-allowed;
    box-shadow: none;
}

.field.is-muted label,
.field.is-muted .field-help {
    color: rgba(94, 110, 102, 0.72);
}

.form-input-error {
    border-color: var(--rosewood);
    box-shadow: 0 0 0 3px rgba(157, 59, 45, 0.14);
}

.form-textarea {
    resize: vertical;
    min-height: 96px;
}

.checkbox-control {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--leaf);
}

.field-error {
    padding: 0.8rem 0.95rem;
    border-radius: var(--radius-sm);
    background: rgba(157, 59, 45, 0.1);
    color: var(--rosewood);
    font-size: 0.92rem;
}

.field-error ul {
    margin: 0;
    padding-left: 1.1rem;
}

.form-error-summary {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(157, 59, 45, 0.24);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(157, 59, 45, 0.12), rgba(255, 244, 238, 0.92));
    box-shadow: 0 14px 32px rgba(72, 55, 41, 0.08);
}

.form-error-summary:focus {
    outline: 2px solid rgba(157, 59, 45, 0.42);
    outline-offset: 3px;
}

.form-error-summary-title {
    margin: 0 0 0.65rem;
    color: var(--rosewood);
    font-size: 0.97rem;
    font-weight: 700;
}

.form-error-summary-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--rosewood);
}

.form-error-summary-list li + li {
    margin-top: 0.36rem;
}

.form-error-summary-list a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 0.08rem;
    text-underline-offset: 0.18rem;
}

.field-help {
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.35;
}

body.modal-open {
    overflow: hidden;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-shell[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 30, 24, 0.58);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 38rem);
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.4rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fffdf9, #f7eee3);
    box-shadow: 0 28px 52px rgba(17, 30, 24, 0.24);
}

.modal-card-wide {
    width: min(100%, 72rem);
}

.modal-shell[data-modal="manufacturing-day-modal"] {
    align-items: start;
    justify-items: center;
    padding:
        max(1rem, calc(var(--topbar-height, 0px) + 1rem))
        1.25rem
        1.25rem;
}

.modal-shell[data-modal="manufacturing-day-modal"] .modal-card-wide {
    max-height: none;
    min-height: min-content;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.modal-header h2 {
    margin: 0.2rem 0 0;
}

.modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--rosewood);
    font: inherit;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.modal-form {
    margin-top: 1rem;
}

.modal-actions {
    justify-content: flex-end;
}

.manufacturing-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 1rem;
}

.manufacturing-summary-card,
.manufacturing-detail-card {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius-md) + 2px);
    background: rgba(255, 255, 255, 0.68);
}

.order-inventory-warning-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.order-inventory-warning-item {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 252, 248, 0.98);
}

.order-inventory-warning-item.is-critical {
    border-color: rgba(186, 90, 77, 0.22);
    background: linear-gradient(180deg, #fff5f2, #fffdf9 76%);
}

.order-inventory-warning-item.is-warning {
    border-color: rgba(213, 160, 63, 0.24);
    background: linear-gradient(180deg, #fffaf0, #fffdf9 76%);
}

.order-inventory-warning-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: start;
}

.order-inventory-warning-head strong,
.order-inventory-warning-metrics strong {
    display: block;
}

.order-inventory-warning-head p,
.order-inventory-warning-note {
    margin: 0.2rem 0 0;
    color: var(--ink-soft);
    line-height: 1.4;
}

.order-inventory-warning-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.order-inventory-warning-metrics div {
    display: grid;
    gap: 0.2rem;
}

.order-inventory-warning-metrics span {
    color: var(--ink-soft);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-inventory-warning-choice {
    display: flex;
    gap: 0.7rem;
    align-items: start;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.order-inventory-warning-choice input {
    accent-color: var(--rosewood);
    margin-top: 0.2rem;
}

.order-inventory-warning-choice strong {
    display: block;
    font-size: 0.95rem;
}

.order-inventory-warning-choice p {
    margin: 0.18rem 0 0;
    color: var(--ink-soft);
    line-height: 1.35;
}

.order-inventory-warning-error[hidden] {
    display: none;
}

.manufacturing-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.manufacturing-summary-header h3 {
    margin: 0.18rem 0 0;
}

.manufacturing-summary-header p,
.manufacturing-product-row p,
.manufacturing-order-head p {
    margin: 0.2rem 0 0;
    color: var(--ink-soft);
}

.manufacturing-summary-chips {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.manufacturing-product-list,
.manufacturing-order-list {
    display: grid;
    gap: 0.75rem;
}

.manufacturing-product-row,
.manufacturing-order-row {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(244, 234, 223, 0.92));
}

.manufacturing-product-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.manufacturing-product-copy {
    display: grid;
    gap: 0.4rem;
}

.manufacturing-subsection {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.manufacturing-flower-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.65rem;
}

.manufacturing-flower-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(244, 234, 223, 0.9));
}

.manufacturing-flower-row strong {
    display: block;
}

.manufacturing-flower-row p {
    margin: 0.16rem 0 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.3;
}

.manufacturing-recipe-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.manufacturing-recipe-breakdown span {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.6rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.06);
    border: 1px solid rgba(25, 51, 43, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
}

.manufacturing-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.manufacturing-order-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.manufacturing-order-products {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.manufacturing-order-products span {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.65rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.06);
    border: 1px solid rgba(25, 51, 43, 0.08);
    font-size: 0.86rem;
    font-weight: 700;
}

.line-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.line-item-list {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.line-item-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(120px, 0.58fr) auto;
    gap: 0.85rem;
    align-items: end;
    padding: 1.15rem 1rem 1rem;
    border: 1px solid rgba(214, 198, 170, 0.55);
    border-radius: var(--radius-md);
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(47, 124, 98, 0.1) 0%, transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 250, 243, 0.97));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 24px rgba(66, 40, 25, 0.06);
    overflow: visible;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.line-item-row[data-order-supply-row] {
    grid-template-columns: minmax(0, 1.55fr) minmax(112px, 0.45fr) minmax(150px, 0.55fr) auto;
}

.line-item-row::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--leaf), var(--gold));
}

.order-complement-manager {
    margin-top: 1rem;
}

.line-item-row:focus-within {
    z-index: 4;
    transform: translateY(-2px);
    border-color: rgba(47, 124, 98, 0.5);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 20px 36px rgba(66, 40, 25, 0.1);
}

.searchable-select-native {
    display: none;
}

.searchable-select {
    position: relative;
}

.searchable-select.is-open {
    z-index: 5;
}

.searchable-select-input {
    padding-right: 3rem;
}

.searchable-select-toggle {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: none;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.16);
    color: var(--leaf);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.searchable-select-toggle:hover {
    background: rgba(47, 124, 98, 0.26);
}

.searchable-select.is-open .searchable-select-toggle {
    transform: rotate(180deg);
}

.searchable-select-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(25, 51, 43, 0.16);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 18px 32px rgba(25, 51, 43, 0.16);
}

.searchable-select.is-open .searchable-select-menu {
    display: grid;
    gap: 0.2rem;
}

.searchable-select-option,
.searchable-select-empty {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
}

.searchable-select-option {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option.is-active {
    background: rgba(47, 124, 98, 0.12);
}

.searchable-select-option.is-selected {
    font-weight: 700;
}

.searchable-select-empty {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.line-item-actions {
    display: flex;
    align-items: stretch;
}

.checkbox-chip-inline {
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    background: var(--surface-strong);
}

.button-block {
    width: 100%;
    justify-content: center;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    transform: none;
}

.button.is-loading,
.button[aria-busy="true"] {
    pointer-events: none;
}

.button.is-loading::before,
.button[aria-busy="true"]::before {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-spin 0.72s linear infinite;
    flex: 0 0 auto;
    opacity: 0.9;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

.button-primary {
    background: linear-gradient(135deg, var(--terracotta), var(--rosewood));
    color: #fff;
    box-shadow: 0 16px 28px rgba(141, 59, 44, 0.24);
}

.button-secondary {
    background: linear-gradient(135deg, #2f7c62, #245f4c);
    color: #fff;
    box-shadow: 0 14px 24px rgba(36, 95, 76, 0.22);
}

.button-danger {
    background: linear-gradient(135deg, #c2574a, var(--rosewood));
    color: #fff;
    box-shadow: 0 14px 24px rgba(141, 59, 44, 0.22);
}

/* Positive actions (save / add / confirm) read green; destructive ones red. */
.button-success {
    background: linear-gradient(135deg, #3c8b70, var(--leaf));
    color: #fff;
    box-shadow: 0 16px 28px rgba(47, 124, 98, 0.24);
}

.button-success:hover {
    box-shadow: 0 18px 32px rgba(47, 124, 98, 0.3);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    border: 1px solid var(--line);
}

.panel .button-ghost,
.poll-panel .button-ghost {
    background: rgba(47, 124, 98, 0.14);
    color: var(--leaf);
    border-color: rgba(47, 124, 98, 0.24);
    box-shadow: 0 10px 22px rgba(47, 124, 98, 0.08);
}

.panel .button-ghost:hover,
.poll-panel .button-ghost:hover {
    background: rgba(47, 124, 98, 0.2);
}

/* Cancel/secondary actions stay neutral so the primary action reads clearly. */
.form-actions .button-ghost {
    background: rgba(25, 51, 43, 0.06);
    color: var(--ink-soft);
    border-color: rgba(25, 51, 43, 0.16);
    box-shadow: none;
}

.form-actions .button-ghost:hover {
    background: rgba(25, 51, 43, 0.1);
    color: var(--ink);
}

.line-item-actions .button-ghost,
.panel [data-formset-remove] {
    background: rgba(141, 59, 44, 0.12);
    color: var(--rosewood);
    border-color: rgba(141, 59, 44, 0.24);
}

.panel [data-formset-add] {
    background: rgba(47, 124, 98, 0.07);
    color: var(--leaf);
    border: 1.5px dashed rgba(47, 124, 98, 0.42);
    box-shadow: none;
}

.panel [data-formset-add]::before {
    content: "+";
    margin-right: 0.4rem;
    font-size: 1.1em;
    font-weight: 800;
    line-height: 1;
}

.panel [data-formset-add]:hover {
    background: rgba(47, 124, 98, 0.14);
    border-color: rgba(47, 124, 98, 0.62);
}

.button-block {
    width: 100%;
}

.message-stack {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
}

.public-footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding: 0 1rem 1rem;
}

.public-footer-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 1rem 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(244, 234, 223, 0.92));
    box-shadow: 0 16px 30px rgba(66, 40, 25, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.public-footer-copy {
    display: grid;
    gap: 0.2rem;
    max-width: 42rem;
}

.public-footer-copy strong {
    font-size: 0.95rem;
}

.public-footer-copy p,
.auth-legal-note,
.landing-cta-legal {
    margin: 0;
    color: rgba(25, 51, 43, 0.7);
    line-height: 1.6;
    font-size: 0.92rem;
}

.public-footer-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem 1rem;
    flex-wrap: wrap;
}

.public-footer-nav a,
.auth-legal-note a,
.landing-cta-legal a {
    color: var(--leaf);
    font-weight: 700;
}

.message {
    width: fit-content;
    max-width: min(100%, 54rem);
    padding: 1rem 1.15rem;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(24, 43, 36, 0.16);
}

.message-success {
    border-color: rgba(47, 124, 98, 0.18);
    background: linear-gradient(135deg, rgba(255, 252, 247, 0.98), rgba(232, 245, 239, 0.96));
}

.message-error {
    border-color: rgba(141, 59, 44, 0.18);
    background: linear-gradient(135deg, rgba(255, 249, 247, 0.98), rgba(249, 232, 227, 0.96));
}

.message-info,
.message-warning {
    background: linear-gradient(135deg, rgba(255, 253, 249, 0.98), rgba(245, 236, 225, 0.96));
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(340px, 1fr));
    gap: 1rem;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.kanban-lane {
    --lane-accent: rgba(213, 160, 63, 0.92);
    --lane-top: #fbf5e6;
    --lane-bottom: #f4ebd6;
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(70, 60, 40, 0.08);
    border-top: 5px solid var(--lane-accent);
    background:
        linear-gradient(180deg, var(--lane-top) 0%, var(--lane-bottom) 100%);
    box-shadow:
        0 20px 34px rgba(35, 30, 20, 0.09),
        0 7px 14px rgba(35, 30, 20, 0.055),
        0 2px 0 rgba(255, 255, 255, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 -1px 0 rgba(120, 100, 70, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.kanban-lane::before,
.kanban-lane::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

.kanban-lane::before {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.36) 0%,
            rgba(255, 255, 255, 0.14) 18%,
            rgba(255, 255, 255, 0) 48%
        );
}

.kanban-lane::after {
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.3),
        inset -1px 0 0 rgba(90, 80, 60, 0.055),
        inset 0 -10px 18px rgba(96, 72, 42, 0.025);
}

.kanban-lane > * {
    position: relative;
    z-index: 1;
}

.kanban-lane:hover {
    transform: translateY(-2px);
    box-shadow:
        0 26px 42px rgba(35, 30, 20, 0.11),
        0 10px 20px rgba(35, 30, 20, 0.065),
        0 2px 0 rgba(255, 255, 255, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(120, 100, 70, 0.07);
}

.lane-upcoming {
    --lane-accent: #d9a53a;
    --lane-top: #fbf5e6;
    --lane-bottom: #f4ebd6;
}

.lane-in_progress {
    --lane-accent: #2ca9ba;
    --lane-top: #ecf8f9;
    --lane-bottom: #dff1f3;
}

.lane-completed {
    --lane-accent: #5a86e8;
    --lane-top: #edf3ff;
    --lane-bottom: #e1eafd;
}

.lane-in_route {
    --lane-accent: #d2744d;
    --lane-top: #fbf0ea;
    --lane-bottom: #f6e4da;
}

.lane-delivered {
    --lane-accent: #3b8b68;
    --lane-top: #edf8f2;
    --lane-bottom: #dff0e7;
}

.lane-failed,
.lane-incident,
.lane-incidents {
    --lane-accent: #c85a5a;
    --lane-top: #fdf0f0;
    --lane-bottom: #f7e1e1;
}

@media (min-width: 1200px) {
    .board-workspace .kanban-board {
        grid-template-columns: repeat(5, minmax(clamp(260px, 15.5vw, 320px), 1fr));
        gap: 0.8rem;
    }

    .dashboard-workspace .board-workspace .kanban-board {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: clamp(0.58rem, 0.8vw, 0.85rem);
        overflow-x: hidden;
    }

    .dashboard-workspace .board-workspace .kanban-lane {
        padding: clamp(0.62rem, 0.72vw, 0.8rem);
    }

    .board-workspace .kanban-lane {
        padding: 0.82rem;
    }

    .board-workspace .lane-header {
        gap: 0.55rem;
        margin-bottom: 0.8rem;
    }

    .board-workspace .lane-header h3 {
        font-size: 1.1rem;
    }

    .board-workspace .lane-header p {
        font-size: 0.92rem;
    }

    .board-workspace .lane-badge,
    .board-workspace .status-pill {
        padding: 0.38rem 0.62rem;
        font-size: 0.72rem;
    }

    .board-workspace .lane-body {
        gap: 0.8rem;
        padding: 0.15rem;
    }

    .board-workspace .order-card {
        gap: 0.72rem;
        padding: 0.82rem;
    }

    .board-workspace .card-header {
        gap: 0.55rem;
    }

    .board-workspace .card-header h3 {
        font-size: 0.98rem;
        line-height: 1.12;
    }

    .board-workspace .card-subcopy,
    .board-workspace .compact-address,
    .board-workspace .order-products-list {
        font-size: 0.84rem;
    }

    .board-workspace .compact-address {
        line-height: 1.28;
    }

    .board-workspace .order-delivery-band {
        gap: 0.5rem 0.55rem;
    }

    .board-workspace .order-delivery-date-chip,
    .board-workspace .order-delivery-items-chip,
    .board-workspace .compact-meta span {
        font-size: 0.72rem;
        padding: 0.28rem 0.55rem;
    }

    .board-workspace .order-delivery-time-chip {
        min-height: 2.35rem;
        padding: 0.46rem 0.78rem;
        font-size: 1.08rem;
    }

    .board-workspace .order-delivery-time-chip.is-muted {
        font-size: 0.76rem;
    }

    .board-workspace .payment-balance {
        gap: 0.3rem;
    }

    .board-workspace .payment-balance div {
        padding: 0.45rem 0.4rem;
    }

    .board-workspace .payment-balance span {
        font-size: 0.62rem;
    }

    .board-workspace .payment-balance strong {
        font-size: 0.74rem;
    }

    .board-workspace .order-products-preview {
        gap: 0.35rem;
        padding: 0.58rem 0.64rem;
    }

    .board-workspace .order-products-title,
    .board-workspace .order-products-empty,
    .board-workspace .order-products-more {
        font-size: 0.72rem;
    }

    .board-workspace .card-actions {
        gap: 0.5rem;
    }

    .board-workspace .card-actions .button {
        min-height: 2.65rem;
    }

    .board-workspace .button-small {
        padding: 0.45rem 0.58rem;
        font-size: 0.72rem;
    }

    .board-workspace .quick-update-form,
    .board-workspace .card-stage-action {
        padding-top: 0.7rem;
    }

    .board-workspace .card-status-advanced > summary {
        font-size: 0.72rem;
    }
}

.lane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lane-header h3 {
    margin: 0 0 0.2rem;
}

.lane-header p {
    margin: 0;
    color: rgba(25, 51, 43, 0.68);
}

.lane-badge,
.status-pill,
.checkbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pill[class*="order-state-"]::before,
.status-pill[class*="payment-"]::before {
    display: none;
    content: none;
}

.lane-badge {
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
}

.lane-badge-upcoming {
    background: rgba(213, 160, 63, 0.16);
    color: var(--status-upcoming-ink);
}

.lane-badge-in_progress {
    background: rgba(45, 159, 177, 0.16);
    color: var(--status-in-progress-ink);
}

.lane-badge-completed {
    background: rgba(77, 120, 207, 0.14);
    color: var(--status-completed-ink);
}

.lane-badge-in_route {
    background: rgba(201, 107, 71, 0.15);
    color: var(--status-in-route-ink);
}

.lane-badge-delivered {
    background: rgba(47, 124, 98, 0.14);
    color: var(--status-delivered-ink);
}

.board-view-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.mobile-list-view-prompt {
    display: none;
}

.view-toggle {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 247, 0.78);
    color: var(--ink-soft);
    box-shadow: 0 8px 18px rgba(66, 40, 25, 0.06);
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.view-toggle:hover,
.view-toggle:focus-visible {
    transform: translateY(-1px);
    color: var(--leaf);
    box-shadow: 0 12px 24px rgba(66, 40, 25, 0.1);
}

.view-toggle.is-active {
    background: var(--leaf);
    border-color: var(--leaf);
    color: #fffdf8;
    box-shadow: 0 14px 28px rgba(47, 124, 98, 0.22);
}

.payment-pending,
.payment-bucket-unpaid,
.order-state-upcoming {
    background: rgba(213, 160, 63, 0.16);
    color: var(--status-upcoming-ink);
}

.payment-bucket-partial,
.order-state-in_progress {
    background: rgba(45, 159, 177, 0.16);
    color: var(--status-in-progress-ink);
}

.payment-paid,
.payment-bucket-paid,
.order-state-completed {
    background: rgba(77, 120, 207, 0.14);
    color: var(--status-completed-ink);
}

.order-state-delivered {
    background: rgba(47, 124, 98, 0.14);
    color: var(--status-delivered-ink);
}

.payment-rejected,
.order-state-failed {
    background: rgba(186, 90, 77, 0.14);
    color: var(--status-incidents-ink);
}

.order-state-in_route {
    background: rgba(201, 107, 71, 0.14);
    color: var(--status-in-route-ink);
}

.status-create {
    background: rgba(47, 124, 98, 0.14);
    color: var(--leaf);
}

.status-update {
    background: rgba(218, 166, 77, 0.18);
    color: #7c5a15;
}

.order-table-panel {
    display: grid;
    gap: 1rem;
}

.order-dashboard-table th,
.order-dashboard-table td {
    vertical-align: middle;
}

.order-dashboard-table td {
    white-space: nowrap;
}

.table-products-cell {
    min-width: 14rem;
}

.order-dashboard-table td:nth-child(2),
.order-dashboard-table td:nth-child(3) {
    white-space: normal;
    min-width: 12rem;
}

.order-dashboard-table .status-pill {
    min-width: max-content;
}

.table-products-list {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.table-products-list div,
.order-products-list li {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
}

.table-products-list span,
.order-products-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-products-more,
.order-products-more {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.lane-body,
.incident-grid,
.driver-grid {
    display: grid;
    gap: 1rem;
}

.lane-body {
    padding: 0.2rem;
    border-radius: calc(var(--radius-md) + 2px);
    background: rgba(255, 252, 247, 0.18);
}

.driver-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.driver-queue-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.driver-control-stack {
    display: grid;
    gap: 0.85rem;
}

.route-queue-header,
.route-template-header {
    align-items: end;
    margin-bottom: 0;
}

.route-queue-header .section-copy,
.route-template-header .section-copy {
    max-width: 40rem;
}

.route-template-panel,
.route-template-grid,
.route-template-order-grid {
    display: grid;
    gap: 1rem;
}

.route-template-panel-secondary {
    margin-bottom: 1rem;
}

.route-toolbar-inline {
    justify-content: flex-start;
    padding: 0.15rem 0 0;
}

.route-template-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.route-template-library {
    display: grid;
    gap: 1rem;
}

.route-template-composer-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(245, 236, 225, 0.92));
    box-shadow: 0 12px 24px rgba(66, 40, 25, 0.05);
}

.route-template-composer-copy h3 {
    margin: 0.25rem 0 0.35rem;
}

.route-template-create-form {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin: 0;
}

.route-template-create-form .field,
.route-template-create-form textarea,
.route-template-create-form input {
    min-width: 0;
}

.route-template-create-form .filter-actions {
    justify-content: stretch;
}

.route-template-create-form .filter-actions .button {
    width: 100%;
}

.route-template-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.route-template-card,
.route-template-order-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 241, 233, 0.92));
    box-shadow: 0 10px 22px rgba(66, 40, 25, 0.06);
}

.route-template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.route-template-card h3,
.route-template-order-card h3 {
    margin: 0.18rem 0 0;
}

.route-template-order-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.route-template-order-actions {
    display: grid;
    gap: 0.7rem;
}

.route-template-move-form {
    display: grid;
    gap: 0.55rem;
}

.order-card,
.delivery-card,
.incident-card,
.empty-card,
.tenant-card {
    padding: 1rem;
}

.order-card {
    display: grid;
    gap: 0.85rem;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 254, 251, 0.99), rgba(255, 249, 241, 0.97));
    border: 1px solid rgba(25, 51, 43, 0.1);
    box-shadow:
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.order-card:hover,
.order-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(25, 51, 43, 0.18);
    box-shadow:
        0 22px 36px rgba(66, 40, 25, 0.13),
        0 2px 0 rgba(255, 255, 255, 0.72) inset;
}

.lane-upcoming .order-card-payment-unpaid {
    background: linear-gradient(180deg, rgba(255, 251, 250, 0.995), rgba(255, 241, 237, 0.985));
    border-color: rgba(186, 90, 77, 0.6);
    box-shadow:
        inset 0 0 0 1px rgba(186, 90, 77, 0.22),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.lane-upcoming .order-card-payment-unpaid:hover,
.lane-upcoming .order-card-payment-unpaid:focus-within {
    background: linear-gradient(180deg, rgba(255, 248, 246, 1), rgba(255, 236, 231, 0.99));
    border-color: rgba(186, 90, 77, 0.86);
    box-shadow:
        inset 0 0 0 1px rgba(186, 90, 77, 0.3),
        0 22px 36px rgba(66, 40, 25, 0.13),
        0 2px 0 rgba(255, 255, 255, 0.72) inset;
}

.lane-upcoming .order-card-payment-partial {
    background: linear-gradient(180deg, rgba(255, 253, 247, 0.995), rgba(251, 243, 217, 0.99));
    border-color: rgba(213, 160, 63, 0.88);
    box-shadow:
        inset 0 0 0 1px rgba(213, 160, 63, 0.32),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.lane-upcoming .order-card-payment-partial:hover,
.lane-upcoming .order-card-payment-partial:focus-within {
    background: linear-gradient(180deg, rgba(255, 251, 239, 1), rgba(248, 236, 197, 0.995));
    border-color: rgba(213, 160, 63, 1);
    box-shadow:
        inset 0 0 0 1px rgba(213, 160, 63, 0.42),
        0 22px 36px rgba(66, 40, 25, 0.13),
        0 2px 0 rgba(255, 255, 255, 0.72) inset;
}

.lane-upcoming .order-card-payment-paid {
    background: linear-gradient(180deg, rgba(249, 255, 252, 0.995), rgba(233, 246, 240, 0.99));
    border-color: rgba(47, 124, 98, 0.62);
    box-shadow:
        inset 0 0 0 1px rgba(47, 124, 98, 0.2),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.lane-upcoming .order-card-payment-paid:hover,
.lane-upcoming .order-card-payment-paid:focus-within {
    background: linear-gradient(180deg, rgba(245, 254, 249, 1), rgba(223, 242, 233, 0.995));
    border-color: rgba(47, 124, 98, 0.86);
    box-shadow:
        inset 0 0 0 1px rgba(47, 124, 98, 0.3),
        0 22px 36px rgba(66, 40, 25, 0.13),
        0 2px 0 rgba(255, 255, 255, 0.72) inset;
}

.order-card-pending {
    border-top: 4px solid rgba(213, 160, 63, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(213, 160, 63, 0.22),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-card-deposit {
    border-top: 4px solid rgba(47, 143, 134, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(47, 143, 134, 0.2),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-card-paid {
    border-top: 4px solid rgba(77, 120, 207, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(77, 120, 207, 0.18),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-card-in_route {
    border-top: 4px solid rgba(201, 107, 71, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(201, 107, 71, 0.2),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-card-delivered {
    border-top: 4px solid rgba(47, 124, 98, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(47, 124, 98, 0.18),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-card-failed {
    border-top: 4px solid rgba(186, 90, 77, 0.92);
    box-shadow:
        inset 4px 0 0 rgba(186, 90, 77, 0.2),
        0 14px 26px rgba(66, 40, 25, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.order-products-preview {
    display: grid;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(25, 51, 43, 0.1);
}

.order-products-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.order-products-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
}

.order-products-list strong,
.table-products-list strong {
    flex: 0 0 auto;
}

.order-products-empty {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.tenant-metrics {
    display: grid;
    gap: 0.45rem;
    margin: 0.9rem 0;
    color: var(--ink-soft);
}

.tenant-metrics p {
    margin: 0;
}

.user-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mini-user-chip {
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.card-header,
.card-links {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.card-header-status {
    display: grid;
    justify-items: end;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.card-header h3,
.incident-card h3,
.delivery-card h3 {
    margin: 0.2rem 0 0;
}

.card-copy {
    display: grid;
    gap: 0.55rem;
    margin: 0.9rem 0;
    color: var(--ink-soft);
}

.card-copy p,
.incident-card p,
.delivery-card p {
    margin: 0;
}

.card-subcopy,
.table-subcopy {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.order-card-new-badge {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(214, 94, 54, 0.92), rgba(240, 171, 53, 0.94));
    color: #fff8f1;
    border: 1px solid rgba(179, 72, 37, 0.28);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow:
        0 10px 24px rgba(214, 94, 54, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.order-card.is-new-order {
    background:
        radial-gradient(circle at top right, rgba(255, 191, 78, 0.2), transparent 30%),
        linear-gradient(180deg, rgba(255, 254, 251, 0.99), rgba(255, 244, 226, 0.98));
    border-color: rgba(230, 129, 56, 0.52);
    box-shadow:
        0 0 0 3px rgba(230, 129, 56, 0.18),
        0 20px 38px rgba(230, 129, 56, 0.24),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
    animation: orderCardNewPulse 1.2s ease-in-out 3;
}

.order-card.is-new-order .order-card-new-badge {
    display: inline-flex;
}

.order-card.is-new-order .order-delivery-date-chip,
.order-card.is-new-order .order-delivery-items-chip {
    background: rgba(240, 171, 53, 0.2);
    color: #935d0d;
    border: 1px solid rgba(230, 129, 56, 0.18);
}

.order-card.is-new-order .order-delivery-time-chip {
    background: linear-gradient(180deg, rgba(255, 242, 221, 1), rgba(255, 224, 181, 0.98));
    border-color: rgba(230, 129, 56, 0.28);
    color: #8d3d20;
    box-shadow:
        0 0 0 4px rgba(240, 171, 53, 0.12),
        0 16px 30px rgba(214, 94, 54, 0.16);
}

@keyframes orderCardNewPulse {
    0%,
    100% {
        border-color: rgba(230, 129, 56, 0.42);
        box-shadow:
            0 0 0 0 rgba(240, 171, 53, 0.24),
            0 18px 32px rgba(214, 94, 54, 0.18),
            0 2px 0 rgba(255, 255, 255, 0.65) inset;
        transform: translateY(0);
    }

    50% {
        border-color: rgba(214, 94, 54, 0.78);
        box-shadow:
            0 0 0 9px rgba(240, 171, 53, 0.16),
            0 24px 42px rgba(214, 94, 54, 0.28),
            0 2px 0 rgba(255, 255, 255, 0.72) inset;
        transform: translateY(-1px);
    }
}

.order-delivery-band {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem 0.75rem;
}

.order-delivery-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 13rem;
}

.order-delivery-date-chip,
.order-delivery-items-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.68rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.order-delivery-time-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.65rem;
    padding: 0.55rem 0.95rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(243, 231, 217, 0.94));
    border: 1px solid rgba(25, 51, 43, 0.1);
    color: #234138;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 14px 28px rgba(66, 40, 25, 0.08);
}

.order-delivery-time-chip.is-muted {
    background: rgba(25, 51, 43, 0.07);
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: none;
}

.compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
}

.compact-meta:empty {
    display: none;
}

.compact-meta span {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.compact-address {
    display: flex;
    align-items: flex-start;
    gap: 0.38rem;
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.35;
}

.next-delivery-details dt,
.next-delivery-details dd,
.today-stop-topline time,
.today-stop-copy small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.payment-balance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0;
}

.payment-balance div {
    min-width: 0;
    padding: 0.54rem 0.48rem;
    border-radius: var(--radius-sm);
    background: rgba(25, 51, 43, 0.06);
    overflow: hidden;
}

.payment-balance span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.payment-balance strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.8rem;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.payment-balance .balance-due {
    background: rgba(218, 166, 77, 0.18);
}

.payment-balance .balance-due strong {
    color: #7c5a15;
}

.payment-balance .balance-clear {
    background: rgba(47, 124, 98, 0.12);
}

.payment-balance .balance-clear strong {
    color: var(--leaf);
}

.order-payment-modal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.order-payment-modal-summary div {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(25, 51, 43, 0.05);
    border: 1px solid rgba(25, 51, 43, 0.08);
}

.order-payment-modal-summary span {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-payment-modal-summary strong {
    font-size: 1.25rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.order-payment-modal-summary .balance-due strong {
    color: #7c5a15;
}

.order-payment-modal-summary .balance-clear strong {
    color: var(--leaf);
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.card-actions,
.compact-form-grid,
.summary-list {
    display: grid;
    gap: 0.75rem;
}

.card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr);
    align-items: stretch;
}

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

.card-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.7rem;
    width: 100%;
}

.order-copy-button {
    position: relative;
    min-width: 0;
    justify-content: center;
    padding: 0.85rem;
    overflow: hidden;
}

.order-copy-button.is-copied {
    background: rgba(47, 124, 98, 0.22);
    color: var(--leaf);
    border-color: rgba(47, 124, 98, 0.32);
}

.order-copy-button.is-copy-error {
    background: rgba(186, 90, 77, 0.18);
    color: var(--status-incidents-ink);
    border-color: rgba(186, 90, 77, 0.3);
}

.order-copy-icon,
.order-copy-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transition: transform 180ms ease, opacity 180ms ease;
}

.order-copy-icon {
    width: 1.15rem;
    height: 1.15rem;
    transform: translate(-50%, -50%);
}

.order-copy-icon::before,
.order-copy-icon::after {
    content: "";
    position: absolute;
    width: 0.68rem;
    height: 0.68rem;
    border: 2px solid currentColor;
    border-radius: 0.12rem;
}

.order-copy-icon::before {
    top: 0.22rem;
    left: 0.28rem;
    opacity: 0.95;
}

.order-copy-icon::after {
    top: -0.02rem;
    left: -0.02rem;
    background: rgba(255, 255, 255, 0.4);
}

.order-copy-check {
    font-size: 1rem;
    font-weight: 800;
    color: var(--leaf);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
}

.order-copy-button.is-copied .order-copy-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
}

.order-copy-button.is-copied .order-copy-check {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.order-copy-button.is-copy-error .order-copy-icon {
    transform: translate(-50%, -50%) scale(0.9);
}

.compact-form-grid-single {
    grid-template-columns: 1fr;
}

.quick-update-form {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.card-stage-action {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
    display: grid;
    gap: 0.55rem;
}

.assign-inline-form {
    display: grid;
    gap: 0.55rem;
}

.quick-update-form .card-stage-action {
    border-top: 0;
    padding-top: 0;
    margin-bottom: 0.35rem;
}

.card-no-drivers {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.card-status-advanced > summary {
    cursor: pointer;
    list-style: none;
    color: var(--ink-soft);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.35rem 0;
    user-select: none;
}

.card-status-advanced > summary::-webkit-details-marker {
    display: none;
}

.card-status-advanced > summary::after {
    content: "▾";
    margin-left: 0.35rem;
    font-size: 0.7rem;
}

.card-status-advanced[open] > summary::after {
    content: "▴";
}

.card-status-advanced[open] {
    margin-top: 0.35rem;
}

.summary-list div {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
}

.executive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.executive-card {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf9, #f7eee3);
}

.executive-card h3 {
    margin: 0 0 0.65rem;
}

.executive-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.sales-insights-stage {
    display: grid;
    gap: 1.2rem;
}

.sales-insights-actions {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    flex-wrap: wrap;
}

.sales-insights-actions .section-copy {
    max-width: 44rem;
}

.sales-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.sales-kpi-card {
    min-height: 8.8rem;
}

.sales-kpi-featured {
    background:
        radial-gradient(140% 120% at 100% 0%, rgba(218, 166, 77, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 248, 241, 0.97));
}

.sales-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.15rem;
}

.sales-analysis-column {
    display: grid;
    gap: 1.15rem;
    align-content: start;
}

.sales-history-section-header {
    margin-bottom: 0.2rem;
}

.sales-empty-state {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(47, 124, 98, 0.08);
    border: 1px dashed rgba(47, 124, 98, 0.22);
}

.sales-empty-state strong {
    display: block;
}

.sales-empty-state p {
    margin: 0.35rem 0 0;
    line-height: 1.45;
}

.sales-trend-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: 0.9rem;
    align-items: end;
    min-height: 19rem;
}

.sales-trend-bar-card {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.7rem 0.7rem 0.8rem;
    border-radius: 20px;
    background: var(--chart-surface);
    border: 1px solid rgba(25, 51, 43, 0.08);
    box-shadow: 0 14px 28px rgba(40, 28, 18, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sales-trend-bar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--chart-shadow);
    border-color: rgba(47, 124, 98, 0.18);
}

.sales-trend-value-stack,
.sales-trend-label-stack {
    min-width: 0;
}

.sales-trend-value-stack strong,
.sales-trend-value-stack small,
.sales-trend-label-stack span {
    display: block;
}

.sales-trend-value-stack strong {
    font-size: 1rem;
    line-height: 1.05;
}

.sales-trend-value-stack small,
.sales-trend-label-stack span {
    color: var(--ink-soft);
}

.sales-trend-value-stack small {
    margin-top: 0.14rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
}

.sales-trend-label-stack span {
    font-size: 0.78rem;
    line-height: 1.25;
}

.sales-trend-bar-track {
    position: relative;
    min-height: 11rem;
    padding: 0.42rem;
    border-radius: var(--radius-md);
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent calc(25% - 1px),
            var(--chart-grid) calc(25% - 1px),
            var(--chart-grid) 25%
        ),
        linear-gradient(180deg, rgba(23, 48, 41, 0.05), rgba(23, 48, 41, 0.015));
    border: 1px solid rgba(214, 198, 170, 0.56);
    overflow: hidden;
    display: flex;
    align-items: end;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.sales-trend-bar-fill {
    width: 100%;
    min-height: 0.45rem;
    border-radius: calc(var(--radius-md) - 0.1rem);
    background: linear-gradient(180deg, var(--chart-fill-start), var(--chart-fill-end));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 12px 24px rgba(47, 124, 98, 0.16);
    transition: height 180ms ease, filter 180ms ease;
    position: relative;
}

.sales-trend-bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 42%);
}

.sales-trend-bar-card:hover .sales-trend-bar-fill {
    filter: saturate(1.08);
}

.sales-status-list,
.sales-ranking-list {
    display: grid;
    gap: 0.85rem;
}

.sales-status-item,
.sales-ranking-item,
.sales-snapshot-card {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.sales-status-item {
    display: grid;
    gap: 0.55rem;
}

.sales-status-topline {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: start;
}

.sales-status-metrics {
    text-align: right;
}

.sales-status-metrics strong,
.sales-status-metrics small {
    display: block;
}

.sales-status-metrics strong {
    font-size: 1rem;
    line-height: 1;
}

.sales-status-metrics small {
    margin-top: 0.12rem;
    color: var(--ink-soft);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sales-status-bar,
.sales-ranking-bar {
    height: 0.8rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18)),
        var(--chart-track);
    overflow: hidden;
    border: 1px solid rgba(25, 51, 43, 0.06);
}

.sales-status-bar-fill,
.sales-ranking-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.sales-status-bar-fill {
    background: currentColor;
}

.sales-ranking-bar span {
    background: linear-gradient(90deg, var(--chart-fill-start), var(--chart-fill-end));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.sales-status-item p,
.sales-ranking-copy span,
.sales-snapshot-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.sales-ranking-item {
    display: grid;
    gap: 0.6rem;
}

.sales-ranking-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.sales-ranking-share {
    flex: 0 0 auto;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    background: var(--chart-pill-bg);
    color: var(--chart-pill-copy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sales-ranking-copy strong,
.sales-snapshot-card strong {
    display: block;
}

.sales-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.sales-snapshot-card {
    display: grid;
    gap: 0.4rem;
}

.sales-snapshot-card span {
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sales-ledger-panel {
    display: grid;
    gap: 0.95rem;
}

.sales-ledger-header .section-copy {
    margin-top: 0.35rem;
}

.sales-ledger-wrap {
    max-height: min(70vh, 980px);
    overflow: auto;
    border-radius: var(--radius-md);
}

.sales-ledger-table {
    min-width: 1440px;
    table-layout: fixed;
}

.sales-ledger-col-folio {
    width: 7.5%;
}

.sales-ledger-col-delivery {
    width: 7%;
}

.sales-ledger-col-created {
    width: 6.5%;
}

.sales-ledger-col-customer {
    width: 8%;
}

.sales-ledger-col-phone {
    width: 6%;
}

.sales-ledger-col-receiver {
    width: 7.25%;
}

.sales-ledger-col-address {
    width: 15.75%;
}

.sales-ledger-col-items {
    width: 4.25%;
}

.sales-ledger-col-shipping {
    width: 5.75%;
}

.sales-ledger-col-total {
    width: 6.5%;
}

.sales-ledger-col-stage,
.sales-ledger-col-payment {
    width: 8%;
}

.sales-ledger-col-actions {
    width: 9.5%;
}

.data-table.sales-ledger-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(255, 251, 245, 0.98);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.sales-ledger-table tbody tr {
    transition: background-color 160ms ease;
}

.sales-ledger-table tbody tr:hover {
    background: rgba(255, 248, 241, 0.88);
}

.data-table.sales-ledger-table td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
}

.sales-ledger-folio strong,
.sales-ledger-total strong,
.sales-cell-stack strong {
    display: block;
}

.sales-cell-stack {
    display: grid;
    gap: 0.18rem;
}

.sales-cell-stack span {
    color: var(--ink-soft);
    line-height: 1.35;
}

.sales-ledger-number,
.sales-ledger-total {
    white-space: nowrap;
}

.sales-ledger-stage,
.sales-ledger-payment,
.sales-ledger-actions {
    text-align: center;
}

.sales-ledger-table :is(.status-pill, .button) {
    justify-content: center;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.12;
    text-align: center;
}

.sales-ledger-table .status-pill {
    min-width: 6.55rem;
    padding: 0.52rem 0.68rem;
}

.sales-ledger-actions .button {
    width: 100%;
    min-height: 2.75rem;
    padding-inline: 0.72rem;
}

@media (max-width: 760px) {
    .sales-ledger-wrap {
        max-height: none;
        overflow: visible;
    }

    .sales-ledger-table,
    .sales-ledger-table tbody,
    .sales-ledger-table tr,
    .sales-ledger-table td {
        display: block;
        width: 100%;
    }

    .sales-ledger-table {
        min-width: 0;
        font-size: 0.95rem;
    }

    .sales-ledger-table colgroup,
    .sales-ledger-table thead {
        display: none;
    }

    .sales-ledger-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .sales-ledger-table tbody tr {
        display: grid;
        gap: 0.62rem;
        padding: 1rem;
        border: 1px solid rgba(25, 51, 43, 0.1);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow:
            0 12px 26px rgba(66, 40, 25, 0.07),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }

    .data-table.sales-ledger-table td {
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .sales-ledger-table td[data-label] {
        display: grid;
        grid-template-columns: minmax(6.7rem, 0.34fr) minmax(0, 1fr);
        gap: 0.72rem;
        align-items: start;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    .sales-ledger-table td[data-label]::before {
        content: attr(data-label);
        color: var(--ops-muted);
        font-size: 0.72rem;
        font-weight: 850;
        letter-spacing: 0.05em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .sales-ledger-folio {
        padding-bottom: 0.15rem;
    }

    .sales-ledger-folio strong {
        font-size: 1.04rem;
        line-height: 1.2;
    }

    .sales-ledger-stage,
    .sales-ledger-payment,
    .sales-ledger-actions {
        text-align: left;
    }

    .sales-ledger-table :is(.status-pill, .button) {
        width: auto;
        min-width: min(10rem, 100%);
        max-width: 100%;
        min-height: 2.38rem;
        padding: 0.54rem 0.76rem;
        white-space: normal;
    }

    .sales-ledger-actions {
        padding-top: 0.75rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    .sales-ledger-actions .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sales-ledger-table td[data-label] {
        grid-template-columns: 1fr;
        gap: 0.26rem;
    }

    .sales-ledger-table td[data-label]::before {
        margin-bottom: 0;
    }

    .sales-ledger-table :is(.status-pill, .button) {
        min-width: 0;
        width: 100%;
    }
}

.order-total-summary {
    position: relative;
    display: grid;
    gap: 0.95rem;
    padding: 1.3rem 1.25rem 1.35rem;
    border: 1px solid rgba(214, 198, 170, 0.55);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(218, 166, 77, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 250, 243, 0.97));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 16px 32px rgba(66, 40, 25, 0.08);
    overflow: hidden;
}

.order-total-summary::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--leaf));
}

.order-total-summary h2 {
    margin: 0.18rem 0 0;
}

.order-total-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.order-total-summary-card {
    display: grid;
    gap: 0.4rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(214, 198, 170, 0.5);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.order-total-summary-card span {
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-total-summary-card strong {
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.order-total-summary-card.is-total {
    border-color: transparent;
    background: linear-gradient(135deg, var(--terracotta), var(--rosewood));
    box-shadow: 0 16px 30px rgba(141, 59, 44, 0.22);
}

.order-total-summary-card.is-total span {
    color: rgba(255, 245, 238, 0.82);
}

.order-total-summary-card.is-total strong {
    color: #fff;
}

body.order-capture-body {
    background-color: #fbf7ef;
    background-image:
        linear-gradient(180deg, rgba(255, 252, 247, 0.82), rgba(251, 247, 239, 0.74) 46%, rgba(251, 247, 239, 0.86)),
        url("../images/backgrounds/ops-bg-lilies.445d040e6d83.avif"),
        linear-gradient(180deg, #fffdf9, #f4eadf);
    background-position: center top, left top, center;
    background-repeat: no-repeat;
    background-size: cover, cover, cover;
}

body.order-capture-body .page-shell {
    max-width: none;
    padding: 1.25rem 0 2rem;
}

.order-capture-page {
    --pf-green-900: #123c31;
    --pf-green-800: #174a3c;
    --pf-green-700: #1f6b54;
    --pf-green-soft: #eef5f1;
    --pf-surface: rgba(255, 255, 255, 0.9);
    --pf-surface-solid: #fff;
    --pf-border: rgba(25, 52, 43, 0.12);
    --pf-text: #19342b;
    --pf-muted: #68766f;
    --pf-terracotta: #b85c43;
    --pf-orange-soft: #fff8ef;
    position: relative;
    display: grid;
    gap: 1.1rem;
    width: min(1680px, calc(100vw - 4.4rem));
    margin: 0 auto;
    padding: clamp(0.95rem, 1.35vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: clamp(1.4rem, 2vw, 2rem);
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(248, 241, 232, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 30px 80px rgba(33, 27, 20, 0.16);
    backdrop-filter: blur(16px) saturate(1.06);
    -webkit-backdrop-filter: blur(16px) saturate(1.06);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .order-capture-page {
        background: rgba(255, 253, 249, 0.96);
    }
}

.order-svg-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    color: currentColor;
}

.order-capture-page .button {
    gap: 0.45rem;
    min-height: 40px;
    border-radius: 12px;
}

.order-capture-page .button.is-loading::after {
    content: "";
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: pf-spin 700ms linear infinite;
}

@keyframes pf-spin {
    to {
        transform: rotate(360deg);
    }
}

.order-capture-page .button-primary {
    min-height: 44px;
    background: linear-gradient(135deg, var(--pf-green-800), var(--pf-green-700));
    color: #fff;
    border-color: rgba(18, 60, 49, 0.18);
    box-shadow: 0 16px 30px rgba(18, 60, 49, 0.2);
}

.order-capture-page .button-primary:hover {
    box-shadow: 0 18px 34px rgba(18, 60, 49, 0.26);
}

.order-capture-back {
    justify-self: start;
    min-height: 38px;
    padding-inline: 0.85rem;
    background: rgba(255, 255, 255, 0.86);
}

.order-capture-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-height: 92px;
    padding: 0.15rem 0 0.75rem;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.order-capture-hero h1 {
    max-width: 52rem;
    margin: 0.08rem 0 0;
    color: var(--pf-text);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.order-capture-hero .section-copy {
    max-width: 48rem;
    margin-top: 0.35rem;
    color: var(--pf-muted);
    font-size: 0.96rem;
}

.order-capture-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.35rem;
}

.order-capture-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.order-intake-form,
.order-intake-shell {
    display: grid;
    gap: 1.15rem;
}

.order-intake-shell {
    grid-template-columns: minmax(560px, 1fr) minmax(360px, 0.72fr) minmax(260px, 300px);
    grid-template-areas:
        "cliente direccion resumen"
        "productos pago resumen"
        "recurrente recurrente resumen";
    align-items: stretch;
}

.order-intake-top-grid,
.order-intake-product-summary-grid,
.order-intake-side-rail {
    display: contents;
}

.order-intake-section-customer {
    grid-area: cliente;
}

.order-intake-section-address {
    grid-area: direccion;
}

.order-intake-section-products {
    grid-area: productos;
}

.order-intake-section-payment {
    grid-area: pago;
}

.order-summary-rail {
    grid-area: resumen;
}

.order-intake-section-collapsible {
    grid-area: recurrente;
}

.order-intake-top-grid {
    display: contents;
}

.order-intake-product-summary-grid {
    display: contents;
}

.order-intake-side-rail {
    display: contents;
}

.order-capture-page .order-intake-section,
.order-capture-page .order-total-summary {
    border: 1px solid var(--pf-border);
    border-radius: 16px;
    background: var(--pf-surface);
    box-shadow: 0 16px 38px rgba(48, 38, 29, 0.07);
}

.order-capture-page .order-intake-section {
    height: 100%;
    padding: clamp(1rem, 1.1vw, 1.2rem);
}

.order-capture-page .order-intake-section-customer,
.order-capture-page .order-intake-section-address {
    min-height: 0;
}

.order-capture-page .order-intake-heading {
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.order-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.order-section-title > .order-svg-icon {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--pf-green-700);
}

.order-capture-page .order-intake-heading h2 {
    margin: 0;
    color: var(--pf-text);
    font-size: 1.1rem;
    line-height: 1.12;
}

.order-capture-page .eyebrow {
    line-height: 1.1;
}

.order-capture-page .order-intake-grid-identity,
.order-address-grid,
.order-capture-page .order-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-capture-page .order-field-card {
    padding: 1rem;
    border-color: rgba(25, 52, 43, 0.1);
    border-radius: 14px;
    background: var(--pf-surface-solid);
    box-shadow: none;
}

.order-capture-page .order-field-card::before,
.order-capture-page .line-item-row::before,
.order-capture-page .order-total-summary::before {
    display: none;
}

.order-capture-page .order-field-card-header {
    padding-bottom: 0.55rem;
    margin-bottom: 0.65rem;
    border-bottom-color: rgba(25, 52, 43, 0.08);
}

.order-capture-page .order-field-card-header strong {
    color: var(--pf-text);
    font-size: 0.9rem;
}

.order-capture-page .compact-form-grid {
    gap: 0.95rem 1.05rem;
}

.order-capture-page .field {
    gap: 0.42rem;
}

.order-capture-page label {
    color: var(--pf-text);
    font-size: 0.81rem;
    font-weight: 700;
}

.order-capture-page .label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
}

.order-capture-page .label-with-icon .order-svg-icon {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--pf-green-700);
}

.order-capture-page .field-help {
    color: var(--pf-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.order-capture-page :is(.form-input, input:not([type="hidden"]), select) {
    min-height: 46px;
    height: 46px;
    border-radius: 11px;
}

.order-capture-page textarea.form-input,
.order-capture-page textarea {
    min-height: 88px;
    max-height: 130px;
    height: auto;
    border-radius: 12px;
}

.order-address-grid .inline-action-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.order-pickup-chip {
    justify-self: end;
    white-space: nowrap;
}

.order-compact-toggle-row {
    align-self: end;
}

.order-pending-capture {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 0;
    max-height: none;
    padding: 0.82rem 1rem 0.82rem 1.15rem;
    border-color: rgba(31, 107, 84, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 249, 0.9));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.96) inset,
        0 12px 26px rgba(18, 60, 49, 0.05);
}

.order-capture-page .order-pending-capture::before {
    width: 3px;
    background: linear-gradient(180deg, var(--pf-green-700), rgba(31, 107, 84, 0.28));
}

.order-pending-capture-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.order-pending-capture-copy label {
    color: var(--pf-text);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.order-pending-capture-copy p {
    margin: 0;
    color: var(--pf-muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.order-pending-toggle.checkbox-chip-inline {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0.55rem 0.74rem;
    border-color: rgba(31, 107, 84, 0.18);
    background: rgba(238, 245, 241, 0.86);
    color: var(--pf-green-700);
    box-shadow: none;
    white-space: nowrap;
}

.order-capture-page .order-pending-toggle input[type="checkbox"] {
    width: 1rem;
    min-height: 0;
    height: 1rem;
}

.order-product-section {
    display: grid;
    gap: 0.95rem;
}

.order-section-help {
    margin: 0;
}

.order-product-catalog-manager,
.order-complement-manager,
.order-custom-bouquet-manager {
    display: grid;
    gap: 0.85rem;
}

.order-complement-manager.is-empty .line-item-list {
    display: none;
}

.order-capture-page .line-item-row {
    grid-template-columns: minmax(0, 1fr) 150px auto;
    align-items: end;
    gap: 0.95rem;
    padding: 0.9rem;
    border-color: rgba(25, 52, 43, 0.1);
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
}

.order-capture-page .line-item-row[data-order-supply-row] {
    grid-template-columns: minmax(0, 1fr) 120px 140px auto;
}

.order-product-action-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.order-product-action {
    min-height: 40px;
    padding-inline: 0.95rem;
    border-color: rgba(47, 124, 98, 0.28);
    background: rgba(238, 245, 241, 0.78);
    color: var(--pf-green-700);
    font-weight: 800;
}

.order-capture-page [data-formset-add]::before {
    display: none;
}

.custom-bouquet-list[hidden] {
    display: none;
}

.order-product-line {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem;
    border: 1px solid rgba(47, 124, 98, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.92);
}

.product-type-badge,
.product-quantity {
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.11);
    color: var(--pf-green-700);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.product-line-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.product-line-copy small {
    color: var(--pf-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-line-total {
    color: var(--pf-text);
    font-weight: 900;
}

.order-summary-rail {
    position: sticky;
    top: calc(var(--topbar-height, 72px) + 16px);
    align-self: start;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.75rem;
    height: calc(100svh - var(--topbar-height, 72px) - 32px);
    max-height: calc(100svh - var(--topbar-height, 72px) - 32px);
}

.order-capture-page .order-total-summary {
    display: grid;
    gap: 0.85rem;
    min-height: 0;
    overflow: auto;
    padding: 0.95rem;
}

.order-summary-save-action {
    display: grid;
}

.order-summary-save-action .button {
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
}

.order-total-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.order-total-summary-header h2 {
    margin: 0.1rem 0 0;
    color: var(--pf-text);
    font-size: 1rem;
}

.order-summary-count {
    flex-shrink: 0;
    padding: 0.32rem 0.55rem;
    border: 1px solid rgba(31, 107, 84, 0.18);
    border-radius: 999px;
    background: var(--pf-green-soft);
    color: var(--pf-green-700);
    font-size: 0.72rem;
    font-weight: 900;
}

.order-summary-meta {
    display: grid;
    gap: 0;
    margin: 0;
}

.order-summary-meta div,
.order-capture-page .order-total-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 38px;
    padding: 0.45rem 0;
    border: 0;
    border-bottom: 1px solid rgba(25, 52, 43, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.order-summary-meta dt,
.order-capture-page .order-total-summary-card span {
    color: var(--pf-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.order-summary-meta dd,
.order-capture-page .order-total-summary-card strong {
    margin: 0;
    color: var(--pf-text);
    font-size: 0.92rem;
    font-weight: 850;
    text-align: right;
}

.order-summary-empty {
    display: grid;
    justify-items: center;
    gap: 0.28rem;
    padding: 0.9rem;
    border: 1px solid rgba(184, 92, 67, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff8f4, #fff);
    color: var(--pf-terracotta);
    text-align: center;
}

.order-summary-empty[hidden] {
    display: none;
}

.order-summary-empty .order-svg-icon {
    width: 1.6rem;
    height: 1.6rem;
}

.order-summary-empty span {
    color: var(--pf-muted);
    font-size: 0.78rem;
}

.order-summary-products {
    display: grid;
    gap: 0.45rem;
}

.order-summary-products[hidden] {
    display: none;
}

.order-summary-products-heading span {
    color: var(--pf-text);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-summary-products-list {
    display: grid;
    gap: 0.42rem;
    max-height: 196px;
    overflow: hidden;
}

.order-summary-product-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    padding: 0.55rem;
    border: 1px solid rgba(25, 52, 43, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.order-summary-product-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.order-summary-product-copy strong {
    overflow: hidden;
    color: var(--pf-text);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-summary-product-copy span,
.order-summary-product-copy small,
.order-summary-products-more {
    color: var(--pf-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.order-summary-product-copy small {
    width: fit-content;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.1);
    color: var(--pf-green-700);
}

.order-summary-product-total {
    color: var(--pf-text);
    font-size: 0.86rem;
    font-weight: 900;
}

.order-summary-products-more {
    margin: 0;
    padding: 0.1rem 0.2rem;
}

.order-capture-page .order-total-summary-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.order-capture-page .order-total-summary-card.is-total {
    align-items: flex-end;
    min-height: 52px;
    margin-top: 0.25rem;
    padding-top: 0.8rem;
    border-bottom: 0;
}

.order-capture-page .order-total-summary-card.is-total span,
.order-capture-page .order-total-summary-card.is-balance span {
    color: var(--pf-text);
}

.order-capture-page .order-total-summary-card.is-total strong {
    color: var(--pf-green-700);
    font-size: 1.75rem;
    line-height: 1;
}

.order-capture-page .order-total-summary-card.is-balance {
    border-bottom: 0;
}

.order-capture-page .order-total-summary-card.is-balance strong {
    color: var(--pf-terracotta);
    font-size: 1.08rem;
}

.order-summary-payment-state,
.order-payment-status-card {
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem;
    border: 1px solid rgba(25, 52, 43, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
}

.order-summary-payment-state span,
.order-payment-status-card span {
    color: var(--pf-muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-summary-payment-state strong,
.order-payment-status-card strong {
    color: var(--pf-text);
    font-size: 0.9rem;
}

.order-summary-payment-state::before,
.order-payment-status-card::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #9aa49e;
}

.order-summary-payment-state,
.order-payment-status-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.order-summary-payment-state span,
.order-summary-payment-state strong,
.order-payment-status-card span,
.order-payment-status-card strong {
    grid-column: 2;
}

.order-summary-payment-state[data-payment-state="partial"],
.order-payment-status-card[data-payment-state="partial"] {
    border-color: rgba(213, 160, 63, 0.24);
    background: rgba(255, 248, 232, 0.82);
}

.order-summary-payment-state[data-payment-state="partial"]::before,
.order-payment-status-card[data-payment-state="partial"]::before {
    background: var(--gold);
}

.order-summary-payment-state[data-payment-state="paid"],
.order-payment-status-card[data-payment-state="paid"] {
    border-color: rgba(47, 124, 98, 0.22);
    background: rgba(239, 248, 244, 0.86);
}

.order-summary-payment-state[data-payment-state="paid"]::before,
.order-payment-status-card[data-payment-state="paid"]::before {
    background: var(--pf-green-700);
}

.order-summary-payment-state[data-payment-state="unpaid"],
.order-payment-status-card[data-payment-state="unpaid"] {
    border-color: rgba(184, 92, 67, 0.16);
    background: rgba(255, 247, 244, 0.78);
}

.order-summary-payment-state[data-payment-state="unpaid"]::before,
.order-payment-status-card[data-payment-state="unpaid"]::before {
    background: var(--pf-terracotta);
}

.order-intake-section-payment .order-payment-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.order-intake-section-payment .order-field-card {
    align-self: stretch;
}

.order-intake-section-payment textarea {
    min-height: 74px;
    max-height: 104px;
}

.order-payment-heading {
    align-items: flex-start;
}

.order-profile-toggle.checkbox-chip-inline {
    max-width: 100%;
    min-height: 38px;
    padding: 0.5rem 0.68rem;
    border-color: rgba(31, 107, 84, 0.18);
    background: rgba(238, 245, 241, 0.86);
    color: var(--pf-green-700);
    box-shadow: none;
    white-space: normal;
}

.order-profile-help {
    margin: -0.3rem 0 0.7rem;
}

.order-intake-section-payment .compact-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
}

.order-intake-section-payment .order-field-card {
    padding: 0;
    border: 0;
    background: transparent;
}

.order-intake-section-payment .order-payment-status-panel {
    padding: 0.58rem;
}

.order-payment-status-panel {
    padding: 0.65rem;
    border: 1px solid rgba(25, 52, 43, 0.08);
    border-radius: 13px;
    background: rgba(250, 248, 243, 0.64);
}

.order-payment-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-payment-quick-actions .button {
    min-height: 38px;
    padding-inline: 0.75rem;
    border-color: rgba(25, 52, 43, 0.11);
    background: rgba(255, 255, 255, 0.86);
    color: var(--pf-text);
}

.order-payment-quick-actions .button.is-active {
    border-color: rgba(213, 160, 63, 0.34);
    background: rgba(255, 244, 214, 0.86);
    color: #8b6218;
}

.order-payment-quick-actions .button[data-payment-action="paid"].is-active {
    border-color: rgba(47, 124, 98, 0.34);
    background: rgba(238, 245, 241, 0.9);
    color: var(--pf-green-700);
}

.order-payment-quick-actions .button[data-payment-action="none"].is-active {
    border-color: rgba(184, 92, 67, 0.22);
    background: rgba(255, 247, 244, 0.9);
    color: var(--pf-terracotta);
}

.order-payment-overpaid {
    color: var(--pf-terracotta);
    font-weight: 800;
}

.order-intake-section-collapsible {
    padding: 0;
}

.order-intake-section-collapsible > .order-intake-heading {
    display: none;
}

.order-intake-section-collapsible .order-collapsible-panel {
    border: 0;
    background: transparent;
}

.order-intake-section-collapsible .order-collapsible-summary {
    min-height: 68px;
    padding: 0.9rem 1rem;
}

.order-capture-final-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (min-width: 761px) {
    .order-capture-final-actions {
        display: none;
    }
}

@media (max-width: 1280px) {
    .order-intake-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cliente"
            "direccion"
            "productos"
            "resumen"
            "pago"
            "recurrente";
    }

    .order-summary-rail {
        position: static;
        height: auto;
        max-height: none;
    }

    .order-capture-page .order-total-summary {
        overflow: visible;
    }

    .order-intake-section-payment .order-payment-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.order-capture-body .page-shell {
        padding-top: 0.9rem;
    }

    .order-capture-page {
        width: min(100%, calc(100vw - 0.5rem));
        padding: 0.7rem;
        border-radius: 1.25rem;
    }

    .order-intake-form,
    .order-intake-shell {
        gap: 0.95rem;
    }

    .order-capture-page .order-intake-section {
        padding: 0.95rem;
    }

    .order-capture-page .order-intake-heading {
        margin-bottom: 0.9rem;
    }

    .order-capture-hero h1 {
        font-size: 1.85rem;
    }

    .order-capture-hero,
    .order-capture-hero-actions,
    .order-capture-final-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .order-capture-hero-actions .button,
    .order-capture-final-actions .button {
        width: 100%;
    }

    .order-summary-save-action {
        display: none;
    }

    .order-pending-capture {
        align-items: stretch;
        flex-direction: column;
    }

    .order-pending-toggle.checkbox-chip-inline {
        justify-content: flex-start;
        width: 100%;
        white-space: normal;
    }

    .order-capture-page .order-intake-grid-identity,
    .order-capture-page .compact-form-grid,
    .order-capture-page .order-payment-grid,
    .order-address-grid,
    .order-capture-page .line-item-row,
    .order-capture-page .line-item-row[data-order-supply-row],
    .order-product-line {
        grid-template-columns: 1fr;
    }

    .order-capture-page .order-intake-grid-identity,
    .order-capture-page .compact-form-grid,
    .order-capture-page .order-payment-grid,
    .order-address-grid,
    .order-capture-page .line-item-row,
    .order-capture-page .line-item-row[data-order-supply-row] {
        gap: 0.9rem;
    }

    .order-address-grid .inline-action-field {
        grid-template-columns: 1fr;
    }

    .order-pickup-chip {
        justify-self: stretch;
    }

    .order-summary-meta div {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.15rem;
    }

    .order-summary-meta dd {
        text-align: left;
    }
}

.message-block {
    padding: 0.85rem;
    border-left: 3px solid var(--terracotta);
    background: #f7ebe5;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-style: italic;
}

.card-links {
    margin-bottom: 1rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.card-links a {
    color: var(--leaf);
    font-weight: 700;
}

.card-links .button,
.card-links .button:visited,
.card-links .button:hover,
.card-links .button:focus-visible {
    color: #fff;
}

.card-links .button-ghost,
.card-links .button-ghost:visited,
.card-links .button-ghost:hover,
.card-links .button-ghost:focus-visible {
    color: var(--ink);
}

.delivery-card {
    display: grid;
    gap: 0.62rem;
    padding: 0.78rem 0.82rem 0.84rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-left: 4px solid var(--terracotta);
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 241, 233, 0.92));
    box-shadow: 0 10px 22px rgba(66, 40, 25, 0.07);
    min-height: 100%;
}

.delivery-card-header,
.delivery-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.delivery-card-header {
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(25, 51, 43, 0.08);
}

.delivery-card-heading {
    min-width: 0;
}

.delivery-card-heading h3 {
    margin: 0.15rem 0 0;
    font-size: 1.02rem;
    line-height: 1.15;
}

.delivery-customer-subcopy {
    margin: 0.18rem 0 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.delivery-card-header-meta {
    display: grid;
    gap: 0.35rem;
    justify-items: end;
}

.delivery-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.delivery-meta-chip {
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.74rem;
}

.delivery-route-toggle {
    justify-content: center;
    padding: 0.3rem 0.56rem;
    font-size: 0.76rem;
}

.delivery-card-body {
    display: grid;
    gap: 0.5rem;
}

.delivery-products-preview {
    margin-top: 0.1rem;
    padding: 0.52rem 0.62rem;
}

.delivery-card-details {
    display: grid;
    gap: 0.42rem;
}

.delivery-detail-row {
    display: grid;
    gap: 0.16rem;
}

.delivery-detail-label {
    color: var(--ink-soft);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-address {
    margin: 0;
    color: var(--ink);
    line-height: 1.32;
    font-size: 0.92rem;
}

.delivery-message-block {
    display: grid;
    gap: 0.25rem;
}

.delivery-message-compact {
    padding: 0.52rem 0.62rem;
    font-size: 0.82rem;
}

.delivery-card-links {
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.45rem;
}

.driver-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
}

.driver-actions form {
    margin: 0;
}

.delivery-card-footer {
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
    flex-direction: column;
    align-items: stretch;
}

.delivery-card-footer .button-small {
    min-height: 2.15rem;
    padding-block: 0.62rem;
}

.delivery-products-preview .order-products-list {
    gap: 0.22rem;
    font-size: 0.82rem;
}

.route-preview-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fffdf9, #f8f1e9);
}

.route-preview-map {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(25, 51, 43, 0.12);
    background:
        linear-gradient(90deg, rgba(25, 51, 43, 0.07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(25, 51, 43, 0.07) 1px, transparent 1px),
        radial-gradient(circle at 25% 30%, rgba(47, 124, 98, 0.18), transparent 28%),
        radial-gradient(circle at 75% 68%, rgba(200, 108, 79, 0.16), transparent 30%),
        #eef3ec;
    background-size:
        38px 38px,
        38px 38px,
        auto,
        auto,
        auto;
}

.route-preview-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #eef3ec;
}

.route-preview-iframe[hidden],
.route-preview-empty[hidden] {
    display: none;
}

.route-preview-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: var(--ink-soft);
    text-align: center;
    font-weight: 700;
    z-index: 2;
}

.route-pin {
    position: absolute;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -100%) rotate(-45deg);
    background: var(--terracotta);
    color: #fffdf9;
    box-shadow: 0 10px 20px rgba(141, 59, 44, 0.28);
    font-size: 0.82rem;
    font-weight: 900;
    z-index: 3;
}

.route-pin-address {
    background: var(--leaf);
}

.route-pin::after {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.18);
}

.route-pin span {
    display: block;
    z-index: 1;
    transform: rotate(45deg);
}

.route-preview-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.route-preview-heading strong {
    display: inline-grid;
    min-width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.12);
    color: var(--leaf);
    font-size: 0.9rem;
}

.route-stop-list {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.route-stop-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid rgba(25, 51, 43, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 253, 249, 0.84);
}

.route-stop-number {
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--leaf);
    color: #fffdf9;
    font-size: 0.8rem;
    font-weight: 900;
}

.route-stop-copy {
    min-width: 0;
}

.route-stop-copy strong,
.route-stop-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-stop-copy small {
    margin-top: 0.15rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.route-stop-actions {
    display: inline-flex;
    gap: 0.35rem;
}

.route-order-button {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--leaf);
    font-weight: 900;
    cursor: pointer;
}

.route-order-button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.route-preview-note {
    margin: 0.8rem 0 0;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.order-detail-panel {
    --order-detail-surface: rgba(255, 255, 252, 0.96);
    --order-detail-soft: rgba(246, 248, 244, 0.88);
    --order-detail-border: rgba(25, 51, 43, 0.1);
    --order-detail-border-strong: rgba(25, 51, 43, 0.16);
    --order-detail-shadow: 0 18px 42px rgba(66, 40, 25, 0.07);
    display: grid;
    gap: 1.05rem;
}

.order-svg-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.order-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 1.4rem;
    align-items: end;
    padding: 1.05rem 1.15rem;
    border: 1px solid var(--order-detail-border);
    border-radius: 0.9rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 252, 0.97), rgba(255, 253, 249, 0.94)),
        var(--order-detail-surface);
    box-shadow: var(--order-detail-shadow);
}

.order-detail-hero-copy {
    min-width: 0;
}

.order-detail-kicker {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.35rem;
    color: #52635c;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-detail-kicker strong {
    color: var(--rosewood);
    letter-spacing: 0.04em;
}

.order-detail-kicker-icon {
    width: 1.75rem;
    height: 1.75rem;
    position: relative;
    display: inline-grid;
    place-items: center;
    border-radius: 0.55rem;
    background: rgba(47, 124, 98, 0.1);
    color: var(--leaf);
}

.order-detail-kicker-icon .order-svg-icon {
    width: 1.05rem;
    height: 1.05rem;
}

.order-detail-hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 3vw, 2.65rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.order-detail-hero .section-copy {
    margin-top: 0.72rem;
    max-width: 44rem;
    color: #52635c;
    line-height: 1.55;
}

.order-detail-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.order-action-button {
    min-height: 2.75rem;
    padding-inline: 1rem;
    gap: 0.5rem;
    border-radius: 0.72rem;
}

.order-action-edit {
    background: linear-gradient(135deg, #2f7c62, #0f4b3c);
    border-color: transparent;
    color: #fff;
}

.order-action-map {
    background: rgba(47, 124, 98, 0.09);
    color: var(--leaf);
    border-color: rgba(47, 124, 98, 0.16);
}

.order-action-icon,
.order-kpi-icon,
.mini-info-icon,
.order-disclosure-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    color: currentColor;
    flex: 0 0 auto;
}

.order-action-icon {
    width: 1rem;
    height: 1rem;
}

.icon-back::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.icon-map::before {
    content: "";
    width: 0.86rem;
    height: 0.86rem;
    border: 2px solid currentColor;
    border-radius: 0.14rem;
    transform: skewY(-8deg);
}

.icon-map::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 0.78rem;
    background: currentColor;
    opacity: 0.55;
}

.icon-button {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(47, 124, 98, 0.24);
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.14);
    color: var(--leaf);
    box-shadow: 0 10px 22px rgba(47, 124, 98, 0.08);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: rgba(47, 124, 98, 0.2);
    border-color: rgba(47, 124, 98, 0.34);
    transform: translateY(-1px);
}

.icon-edit {
    position: relative;
    width: 1rem;
    height: 1rem;
    transform: rotate(-45deg);
}

.icon-edit::before,
.icon-edit::after {
    content: "";
    position: absolute;
    left: 0.2rem;
}

.icon-edit::before {
    top: 0;
    width: 0.45rem;
    height: 0.78rem;
    border-radius: 0.12rem;
    background: currentColor;
}

.icon-edit::after {
    top: 0.82rem;
    width: 0;
    height: 0;
    border-left: 0.225rem solid transparent;
    border-right: 0.225rem solid transparent;
    border-top: 0.28rem solid currentColor;
}

.order-detail-read {
    display: grid;
    gap: 1.05rem;
}

.order-detail-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.order-detail-kpi {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    min-height: 5rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--order-detail-border);
    border-radius: 0.85rem;
    background: var(--order-detail-surface);
    box-shadow: 0 14px 30px rgba(66, 40, 25, 0.055);
}

.order-detail-kpi p {
    margin: 0 0 0.24rem;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.order-detail-kpi strong {
    display: block;
    margin: 0;
    color: var(--ink);
    font-size: clamp(1rem, 1.2vw, 1.16rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.order-detail-kpi.has-balance-due strong {
    color: var(--rosewood);
}

.order-detail-kpi.is-balanced strong {
    color: var(--leaf);
}

.order-kpi-icon {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(47, 124, 98, 0.13);
    background: rgba(47, 124, 98, 0.08);
    color: var(--ink-soft);
}

.order-kpi-icon .order-svg-icon {
    width: 1.28rem;
    height: 1.28rem;
}

.icon-calendar::before {
    border: 2px solid currentColor;
    border-radius: 0.18rem;
    box-shadow: inset 0 0.28rem 0 rgba(47, 124, 98, 0.16);
}

.icon-flag::before {
    width: 0.8rem;
    height: 1.05rem;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 0.1rem 0.5rem 0.5rem 0.1rem;
}

.icon-wallet::before {
    border: 2px solid currentColor;
    border-radius: 0.2rem;
    box-shadow: inset -0.25rem 0 0 rgba(47, 124, 98, 0.15);
}

.icon-balance::before {
    border: 2px solid currentColor;
    border-radius: 999px;
}

.icon-user::before {
    border: 2px solid currentColor;
    border-radius: 999px 999px 0.55rem 0.55rem;
}

.icon-phone::before {
    width: 0.7rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-radius: 0.18rem;
}

.icon-location::before {
    width: 0.82rem;
    height: 0.82rem;
    border: 2px solid currentColor;
    border-radius: 999px 999px 999px 0;
    transform: rotate(-45deg);
}

.icon-truck::before {
    width: 1.05rem;
    height: 0.72rem;
    border: 2px solid currentColor;
    border-radius: 0.18rem;
}

.icon-clipboard::before {
    border: 2px solid currentColor;
    border-radius: 0.18rem;
    box-shadow: inset 0 0.18rem 0 rgba(47, 124, 98, 0.14);
}

.status-dot {
    width: 0.74rem;
    height: 0.74rem;
    border-radius: 999px;
    background: var(--leaf);
    box-shadow: 0 0 0 0.28rem rgba(47, 124, 98, 0.1);
}

.status-dot.is-upcoming,
.status-dot.is-payment-unpaid {
    background: var(--status-upcoming);
    box-shadow: 0 0 0 0.28rem rgba(218, 163, 55, 0.12);
}

.status-dot.is-in_progress,
.status-dot.is-in_route,
.status-dot.is-payment-partial {
    background: var(--status-in-progress);
    box-shadow: 0 0 0 0.28rem rgba(55, 176, 190, 0.12);
}

.status-dot.is-completed,
.status-dot.is-delivered,
.status-dot.is-payment-paid {
    background: var(--leaf);
    box-shadow: 0 0 0 0.28rem rgba(47, 124, 98, 0.12);
}

.status-dot.is-failed {
    background: var(--rosewood);
    box-shadow: 0 0 0 0.28rem rgba(141, 59, 44, 0.12);
}

.order-detail-primary-grid {
    display: grid;
    grid-template-columns: minmax(380px, 1.18fr) minmax(280px, 0.82fr) minmax(270px, 0.7fr);
    gap: 1rem;
    align-items: stretch;
}

.order-detail-primary-grid > *,
.order-detail-secondary-grid > * {
    min-height: 100%;
}

.order-detail-card,
.order-detail-disclosure,
.danger-zone-panel {
    min-width: 0;
    border: 1px solid var(--order-detail-border);
    border-radius: 0.9rem;
    background: var(--order-detail-surface);
    box-shadow: var(--order-detail-shadow);
}

.order-detail-card {
    display: grid;
    align-content: start;
    padding: 1.05rem 1.1rem;
}

.order-card-heading {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.order-card-heading h2,
.danger-zone-copy h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.12rem;
    line-height: 1.18;
}

.order-card-heading p,
.danger-zone-copy p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.order-info-section,
.order-payment-summary {
    min-width: 0;
    display: grid;
    gap: 0.8rem;
}

.order-info-section h3,
.order-payment-summary h3 {
    margin: 0;
    color: var(--rosewood);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-rows {
    display: grid;
    gap: 0;
    margin: 0;
}

.info-rows div {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 0.68rem 0;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.info-rows div:first-child {
    border-top: 0;
    padding-top: 0;
}

.info-rows dt {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.info-rows dd {
    margin: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
    font-weight: 700;
}

.florist-brief-section {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    background:
        linear-gradient(180deg, rgba(248, 252, 249, 0.98), rgba(255, 252, 247, 0.94)),
        radial-gradient(circle at top right, rgba(47, 124, 98, 0.08), transparent 40%);
}

.florist-notes-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
    align-self: stretch;
}

.order-product-list {
    display: grid;
    gap: 0.65rem;
}

.order-product-list-featured {
    gap: 0.8rem;
}

.order-product-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.order-product-line:first-child {
    border-top: 0;
    padding-top: 0;
}

.order-product-line-featured {
    align-items: start;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.order-product-line-featured:first-child {
    border-top: 0;
    padding-top: 0;
}

.product-quantity {
    min-width: 2.15rem;
    height: 2.15rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.12);
    color: var(--leaf);
    font-size: 0.85rem;
    font-weight: 900;
}

.order-product-line-featured .product-quantity {
    min-width: 2.4rem;
    height: 2.4rem;
    background: rgba(47, 124, 98, 0.16);
    font-size: 0.88rem;
}

.product-line-copy {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
}

.order-product-line-featured .product-line-copy strong {
    font-size: 1.05rem;
}

.order-product-line-bouquet {
    grid-template-columns: minmax(4.8rem, 5.3rem) minmax(0, 1fr);
}

.product-line-copy strong,
.product-line-copy small {
    overflow-wrap: anywhere;
}

.product-line-copy small {
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.product-line-total {
    color: var(--ink);
    font-weight: 900;
}

.order-product-line-featured .product-line-total {
    font-size: 1.1rem;
}

.product-quantity-card {
    min-width: auto;
    height: 3.9rem;
    justify-self: stretch;
    align-self: start;
    padding: 0.75rem 0.6rem;
    border-radius: 0.72rem;
    background:
        linear-gradient(180deg, rgba(47, 124, 98, 0.18), rgba(47, 124, 98, 0.1)),
        rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(47, 124, 98, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    text-align: center;
    gap: 0.18rem;
}

.product-quantity-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.45rem;
    line-height: 1;
}

.product-quantity-card span {
    display: block;
    color: var(--leaf);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-line-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

.bouquet-breakdown-table-wrap {
    overflow: auto;
    border-radius: 0.72rem;
    border: 1px solid rgba(47, 124, 98, 0.12);
    background: rgba(250, 252, 250, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bouquet-breakdown-table {
    width: 100%;
    min-width: 26rem;
    border-collapse: collapse;
}

.bouquet-breakdown-table th,
.bouquet-breakdown-table td {
    padding: 0.62rem 0.8rem;
    text-align: left;
}

.bouquet-breakdown-table thead th {
    background: rgba(47, 124, 98, 0.08);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bouquet-breakdown-table tbody tr + tr td {
    border-top: 1px solid rgba(47, 124, 98, 0.08);
}

.bouquet-breakdown-table tbody td {
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
}

.bouquet-breakdown-table tbody td:last-child {
    width: 5.5rem;
    text-align: right;
    color: var(--leaf);
}

.order-product-empty {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 700;
}

.recipe-empty {
    margin: 0.3rem 0 0;
    padding: 0.72rem 0.8rem;
    border: 1px dashed rgba(47, 124, 98, 0.18);
    border-radius: 0.7rem;
    background: rgba(47, 124, 98, 0.05);
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.4;
}

.florist-note-stack {
    display: grid;
    gap: 0.8rem;
}

.florist-note-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 0.72rem;
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: rgba(255, 253, 249, 0.82);
}

.florist-note-card-primary {
    background: linear-gradient(180deg, rgba(248, 252, 249, 0.98), rgba(255, 253, 249, 0.9));
    border-color: rgba(47, 124, 98, 0.14);
}

.florist-note-label {
    color: var(--rosewood);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.florist-note-card p {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.florist-delivery-quicklist {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0.1rem 0 0;
}

.florist-delivery-quicklist div {
    display: grid;
    grid-template-columns: minmax(112px, 0.38fr) minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.florist-delivery-quicklist div:first-child {
    padding-top: 0;
    border-top: 0;
}

.florist-delivery-quicklist dt {
    display: flex;
    gap: 0.42rem;
    align-items: center;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 800;
}

.florist-delivery-quicklist dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mini-info-icon {
    width: 1rem;
    height: 1rem;
    color: var(--leaf);
}

.mini-info-icon .order-svg-icon {
    width: 0.88rem;
    height: 0.88rem;
}

.inline-muted {
    display: block;
    margin-top: 0.2rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.info-row-stack,
.info-rows-two div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

.order-payment-summary {
    grid-template-rows: auto auto minmax(0, 1fr);
    position: sticky;
    top: 1rem;
    background:
        linear-gradient(180deg, rgba(247, 252, 248, 0.96), rgba(255, 253, 249, 0.96));
}

.payment-total {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 0 1rem;
    border-bottom: 1px solid rgba(47, 124, 98, 0.16);
}

.payment-total span {
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.payment-total strong {
    color: var(--leaf);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1;
}

.payment-ledger {
    display: grid;
    gap: 0;
    margin: 0;
    align-self: start;
}

.payment-ledger div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
    padding: 0.72rem 0;
    border-top: 1px solid rgba(47, 124, 98, 0.1);
}

.payment-ledger dt {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 750;
}

.payment-ledger dd {
    margin: 0;
    color: var(--ink);
    font-weight: 900;
}

.payment-ledger .is-due dt,
.payment-ledger .is-due dd {
    color: var(--rosewood);
}

.payment-ledger .is-paid dt,
.payment-ledger .is-paid dd {
    color: var(--leaf);
}

.order-detail-secondary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: stretch;
}

.order-detail-accordion-stack,
.order-detail-side-stack {
    display: grid;
    gap: 0.85rem;
    min-height: 100%;
}

.order-detail-side-stack {
    grid-template-rows: minmax(0, 1fr) auto;
}

.order-detail-disclosure {
    overflow: hidden;
}

.order-detail-disclosure summary {
    display: grid;
    grid-template-columns: auto minmax(7rem, 0.5fr) repeat(4, minmax(0, 1fr)) auto;
    gap: 0.8rem;
    align-items: center;
    min-height: 4.6rem;
    padding: 0.95rem 1.05rem;
    cursor: pointer;
    list-style: none;
}

.order-detail-disclosure summary::-webkit-details-marker {
    display: none;
}

.order-detail-disclosure summary::after {
    content: "";
    width: 0.58rem;
    height: 0.58rem;
    border-right: 2px solid var(--ink-soft);
    border-bottom: 2px solid var(--ink-soft);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.order-detail-disclosure[open] summary::after {
    transform: rotate(225deg);
}

.order-detail-disclosure summary strong {
    color: var(--ink);
    font-size: 1.02rem;
}

.order-detail-disclosure summary span:not(.order-disclosure-icon) {
    min-width: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-disclosure-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.62rem;
    background: rgba(47, 124, 98, 0.1);
    color: var(--leaf);
}

.order-disclosure-icon .order-svg-icon {
    width: 1.12rem;
    height: 1.12rem;
}

.order-detail-disclosure .info-rows {
    padding: 0 1.05rem 1rem 4rem;
}

.info-rows-compact div {
    padding-block: 0.56rem;
}

.status-timeline-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 1.15rem;
}

.status-timeline {
    position: relative;
    display: grid;
    gap: 0;
    max-height: none;
    min-height: 0;
    overflow: auto;
    margin: 0;
    padding: 0 0 0 1.35rem;
    list-style: none;
}

.status-timeline::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    left: 0.4rem;
    width: 2px;
    background: rgba(47, 124, 98, 0.24);
}

.status-timeline li {
    position: relative;
    display: grid;
    gap: 0.16rem;
    padding: 0 0 1rem 0.65rem;
}

.status-timeline li::before {
    content: "";
    position: absolute;
    top: 0.25rem;
    left: -1.08rem;
    width: 0.78rem;
    height: 0.78rem;
    border: 2px solid var(--leaf);
    border-radius: 999px;
    background: var(--order-detail-surface);
    box-shadow: 0 0 0 0.18rem rgba(47, 124, 98, 0.1);
}

.status-timeline li:first-child::before {
    background: var(--leaf);
}

.status-timeline time {
    color: var(--rosewood);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-timeline strong {
    color: var(--ink);
    font-size: 0.98rem;
}

.status-timeline span,
.status-timeline p {
    margin: 0;
    color: var(--ink);
    font-size: 0.84rem;
    line-height: 1.35;
}

.status-timeline-empty {
    color: var(--ink-soft);
}

.danger-zone-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-color: rgba(141, 59, 44, 0.2);
    background: linear-gradient(180deg, rgba(255, 248, 245, 0.96), rgba(255, 253, 249, 0.94));
    box-shadow: 0 14px 30px rgba(141, 59, 44, 0.06);
}

.danger-zone-copy {
    display: grid;
    gap: 0.3rem;
}

.danger-zone-copy .eyebrow {
    color: var(--rosewood);
}

.order-detail-panel :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid rgba(47, 124, 98, 0.36);
    outline-offset: 2px;
}

.order-detail-edit {
    display: none;
    gap: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}

.order-detail-panel.is-editing .order-detail-read {
    display: none;
}

.order-detail-panel.is-editing .order-detail-edit {
    display: grid;
    padding: 1.1rem;
    border: 1px solid var(--order-detail-border);
    border-radius: 0.9rem;
    background: var(--order-detail-surface);
    box-shadow: var(--order-detail-shadow);
}

.detail-edit-fields {
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}

.edit-products-panel {
    display: grid;
    gap: 1rem;
}

.edit-products-panel .section-header {
    margin-bottom: 0;
}

.edit-products-panel h3 {
    margin: 0.25rem 0 0;
}

.edit-product-add-form {
    grid-template-columns: minmax(260px, 1fr) minmax(120px, 0.32fr) auto;
    align-items: end;
}

.edit-products-table {
    margin-top: 0.15rem;
}

.order-edit-final-actions {
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.quick-update-form,
.driver-actions {
    display: grid;
    gap: 0.8rem;
}

.detail-edit-form {
    align-items: start;
}

.detail-edit-form .form-textarea {
    min-height: 78px;
}

.status-control-panel {
    padding-block: 1.15rem;
}

.status-control-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.delivery-page {
    --delivery-surface: rgba(255, 252, 247, 0.94);
    --delivery-surface-strong: rgba(255, 255, 252, 0.98);
    --delivery-surface-muted: rgba(245, 238, 228, 0.9);
    --delivery-border: rgba(25, 51, 43, 0.09);
    --delivery-border-strong: rgba(25, 51, 43, 0.14);
    --delivery-shadow-sm: 0 12px 28px rgba(66, 40, 25, 0.05);
    --delivery-shadow-md: 0 18px 42px rgba(66, 40, 25, 0.08);
    max-width: min(1540px, calc(100vw - 1.4rem));
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.delivery-hero,
.delivery-poll-panel,
.delivery-overview-card {
    border: 1px solid var(--delivery-border);
    border-radius: 26px;
    background: var(--delivery-surface);
    box-shadow: var(--delivery-shadow-sm);
}

.delivery-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 1.35rem;
    align-items: end;
    padding: 1rem 1.15rem 1.05rem;
}

.delivery-hero h1 {
    margin: 0.18rem 0 0.35rem;
    font-size: clamp(2.05rem, 4vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.delivery-hero .section-copy {
    max-width: 45rem;
    font-size: 0.96rem;
    line-height: 1.45;
}

.delivery-hero-actions {
    display: flex;
    align-items: center;
}

.delivery-hero-actions .button {
    min-height: 2.8rem;
    padding-inline: 1.15rem;
    box-shadow: 0 12px 22px rgba(47, 124, 98, 0.18);
}

.delivery-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 0.8rem;
}

.delivery-overview-card {
    display: grid;
    gap: 0.22rem;
    padding: 0.9rem 1rem;
}

.delivery-overview-card span {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-overview-card strong {
    font-size: clamp(1.95rem, 2.1vw, 2.55rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.delivery-overview-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.35;
}

.delivery-poll-panel {
    width: 100%;
    padding: 1rem 1.1rem 1.3rem;
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(248, 241, 231, 0.92));
}

.delivery-poll-panel .driver-queue-panel,
.delivery-poll-panel .delivery-operations-shell,
.delivery-poll-panel .delivery-queue-section,
.delivery-poll-panel .delivery-secondary-grid {
    display: grid;
    gap: 1rem;
}

.delivery-poll-panel .delivery-queue-section,
.delivery-poll-panel .delivery-secondary-grid {
    margin-top: 1.1rem;
}

.delivery-poll-panel .delivery-workspace-header,
.delivery-poll-panel .delivery-queue-header,
.delivery-poll-panel .delivery-secondary-header {
    align-items: end;
    gap: 1rem;
}

.delivery-poll-panel .delivery-workspace-header .section-copy,
.delivery-poll-panel .delivery-secondary-header .section-copy,
.delivery-poll-panel .delivery-queue-header .section-copy {
    max-width: 34rem;
}

.delivery-poll-panel .delivery-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem 1rem;
    align-items: end;
}

.delivery-poll-panel .delivery-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 0.8rem;
    margin: 0;
    padding: 0.95rem;
    border-radius: 22px;
    border: 1px solid var(--delivery-border);
    background: rgba(255, 255, 252, 0.85);
    box-shadow: 0 10px 24px rgba(66, 40, 25, 0.04);
}

.delivery-poll-panel .delivery-filter-bar .field {
    min-width: 0;
}

.delivery-poll-panel .delivery-filter-actions {
    justify-content: flex-end;
    align-self: end;
}

.delivery-poll-panel .delivery-route-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--delivery-border);
    background: rgba(255, 255, 252, 0.82);
    box-shadow: 0 10px 22px rgba(66, 40, 25, 0.05);
}

.delivery-poll-panel .delivery-route-actions .button,
.delivery-poll-panel .delivery-filter-actions .button {
    min-height: 2.85rem;
}

.delivery-poll-panel .delivery-route-workspace {
    grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.92fr);
    gap: 0;
    padding: 0.9rem;
    margin-bottom: 0;
    border: 1px solid var(--delivery-border);
    border-radius: 28px;
    background: var(--delivery-surface-strong);
    box-shadow: var(--delivery-shadow-md);
    overflow: hidden;
}

.delivery-poll-panel .route-preview-map {
    min-height: 540px;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(25, 51, 43, 0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(25, 51, 43, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 26% 34%, rgba(47, 124, 98, 0.14), transparent 30%),
        radial-gradient(circle at 74% 68%, rgba(201, 107, 71, 0.12), transparent 28%),
        #eef2ee;
    background-size:
        44px 44px,
        44px 44px,
        auto,
        auto,
        auto;
}

.delivery-poll-panel .route-preview-stops {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100%;
    padding: 1rem 0 0 1rem;
}

.delivery-poll-panel .route-preview-heading {
    margin-bottom: 0.9rem;
    padding: 0 0.2rem 0 0;
}

.delivery-poll-panel .route-preview-heading-copy h3 {
    margin: 0.16rem 0 0;
    font-size: 1.08rem;
    line-height: 1.15;
}

.delivery-poll-panel .route-preview-heading strong {
    min-width: 2.3rem;
    width: 2.3rem;
    height: 2.3rem;
    background: rgba(47, 124, 98, 0.14);
    box-shadow: inset 0 0 0 1px rgba(47, 124, 98, 0.12);
}

.delivery-poll-panel .route-stop-list {
    max-height: 424px;
    overflow: auto;
    padding-right: 0.2rem;
}

.delivery-poll-panel .route-stop-row {
    padding: 0.78rem 0.82rem;
    border-radius: 18px;
    border-color: transparent;
    background: rgba(246, 241, 233, 0.56);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.delivery-poll-panel .route-stop-row:hover {
    transform: translateY(-1px);
    border-color: rgba(25, 51, 43, 0.1);
    background: rgba(255, 255, 252, 0.96);
}

.delivery-poll-panel .route-stop-number {
    width: 1.95rem;
    height: 1.95rem;
    background: linear-gradient(135deg, #2f7c62, #255948);
    box-shadow: 0 10px 18px rgba(47, 124, 98, 0.16);
}

.delivery-poll-panel .route-stop-copy strong {
    display: block;
    margin-bottom: 0.12rem;
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.25;
}

.delivery-poll-panel .route-stop-copy small {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.35;
}

.delivery-poll-panel .route-stop-actions {
    display: flex;
    gap: 0.35rem;
}

.delivery-poll-panel .route-order-button {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(25, 51, 43, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 252, 0.94);
    color: var(--leaf);
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(66, 40, 25, 0.05);
}

.delivery-poll-panel .route-order-button:disabled {
    opacity: 0.45;
    box-shadow: none;
}

.delivery-poll-panel .route-preview-note {
    margin: 0.9rem 0 0;
    padding: 0.85rem 0.2rem 0 0;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
    font-size: 0.81rem;
    line-height: 1.45;
}

.delivery-poll-panel .delivery-queue-summary {
    display: grid;
    justify-items: end;
    gap: 0.1rem;
}

.delivery-poll-panel .delivery-queue-summary strong {
    font-size: clamp(1.6rem, 2vw, 2rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.delivery-poll-panel .delivery-queue-summary span {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-poll-panel .delivery-queue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.delivery-poll-panel .delivery-card {
    gap: 0.72rem;
    padding: 0.95rem 1rem 1rem;
    border: 1px solid var(--delivery-border);
    border-left: 0;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(248, 241, 232, 0.94));
    box-shadow: var(--delivery-shadow-sm);
}

.delivery-poll-panel .delivery-card:hover,
.delivery-poll-panel .delivery-card:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--delivery-shadow-md);
    border-color: var(--delivery-border-strong);
}

.delivery-poll-panel .delivery-card-header {
    padding-bottom: 0.65rem;
    border-bottom-color: rgba(25, 51, 43, 0.07);
}

.delivery-poll-panel .delivery-card-heading h3 {
    font-size: 1.08rem;
}

.delivery-poll-panel .delivery-customer-subcopy {
    font-size: 0.82rem;
}

.delivery-poll-panel .delivery-card-header-meta {
    gap: 0.45rem;
}

.delivery-poll-panel .delivery-route-toggle {
    min-height: 2.2rem;
    padding: 0.34rem 0.68rem;
    border: 1px solid rgba(47, 124, 98, 0.12);
    background: rgba(244, 248, 244, 0.95);
    color: #2c6a56;
    font-size: 0.74rem;
}

.delivery-poll-panel .delivery-route-toggle input {
    accent-color: #2f7c62;
}

.delivery-poll-panel .delivery-card-body {
    grid-template-columns: minmax(0, 1.1fr) minmax(190px, 0.9fr);
    gap: 0.72rem;
    align-items: start;
}

.delivery-poll-panel .delivery-card-details {
    gap: 0.52rem;
}

.delivery-poll-panel .delivery-products-preview {
    height: 100%;
    padding: 0.62rem 0.72rem;
    background: rgba(255, 255, 255, 0.72);
}

.delivery-poll-panel .delivery-message-block {
    gap: 0.3rem;
}

.delivery-poll-panel .delivery-message-compact {
    padding: 0.58rem 0.68rem;
    background: #f7ece6;
}

.delivery-poll-panel .delivery-card-footer {
    gap: 0.75rem;
    padding-top: 0.7rem;
}

.delivery-poll-panel .delivery-card-links {
    justify-content: space-between;
}

.delivery-poll-panel .delivery-card-links span {
    font-size: 0.8rem;
}

.delivery-poll-panel .delivery-card-links .button-secondary {
    background: linear-gradient(135deg, #2f7c62, #255948);
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(47, 124, 98, 0.18);
}

.delivery-poll-panel .driver-actions {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    gap: 0.75rem;
    align-items: start;
}

.delivery-poll-panel .delivery-complete-form .button {
    min-height: 3.15rem;
    background: linear-gradient(135deg, #2f7c62, #245e4c);
    border-color: transparent;
    box-shadow: 0 14px 24px rgba(47, 124, 98, 0.18);
}

.delivery-poll-panel .delivery-failure-action {
    display: grid;
}

.delivery-poll-panel .delivery-failure-trigger {
    min-height: 3.15rem;
    background: linear-gradient(180deg, #fff7f4, #f5dfd7);
    color: #8d4532;
    border: 1px solid rgba(160, 72, 46, 0.18);
    box-shadow: none;
}

.delivery-poll-panel .delivery-failure-trigger:hover,
.delivery-poll-panel .delivery-failure-trigger:focus-visible {
    background: linear-gradient(180deg, #fff3ef, #f3d5cc);
    color: #7f3d2d;
}

.delivery-poll-panel .delivery-failure-form {
    gap: 0.5rem;
}

.delivery-poll-panel .delivery-failure-form .compact-field {
    gap: 0.35rem;
}

.delivery-poll-panel .delivery-failure-form .form-textarea {
    min-height: 82px;
    resize: vertical;
}

.delivery-poll-panel .delivery-failure-form .button-danger {
    min-height: 2.6rem;
    background: linear-gradient(180deg, #fff7f4, #f5dfd7);
    color: #8d4532;
    border: 1px solid rgba(160, 72, 46, 0.18);
    box-shadow: none;
}

.delivery-failure-modal-card {
    width: min(100%, 34rem);
}

.delivery-failure-modal-card .modal-header h2 {
    max-width: 24rem;
}

.delivery-failure-modal-card .delivery-failure-form {
    margin-top: 0.4rem;
}

.delivery-failure-modal-card .delivery-failure-form .form-textarea {
    min-height: 132px;
}

.delivery-failure-modal-card .modal-actions {
    justify-content: flex-end;
}

.delivery-poll-panel .delivery-secondary-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    align-items: start;
}

.delivery-poll-panel .delivery-secondary-panel,
.delivery-poll-panel .delivery-history-panel {
    margin-top: 0;
    padding: 1rem;
    border: 1px solid var(--delivery-border);
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.82);
    box-shadow: 0 10px 24px rgba(66, 40, 25, 0.04);
}

.delivery-poll-panel .route-template-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.delivery-poll-panel .route-template-card {
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid rgba(25, 51, 43, 0.07);
    border-radius: 20px;
    background: rgba(255, 255, 252, 0.88);
    box-shadow: none;
}

.delivery-poll-panel .route-template-save-card,
.delivery-poll-panel .history-details {
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 252, 0.72);
}

.delivery-poll-panel .route-template-save-card summary,
.delivery-poll-panel .history-details summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.88rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 800;
}

.delivery-poll-panel .route-template-save-card summary::-webkit-details-marker,
.delivery-poll-panel .history-details summary::-webkit-details-marker {
    display: none;
}

.delivery-poll-panel .route-template-save-card summary span,
.delivery-poll-panel .history-details summary span {
    color: var(--ink);
}

.delivery-poll-panel .route-template-save-card summary small,
.delivery-poll-panel .history-details summary small {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.delivery-poll-panel .route-template-save-card[open] summary,
.delivery-poll-panel .history-details[open] summary {
    border-bottom: 1px solid rgba(25, 51, 43, 0.08);
}

.delivery-poll-panel .route-template-create-form {
    gap: 0.8rem;
    padding: 0.95rem 1rem 1rem;
}

.delivery-poll-panel .route-template-create-form .filter-actions .button {
    width: 100%;
}

.delivery-poll-panel .history-details .incident-grid {
    gap: 0.7rem;
    padding: 0.9rem 1rem 1rem;
}

.delivery-poll-panel .history-details .incident-card {
    padding: 0.85rem 0.9rem;
    box-shadow: none;
}

.delivery-poll-panel .delivery-secondary-empty,
.delivery-poll-panel .delivery-history-empty {
    padding: 0.1rem 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.delivery-page :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid rgba(47, 124, 98, 0.34);
    outline-offset: 2px;
}

.delivery-page {
    --pf-green-900: #123c31;
    --pf-green-800: #174a3c;
    --pf-green-700: #1f6b54;
    --pf-cream-50: #faf8f3;
    --pf-surface: #ffffff;
    --pf-border: #e7e5de;
    --pf-text: #19342b;
    --pf-muted: #68766f;
    --pf-terracotta: #b85c43;
    --pf-soft-green: #eef5f1;
    --pf-soft-red: #fff2ee;
    max-width: min(1500px, calc(100vw - 1.4rem));
    color: var(--pf-text);
}

.delivery-route-header {
    min-height: auto;
    padding: 0.95rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--pf-border);
    box-shadow: 0 14px 34px rgba(33, 42, 35, 0.06);
}

.delivery-route-header h1 {
    margin: 0.1rem 0 0.28rem;
    font-size: clamp(1.8rem, 3vw, 2.25rem);
    letter-spacing: -0.035em;
}

.delivery-route-header .section-copy {
    color: var(--pf-muted);
    font-size: 0.93rem;
}

.delivery-route-header .delivery-hero-actions {
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.delivery-poll-panel {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(250, 248, 243, 0.72);
    border-color: var(--pf-border);
    box-shadow: 0 16px 38px rgba(33, 42, 35, 0.07);
}

.delivery-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.delivery-overview-card {
    position: relative;
    min-height: 4.9rem;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: var(--pf-surface);
    border-color: var(--pf-border);
    box-shadow: 0 10px 24px rgba(33, 42, 35, 0.05);
}

.delivery-overview-card::before {
    content: "";
    width: 2.35rem;
    height: 2.35rem;
    grid-row: span 3;
    border-radius: 50%;
    background: var(--pf-soft-green);
    box-shadow: inset 0 0 0 1px rgba(31, 107, 84, 0.12);
}

.delivery-overview-card span,
.delivery-overview-card p {
    grid-column: 2;
}

.delivery-overview-card strong {
    grid-column: 2;
    color: var(--pf-green-900);
    font-size: clamp(1.5rem, 2vw, 1.9rem);
    letter-spacing: -0.04em;
}

.delivery-overview-card p {
    font-size: 0.82rem;
}

.delivery-overview-incidents::before {
    background: var(--pf-soft-red);
    box-shadow: inset 0 0 0 1px rgba(184, 92, 67, 0.18);
}

.delivery-overview-incidents strong {
    color: var(--pf-terracotta);
}

.delivery-route-focus-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.delivery-queue-section {
    display: grid;
    gap: 0.95rem;
}

.next-delivery-card,
.today-stops-panel,
.delivery-route-workspace,
.delivery-advanced-panel,
.delivery-history-panel,
.route-template-panel {
    border: 1px solid var(--pf-border);
    border-radius: 18px;
    background: var(--pf-surface);
    box-shadow: 0 12px 28px rgba(33, 42, 35, 0.06);
}

.next-delivery-card {
    display: grid;
    gap: 0.9rem;
    padding: 1.05rem 1.15rem;
}

.next-delivery-header,
.today-stops-header,
.delivery-map-header,
.delivery-history-heading,
.route-template-premium-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.next-delivery-header h2,
.today-stops-header h2,
.delivery-map-header h2,
.delivery-history-heading h2,
.route-template-premium-header h2 {
    margin: 0.12rem 0 0;
    color: var(--pf-text);
    font-size: 1.22rem;
    line-height: 1.15;
}

.next-delivery-time {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.42rem 0.72rem;
    border-radius: 12px;
    background: var(--pf-soft-green);
    color: var(--pf-green-800);
    font-weight: 850;
}

.next-delivery-details {
    display: grid;
    gap: 0;
    margin: 0;
}

.next-delivery-details div {
    display: grid;
    grid-template-columns: minmax(6.8rem, 0.34fr) minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.62rem 0;
    border-top: 1px solid rgba(25, 52, 43, 0.08);
}

.next-delivery-details div:first-child {
    border-top: 0;
}

.next-delivery-details dt {
    color: var(--pf-muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.next-delivery-details dd {
    margin: 0;
    color: var(--pf-text);
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.delivery-product-line {
    display: block;
}

.next-delivery-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    padding-top: 0.2rem;
}

.next-action-button {
    width: 100%;
    min-height: 3rem;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.9rem;
}

.next-delivery-actions .button-primary {
    background: linear-gradient(135deg, var(--pf-green-900), var(--pf-green-700));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgba(18, 60, 49, 0.18);
}

.next-delivery-actions .button-danger {
    background: var(--pf-soft-red);
    color: var(--pf-terracotta);
    border: 1px solid rgba(184, 92, 67, 0.28);
    box-shadow: none;
}

.today-stops-panel {
    padding: 0.95rem;
}

.today-stops-header {
    margin-bottom: 0.75rem;
}

.today-stops-header p,
.route-template-premium-header p {
    margin: 0.22rem 0 0;
    color: var(--pf-muted);
    font-size: 0.9rem;
}

.today-stops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.today-stop-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.72rem;
    align-items: start;
    min-width: 0;
    padding: 0.82rem;
    border: 1px solid rgba(25, 52, 43, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
}

.today-stop-card.is-current {
    border-color: rgba(31, 107, 84, 0.32);
    background: linear-gradient(180deg, rgba(238, 245, 241, 0.7), rgba(255, 255, 255, 0.9));
    box-shadow: inset 3px 0 0 var(--pf-green-700);
}

.today-stop-route-toggle {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    color: var(--pf-green-800);
    font-weight: 850;
    cursor: pointer;
}

.today-stop-route-toggle span {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--pf-soft-green);
    border: 1px solid rgba(31, 107, 84, 0.14);
}

.today-stop-route-toggle input {
    accent-color: var(--pf-green-700);
}

.today-stop-copy {
    min-width: 0;
}

.today-stop-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.55rem;
}

.today-stop-topline strong {
    color: var(--pf-text);
    font-size: 0.95rem;
    line-height: 1.2;
}

.today-stop-topline time {
    color: var(--pf-text);
    font-size: 0.82rem;
    font-weight: 800;
}

.today-stop-copy p,
.today-stop-copy small {
    display: block;
    margin: 0.16rem 0 0;
    color: var(--pf-muted);
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.today-stop-product {
    color: var(--pf-text);
    font-weight: 800;
}

.today-stop-actions {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.today-stop-current-label {
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: var(--pf-soft-green);
    color: var(--pf-green-800);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.delivery-map-column {
    display: grid;
    gap: 0.85rem;
    position: sticky;
    top: calc(var(--topbar-height, 72px) + 0.8rem);
}

.delivery-route-workspace {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    overflow: hidden;
}

.delivery-map-header {
    align-items: center;
}

.delivery-map-route-form {
    margin: 0;
}

.delivery-map-route-button {
    min-height: 2.7rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pf-green-900), var(--pf-green-700));
    border-color: transparent;
}

.delivery-route-workspace .route-preview-map {
    min-height: clamp(18rem, 36vw, 27rem);
    border-radius: 16px;
    border: 1px solid var(--pf-border);
    overflow: hidden;
}

.delivery-route-workspace .route-preview-stops {
    padding: 0;
}

.delivery-route-workspace .route-stop-list {
    max-height: 15rem;
}

.delivery-advanced-panel {
    overflow: hidden;
}

.delivery-advanced-panel summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    list-style: none;
    color: var(--pf-text);
    font-weight: 850;
}

.delivery-advanced-panel summary::-webkit-details-marker,
.route-template-save-card summary::-webkit-details-marker {
    display: none;
}

.delivery-advanced-panel summary small {
    color: var(--pf-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.delivery-advanced-panel[open] summary {
    border-bottom: 1px solid var(--pf-border);
}

.delivery-advanced-panel .delivery-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    margin: 0;
    padding: 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.delivery-history-panel {
    margin-top: 1rem;
    padding: 1rem;
}

.delivery-history-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.delivery-history-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.64rem 0;
    border-top: 1px solid rgba(25, 52, 43, 0.08);
}

.delivery-history-row:first-child {
    border-top: 0;
}

.delivery-history-status {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--pf-green-700);
}

.delivery-history-status.is-failed {
    background: var(--pf-terracotta);
}

.delivery-history-row strong {
    color: var(--pf-text);
    font-size: 0.86rem;
}

.delivery-history-row p {
    margin: 0.12rem 0 0;
    color: var(--pf-muted);
    font-size: 0.8rem;
}

.delivery-history-row time {
    color: var(--pf-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.delivery-route-templates-shell {
    display: grid;
}

.route-template-panel {
    padding: 1rem;
}

.route-template-premium-header {
    margin-bottom: 0.95rem;
}

.route-template-save-card {
    position: relative;
}

.route-template-save-card summary.button {
    min-height: 2.75rem;
    list-style: none;
}

.route-template-save-card[open] {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(10, 24, 19, 0.36);
}

.route-template-save-card[open] summary {
    display: none;
}

.route-template-save-card[open] .route-template-create-form {
    width: min(100%, 34rem);
    padding: 1rem;
    border: 1px solid var(--pf-border);
    border-radius: 18px;
    background: var(--pf-surface);
    box-shadow: 0 26px 60px rgba(10, 24, 19, 0.22);
}

.route-template-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
}

.route-template-card {
    padding: 0.92rem;
    border-radius: 16px;
    border-color: var(--pf-border);
    background: var(--pf-surface);
    box-shadow: 0 8px 20px rgba(33, 42, 35, 0.04);
}

.route-template-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.route-template-actions form,
.route-template-actions .button {
    width: 100%;
}

.route-template-actions .button {
    justify-content: center;
}

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

    .delivery-map-column {
        position: static;
    }

    .delivery-map-column {
        order: 2;
    }

    .delivery-queue-section {
        order: 1;
    }
}

@media (max-width: 920px) {
    .delivery-route-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .delivery-route-header .delivery-hero-actions {
        justify-content: flex-start;
    }

    .delivery-overview {
        grid-template-columns: 1fr;
    }

    .next-delivery-actions {
        grid-template-columns: 1fr;
    }

    .delivery-advanced-panel .delivery-filter-bar {
        grid-template-columns: 1fr;
    }

    .route-template-premium-header,
    .delivery-history-heading,
    .delivery-map-header {
        display: grid;
    }
}

@media (max-width: 640px) {
    .delivery-page {
        max-width: min(100%, calc(100vw - 0.7rem));
    }

    .delivery-poll-panel,
    .delivery-route-header,
    .next-delivery-card,
    .today-stops-panel,
    .delivery-route-workspace,
    .delivery-advanced-panel,
    .delivery-history-panel,
    .route-template-panel {
        border-radius: 14px;
    }

    .delivery-poll-panel {
        padding: 0.7rem;
    }

    .next-delivery-details div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .today-stops-grid {
        grid-template-columns: 1fr;
    }

    .today-stop-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .today-stop-actions {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr;
        justify-items: stretch;
    }

    .today-stop-actions .button {
        justify-content: center;
    }

    .route-template-actions {
        grid-template-columns: 1fr;
    }
}

.danger-confirmation {
    display: grid;
    gap: 1rem;
}

.danger-confirmation summary {
    list-style: none;
}

.danger-confirmation summary::-webkit-details-marker {
    display: none;
}

.danger-confirmation-trigger {
    width: fit-content;
}

.danger-confirmation-banner {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(141, 59, 44, 0.18);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 244, 241, 0.98), rgba(255, 251, 249, 0.94));
}

.danger-confirmation-banner strong {
    color: var(--rosewood);
    font-size: 0.96rem;
}

.danger-confirmation-banner p {
    margin: 0.35rem 0 0;
    color: var(--ink);
    line-height: 1.5;
}

.danger-confirmation-actions {
    display: flex;
    justify-content: flex-start;
}

.route-toolbar {
    margin-bottom: 1rem;
}

.checkbox-chip {
    width: fit-content;
    margin-bottom: 0.85rem;
    background: rgba(47, 124, 98, 0.1);
    color: var(--leaf);
}

.checkbox-chip input {
    accent-color: var(--leaf);
}

.checkbox-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-chip-group .checkbox-chip {
    margin-bottom: 0;
}

.table-inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.table-inline-actions form {
    margin: 0;
}

.auth-shell {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(520px, 100%);
    padding: 2rem;
}

.auth-legal-note {
    margin-top: 1rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.data-table th,
.data-table td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--ink-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.button-small {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
}

.inventory-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
    background:
        linear-gradient(135deg, rgba(47, 124, 98, 0.12), rgba(255, 248, 241, 0.9) 46%, rgba(218, 166, 77, 0.2)),
        var(--surface);
    overflow: hidden;
}

.inventory-page .page-shell {
    gap: 1.35rem;
}

.inventory-page:not(.inventory-page-supplies) .page-shell {
    width: min(1960px, calc(100vw - 1.5rem));
    gap: clamp(0.9rem, 1.15vw, 1.25rem);
}

.inventory-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.inventory-switcher-link {
    display: grid;
    gap: 0.22rem;
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: rgba(255, 251, 246, 0.86);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(34, 25, 16, 0.05);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.inventory-switcher-link:hover,
.inventory-switcher-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(47, 124, 98, 0.18);
    box-shadow: 0 16px 30px rgba(34, 25, 16, 0.08);
}

.inventory-switcher-link span {
    font-size: 1rem;
    font-weight: 800;
}

.inventory-switcher-link small {
    color: var(--ink-soft);
}

.inventory-switcher-link.is-active {
    background:
        linear-gradient(135deg, rgba(47, 124, 98, 0.12), rgba(255, 248, 241, 0.96) 58%, rgba(218, 166, 77, 0.16)),
        var(--surface);
    border-color: rgba(47, 124, 98, 0.2);
    box-shadow: 0 18px 34px rgba(34, 25, 16, 0.09);
}

.inventory-hero-copy {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.inventory-hero-aside {
    display: grid;
    gap: 0.85rem;
}

.inventory-hero-aside-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(25, 51, 43, 0.1);
    background: rgba(255, 253, 249, 0.88);
}

.inventory-hero-aside-card span,
.inventory-ranking-item span,
.inventory-trend-metrics span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-hero-aside-card strong {
    font-size: 1.6rem;
    line-height: 1;
}

.inventory-hero-aside-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.inventory-hero-aside-card-soft {
    background: rgba(244, 234, 223, 0.72);
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-panel {
    grid-template-columns: minmax(0, 1.2fr) minmax(520px, 0.8fr);
    align-items: center;
    padding: clamp(1.25rem, 1.8vw, 1.8rem);
    background:
        linear-gradient(110deg, rgba(255, 252, 248, 0.96), rgba(255, 248, 241, 0.9) 58%, rgba(244, 234, 223, 0.78)),
        var(--surface);
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-copy {
    gap: 0.65rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-copy h1 {
    max-width: 16ch;
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-copy .section-copy {
    max-width: 58rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.inventory-page:not(.inventory-page-supplies) .inventory-hero-aside-card {
    min-height: 8.25rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 253, 249, 0.9);
    box-shadow: 0 12px 28px rgba(42, 31, 20, 0.06);
}

.inventory-hero-panel-supplies {
    background:
        linear-gradient(135deg, rgba(21, 86, 74, 0.12), rgba(252, 248, 243, 0.96) 48%, rgba(173, 112, 49, 0.2)),
        var(--surface);
}

.inventory-hero-aside-supplies .inventory-hero-aside-card-soft {
    background: rgba(243, 239, 230, 0.88);
}

.inventory-metric-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.9rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(0.75rem, 1vw, 1rem);
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value"
        "icon note";
    column-gap: 0.85rem;
    align-items: center;
    min-height: 6.7rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 252, 248, 0.9);
    box-shadow: 0 16px 34px rgba(44, 33, 22, 0.07);
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card span {
    grid-area: label;
    display: flex;
    align-items: center;
    gap: 0;
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card .pf-icon {
    grid-area: icon;
    width: 2.6rem;
    height: 2.6rem;
    margin-right: 0.75rem;
    padding: 0.7rem;
    border-radius: 999px;
    color: var(--leaf);
    background: rgba(47, 124, 98, 0.1);
    box-shadow: inset 0 0 0 1px rgba(47, 124, 98, 0.08);
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card strong {
    grid-area: value;
    margin-top: 0.15rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-note {
    grid-area: note;
    max-width: 20ch;
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-alert .pf-icon,
.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .inventory-metric-aging .pf-icon {
    color: #9a6a16;
    background: rgba(213, 160, 63, 0.14);
}

.inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .inventory-metric-critical .pf-icon {
    color: #9a3f34;
    background: rgba(186, 90, 77, 0.14);
}

.inventory-metric-aging {
    background: linear-gradient(180deg, #fff8e7, #f7efdc);
}

.inventory-metric-critical {
    background: linear-gradient(180deg, #fff3ef, #f5e3dc);
}

.inventory-action-panel {
    background:
        linear-gradient(135deg, rgba(47, 124, 98, 0.08), rgba(255, 248, 241, 0.96) 42%, rgba(218, 166, 77, 0.12)),
        var(--surface);
}

.inventory-insights-placeholder-panel,
.inventory-insights-stage,
.inventory-command-panel {
    background:
        linear-gradient(135deg, rgba(47, 124, 98, 0.08), rgba(255, 248, 241, 0.96) 42%, rgba(218, 166, 77, 0.12)),
        var(--surface);
}

.inventory-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}

.inventory-command-main,
.inventory-command-filter {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.inventory-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.inventory-category-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 1fr);
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.inventory-category-chip {
    display: grid;
    gap: 0.26rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: rgba(255, 251, 246, 0.92);
    color: inherit;
    text-decoration: none;
}

.inventory-category-chip strong {
    font-size: 1.45rem;
    line-height: 1;
}

.inventory-category-chip small {
    color: var(--ink-soft);
}

.inventory-category-chip.is-active {
    border-color: rgba(47, 124, 98, 0.2);
    box-shadow: inset 0 3px 0 #2f7c62;
}

.inventory-category-empty {
    min-width: 280px;
}

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

.inventory-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
    gap: 1.25rem;
    align-items: start;
}

.inventory-page:not(.inventory-page-supplies) .inventory-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: clamp(1rem, 1.3vw, 1.35rem);
}

.inventory-page:not(.inventory-page-supplies) .inventory-workspace,
.inventory-page:not(.inventory-page-supplies) .inventory-primary-column,
.inventory-page:not(.inventory-page-supplies) .inventory-main-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-main-panel > *,
.inventory-page:not(.inventory-page-supplies) .table-wrap {
    min-width: 0;
}

.inventory-page:not(.inventory-page-supplies) .table-wrap {
    max-width: 100%;
    overflow-x: visible;
}

.inventory-primary-column {
    display: grid;
    gap: clamp(0.9rem, 1.15vw, 1.2rem);
    min-width: 0;
}

.inventory-sidebar {
    display: grid;
    gap: 1.25rem;
    align-self: start;
}

.inventory-page:not(.inventory-page-supplies) .inventory-sidebar {
    gap: 1rem;
}

.inventory-section-header {
    align-items: start;
    margin-bottom: 1.4rem;
}

.inventory-stock-header {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.05rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-stock-header > *,
.inventory-page:not(.inventory-page-supplies) .inventory-stock-filter,
.inventory-page:not(.inventory-page-supplies) .inventory-stock-filter .field,
.inventory-page:not(.inventory-page-supplies) .inventory-stock-filter :is(input, select) {
    min-width: 0;
    max-width: 100%;
}

.inventory-stock-title {
    margin-bottom: 0;
}

.inventory-stock-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 253, 249, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.inventory-stock-filter .field {
    margin: 0;
}

.inventory-stock-filter label {
    font-size: 0.72rem;
}

.inventory-stock-filter-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.inventory-stock-filter-actions .button {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 2.55rem;
    padding: 0.58rem 1rem;
    white-space: nowrap;
}

.inventory-table {
    min-width: 1080px;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table {
    min-width: 0;
    table-layout: fixed;
    font-size: clamp(0.76rem, 0.32vw + 0.68rem, 0.88rem);
}

.inventory-page:not(.inventory-page-supplies) .flower-col-name {
    width: 11%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-color {
    width: 7%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-price {
    width: 8%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-arrivals,
.inventory-page:not(.inventory-page-supplies) .flower-col-available {
    width: 8%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-reorder {
    width: 6%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-sold {
    width: 7%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-age {
    width: 8%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-freshness {
    width: 22%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-status {
    width: 13%;
}

.inventory-page:not(.inventory-page-supplies) .flower-col-actions {
    width: 10%;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table th,
.inventory-page:not(.inventory-page-supplies) .inventory-table td {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table thead th {
    white-space: nowrap;
    font-size: clamp(0.62rem, 0.18vw + 0.58rem, 0.74rem);
    letter-spacing: 0.035em;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-inline-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 0.38rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-actions-cell .button {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.48rem 0.52rem;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-actions-cell .pf-icon {
    flex: 0 0 auto;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-flower-cell {
    gap: 0.16rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-flower-cell strong {
    font-size: 0.94em;
    line-height: 1.15;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-flower-cell span {
    font-size: 0.74em;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-cell-inline,
.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-stock-breakdown-cell > strong {
    font-variant-numeric: tabular-nums;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-stock-breakdown {
    gap: 0.25rem;
    margin-top: 0.32rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-breakdown-pill,
.inventory-page:not(.inventory-page-supplies) .inventory-table .status-pill {
    padding: 0.18rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.12;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .freshness-indicator {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.42rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .freshness-light {
    width: 0.72rem;
    height: 0.72rem;
    box-shadow: 0 0 0 4px rgba(47, 124, 98, 0.1);
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .freshness-indicator strong {
    font-size: 0.78rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .freshness-indicator small,
.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-threshold-note {
    font-size: 0.68rem;
    line-height: 1.24;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-threshold-note {
    margin-top: 0.34rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table .inventory-status-stack {
    gap: 0.28rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-main-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-insights-placeholder-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-insights-stage,
.inventory-page:not(.inventory-page-supplies) .inventory-recipes-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-attention-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-legend-panel,
.inventory-page:not(.inventory-page-supplies) .inventory-sidebar-actions-panel {
    background: rgba(255, 252, 248, 0.92);
    border-color: rgba(25, 51, 43, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 18px 38px rgba(42, 31, 20, 0.07);
}

.inventory-page:not(.inventory-page-supplies) .inventory-main-panel {
    padding: clamp(1rem, 1.3vw, 1.35rem);
}

.inventory-page:not(.inventory-page-supplies) .inventory-table th,
.inventory-page:not(.inventory-page-supplies) .inventory-table td {
    padding-block: 0.78rem;
    padding-inline: 0.42rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table tbody tr {
    transition: background-color 160ms ease;
}

.inventory-page:not(.inventory-page-supplies) .inventory-table tbody tr:hover {
    background: rgba(47, 124, 98, 0.045);
}

.inventory-row-critical {
    background: rgba(186, 90, 77, 0.05);
}

.inventory-row-warning {
    background: rgba(213, 160, 63, 0.06);
}

.inventory-flower-cell {
    display: grid;
    gap: 0.22rem;
}

.inventory-flower-cell span,
.inventory-threshold-note,
.inventory-attention-item p,
.inventory-empty-state p,
.inventory-legend-item p,
.inventory-trend-item p {
    color: var(--ink-soft);
}

.inventory-stock-breakdown-cell strong {
    display: block;
}

.inventory-stock-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.inventory-breakdown-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.inventory-breakdown-fresh {
    background: rgba(47, 124, 98, 0.1);
    color: #1f5a46;
}

.inventory-breakdown-warning {
    background: rgba(213, 160, 63, 0.14);
    color: #7b5713;
}

.inventory-breakdown-critical {
    background: rgba(186, 90, 77, 0.14);
    color: #7f352e;
}

.inventory-flower-cell span {
    font-size: 0.84rem;
}

.freshness-indicator {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.65rem;
    min-width: 168px;
}

.freshness-light {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.2);
    box-shadow: 0 0 0 5px rgba(25, 51, 43, 0.06);
}

.freshness-light-static {
    flex: 0 0 auto;
}

.freshness-indicator strong {
    display: block;
    font-size: 0.88rem;
}

.freshness-indicator small {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.freshness-fresh .freshness-light,
.freshness-light.freshness-fresh {
    background: #2f7c62;
    box-shadow: 0 0 0 5px rgba(47, 124, 98, 0.12);
}

.freshness-warning .freshness-light,
.freshness-light.freshness-warning {
    background: #d5a03f;
    box-shadow: 0 0 0 5px rgba(213, 160, 63, 0.14);
}

.freshness-critical .freshness-light,
.freshness-light.freshness-critical {
    background: #ba5a4d;
    box-shadow: 0 0 0 5px rgba(186, 90, 77, 0.15);
}

.freshness-out .freshness-light {
    background: #94a199;
    box-shadow: 0 0 0 5px rgba(94, 110, 102, 0.12);
}

.freshness-unknown .freshness-light {
    background: #6d8d83;
    box-shadow: 0 0 0 5px rgba(109, 141, 131, 0.12);
}

.inventory-threshold-note {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.76rem;
    line-height: 1.35;
}

.inventory-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inventory-inline-actions {
    justify-content: flex-end;
}

.inventory-main-panel-supplies,
.inventory-supply-decision-panel,
.inventory-page-supplies .inventory-attention-panel,
.inventory-page-supplies .inventory-legend-panel {
    background:
        linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(251, 246, 239, 0.96)),
        var(--surface);
}

.inventory-page-supplies .inventory-workspace,
.inventory-page-supplies .inventory-main-panel-supplies,
.inventory-page-supplies .inventory-main-panel-supplies > *,
.inventory-page-supplies .table-wrap {
    min-width: 0;
}

.inventory-page-supplies .table-wrap {
    max-width: 100%;
    overflow-x: visible;
}

.inventory-table-supplies {
    min-width: 0;
    table-layout: fixed;
    font-size: clamp(0.74rem, 0.3vw + 0.68rem, 0.86rem);
}

.inventory-table-supplies .supply-col-item {
    width: 24%;
}

.inventory-table-supplies .supply-col-sku {
    width: 9%;
}

.inventory-table-supplies .supply-col-type {
    width: 8%;
}

.inventory-table-supplies .supply-col-stock {
    width: 9%;
}

.inventory-table-supplies .supply-col-buffer,
.inventory-table-supplies .supply-col-usage {
    width: 6%;
}

.inventory-table-supplies .supply-col-location {
    width: 15%;
}

.inventory-table-supplies .supply-col-status {
    width: 9%;
}

.inventory-table-supplies .supply-col-actions {
    width: 14%;
}

.inventory-table-supplies th,
.inventory-table-supplies td {
    padding-block: 0.7rem;
    padding-inline: 0.42rem;
    vertical-align: middle;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.inventory-table-supplies th {
    white-space: nowrap;
    font-size: clamp(0.62rem, 0.16vw + 0.58rem, 0.72rem);
    letter-spacing: 0.035em;
}

.inventory-table-supplies tbody tr {
    transition:
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.inventory-table-supplies tbody tr:hover {
    background: rgba(47, 124, 98, 0.045);
    box-shadow: inset 3px 0 0 rgba(47, 124, 98, 0.24);
}

.supply-item-cell {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.supply-item-heading {
    display: flex;
    align-items: center;
    gap: 0.36rem;
    flex-wrap: wrap;
    min-width: 0;
}

.supply-item-heading strong,
.supply-location-text {
    overflow-wrap: anywhere;
}

.supply-item-heading span,
.supply-type-pill,
.supply-stock-note {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.2;
}

.supply-item-heading span {
    flex: 0 0 auto;
    padding: 0.18rem 0.48rem;
    background: rgba(25, 51, 43, 0.07);
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.supply-type-pill {
    padding: 0.22rem 0.58rem;
    background: rgba(238, 232, 221, 0.88);
    color: #52625a;
    font-size: 0.75rem;
}

.supply-sku-code {
    display: inline-block;
    max-width: 100%;
    padding: 0.2rem 0.38rem;
    border: 1px solid rgba(25, 51, 43, 0.1);
    border-radius: 0.45rem;
    background: rgba(255, 253, 249, 0.86);
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.74rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.supply-stock-cell {
    display: grid;
    justify-items: start;
    gap: 0.25rem;
}

.supply-stock-cell strong,
.supply-metric-column strong {
    font-size: 1.02rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.supply-stock-note {
    padding: 0.18rem 0.52rem;
    font-size: 0.75rem;
}

.supply-stock-note-ok {
    background: rgba(47, 124, 98, 0.11);
    color: #1f5a46;
}

.supply-stock-note-warning {
    background: rgba(213, 160, 63, 0.16);
    color: #7b5713;
}

.supply-stock-note-critical {
    background: rgba(186, 90, 77, 0.16);
    color: #7f352e;
}

.inventory-table-supplies .inventory-status-stack {
    gap: 0.35rem;
}

.inventory-table-supplies .status-pill {
    white-space: nowrap;
}

.inventory-table-supplies .inventory-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: flex-start;
    gap: 0.36rem;
}

.inventory-table-supplies .inventory-actions-cell .button {
    width: 100%;
    min-height: 2.28rem;
    padding: 0.46rem 0.48rem;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
}

.inventory-table-supplies .inventory-actions-cell .button-success {
    padding-inline: 0.65rem;
}

.inventory-table-supplies .inventory-actions-cell .button-ghost {
    padding-inline: 0.6rem;
}

.inventory-ranking-list-compact .inventory-ranking-item {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.freshness-pill {
    border: 1px solid transparent;
}

.freshness-pill-fresh {
    background: rgba(47, 124, 98, 0.12);
    color: #1f5a46;
    border-color: rgba(47, 124, 98, 0.18);
}

.freshness-pill-warning {
    background: rgba(213, 160, 63, 0.16);
    color: #7b5713;
    border-color: rgba(213, 160, 63, 0.2);
}

.freshness-pill-critical {
    background: rgba(186, 90, 77, 0.16);
    color: #7f352e;
    border-color: rgba(186, 90, 77, 0.2);
}

.freshness-pill-mixed {
    background: rgba(45, 159, 177, 0.14);
    color: #1c6672;
    border-color: rgba(45, 159, 177, 0.22);
}

.inventory-filter-panel,
.inventory-attention-panel,
.inventory-legend-panel,
.inventory-management-panel {
    background: rgba(255, 248, 241, 0.96);
}

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

.inventory-attention-list,
.inventory-legend-list,
.inventory-ranking-list,
.inventory-trend-list {
    display: grid;
    gap: 0.8rem;
}

.inventory-sidebar-actions-panel {
    display: grid;
    gap: 0.9rem;
}

.inventory-sidebar-actions-panel .inventory-section-header {
    margin-bottom: 0;
}

.inventory-sidebar-action-strip {
    display: grid;
    gap: 0.65rem;
}

.inventory-sidebar-action-strip .button {
    width: 100%;
    justify-content: center;
}

.inventory-sidebar-action-strip .button-success {
    box-shadow: 0 14px 26px rgba(29, 97, 75, 0.16);
}

.inventory-page:not(.inventory-page-supplies) .inventory-attention-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.85rem 0.9rem;
}

.inventory-page:not(.inventory-page-supplies) .inventory-attention-meta {
    justify-content: space-between;
}

.inventory-page:not(.inventory-page-supplies) .inventory-attention-meta .button-small {
    margin-left: auto;
}

.inventory-attention-item,
.inventory-legend-item,
.inventory-trend-item {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.inventory-attention-item strong,
.inventory-legend-item strong,
.inventory-ranking-item strong,
.inventory-trend-item strong {
    display: block;
}

.inventory-attention-item p,
.inventory-empty-state p,
.inventory-legend-item p,
.inventory-trend-item p {
    margin: 0.3rem 0 0;
    line-height: 1.45;
}

.inventory-attention-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.inventory-empty-state {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(47, 124, 98, 0.08);
    border: 1px dashed rgba(47, 124, 98, 0.22);
}

.inventory-empty-state strong {
    display: block;
}

.inventory-recent-movement-list {
    display: grid;
    gap: 0.8rem;
}

.inventory-recent-movement-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.inventory-recent-movement-item p,
.inventory-recent-movement-meta small {
    margin: 0.28rem 0 0;
    color: var(--ink-soft);
}

.inventory-recent-movement-meta {
    display: grid;
    gap: 0.35rem;
    justify-items: end;
    text-align: right;
}

.inventory-legend-item {
    grid-template-columns: auto 1fr;
    align-items: start;
}

.inventory-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

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

.inventory-insights-stage {
    display: grid;
    gap: 1.2rem;
}

.inventory-insights-actions {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    flex-wrap: wrap;
}

.inventory-insights-actions .section-copy {
    max-width: 42rem;
}

.inventory-metric-strip-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.inventory-ranking-item {
    display: grid;
    gap: 0.55rem;
}

.inventory-ranking-copy {
    min-width: 0;
}

.inventory-ranking-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory-ranking-share {
    flex: 0 0 auto;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    background: var(--chart-pill-bg);
    color: var(--chart-pill-copy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.inventory-ranking-bar {
    height: 0.8rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18)),
        var(--chart-track);
    overflow: hidden;
    border: 1px solid rgba(25, 51, 43, 0.06);
}

.inventory-ranking-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--chart-fill-solid), var(--chart-fill-end));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.inventory-trend-item {
    grid-template-columns: minmax(0, 1.3fr) auto;
    align-items: center;
}

.inventory-trend-metrics {
    display: grid;
    gap: 0.35rem;
    justify-items: end;
    text-align: right;
}

.inventory-recent-activity-modal-card {
    display: grid;
    gap: 1rem;
}

.inventory-recent-activity-modal-card .table-wrap {
    max-height: min(60vh, 720px);
    overflow: auto;
}

.inventory-form-grid {
    gap: 1rem;
}

.inventory-form-grid .field-span-2 {
    grid-column: span 2;
}

.inventory-lot-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.inventory-flower-hero {
    background:
        linear-gradient(135deg, rgba(255, 251, 246, 0.98), rgba(255, 247, 239, 0.96)),
        var(--surface);
    border-color: rgba(25, 51, 43, 0.1);
    box-shadow: 0 18px 40px rgba(34, 25, 16, 0.1);
}

.inventory-flower-hero .eyebrow,
.inventory-lot-lane-head .eyebrow,
.inventory-lot-summary-card span {
    color: #7f5038;
}

.inventory-flower-hero .section-copy {
    color: #627168;
    max-width: 44rem;
}

.inventory-lot-summary-card {
    display: grid;
    gap: 0.3rem;
    min-height: 0;
    padding: 0.9rem 1rem;
    align-content: start;
    background: rgba(255, 252, 248, 0.97);
    border: 1px solid rgba(25, 51, 43, 0.08);
    box-shadow: 0 14px 30px rgba(44, 33, 22, 0.08);
    content-visibility: visible;
    contain: none;
    contain-intrinsic-size: auto;
}

.inventory-lot-summary-card span,
.inventory-lot-card-metrics span {
    color: #6d5a4d;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-lot-summary-card strong {
    margin: 0.2rem 0 0;
    font-size: 2.35rem;
    line-height: 0.95;
    color: var(--ink);
}

.inventory-lot-summary-card p,
.inventory-lot-card-head p,
.inventory-lot-card-copy {
    margin: 0;
    color: #627168;
    line-height: 1.45;
}

.inventory-lot-summary-card p {
    max-width: 22ch;
    font-size: 0.94rem;
}

.inventory-lot-summary-card-fresh {
    background: linear-gradient(180deg, #f3faf6, #fffdf9 72%);
    border-color: rgba(47, 124, 98, 0.16);
    box-shadow:
        inset 0 4px 0 #2f7c62,
        0 14px 30px rgba(44, 33, 22, 0.08);
}

.inventory-lot-summary-card-warning {
    background: linear-gradient(180deg, #fff9ef, #fffdf9 72%);
    border-color: rgba(213, 160, 63, 0.2);
    box-shadow:
        inset 0 4px 0 #d5a03f,
        0 14px 30px rgba(44, 33, 22, 0.08);
}

.inventory-lot-summary-card-critical {
    background: linear-gradient(180deg, #fff4f1, #fffdf9 72%);
    border-color: rgba(186, 90, 77, 0.2);
    box-shadow:
        inset 0 4px 0 #ba5a4d,
        0 14px 30px rgba(44, 33, 22, 0.08);
}

.inventory-lot-summary-card-neutral {
    background: linear-gradient(180deg, #fffdfa, #fffaf5);
    border-color: rgba(25, 51, 43, 0.08);
    box-shadow:
        inset 0 4px 0 #d8cbbd,
        0 14px 30px rgba(44, 33, 22, 0.08);
}

.inventory-flower-form-panel,
.inventory-flower-table-panel,
.inventory-flower-audit-panel,
.inventory-flower-decision-panel {
    background: rgba(255, 251, 246, 0.97);
    border-color: rgba(25, 51, 43, 0.08);
}

.inventory-flower-form-panel {
    box-shadow: 0 16px 34px rgba(45, 31, 21, 0.08);
}

.inventory-lot-decision-panel {
    display: grid;
    gap: 1.2rem;
}

.inventory-flower-decision-panel {
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(251, 246, 239, 0.96)),
        var(--surface);
    box-shadow: 0 16px 36px rgba(45, 31, 21, 0.08);
}

.inventory-flower-decision-panel .section-copy,
.inventory-lot-lane-head,
.inventory-lot-card-copy {
    color: #647166;
}

.inventory-supply-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.inventory-supply-stack-card {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.05rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: rgba(255, 253, 249, 0.9);
}

.inventory-supply-stack-card span {
    color: #6d5a4d;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-supply-stack-card strong {
    font-size: 2rem;
    line-height: 1;
}

.inventory-form-grid-supplies textarea,
.inventory-flower-form-panel textarea {
    min-height: 112px;
}

.inventory-lot-lane-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.inventory-lot-lane {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 0.2rem;
}

.inventory-lot-lane:first-child {
    border-right: 1px solid rgba(25, 51, 43, 0.08);
    padding-right: 1rem;
}

.inventory-lot-lane:last-child {
    padding-left: 1rem;
}

.inventory-lot-lane-head {
    display: grid;
    gap: 0.25rem;
}

.inventory-lot-lane-head h3 {
    margin: 0;
}

.inventory-lot-card-list {
    display: grid;
    gap: 0.85rem;
}

.inventory-lot-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: rgba(255, 253, 250, 0.98);
    box-shadow: 0 8px 20px rgba(43, 30, 19, 0.05);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.inventory-lot-card-fresh {
    border-color: rgba(47, 124, 98, 0.18);
    background: linear-gradient(180deg, #f6fbf7, #fffdfb 70%);
    box-shadow:
        inset 3px 0 0 #2f7c62,
        0 8px 20px rgba(43, 30, 19, 0.05);
}

.inventory-lot-card-warning {
    border-color: rgba(213, 160, 63, 0.2);
    background: linear-gradient(180deg, #fffaf2, #fffdfb 70%);
    box-shadow:
        inset 3px 0 0 #d5a03f,
        0 8px 20px rgba(43, 30, 19, 0.05);
}

.inventory-lot-card-critical {
    border-color: rgba(186, 90, 77, 0.2);
    background: linear-gradient(180deg, #fff5f2, #fffdfb 70%);
    box-shadow:
        inset 3px 0 0 #ba5a4d,
        0 8px 20px rgba(43, 30, 19, 0.05);
}

.inventory-lot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(43, 30, 19, 0.08);
}

.inventory-lot-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: start;
}

.inventory-lot-card-head strong,
.inventory-lot-card-metrics strong {
    display: block;
    color: var(--ink);
}

.inventory-lot-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.inventory-lot-card-metrics div {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
}

.inventory-lot-card .inline-actions {
    flex-wrap: wrap;
}

/* Single FIFO "sell line": oldest stock on top (sells first), newest below. */
.inventory-sale-line {
    display: grid;
    gap: 0.55rem;
}

.inventory-sale-flow-marker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7f5038;
}

.inventory-sale-flow-marker-bottom {
    color: #647166;
}

.inventory-sale-line-list {
    display: grid;
    gap: 0.6rem;
    position: relative;
}

/* Visual spine that reinforces the top-to-bottom consumption order. */
.inventory-sale-line-list::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    left: -0.55rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(186, 90, 77, 0.5), rgba(47, 124, 98, 0.45));
}

.inventory-sale-row-title {
    display: grid;
    gap: 0.2rem;
}

.inventory-sale-row-next {
    box-shadow:
        inset 3px 0 0 var(--leaf),
        0 12px 26px rgba(43, 30, 19, 0.1);
}

.inventory-sale-badge {
    justify-self: start;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1f5a46;
    background: rgba(47, 124, 98, 0.16);
    border: 1px solid rgba(47, 124, 98, 0.24);
}

.inventory-sale-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(25, 51, 43, 0.08);
    background: rgba(255, 252, 248, 0.97);
}

.inventory-sale-summary div {
    display: grid;
    gap: 0.2rem;
}

.inventory-sale-summary span {
    color: #6d5a4d;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-sale-summary strong {
    font-size: 1.6rem;
    line-height: 1;
    color: var(--ink);
}

.inventory-sale-summary-ok strong {
    color: #1f5a46;
}

.inventory-sale-summary-depurar strong {
    color: #7f352e;
}

@media (max-width: 1080px) {
    .inventory-sale-summary {
        grid-template-columns: 1fr;
    }
}

.inventory-flower-table-panel .section-copy,
.inventory-flower-audit-panel .section-copy {
    color: #647166;
}

@media (max-width: 1200px) {
    .order-detail-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .order-detail-actions {
        justify-content: flex-start;
    }

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

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

    .florist-brief-section {
        grid-column: 1 / -1;
    }

    .order-detail-secondary-grid {
        grid-template-columns: 1fr;
    }

    .order-payment-summary {
        position: static;
    }

    .order-detail-disclosure summary {
        grid-template-columns: auto minmax(7rem, 0.42fr) repeat(2, minmax(0, 1fr)) auto;
    }

}

@media (min-width: 1081px) {
    .inventory-sidebar {
        position: sticky;
        top: 5.6rem;
    }
}

@media (max-width: 1279px) {
    .inventory-page:not(.inventory-page-supplies) .inventory-workspace {
        grid-template-columns: 1fr;
    }

    .inventory-page-supplies .inventory-workspace {
        grid-template-columns: 1fr;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .inventory-page-supplies .inventory-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-stock-header {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 1080px) {
    .inventory-page:not(.inventory-page-supplies) .inventory-sidebar,
    .inventory-page-supplies .inventory-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        grid-template-areas: "brand nav user";
        align-items: center;
        gap: 0.55rem;
        padding-inline: 0.95rem;
    }

    .brand-block {
        max-width: none;
    }

    .brand-name {
        font-size: 1.12rem;
    }

    .nav-link {
        padding-inline: 0.52rem;
        font-size: 0.8rem;
    }

    .user-chip-name {
        max-width: 7rem;
    }

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

    .inventory-metric-strip,
    .inventory-metric-strip-insights,
    .inventory-command-panel,
    .customer-csv-modal-layout,
    .product-csv-modal-layout,
    .inventory-secondary-grid,
    .inventory-insights-grid,
    .inventory-workspace,
    .inventory-hero-panel,
    .inventory-lot-summary-grid,
    .inventory-lot-lane-grid {
        grid-template-columns: 1fr;
    }

    .inventory-lot-lane:first-child {
        border-right: 0;
        padding-right: 0.2rem;
    }

    .inventory-lot-lane:last-child {
        padding-left: 0.2rem;
    }

    .inventory-action-strip,
    .inventory-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .inventory-stock-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

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

    .inventory-stock-filter-actions {
        justify-content: flex-start;
    }

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

    .order-total-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-primary {
        grid-template-columns: 1fr auto;
    }

    .inventory-filter-form {
        grid-template-columns: 1fr;
    }

    .inventory-insights-actions {
        align-items: stretch;
    }

    .inventory-insights-actions .button {
        width: 100%;
    }

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

    .sales-insights-actions {
        align-items: stretch;
    }

    .field-search-primary {
        grid-column: 1 / -1;
    }

    .dashboard-filter-actions {
        justify-content: flex-start;
    }

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

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

    .platform-search,
    .board-filter-form,
    .product-management-grid,
    .customer-management-grid,
    .sales-analysis-grid,
    .delivery-filter-form,
    .route-template-layout,
    .route-preview-panel,
    .florist-brief-grid,
    .detail-grid,
    .card-actions,
    .compact-form-grid,
    .order-intake-grid,
    .order-payment-grid,
    .executive-grid,
    .status-control-form {
        grid-template-columns: 1fr;
    }

    .weekly-days-strip {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.65rem;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .week-day-card-shell {
        flex: 0 0 clamp(16rem, 46vw, 22rem);
        min-width: 0;
        scroll-snap-align: start;
    }

    .kanban-board {
        grid-template-columns: repeat(5, minmax(290px, 1fr));
    }

    .board-filter-form .filter-actions,
    .delivery-filter-form .filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

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

@media (min-width: 921px) and (max-width: 1199px) {
    .dashboard-workspace .board-workspace .kanban-board {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.55rem;
        overflow-x: hidden;
    }

    .dashboard-workspace .board-workspace .kanban-lane {
        padding: 0.58rem;
    }

    .dashboard-workspace .board-workspace .lane-header {
        gap: 0.45rem;
    }

    .dashboard-workspace .board-workspace .lane-header h3 {
        font-size: 0.98rem;
    }

    .dashboard-workspace .board-workspace .lane-header p,
    .dashboard-workspace .board-workspace .lane-badge {
        font-size: 0.68rem;
    }
}

@media (max-width: 920px) {
    .page-shell {
        width: min(1600px, calc(100% - 1.1rem));
    }

    .ops-page {
        width: min(100%, calc(100vw - 1rem));
        gap: 1rem;
        padding: 0.95rem;
        border-radius: 1.5rem;
    }

    .ops-hero,
    .ops-page > .hero-panel {
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
    }

    .ops-hero .hero-actions,
    .ops-page > .hero-panel .hero-actions {
        justify-content: flex-start;
        padding-top: 0;
    }

    .dashboard-workspace {
        width: min(100%, calc(100vw - 1rem));
        gap: 0.95rem;
        padding: 0.9rem;
        border-radius: 1.5rem;
    }

    .dashboard-workspace .dashboard-heading {
        padding-bottom: 0.9rem;
    }

    .hero-panel,
    .panel,
    .poll-panel,
    .incident-panel,
    .auth-card {
        padding: 1.2rem;
    }

    .dashboard-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-meta {
        justify-content: flex-start;
    }

    .platform-search,
    .dashboard-filter-primary,
    .board-filter-form,
    .product-management-grid,
    .customer-management-grid,
    .sales-analysis-grid,
    .delivery-filter-form,
    .route-template-layout,
    .route-preview-panel,
    .florist-brief-grid,
    .detail-grid,
    .order-record,
    .card-actions,
    .compact-form-grid,
    .recurring-settings-grid,
    .recurring-occurrence-summary-grid,
    .order-intake-grid,
    .order-payment-grid,
    .executive-grid,
    .status-control-form,
    .form-grid,
    .history-filter-grid,
    .filter-form {
        grid-template-columns: 1fr;
    }

	    .order-payment-summary {
	        position: static;
	    }

    .order-detail-primary-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-disclosure summary {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .danger-zone-panel {
        grid-template-columns: 1fr;
        align-items: start;
    }

	    .route-toolbar,
	    .form-actions,
    .filter-actions,
    .status-control-form {
        align-items: stretch;
    }

    .advanced-filter-panel {
        min-width: 0;
    }

    .dashboard-filter-actions,
    .advanced-filter-toggle,
    .filter-actions-primary,
    .filter-actions-primary .button {
        width: 100%;
    }

    .dashboard-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .manufacturing-modal-grid {
        grid-template-columns: 1fr;
    }

    .advanced-filter-toggle,
    .filter-actions-primary .button {
        justify-content: center;
    }
}

@media (max-width: 760px) {
    body {
        background-position:
            center top,
            top left,
            top right,
            58% top,
            center;
        background-size:
            auto,
            900px 900px,
            760px 760px,
            cover,
            cover;
    }

    .topbar {
        padding: 0.72rem 0.85rem 0.82rem;
        gap: 0.7rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "nav"
            "user";
    }

    .brand-mark {
        width: 2.45rem;
        height: 2.45rem;
        padding: 0.1rem;
    }

    .brand-logo-image {
        width: 2.16rem;
        height: 2.16rem;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    body:not(.landing-page) .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand user"
            "nav nav";
        align-items: center;
        padding-block: 0.56rem 0.64rem;
    }

    body:not(.landing-page) .brand-block {
        max-width: none;
    }

    body:not(.landing-page) .nav-shell {
        grid-area: nav;
        gap: 0.45rem;
    }

    body:not(.landing-page) .nav-toggle {
        min-height: 2.75rem;
        padding: 0.72rem 0.9rem;
        border-radius: 0.9rem;
    }

    body:not(.landing-page) .user-block {
        width: auto;
        justify-self: end;
    }

    body:not(.landing-page) .account-menu,
    body:not(.landing-page) .user-chip {
        width: auto;
    }

    body:not(.landing-page) .user-chip {
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0.3rem;
        justify-content: center;
    }

    body:not(.landing-page) .user-chip-copy {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body:not(.landing-page) .user-chip > .pf-icon {
        display: none;
    }

    .topbar,
    .dashboard-heading,
    .hero-panel,
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-shell {
        width: min(1600px, calc(100% - 0.7rem));
        margin-top: 0.9rem;
        gap: 1rem;
    }

    .ops-page {
        width: min(100%, calc(100vw - 0.5rem));
        gap: 0.9rem;
        padding: 0.7rem;
        border-radius: 1.25rem;
    }

    .ops-page :is(.panel, .poll-panel) {
        padding: 0.95rem;
    }

    .ops-hero h1,
    .ops-page > .hero-panel h1 {
        font-size: clamp(1.65rem, 8vw, 2rem);
    }

    .ops-hero .hero-actions .button,
    .ops-page > .hero-panel .hero-actions .button {
        width: 100%;
    }

    .dashboard-workspace {
        width: min(100%, calc(100vw - 0.5rem));
        gap: 0.8rem;
        padding: 0.7rem;
        border-radius: 1.25rem;
    }

    .dashboard-workspace .dashboard-heading {
        gap: 0.85rem;
        padding: 0.05rem 0.05rem 0.8rem;
    }

    .dashboard-workspace .dashboard-meta {
        align-items: stretch;
    }

    .dashboard-workspace .dashboard-badge,
    .dashboard-workspace .dashboard-meta .button {
        justify-content: center;
        width: 100%;
    }

    .dashboard-workspace .stage-overview-panel,
    .dashboard-workspace .dashboard-filter-panel,
    .dashboard-workspace .board-workspace,
    .dashboard-workspace .weekly-glance-panel {
        padding: 0.85rem;
        border-radius: 1rem;
    }

    .dashboard-workspace .board-filter-strip {
        padding: 0;
        border-radius: 0;
    }

    .hero-panel,
    .panel,
    .poll-panel,
    .incident-panel,
    .auth-card {
        padding: 1rem;
    }

    .hero-panel h1,
    .auth-card h1,
    .dashboard-heading h1 {
        font-size: clamp(1.8rem, 8vw, 2.45rem);
    }

	    .dashboard-heading > div:first-child {
	        padding: 0.9rem 1rem;
	    }

    .order-detail-hero h1 {
        font-size: clamp(1.9rem, 8vw, 2.35rem);
    }

    .order-detail-actions {
        align-items: stretch;
    }

    .order-action-button {
        min-height: 2.85rem;
    }

	    .florist-brief-header,
	    .florist-brief-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .metric-strip,
    .filter-form,
    .board-filter-form,
    .delivery-filter-form,
    .route-template-layout,
    .route-preview-panel,
    .history-filter-grid,
    .form-grid,
    .platform-search,
    .order-record,
    .info-rows div,
    .info-rows-two,
    .payment-rows div,
    .florist-brief-grid,
    .sales-kpi-strip,
    .sales-snapshot-grid,
    .order-product-line,
    .tenant-grid,
    .executive-grid,
    .detail-grid,
    .card-actions,
    .compact-form-grid,
    .recurring-settings-grid,
    .recurring-occurrence-summary-grid,
    .order-intake-grid,
    .order-payment-grid,
    .status-control-form,
    .incident-grid,
    .driver-grid,
    .stage-overview-legend {
        grid-template-columns: 1fr;
    }

    .stage-overview-item,
    .stage-overview-item:first-child,
    .stage-overview-item:last-child {
        padding: 0.65rem 0;
        border-left: 0;
        border-top: 1px solid rgba(25, 51, 43, 0.12);
    }

    .stage-overview-item:first-child {
        border-top: 0;
    }

	    .order-product-line-bouquet .product-quantity-card,
	    .order-product-line-bouquet .product-line-total {
	        justify-self: start;
	    }

    .order-detail-kpi {
        padding: 0.82rem;
    }

    .order-kpi-icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .product-line-heading {
        grid-template-columns: 1fr;
    }

    .order-detail-disclosure summary span:not(.order-disclosure-icon) {
        flex: 1 1 100%;
        display: block;
        white-space: normal;
    }

    .order-detail-disclosure .info-rows {
        padding: 0 0.95rem 1rem;
    }

    .danger-confirmation-trigger,
    .danger-confirmation-actions .button {
        width: 100%;
        justify-content: center;
    }

	    .bouquet-breakdown-table {
	        min-width: 0;
    }

    .bouquet-breakdown-table th,
    .bouquet-breakdown-table td {
        padding: 0.58rem 0.65rem;
    }

    .bouquet-breakdown-table thead th {
        font-size: 0.68rem;
    }

    .card-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr);
        gap: 0.55rem;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-shell {
        gap: 0.6rem;
    }

    .topnav {
        width: 100%;
        display: none;
        margin: 0;
        padding: 0.45rem;
        border: 1px solid rgba(255, 249, 243, 0.1);
        border-radius: 1rem;
        background: rgba(3, 18, 14, 0.18);
        grid-template-columns: 1fr;
        gap: 0.45rem;
        overflow: visible;
    }

    .nav-shell.is-open .topnav {
        display: grid;
    }

    .topnav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.85rem 1rem;
        border-color: rgba(255, 249, 243, 0.07);
    }

    .user-block {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .account-menu,
    .user-chip,
    .account-menu-panel,
    .account-menu-form,
    .account-menu-form .button-ghost {
        width: 100%;
    }

    body:not(.landing-page) .user-block {
        width: auto;
        flex-direction: row;
        align-items: center;
    }

    body:not(.landing-page) .account-menu,
    body:not(.landing-page) .user-chip {
        width: auto;
    }

    .button,
    .nav-link,
    .user-chip {
        justify-content: center;
    }

    .user-block .user-chip {
        justify-content: flex-start;
    }

    body:not(.landing-page) .user-block .user-chip {
        justify-content: center;
    }

    .button,
    .route-toolbar .button,
    .form-actions .button,
    .filter-actions .button,
    .hero-actions .button {
        width: 100%;
    }

    .hero-actions,
    .route-toolbar,
    .form-actions,
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .metric-card strong {
        font-size: 1.75rem;
    }

    .account-menu-panel {
        position: static;
        margin-top: 0.6rem;
    }

    body:not(.landing-page) .account-menu-panel {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: 0;
        width: min(20rem, calc(100vw - 1.5rem));
        margin-top: 0;
    }

    .metric-card,
    .order-card,
    .delivery-card,
    .incident-card,
    .tenant-card,
    .empty-card {
        padding: 0.95rem;
    }

    .message {
        width: 100%;
    }

    .mobile-list-view-prompt {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 2.9rem;
        padding: 0.78rem 0.9rem;
        border: 1px solid rgba(47, 124, 98, 0.22);
        border-radius: 0.95rem;
        background: rgba(238, 245, 241, 0.92);
        color: var(--ops-green-700);
        font-size: 0.9rem;
        font-weight: 850;
        text-align: center;
        box-shadow: 0 10px 22px rgba(47, 124, 98, 0.08);
    }

    .kanban-board {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(84vw, 330px);
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scroll-snap-type: x proximity;
    }

    .kanban-lane {
        min-width: 0;
        scroll-snap-align: start;
        border-radius: 20px;
        box-shadow:
            0 14px 24px rgba(35, 30, 20, 0.08),
            0 5px 10px rgba(35, 30, 20, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            inset 0 -1px 0 rgba(120, 100, 70, 0.05);
    }

    .kanban-lane:hover {
        transform: none;
    }

    .lane-header,
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lane-badge,
    .status-pill {
        align-self: flex-start;
    }

    .data-table {
        min-width: 640px;
        font-size: 0.94rem;
    }

    .order-dashboard-table,
    .order-dashboard-table tbody,
    .order-dashboard-table tr,
    .order-dashboard-table td {
        display: block;
        width: 100%;
    }

    .order-dashboard-table {
        min-width: 0;
    }

    .order-dashboard-table thead {
        display: none;
    }

    .order-dashboard-table tbody tr {
        margin-bottom: 0.85rem;
        padding: 0.95rem;
        border: 1px solid var(--line);
        border-radius: 1rem;
        background: var(--surface-strong);
        box-shadow: 0 12px 26px rgba(66, 40, 25, 0.07);
    }

    .order-dashboard-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .order-dashboard-table td,
    .order-dashboard-table td:nth-child(2),
    .order-dashboard-table td:nth-child(3) {
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .order-dashboard-table td[data-label] {
        margin-top: 0.58rem;
        padding-top: 0.58rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    .order-dashboard-table td:first-child {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .order-dashboard-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.28rem;
        color: var(--ops-muted);
        font-size: 0.72rem;
        font-weight: 850;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .order-dashboard-table .status-pill {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
    }

    .order-dashboard-table .table-products-cell {
        min-width: 0;
    }

    .order-dashboard-table .table-actions {
        display: grid;
        gap: 0.5rem;
        margin-top: 0.85rem;
    }

    .order-dashboard-table .table-actions .button {
        width: 100%;
    }

    .table-wrap {
        margin: 0 -0.15rem;
        padding-bottom: 0.2rem;
    }

    .line-item-row {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    .line-item-header {
        flex-direction: column;
        align-items: stretch;
    }

    .line-item-actions,
    .inline-actions {
        width: 100%;
    }

    .line-item-actions .button,
    .inline-actions .button {
        width: 100%;
    }

    .checkbox-chip-inline {
        min-height: auto;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .compact-meta {
        gap: 0.35rem;
    }

    .compact-meta span {
        font-size: 0.74rem;
    }

    .card-header-status {
        width: 100%;
        justify-items: start;
    }

    .order-delivery-band {
        gap: 0.55rem;
    }

    .order-delivery-primary {
        width: 100%;
    }

    .order-delivery-time-chip {
        min-height: 2.5rem;
        font-size: 1.18rem;
    }

    .order-delivery-time-chip.is-muted {
        font-size: 0.8rem;
    }

    .weekly-glance-panel {
        gap: 0.8rem;
    }

    .weekly-glance-shell {
        gap: 0.8rem;
    }

    .weekly-glance-panel .section-header {
        gap: 0.75rem;
        margin-bottom: 0.9rem;
    }

    .weekly-glance-panel .section-header .section-copy {
        max-width: none;
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .week-day-pill {
        min-height: auto;
        gap: 0.55rem;
        padding: 0.85rem;
        padding-top: 2.8rem;
    }

    .week-day-pill-top strong {
        font-size: 1.55rem;
    }

    .week-day-pill-preview {
        padding-top: 0.55rem;
        font-size: 0.76rem;
    }

    .week-day-pill-body small,
    .week-day-pill-products small {
        font-size: 0.76rem;
    }

    .week-day-quick-add {
        top: 0.6rem;
        right: 0.6rem;
        width: 1.85rem;
        height: 1.85rem;
    }

    .weekly-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .weekly-summary-card {
        padding: 0.72rem 0.78rem;
        border-radius: 16px;
    }

    .weekly-summary-card span {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
    }

    .weekly-summary-card strong {
        font-size: 1.3rem;
    }

    .weekly-glance-meta,
    .weekly-nav {
        width: 100%;
    }

    .weekly-glance-meta {
        display: grid;
        gap: 0.55rem;
    }

    .weekly-nav {
        justify-content: space-between;
        padding: 0.45rem 0.5rem;
        gap: 0.5rem;
    }

    .weekly-nav-button {
        width: 2.15rem;
        height: 2.15rem;
    }

    .weekly-nav-summary strong {
        font-size: 0.92rem;
    }

    .weekly-nav-summary .section-copy {
        font-size: 0.76rem;
    }

    .weekly-nav-today {
        width: 100%;
        justify-content: center;
    }

    .weekly-days-strip {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.6rem;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .week-day-card-shell {
        flex: 0 0 clamp(18rem, 78vw, 26rem);
        min-width: 0;
        scroll-snap-align: start;
    }

    .week-day-pill {
        width: 100%;
    }

    .weekly-nav-summary {
        min-width: 0;
        flex: 1;
    }

    .dashboard-badge {
        width: 100%;
        justify-content: center;
    }

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

    .sales-trend-bar-track {
        min-height: 9.5rem;
    }

    .sales-ranking-topline,
    .inventory-ranking-topline {
        align-items: start;
    }

    .auth-shell {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .topbar {
        position: sticky;
    }

    .brand-mark {
        padding: 0.08rem;
    }

    .brand-logo-image {
        width: 2.12rem;
        height: 2.12rem;
    }

    .page-shell {
        width: min(1600px, calc(100% - 0.55rem));
    }

    .hero-panel h1,
    .auth-card h1,
    .dashboard-heading h1 {
        font-size: clamp(1.65rem, 9vw, 2.1rem);
    }

    .section-copy,
    .card-subcopy,
    .table-subcopy,
    .metric-note {
        font-size: 0.92rem;
    }

    .weekly-glance-panel .section-header .section-copy {
        font-size: 0.8rem;
    }

    .weekly-summary-grid {
        grid-template-columns: 1fr;
    }

    .weekly-nav {
        padding: 0.42rem 0.45rem;
    }

    .weekly-nav-button {
        width: 2rem;
        height: 2rem;
    }

    .weekly-days-strip {
        gap: 0.75rem;
    }

    .week-day-card-shell {
        flex-basis: min(86vw, 24rem);
    }

    .metric-card strong {
        font-size: 1.55rem;
    }

    .sales-trend-chart {
        grid-template-columns: 1fr;
    }

    .button-small {
        padding: 0.65rem 0.9rem;
        font-size: 0.88rem;
    }

    .modal-shell {
        padding: 0.85rem;
    }

    .modal-card {
        width: 100%;
        max-height: calc(100vh - 1.7rem);
        max-height: calc(100dvh - 1.7rem);
        padding: 1rem;
    }

    .kanban-board {
        grid-auto-columns: minmax(88vw, 1fr);
    }

    .data-table {
        min-width: 580px;
    }
}

@media (max-width: 1240px) {
    .delivery-poll-panel .delivery-toolbar,
    .delivery-poll-panel .delivery-secondary-grid {
        grid-template-columns: 1fr;
    }

    .delivery-poll-panel .delivery-route-actions {
        justify-content: flex-start;
        border-radius: 22px;
    }

    .delivery-poll-panel .delivery-route-workspace {
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
    }
}

@media (max-width: 980px) {
    .delivery-page {
        max-width: min(1540px, calc(100vw - 0.9rem));
    }

    .delivery-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .delivery-overview,
    .delivery-poll-panel .delivery-queue-grid {
        grid-template-columns: 1fr;
    }

    .delivery-poll-panel .delivery-filter-bar,
    .delivery-poll-panel .delivery-route-workspace,
    .delivery-poll-panel .delivery-card-body,
    .delivery-poll-panel .driver-actions {
        grid-template-columns: 1fr;
    }

    .delivery-poll-panel .route-preview-map {
        min-height: 420px;
    }

    .delivery-poll-panel .route-preview-stops {
        padding-left: 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    .delivery-poll-panel .route-stop-list {
        max-height: 320px;
    }

    .delivery-poll-panel .delivery-card-links {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .delivery-page {
        max-width: min(1540px, calc(100vw - 0.55rem));
        gap: 0.85rem;
    }

    .delivery-hero,
    .delivery-poll-panel,
    .delivery-overview-card {
        border-radius: 22px;
    }

    .delivery-hero {
        padding: 0.95rem 1rem 1rem;
    }

    .delivery-hero h1 {
        font-size: clamp(1.9rem, 8vw, 2.45rem);
    }

    .delivery-overview {
        gap: 0.65rem;
    }

    .delivery-poll-panel {
        padding: 0.95rem 0.9rem 1.1rem;
    }

    .delivery-poll-panel .delivery-workspace-header,
    .delivery-poll-panel .delivery-queue-header,
    .delivery-poll-panel .delivery-secondary-header {
        align-items: start;
    }

    .delivery-poll-panel .delivery-filter-bar {
        padding: 0.85rem;
    }

    .delivery-poll-panel .delivery-filter-actions,
    .delivery-poll-panel .delivery-route-actions {
        justify-content: stretch;
    }

    .delivery-poll-panel .delivery-route-actions .button,
    .delivery-poll-panel .delivery-filter-actions .button {
        width: 100%;
    }

    .delivery-poll-panel .delivery-route-workspace {
        padding: 0.8rem;
    }

    .delivery-poll-panel .route-preview-stops {
        order: -1;
        padding-top: 0;
        margin-bottom: 0.8rem;
        border-top: 0;
        border-bottom: 1px solid rgba(25, 51, 43, 0.08);
        padding-bottom: 0.9rem;
    }

    .delivery-poll-panel .route-preview-map {
        min-height: 340px;
        border-radius: 18px;
    }

    .delivery-poll-panel .delivery-queue-summary {
        justify-items: start;
    }

    .delivery-poll-panel .delivery-card {
        padding: 0.9rem;
        border-radius: 20px;
    }

    .delivery-poll-panel .delivery-failure-form .form-textarea {
        min-height: 74px;
    }
}

@media (max-width: 560px) {
    .delivery-hero .section-copy,
    .delivery-overview-card p,
    .delivery-poll-panel .route-preview-note {
        font-size: 0.88rem;
    }

    .delivery-overview-card strong,
    .delivery-poll-panel .delivery-queue-summary strong {
        font-size: 1.55rem;
    }

    .delivery-poll-panel .route-stop-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .delivery-poll-panel .route-stop-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .delivery-poll-panel .route-preview-heading strong {
        min-width: 2rem;
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 960px) {
    .inventory-page .table-wrap {
        overflow-x: visible;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table),
    .inventory-page :is(.inventory-table, .inventory-stack-table) tbody,
    .inventory-page :is(.inventory-table, .inventory-stack-table) tr,
    .inventory-page :is(.inventory-table, .inventory-stack-table) td {
        display: block;
        width: 100%;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) {
        min-width: 0;
        table-layout: auto;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) colgroup,
    .inventory-page :is(.inventory-table, .inventory-stack-table) thead {
        display: none;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) tbody tr {
        margin-bottom: 0.85rem;
        padding: 0.95rem 1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--surface-strong);
        box-shadow: 0 14px 30px rgba(66, 40, 25, 0.06);
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) tbody tr:last-child {
        margin-bottom: 0;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td {
        padding: 0;
        border: 0;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td:first-child {
        padding-bottom: 0.2rem;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td[data-label] {
        margin-top: 0.55rem;
        padding-top: 0.55rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.3rem;
        color: var(--ink-soft);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td.inventory-cell-inline {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        font-weight: 700;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td.inventory-cell-inline::before {
        margin-bottom: 0;
    }

    .inventory-page .inventory-table .inventory-freshness-cell {
        display: grid;
        gap: 0.45rem;
    }

    .inventory-page .inventory-table .freshness-indicator {
        min-width: 0;
        align-items: start;
    }

    .inventory-page .inventory-table .inventory-threshold-note {
        margin-top: 0;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) .inventory-actions-cell {
        margin-top: 0.85rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .inventory-page .inventory-table .inventory-inline-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) .inventory-actions-cell .button,
    .inventory-page .inventory-table .inventory-inline-actions .button,
    .inventory-page .inventory-stack-table .inventory-actions-cell form,
    .inventory-page .inventory-stack-table .inventory-actions-cell form .button {
        width: 100%;
        max-width: 100%;
        min-height: 2.65rem;
        padding: 0.62rem 0.8rem;
        border-radius: 999px;
        justify-content: center;
        font-size: 0.86rem;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
    }

    .inventory-page :is(.inventory-table, .inventory-stack-table) td[colspan] {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        text-align: center;
        color: var(--ink-soft);
    }
}

/* Inventory dashboard — phone optimizations (points 1-4) */
@media (max-width: 760px) {
    /* 4 — Compact hero: shrink copy, surface the urgent count */
    .inventory-page:not(.inventory-page-supplies) .inventory-hero-panel {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        align-items: stretch;
        padding: 1rem;
    }

    .inventory-page:not(.inventory-page-supplies) .page-shell {
        width: min(100%, calc(100vw - 0.5rem));
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-copy {
        gap: 0.6rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-copy h1 {
        max-width: none;
        font-size: clamp(1.9rem, 9vw, 2.35rem);
        line-height: 1.02;
        overflow-wrap: anywhere;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-aside {
        grid-template-columns: 1fr;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-copy .section-copy {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-aside-card {
        min-height: 0;
        padding: 0.85rem 0.95rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-aside-card strong {
        font-size: 1.4rem;
    }

    /* The "Regla de perecederos" card is purely informational — hide on phones
       so the urgent-attention count leads. */
    .inventory-page:not(.inventory-page-supplies) .inventory-hero-aside-card-soft {
        display: none;
    }

    /* 3 — Metric strip: 2 compact columns, alert cards first */
    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card {
        order: 2;
        grid-template-columns: 1fr;
        grid-template-areas:
            "label"
            "value"
            "note";
        min-height: 0;
        padding: 0.7rem 0.8rem;
        align-items: start;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-alert,
    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .inventory-metric-aging,
    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .inventory-metric-critical {
        order: 1;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card span {
        gap: 0.35rem;
        min-width: 0;
        font-size: 0.68rem;
        line-height: 1.15;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card .pf-icon {
        width: 1rem;
        height: 1rem;
        margin-right: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-card strong {
        font-size: 1.45rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip .metric-note {
        max-width: none;
        font-size: 0.76rem;
    }

    /* 2 — Surface the attention queue above the live-stock table */
    .inventory-workspace {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .inventory-primary-column {
        display: contents;
    }

    .inventory-sidebar {
        display: contents;
    }

    .inventory-attention-panel {
        order: 1;
    }

    .inventory-main-panel {
        order: 2;
    }

    .inventory-filter-panel {
        order: 3;
    }

    .inventory-legend-panel {
        order: 3;
    }

    .inventory-sidebar-actions-panel {
        order: 4;
    }

    .inventory-insights-shell {
        order: 5;
    }

    .inventory-secondary-grid {
        order: 6;
    }

    .inventory-stock-filter {
        grid-template-columns: 1fr;
        padding: 0.65rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-stock-filter-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.55rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-stock-filter-actions .button {
        width: auto;
        flex: 0 1 auto;
        min-height: 2.55rem;
        padding: 0.58rem 1rem;
        border-radius: 999px;
        font-size: 0.88rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    /* 1 & 5 — Turn dense tables (live stock + recipes + movements) into cards */
    :is(.inventory-table, .inventory-stack-table),
    :is(.inventory-table, .inventory-stack-table) tbody,
    :is(.inventory-table, .inventory-stack-table) tr,
    :is(.inventory-table, .inventory-stack-table) td {
        display: block;
        width: 100%;
    }

    :is(.inventory-table, .inventory-stack-table) {
        min-width: 0;
    }

    :is(.inventory-table, .inventory-stack-table) thead {
        display: none;
    }

    :is(.inventory-table, .inventory-stack-table) tbody tr {
        margin-bottom: 0.85rem;
        padding: 0.95rem 1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--surface-strong);
        box-shadow: 0 14px 30px rgba(66, 40, 25, 0.06);
    }

    :is(.inventory-table, .inventory-stack-table) tbody tr:last-child {
        margin-bottom: 0;
    }

    :is(.inventory-table, .inventory-stack-table) td {
        padding: 0;
        border: 0;
    }

    /* First cell acts as the card title */
    :is(.inventory-table, .inventory-stack-table) td:first-child {
        padding-bottom: 0.2rem;
    }

    .inventory-table .inventory-flower-cell strong,
    .inventory-table-supplies .supply-item-heading strong {
        font-size: 1.05rem;
    }

    .inventory-table-supplies .supply-item-heading {
        flex-wrap: wrap;
    }

    /* Recipes / movements: first cell (product / timestamp) is the title */
    .inventory-stack-table td:first-child {
        font-weight: 700;
        font-size: 1.02rem;
    }

    /* Labelled cells: label sits above its value (block layout) */
    :is(.inventory-table, .inventory-stack-table) td[data-label] {
        margin-top: 0.55rem;
        padding-top: 0.55rem;
        border-top: 1px solid rgba(25, 51, 43, 0.08);
    }

    :is(.inventory-table, .inventory-stack-table) td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.3rem;
        color: var(--ink-soft);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* Simple numeric cells: label left, value right on a single line */
    :is(.inventory-table, .inventory-stack-table) td.inventory-cell-inline {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        font-weight: 700;
    }

    :is(.inventory-table, .inventory-stack-table) td.inventory-cell-inline::before {
        margin-bottom: 0;
    }

    /* Action buttons stack full-width at the foot of the card */
    :is(.inventory-table, .inventory-stack-table) .inventory-actions-cell {
        margin-top: 0.85rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .inventory-table .inventory-inline-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    :is(.inventory-table, .inventory-stack-table) .inventory-actions-cell .button,
    .inventory-table .inventory-inline-actions .button,
    .inventory-stack-table .inventory-actions-cell form,
    .inventory-stack-table .inventory-actions-cell form .button {
        width: 100%;
    }

    /* Empty-state row spans naturally as a single block */
    :is(.inventory-table, .inventory-stack-table) td[colspan] {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        text-align: center;
        color: var(--ink-soft);
    }

    /* 6 — Touch targets & legibility */
    .button-small {
        min-height: 2.75rem;
    }

    .inventory-table .inventory-threshold-note,
    .inventory-table .freshness-indicator small {
        font-size: 0.8rem;
    }

    .inventory-breakdown-pill {
        font-size: 0.78rem;
        padding: 0.26rem 0.62rem;
    }

    .inventory-attention-meta .button-small {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .inventory-page:not(.inventory-page-supplies) .inventory-switcher {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-switcher-link {
        padding: 0.8rem 0.9rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-switcher-link span {
        font-size: 0.95rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-panel {
        border-radius: 1.15rem;
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-hero-copy h1 {
        font-size: clamp(1.72rem, 8vw, 2rem);
    }

    .inventory-page:not(.inventory-page-supplies) .inventory-metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.landing-page {
    background-color: #efe6d8;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(218, 166, 77, 0.24), transparent 18%),
        radial-gradient(circle at 86% 14%, rgba(47, 124, 98, 0.18), transparent 18%),
        linear-gradient(180deg, rgba(10, 24, 19, 0.22) 0%, rgba(10, 24, 19, 0) 18%),
        linear-gradient(180deg, #f8efe2 0%, #f1e6d6 54%, #f8f3ec 100%);
}

.landing-page .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand user";
    align-items: center;
    gap: 1rem;
    padding-block: 0.85rem;
    background: rgba(22, 49, 41, 0.9);
    backdrop-filter: blur(14px);
}

.landing-page .brand-block {
    max-width: 26rem;
}

.landing-page .brand-copy {
    display: none;
}

.landing-header-actions {
    grid-area: user;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.landing-header-nav {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
    padding-right: 1.4rem;
    border-right: 1px solid rgba(255, 249, 243, 0.2);
}

.landing-header-actions .button {
    padding: 0.62rem 1.4rem;
}

.landing-header-link {
    color: rgba(255, 249, 243, 0.82);
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 180ms ease, transform 180ms ease;
}

.landing-header-link:hover {
    color: var(--surface-strong);
    transform: translateY(-1px);
}

.landing-page .page-shell {
    width: 100%;
    margin: 0;
    gap: 0;
}

.landing-hero {
    min-height: calc(100svh - 5.5rem);
    /* max() centers the content once the viewport outgrows 88rem */
    padding: clamp(2.2rem, 4vw, 4rem) max(clamp(1.1rem, 4vw, 3.25rem), calc((100% - 88rem) / 2)) clamp(2rem, 4vw, 3rem);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(14rem, 0.82fr);
    gap: clamp(1.8rem, 5vw, 4rem);
    align-items: center;
    position: relative;
    overflow: clip;
    background:
        linear-gradient(90deg, rgba(246, 237, 223, 0.98) 0%, rgba(246, 237, 223, 0.9) 20%, rgba(246, 237, 223, 0.58) 34%, rgba(246, 237, 223, 0.16) 54%, rgba(246, 237, 223, 0.04) 100%),
        linear-gradient(180deg, rgba(20, 34, 27, 0.14), rgba(20, 34, 27, 0.08)),
        url("../images/marketing-hero-1280.819080015910.jpg");
    background-position: left center, center, center;
    background-repeat: no-repeat;
    background-size: cover, cover, cover;
    border-radius: 0 0 2.4rem 2.4rem;
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: auto -6% -10% auto;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 241, 0.2), rgba(255, 248, 241, 0));
    pointer-events: none;
}

.landing-hero-copy {
    max-width: 42rem;
    display: grid;
    gap: 1.1rem;
    padding: clamp(1.2rem, 2vw, 1.8rem) 0;
    position: relative;
    z-index: 1;
    animation: landingFadeUp 700ms ease both;
}

.landing-eyebrow {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--leaf);
}

.landing-eyebrow-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: min(100%, clamp(11rem, 19vw, 14.5rem));
    padding: 0.72rem 0.92rem;
    border-radius: 2rem;
    background: linear-gradient(180deg, rgba(48, 74, 60, 0.96), rgba(29, 48, 39, 0.98));
    border: 1px solid rgba(248, 236, 220, 0.18);
    box-shadow: 0 18px 34px rgba(19, 34, 28, 0.2), inset 0 1px 0 rgba(255, 249, 239, 0.1);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.landing-eyebrow-logo {
    width: 2.9rem;
    height: 2.9rem;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: drop-shadow(0 10px 18px rgba(66, 40, 25, 0.1));
}

.landing-wordmark-logo {
    width: clamp(11rem, 19vw, 14.5rem);
    height: auto;
    border-radius: 1.25rem;
    filter: drop-shadow(0 14px 22px rgba(10, 18, 14, 0.18));
}

.landing-hero h1,
.landing-section h2,
.landing-band h2,
.landing-cta h2 {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #10241d;
}

.landing-hero h1 {
    font-size: clamp(3rem, 4.8vw, 5.2rem);
    line-height: 0.96;
    max-width: 16ch;
}

.landing-hero-text,
.landing-hero-note,
.landing-section-heading p,
.landing-benefit-grid p,
.landing-steps p,
.landing-detail-copy p,
.landing-detail-list p,
.landing-cta p {
    margin: 0;
    color: rgba(25, 51, 43, 0.76);
    line-height: 1.6;
    font-size: 1.02rem;
}

.landing-hero-text {
    max-width: 34rem;
    font-size: 1.08rem;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
    margin-top: 0.5rem;
}

.landing-hero-actions .button {
    padding: 0.95rem 1.75rem;
    font-size: 1.03rem;
}

.landing-hero-actions .button-primary {
    box-shadow: 0 20px 36px rgba(141, 59, 44, 0.3);
}

.landing-hero-actions .button-secondary {
    box-shadow: 0 20px 36px rgba(47, 124, 98, 0.24);
}

.landing-device-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.landing-device-note-label {
    margin: 0;
    width: 100%;
    color: rgba(25, 51, 43, 0.68);
    font-size: 0.94rem;
    font-weight: 700;
}

.landing-device-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 249, 243, 0.54);
    border: 1px solid rgba(25, 51, 43, 0.1);
    color: rgba(25, 51, 43, 0.72);
    box-shadow: 0 16px 26px rgba(66, 40, 25, 0.08);
    backdrop-filter: blur(10px);
}

.landing-device-item span {
    font-size: 0.92rem;
    font-weight: 700;
}

.landing-device-item svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: var(--leaf);
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.landing-hero-visual {
    position: relative;
    min-height: 34rem;
    display: grid;
    align-items: center;
    justify-items: end;
    z-index: 1;
    animation: landingFloatIn 900ms ease both;
}

.landing-hero-signals {
    position: relative;
    inset: auto;
    display: grid;
    gap: 0.9rem;
    justify-items: end;
    margin: 0;
    padding-right: 0.4rem;
}

.landing-hero-signals span:nth-child(1) {
    transform: translateX(-2.8rem);
}

.landing-hero-signals span:nth-child(2) {
    transform: translateX(-0.6rem);
}

.landing-hero-signals span:nth-child(3) {
    transform: translateX(-2.1rem);
}

.landing-hero-signals span {
    display: inline-flex;
    width: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.72);
    border: 1px solid rgba(25, 51, 43, 0.09);
    color: #163129;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 30px rgba(66, 40, 25, 0.12);
}

.landing-section,
.landing-band,
.landing-cta {
    padding: clamp(3rem, 7vw, 6rem) max(clamp(1.1rem, 4vw, 3.25rem), calc((100% - 82rem) / 2));
}

.landing-section {
    display: grid;
    gap: 2rem;
}

.landing-section-heading {
    display: grid;
    gap: 0.8rem;
    max-width: 45rem;
}

.landing-section h2,
.landing-band h2,
.landing-cta h2 {
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    line-height: 1.02;
    max-width: 20ch;
}

.landing-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.landing-benefit-grid article {
    padding: 1.4rem 0 0;
    border-top: 1px solid rgba(25, 51, 43, 0.12);
    display: grid;
    gap: 0.8rem;
}

.landing-benefit-grid h3,
.landing-steps h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.landing-band {
    background: rgba(22, 49, 41, 0.96);
    color: var(--surface-strong);
    display: grid;
    gap: 2rem;
}

.landing-band .landing-eyebrow,
.landing-band h2,
.landing-band p,
.landing-band h3,
.landing-band span {
    color: inherit;
}

.landing-band .landing-section-heading p,
.landing-band .landing-steps p {
    color: rgba(255, 249, 243, 0.76);
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.landing-steps article {
    display: grid;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 249, 243, 0.16);
}

.landing-steps span {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    opacity: 0.72;
}

.landing-detail-section {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    align-items: start;
    gap: 2rem;
}

.landing-detail-copy,
.landing-detail-list {
    display: grid;
    gap: 1rem;
}

.landing-detail-list p {
    padding: 1rem 0 0;
    border-top: 1px solid rgba(25, 51, 43, 0.12);
}

.landing-cta {
    display: grid;
    justify-items: start;
    gap: 1rem;
    background:
        radial-gradient(circle at top right, rgba(218, 166, 77, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(247, 239, 228, 0.92));
}

.landing-cta-legal {
    max-width: 38rem;
}

.legal-page {
    background-color: #efe5d8;
    background-image:
        radial-gradient(circle at 12% 14%, rgba(218, 166, 77, 0.18), transparent 20%),
        radial-gradient(circle at 84% 10%, rgba(47, 124, 98, 0.14), transparent 18%),
        linear-gradient(180deg, rgba(22, 49, 41, 0.16) 0%, rgba(239, 229, 216, 0.98) 16%, rgba(248, 243, 236, 1) 100%);
}

.legal-header-actions {
    justify-content: flex-end;
}

.legal-shell {
    width: min(100%, 84rem);
    margin: 0 auto;
    padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 3rem;
    display: grid;
    gap: 1.4rem;
}

.legal-hero {
    display: grid;
    gap: 0.9rem;
    padding: clamp(1.4rem, 3vw, 2rem);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(255, 253, 249, 0.95), rgba(244, 234, 223, 0.92)),
        rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(25, 51, 43, 0.08);
    box-shadow: 0 22px 46px rgba(66, 40, 25, 0.1);
}

.legal-hero h1,
.legal-section h2 {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    letter-spacing: -0.04em;
    color: #10241d;
}

.legal-hero h1 {
    font-size: clamp(2.3rem, 4vw, 4.2rem);
    line-height: 0.98;
    max-width: 12ch;
}

.legal-lead,
.legal-section p,
.legal-callout p,
.legal-list li,
.legal-meta span {
    margin: 0;
    color: rgba(25, 51, 43, 0.78);
    line-height: 1.7;
}

.legal-lead {
    max-width: 54rem;
    font-size: 1.05rem;
}

.legal-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
}

.legal-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.78rem;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.08);
    border: 1px solid rgba(47, 124, 98, 0.12);
    color: var(--leaf);
    font-size: 0.9rem;
    font-weight: 700;
}

.legal-card {
    display: grid;
    gap: 1.35rem;
    padding: clamp(1.3rem, 3vw, 2rem);
}

.legal-callout {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 248, 241, 0.96), rgba(247, 237, 228, 0.94));
    border: 1px solid rgba(200, 108, 79, 0.18);
}

.legal-callout strong {
    color: var(--rosewood);
    font-size: 0.95rem;
}

.legal-section {
    display: grid;
    gap: 0.7rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(25, 51, 43, 0.1);
}

.legal-section h2 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.08;
}

.legal-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.45rem;
}

.legal-section a {
    color: var(--leaf);
    font-weight: 700;
}

@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 980px) {
    .landing-page .brand-block {
        max-width: 22rem;
    }

    .landing-hero,
    .landing-detail-section,
    .landing-benefit-grid,
    .landing-steps {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: auto;
        padding-top: 2.4rem;
        background:
            linear-gradient(180deg, rgba(246, 237, 223, 0.92) 0%, rgba(246, 237, 223, 0.72) 28%, rgba(246, 237, 223, 0.22) 52%, rgba(246, 237, 223, 0.1) 100%),
            linear-gradient(180deg, rgba(20, 34, 27, 0.1), rgba(20, 34, 27, 0.08)),
            url("../images/marketing-hero-1280.819080015910.jpg");
        background-position: center top, center, 62% center;
    }

    .landing-hero-visual {
        min-height: 7rem;
        order: 0;
    }

    .landing-hero-signals {
        justify-items: start;
        margin: 0;
        padding-right: 0;
    }

    .landing-hero-signals span:nth-child(1),
    .landing-hero-signals span:nth-child(2),
    .landing-hero-signals span:nth-child(3) {
        transform: none;
    }

    .landing-header-actions {
        gap: 0.85rem;
    }

    .landing-header-nav {
        gap: 0.85rem;
        padding-right: 0.85rem;
    }
}

@media (max-width: 720px) {
    .landing-page .topbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "user";
        align-items: start;
    }

    .landing-header-actions {
        justify-content: flex-start;
    }

    .landing-page .brand-block {
        max-width: 100%;
    }

    .landing-header-nav {
        display: none;
    }

    .landing-hero h1 {
        max-width: 8ch;
    }

    .landing-hero-text,
    .landing-section-heading p,
    .landing-benefit-grid p,
    .landing-steps p,
    .landing-detail-copy p,
    .landing-detail-list p,
    .landing-cta p {
        font-size: 0.98rem;
    }

    .landing-device-item {
        padding-inline: 0.72rem;
    }

    .landing-device-item span {
        font-size: 0.85rem;
    }

    .landing-hero-visual {
        min-height: auto;
        justify-items: start;
    }

    .landing-hero {
        padding-bottom: 2.4rem;
        border-radius: 0 0 1.8rem 1.8rem;
    }

    .landing-hero-copy {
        padding-top: 0.4rem;
    }

    .landing-hero-signals span {
        font-size: 0.82rem;
    }

    .public-footer {
        padding-inline: 0.75rem;
    }

    .public-footer-inner {
        padding: 0.95rem 1rem;
    }

    .legal-shell {
        padding-inline: 0.75rem;
        padding-bottom: 2.2rem;
    }

    .legal-hero h1 {
        max-width: 9ch;
    }

    .legal-meta span {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button {
        transition: none;
    }

    .order-card.is-new-order {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

body.performance-lite.landing-page .topbar,
body.performance-lite .landing-eyebrow-brand,
body.performance-lite .landing-device-item,
body.performance-lite .landing-hero-signals span,
body.performance-lite .landing-surface-card,
body.performance-lite .modal-backdrop {
    backdrop-filter: none;
}

body.performance-lite .landing-hero-copy,
body.performance-lite .landing-hero-visual,
body.performance-lite .order-card.is-new-order {
    animation: none;
}

/* Phase 3-5 UI polish: shared density, scanability, and interaction quality. */
:where(a, button, summary, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid var(--ops-focus);
    outline-offset: 3px;
}

.button,
.nav-link,
.view-toggle,
.modal-close,
.weekly-nav-button,
.week-day-quick-add,
.order-copy-button,
.route-order-button,
.account-menu-link,
.advanced-filter-toggle,
.search-inline-toggle {
    touch-action: manipulation;
}

.button,
.view-toggle,
.modal-close,
.weekly-nav-button,
.week-day-quick-add,
.order-copy-button,
.route-order-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.button {
    border: 1px solid transparent;
    line-height: 1.15;
}

.button:not(:disabled):active,
.view-toggle:not(:disabled):active,
.modal-close:not(:disabled):active,
.weekly-nav-button:not(:disabled):active,
.week-day-quick-add:not(:disabled):active {
    transform: translateY(0) scale(0.98);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.button.is-loading,
.button[aria-busy="true"] {
    cursor: progress;
    opacity: 0.86;
}

.button-primary:hover,
.button-primary:focus-visible {
    box-shadow: 0 18px 34px rgba(141, 59, 44, 0.3);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    box-shadow: 0 18px 34px rgba(36, 95, 76, 0.28);
}

.button-danger:hover,
.button-danger:focus-visible {
    box-shadow: 0 18px 34px rgba(141, 59, 44, 0.3);
}

.button-ghost:hover,
.button-ghost:focus-visible,
.account-menu-link:hover,
.account-menu-link:focus-visible {
    border-color: rgba(47, 124, 98, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 24px rgba(25, 51, 43, 0.08);
}

.modal-close {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.modal-close:hover,
.modal-close:focus-visible {
    border-color: rgba(141, 59, 44, 0.22);
    background: rgba(255, 248, 244, 0.98);
    box-shadow: 0 12px 24px rgba(141, 59, 44, 0.12);
}

.ops-page,
.dashboard-workspace {
    scroll-margin-top: calc(var(--topbar-height, 72px) + 1rem);
}

.dashboard-workspace .dashboard-heading {
    align-items: end;
}

.dashboard-workspace .dashboard-meta {
    justify-content: flex-end;
}

.dashboard-badge,
.dashboard-context-chip,
.lane-badge,
.status-pill {
    line-height: 1.15;
}

.ops-page .metric-card,
.dashboard-workspace .stage-overview-panel,
.dashboard-workspace .dashboard-filter-panel,
.dashboard-workspace .board-workspace,
.dashboard-workspace .weekly-glance-panel,
.advanced-filter-card,
.weekly-summary-card,
.week-day-pill,
.kanban-lane,
.order-card,
.delivery-card,
.tenant-card {
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease;
}

.ops-page .metric-card {
    position: relative;
    overflow: hidden;
}

.ops-page .metric-card::after {
    content: "";
    position: absolute;
    inset: auto 1rem 0.65rem 1rem;
    height: 2px;
    border-radius: 999px;
    background: rgba(47, 124, 98, 0.12);
}

.ops-page a.metric-card:hover,
.ops-page a.metric-card:focus-visible {
    border-color: rgba(47, 124, 98, 0.24);
    box-shadow: 0 18px 36px rgba(33, 42, 35, 0.1);
}

.section-header,
.dashboard-heading,
.modal-header,
.manufacturing-summary-header,
.delivery-map-header,
.route-template-panel-header {
    min-width: 0;
}

.section-header > *,
.dashboard-heading > *,
.modal-header > *,
.manufacturing-summary-header > *,
.delivery-map-header > *,
.route-template-panel-header > * {
    min-width: 0;
}

.section-copy,
.table-subcopy,
.metric-note,
.card-subcopy,
.field-help {
    line-height: 1.45;
}

.field label,
.account-menu-label {
    line-height: 1.25;
}

.field-help {
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.field-error {
    border: 1px solid rgba(141, 59, 44, 0.16);
    line-height: 1.35;
}

.form-input {
    min-height: 2.75rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-input::placeholder {
    color: rgba(94, 110, 102, 0.72);
}

.form-input[aria-invalid="true"],
.field:has(.field-error) .form-input {
    border-color: rgba(141, 59, 44, 0.72);
}

.checkbox-control {
    min-width: 1.1rem;
    flex: 0 0 auto;
}

.checkbox-chip-inline,
.search-inline-toggle,
.advanced-filter-toggle {
    min-height: 2.75rem;
}

.table-wrap {
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 26px rgba(66, 40, 25, 0.05);
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    border-bottom-color: rgba(25, 51, 43, 0.09);
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(246, 240, 232, 0.98));
    box-shadow: 0 1px 0 rgba(25, 51, 43, 0.08);
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 1rem;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 1rem;
}

.data-table tbody tr {
    transition: background 160ms ease, box-shadow 160ms ease;
}

.data-table tbody tr:hover {
    background: rgba(47, 124, 98, 0.045);
}

.data-table tbody tr:focus-within {
    background: rgba(47, 124, 98, 0.07);
    box-shadow: inset 3px 0 0 rgba(47, 124, 98, 0.42);
}

.table-actions {
    align-items: center;
    flex-wrap: wrap;
}

.order-dashboard-table .table-actions {
    min-width: 12rem;
}

.order-dashboard-table .button-small {
    min-height: 2.45rem;
}

.order-dashboard-table .status-pill,
.order-dashboard-table .payment-bucket-paid,
.order-dashboard-table .payment-bucket-partial,
.order-dashboard-table .payment-bucket-unpaid {
    max-width: 100%;
}

.table-products-list div {
    min-width: 0;
}

.table-products-list span,
.order-products-list span {
    overflow-wrap: anywhere;
}

.mobile-list-view-prompt {
    min-height: 2.75rem;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mobile-list-view-prompt:hover,
.mobile-list-view-prompt:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(47, 124, 98, 0.24);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(25, 51, 43, 0.08);
}

.kanban-board {
    scroll-snap-type: x proximity;
}

.kanban-lane {
    scroll-snap-align: start;
}

.lane-body {
    min-height: 4.5rem;
}

.order-card:focus-within,
.delivery-card:focus-within,
.tenant-card:focus-within,
.week-day-card-shell:focus-within .week-day-pill {
    border-color: rgba(47, 124, 98, 0.24);
    box-shadow: 0 16px 34px rgba(33, 42, 35, 0.1);
}

@media (max-width: 920px) {
    .dashboard-workspace .dashboard-heading {
        align-items: stretch;
    }

    .dashboard-workspace .dashboard-meta {
        justify-content: stretch;
    }

    .data-table th {
        position: static;
    }
}

@media (max-width: 760px) {
    .table-wrap {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .order-dashboard-table tbody tr {
        position: relative;
        overflow: hidden;
        border-color: rgba(25, 51, 43, 0.1);
    }

    .order-dashboard-table tbody tr::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: linear-gradient(180deg, var(--leaf), var(--gold));
    }

    .order-dashboard-table td[data-label] {
        display: grid;
        grid-template-columns: minmax(7.5rem, 0.42fr) minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
    }

    .order-dashboard-table td[data-label]::before {
        margin: 0.12rem 0 0;
    }

    .order-dashboard-table td:first-child {
        display: block;
    }

    .order-dashboard-table .table-actions {
        min-width: 0;
    }

    .mobile-list-view-prompt {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .order-dashboard-table td[data-label] {
        grid-template-columns: 1fr;
        gap: 0.28rem;
    }

    .button-small {
        min-height: 2.75rem;
    }
}

/* Phase 6-9 UI polish: navigation state, form feedback, data affordance, async stability. */
.nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset: auto 0.7rem 0.22rem;
    height: 2px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 0 1px rgba(218, 166, 77, 0.18);
}

.topnav .nav-link[aria-current="page"] {
    color: #fffdf9;
}

.account-menu[open] .user-chip-button {
    background: rgba(255, 249, 243, 0.14);
    border-color: rgba(255, 249, 243, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 12px 24px rgba(4, 15, 12, 0.2);
}

.account-menu-panel {
    transform-origin: top right;
}

.account-menu[open] .account-menu-panel {
    animation: account-menu-enter 170ms ease-out;
}

@keyframes account-menu-enter {
    from {
        opacity: 0;
        transform: translateY(-0.25rem) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-input[aria-invalid="true"] {
    border-color: rgba(141, 59, 44, 0.72);
    background:
        linear-gradient(180deg, rgba(255, 250, 247, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow:
        0 0 0 3px rgba(141, 59, 44, 0.14),
        0 12px 22px rgba(66, 40, 25, 0.06);
}

.form-input[aria-busy="true"] {
    background-image:
        linear-gradient(90deg, transparent, rgba(47, 124, 98, 0.08), transparent);
    background-size: 220% 100%;
    animation: field-busy-sheen 1.15s ease-in-out infinite;
}

@keyframes field-busy-sheen {
    from {
        background-position: 120% 0;
    }

    to {
        background-position: -120% 0;
    }
}

.table-caption {
    caption-side: top;
    padding: 0.8rem 1rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.table-empty-cell {
    padding: 1rem !important;
}

.table-empty-state {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
    padding: 1.2rem;
    text-align: left;
}

.table-empty-state h3,
.lane-empty-card h3 {
    margin: 0;
}

.table-empty-state p:not(.eyebrow),
.lane-empty-card p {
    margin: 0;
    color: var(--ink-soft);
}

.lane-empty-card {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    min-height: 7rem;
    padding: 1rem;
    text-align: center;
}

.lane-empty-card .pf-icon {
    margin: 0;
    color: rgba(94, 110, 102, 0.62);
}

[aria-busy="true"].is-refreshing {
    cursor: progress;
}

[data-poll-url].is-refreshing,
#dashboard-stage-overview.is-refreshing,
#dashboard-weekly-context.is-refreshing,
#dashboard-board-content.is-refreshing {
    position: relative;
}

[data-poll-url].is-refreshing::after,
#dashboard-stage-overview.is-refreshing::after,
#dashboard-weekly-context.is-refreshing::after,
#dashboard-board-content.is-refreshing::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.36) 50%, transparent 100%);
    opacity: 0.42;
    transform: translateX(-100%);
    animation: refresh-sheen 900ms ease-out;
}

@keyframes refresh-sheen {
    to {
        transform: translateX(100%);
    }
}

@media (max-width: 760px) {
    .nav-link[aria-current="page"]::after {
        inset: 0.5rem auto 0.5rem 0.5rem;
        width: 3px;
        height: auto;
    }

    .table-caption {
        padding: 0 0 0.75rem;
    }
}

/* Phase 10-12 closeout: responsive QA guards, final a11y affordances, print-friendly polish. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

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

button,
input,
select,
textarea {
    font-size: max(1rem, 16px);
}

.table-wrap,
.kanban-board,
.route-template-available-list,
.delivery-page .route-stop-list {
    overscroll-behavior-inline: contain;
}

.modal-close {
    position: relative;
    font-size: 0;
    overflow: hidden;
}

.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    width: 1.05rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

.modal-card {
    overflow-wrap: anywhere;
}

.message-stack {
    scroll-margin-top: calc(var(--topbar-height, 72px) + 1rem);
}

.data-table :is(td, th),
.status-pill,
.lane-badge,
.dashboard-badge,
.dashboard-context-chip,
.button,
.nav-link {
    overflow-wrap: anywhere;
}

.balance-due,
.message-error,
.field-error,
.form-error-summary {
    color: var(--rosewood);
}

.balance-clear,
.message-success {
    color: var(--leaf);
}

@media (max-width: 760px) {
    body {
        min-width: 320px;
    }

    .topbar {
        padding-top: max(0.56rem, env(safe-area-inset-top));
    }

    .page-shell {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .modal-shell {
        padding:
            max(0.75rem, env(safe-area-inset-top))
            max(0.65rem, env(safe-area-inset-right))
            max(0.75rem, env(safe-area-inset-bottom))
            max(0.65rem, env(safe-area-inset-left));
    }
}

@media print {
    body {
        background: #fff !important;
        color: #111 !important;
    }

    .topbar,
    .skip-link,
    .message-stack,
    .button,
    .modal-shell,
    .board-view-actions {
        display: none !important;
    }

    .page-shell,
    .ops-page,
    .dashboard-workspace,
    .panel,
    .poll-panel {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .table-wrap {
        overflow: visible !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}

/* Delivery route premium layout final overrides */
.delivery-page .delivery-route-focus-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.delivery-page .delivery-route-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1rem;
    margin: 0;
    border-radius: 18px;
}

.delivery-page .delivery-route-workspace .route-preview-map {
    min-height: clamp(18rem, 36vw, 27rem);
    border-radius: 16px;
}

.delivery-page .delivery-route-workspace .route-preview-stops {
    padding: 0;
}

.delivery-page .delivery-route-workspace .route-stop-list {
    max-height: 15rem;
}

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

.delivery-page .delivery-filter-form.delivery-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

@media (max-width: 1180px) {
    .delivery-page .delivery-route-focus-grid {
        grid-template-columns: 1fr;
    }

    .delivery-page .delivery-map-column {
        position: static;
    }
}

@media (max-width: 920px) {
    .delivery-page .delivery-overview,
    .delivery-page .next-delivery-actions,
    .delivery-page .delivery-filter-form.delivery-filter-bar {
        grid-template-columns: 1fr;
    }

    .delivery-page .delivery-map-header,
    .delivery-page .delivery-history-heading,
    .delivery-page .route-template-premium-header {
        display: grid;
    }
}

@media (max-width: 640px) {
    .delivery-page .today-stops-grid,
    .delivery-page .route-template-actions {
        grid-template-columns: 1fr;
    }

    .delivery-page .today-stop-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .delivery-page .today-stop-actions {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr;
        justify-items: stretch;
    }

    .delivery-page .next-delivery-details div {
        grid-template-columns: 1fr;
    }
}

.route-template-detail-page {
    --rt-green-900: #123c31;
    --rt-green-800: #174a3c;
    --rt-green-700: #1f6b54;
    --rt-cream-50: #faf8f3;
    --rt-surface: rgba(255, 255, 255, 0.93);
    --rt-border: #e7e5de;
    --rt-text: #19342b;
    --rt-muted: #68766f;
    --rt-terracotta: #b85c43;
    --rt-soft-green: #eef5f1;
    --rt-soft-red: #fff2ee;
    display: grid;
    gap: 1rem;
    color: var(--rt-text);
}

.route-template-detail-hero,
.route-template-detail-panel,
.route-template-danger-zone {
    border: 1px solid var(--rt-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 243, 0.9));
    box-shadow: 0 18px 42px rgba(18, 60, 49, 0.08);
}

.route-template-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.25rem 1.35rem;
}

.route-template-detail-title h1 {
    margin: 0.1rem 0 0.35rem;
    color: var(--rt-green-900);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.route-template-detail-title > p {
    margin: 0;
    max-width: 42rem;
    color: var(--rt-muted);
}

.route-template-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin-top: 0.65rem;
    color: var(--rt-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.route-template-detail-actions,
.route-template-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.route-template-detail-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.route-template-detail-actions .button {
    min-height: 2.85rem;
    padding-inline: 1.15rem;
}

.route-template-detail-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.42fr) minmax(0, 0.58fr);
    gap: 1rem;
    align-items: start;
}

.route-template-detail-sidebar,
.route-template-detail-main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.route-template-detail-panel {
    padding: 1rem;
}

.route-template-panel-header {
    margin-bottom: 0.9rem;
}

.route-template-panel-header h2 {
    margin: 0;
    color: var(--rt-green-900);
    font-size: 1.1rem;
}

.route-template-panel-header p {
    margin: 0.25rem 0 0;
    color: var(--rt-muted);
    font-size: 0.86rem;
}

.route-template-summary-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.route-template-summary-list div {
    display: grid;
    grid-template-columns: minmax(8rem, 0.44fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
}

.route-template-summary-list dt,
.route-template-stop-grid span,
.available-order-card dt {
    color: var(--rt-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.route-template-summary-list dd,
.route-template-stop-grid strong,
.available-order-card dd {
    margin: 0;
    color: var(--rt-text);
    font-size: 0.9rem;
    font-weight: 800;
}

.route-template-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.route-template-metric-grid article {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    background: rgba(250, 248, 243, 0.72);
}

.route-template-metric-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 999px;
    background: var(--rt-soft-green);
    color: var(--rt-green-700);
    font-size: 0.76rem;
    font-weight: 900;
}

.route-template-metric-grid p {
    margin: 0;
    color: var(--rt-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.route-template-metric-grid strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--rt-green-900);
    font-size: 1.02rem;
    line-height: 1.1;
}

.route-template-map-frame {
    position: relative;
    min-height: 285px;
    overflow: hidden;
    border: 1px solid var(--rt-border);
    border-radius: 16px;
    background:
        linear-gradient(rgba(31, 107, 84, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 107, 84, 0.07) 1px, transparent 1px),
        #eef3ef;
    background-size: 70px 70px;
}

.route-template-map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 285px;
    border: 0;
}

.route-template-map-empty {
    display: grid;
    min-height: 285px;
    place-items: center;
    padding: 1rem;
    color: var(--rt-muted);
    font-weight: 800;
    text-align: center;
}

.route-template-available-list {
    display: grid;
    gap: 0.7rem;
    max-height: 25rem;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.available-order-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.available-order-card header,
.available-order-card footer,
.route-template-stop-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.available-order-card h3,
.route-template-stop-heading h3,
.route-template-other-card h3 {
    margin: 0.15rem 0 0;
    color: var(--rt-green-900);
    font-size: 0.98rem;
}

.available-order-card time,
.route-template-stop-heading time {
    color: var(--rt-green-700);
    font-size: 0.82rem;
    font-weight: 900;
}

.available-order-card dl {
    display: grid;
    gap: 0.42rem;
    margin: 0;
}

.available-order-card footer {
    align-items: center;
}

.route-template-order-panel {
    padding: 1rem;
}

.route-template-state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--rt-soft-green);
    color: var(--rt-green-700);
    font-size: 0.74rem;
    font-weight: 900;
}

.route-template-stop-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-template-stop-card {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.95rem;
    border: 1px solid var(--rt-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 22px rgba(18, 60, 49, 0.045);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.route-template-stop-card:hover {
    border-color: rgba(31, 107, 84, 0.32);
    box-shadow: 0 14px 28px rgba(18, 60, 49, 0.075);
    transform: translateY(-1px);
}

.route-template-stop-grip {
    color: var(--rt-muted);
    font-weight: 900;
    letter-spacing: 0;
    writing-mode: vertical-rl;
}

.route-template-stop-number {
    display: inline-grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border-radius: 999px;
    background: var(--rt-green-900);
    color: #fff;
    font-weight: 900;
}

.route-template-stop-content {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.route-template-stop-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.35fr 1fr;
    gap: 0.8rem;
}

.route-template-stop-grid div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.route-template-stop-grid strong {
    overflow-wrap: anywhere;
}

.route-template-stop-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--rt-border);
}

.route-template-stop-actions form {
    margin: 0;
}

.route-order-button {
    display: inline-grid;
    width: 2.3rem;
    height: 2.3rem;
    place-items: center;
    border: 1px solid var(--rt-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--rt-green-900);
    font-weight: 900;
    cursor: pointer;
}

.route-order-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.route-order-remove {
    color: var(--rt-terracotta);
}

.route-template-move-inline-form {
    grid-column: 3 / 4;
    display: grid;
    grid-template-columns: auto minmax(10rem, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    margin: -0.15rem 0 0;
}

.route-template-move-inline-form label {
    color: var(--rt-muted);
    font-size: 0.75rem;
    font-weight: 900;
}

.route-template-add-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.8rem;
    padding: 0.85rem;
    border: 1px dashed rgba(104, 118, 111, 0.42);
    border-radius: 14px;
    color: var(--rt-muted);
    font-weight: 800;
}

.route-template-add-hint p {
    margin: 0;
}

.route-template-add-hint span {
    color: var(--rt-green-900);
    font-size: 1.1rem;
    font-weight: 900;
}

.route-template-other-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 0.65rem;
}

.route-template-other-card {
    display: grid;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.route-template-other-card.is-current {
    border-color: rgba(31, 107, 84, 0.72);
    box-shadow: inset 0 0 0 1px rgba(31, 107, 84, 0.1);
}

.route-template-other-card p,
.route-template-other-card small {
    margin: 0;
    color: var(--rt-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.route-template-other-card > span {
    justify-self: start;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--rt-soft-green);
    color: var(--rt-green-700);
    font-size: 0.74rem;
    font-weight: 900;
}

.route-template-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-color: rgba(184, 92, 67, 0.26);
    background: linear-gradient(180deg, rgba(255, 250, 247, 0.96), rgba(255, 242, 238, 0.72));
}

.route-template-danger-zone h2 {
    margin: 0.18rem 0 0.3rem;
    color: var(--rt-terracotta);
    font-size: 1.05rem;
}

.route-template-danger-zone p {
    margin: 0;
    color: var(--rt-muted);
}

.route-template-empty-state {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px dashed rgba(104, 118, 111, 0.35);
    border-radius: 14px;
    background: rgba(250, 248, 243, 0.7);
    color: var(--rt-muted);
}

.route-template-empty-state h3,
.route-template-empty-state p {
    margin: 0;
}

.route-template-edit-modal,
.route-template-delete-modal {
    background: linear-gradient(180deg, #ffffff, #faf8f3);
}

.route-template-edit-modal .route-template-create-form .filter-actions .button {
    width: auto;
}

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

    .route-template-detail-sidebar {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .route-template-available-panel,
    .route-template-map-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 920px) {
    .route-template-detail-hero,
    .route-template-detail-actions,
    .route-template-panel-header,
    .available-order-card header,
    .available-order-card footer,
    .route-template-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .route-template-detail-actions .button {
        width: 100%;
    }

    .route-template-detail-sidebar,
    .route-template-stop-grid,
    .route-template-metric-grid {
        grid-template-columns: 1fr;
    }

    .route-template-stop-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .route-template-stop-grip {
        display: none;
    }

    .route-template-stop-content,
    .route-template-move-inline-form,
    .route-template-stop-actions {
        grid-column: 1 / -1;
    }

    .route-template-stop-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 0;
        padding-top: 0.75rem;
        border-left: 0;
        border-top: 1px solid var(--rt-border);
    }

    .route-order-button {
        width: 100%;
        min-height: 2.75rem;
    }

    .route-template-move-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .route-template-detail-page {
        gap: 0.8rem;
    }

    .route-template-detail-hero,
    .route-template-detail-panel,
    .route-template-danger-zone {
        border-radius: 14px;
    }

    .route-template-summary-list div {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }

    .route-template-map-frame,
    .route-template-map-frame iframe,
    .route-template-map-empty {
        min-height: 230px;
    }

    .route-template-available-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

body.safari-render-stable .hero-panel,
body.safari-render-stable .panel,
body.safari-render-stable .poll-panel,
body.safari-render-stable .incident-panel,
body.safari-render-stable .weekly-glance-panel,
body.safari-render-stable .inventory-recent-activity-modal-card {
    content-visibility: visible;
    contain: none;
    contain-intrinsic-size: auto;
}

body.safari-render-stable .ops-page::before,
body.safari-render-stable .dashboard-workspace,
body.safari-render-stable .order-capture-page::before,
body.safari-render-stable .modal-backdrop,
body.safari-render-stable .landing-eyebrow-brand,
body.safari-render-stable .landing-device-item,
body.safari-render-stable .landing-hero-signals span,
body.safari-render-stable .landing-surface-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.safari-render-stable [data-poll-url].is-refreshing::after,
body.safari-render-stable #dashboard-stage-overview.is-refreshing::after,
body.safari-render-stable #dashboard-weekly-context.is-refreshing::after,
body.safari-render-stable #dashboard-board-content.is-refreshing::after {
    animation: none;
    opacity: 0.18;
    transform: none;
}
