: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-pending: #d5a03f;
    --status-pending-ink: #7b5713;
    --status-deposit: #2d9fb1;
    --status-deposit-ink: #1c6672;
    --status-paid: #4d78cf;
    --status-paid-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;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    background-color: #f7efe4;
    background-image:
        linear-gradient(180deg, rgba(17, 30, 24, 0.46) 0%, rgba(17, 30, 24, 0.2) 22%, rgba(247, 239, 228, 0.92) 100%),
        radial-gradient(circle at top left, rgba(218, 166, 77, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(200, 108, 79, 0.14), transparent 30%),
        url("../images/backgrounds/site-bg.34b198382b24.jpg"),
        linear-gradient(180deg, #fffdf9 0%, var(--mist) 100%);
    background-position:
        center top,
        top left,
        top right,
        center top,
        center;
    background-repeat: no-repeat;
    background-size:
        cover,
        1400px 1400px,
        1200px 1200px,
        cover,
        cover;
    background-attachment: scroll;
    min-height: 100vh;
}

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

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

.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: minmax(0, 1fr) auto;
    grid-template-areas:
        "brand user"
        "nav nav";
    align-items: start;
    gap: 0.55rem 1rem;
    padding: 0.65rem clamp(0.75rem, 2vw, 1.5rem);
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-line);
    box-shadow: 0 18px 34px rgba(10, 20, 16, 0.22);
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    padding: 0.44rem 0.78rem;
    border-radius: 999px;
    background: var(--surface-strong);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-copy {
    margin: 0.22rem 0 0;
    color: var(--topbar-copy);
    max-width: 17rem;
    line-height: 1.28;
    font-size: 0.76rem;
}

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

.nav-shell {
    grid-area: nav;
    display: grid;
    gap: 0.35rem;
}

.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 {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-10%) rotate(45deg);
    transition: transform 180ms ease;
}

.nav-shell.is-open .nav-toggle::after {
    transform: translateY(15%) rotate(-135deg);
}

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

.topnav {
    min-width: 0;
    width: min(100%, 1180px);
    margin: 0 auto;
    justify-content: center;
    gap: 0.42rem 0.55rem;
    align-content: center;
}

.nav-link,
.user-chip {
    padding: 0.48rem 0.72rem;
    border: 1px solid rgba(22, 49, 41, 0.08);
    border-radius: 999px;
    background: var(--surface-muted);
    box-shadow: none;
    font-weight: 700;
    white-space: nowrap;
}

.nav-link {
    font-size: 0.92rem;
}

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

.user-chip {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.2;
    font-weight: 600;
    padding-right: 0.88rem;
    padding-left: 0.88rem;
}

.user-chip small {
    color: var(--ink-soft);
    font-size: 0.68rem;
}

.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: start;
}

.nav-link:hover,
.topbar .button-ghost:hover {
    background: var(--surface-strong);
}

.account-menu {
    position: relative;
}

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

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

.user-chip-button {
    position: relative;
    cursor: pointer;
    padding-right: 2.35rem;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.user-chip-button::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--ink-soft);
    border-bottom: 2px solid var(--ink-soft);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 180ms ease;
}

.account-menu[open] .user-chip-button::after {
    transform: translateY(-30%) rotate(-135deg);
}

.user-chip-button:hover {
    background: var(--surface-strong);
    border-color: rgba(218, 166, 77, 0.25);
}

.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;
    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: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(135deg, rgba(218, 166, 77, 0.22), rgba(255, 248, 241, 0.94));
    border-color: rgba(218, 166, 77, 0.34);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(218, 166, 77, 0.08);
}

.page-shell {
    width: min(1720px, calc(100% - 1.5rem));
    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: auto;
    contain-intrinsic-size: 1px 480px;
}

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

.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-pending {
    border-top: 4px solid var(--status-pending);
}

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

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

.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-paid);
    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-bar {
    display: flex;
    width: 100%;
    min-height: 0.7rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
}

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

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

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

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

.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.55rem;
}

.stage-overview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.62rem 0.72rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(25, 51, 43, 0.08);
}

.stage-overview-dot {
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

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

.stage-overview-item strong {
    font-size: 1rem;
    line-height: 1;
}

.stage-overview-item small {
    margin-top: 0.08rem;
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.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-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;
}

.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-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-icon {
    position: relative;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.advanced-filter-icon::before,
.advanced-filter-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(currentColor, currentColor) 0.1rem 0.15rem / 0.9rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.1rem 0.49rem / 0.9rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.1rem 0.83rem / 0.9rem 0.12rem no-repeat;
}

.advanced-filter-icon::after {
    background:
        radial-gradient(circle, currentColor 45%, transparent 48%) 0.62rem 0.03rem / 0.34rem 0.34rem no-repeat,
        radial-gradient(circle, currentColor 45%, transparent 48%) 0.24rem 0.37rem / 0.34rem 0.34rem no-repeat,
        radial-gradient(circle, currentColor 45%, transparent 48%) 0.72rem 0.71rem / 0.34rem 0.34rem no-repeat;
}

.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-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

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

.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;
}

.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;
}

.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-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-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);
}

.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;
}

.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;
}

.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);
    overflow-y: auto;
    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-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;
    cursor: pointer;
}

.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-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::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--leaf), var(--gold));
}

.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 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    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-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, #3c8b70, var(--leaf));
    color: #fff;
}

.button-danger {
    background: linear-gradient(135deg, #c2574a, var(--rosewood));
    color: #fff;
}

/* 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;
}

.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(320px, 1fr));
    gap: 1rem;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.kanban-lane {
    min-width: 0;
    padding: 1rem;
    border-radius: calc(var(--radius-lg) - 6px);
    border: 1px solid rgba(25, 51, 43, 0.12);
    background: linear-gradient(180deg, rgba(248, 240, 228, 0.98), rgba(239, 230, 217, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 18px 34px rgba(66, 40, 25, 0.08);
}

.lane-pending {
    border-top: 5px solid var(--status-pending);
    background: linear-gradient(180deg, #fbf5e7, #efe4cb);
}

.lane-deposit {
    border-top: 5px solid var(--status-deposit);
    background: linear-gradient(180deg, #edf7f6, #dbecea);
}

.lane-paid {
    border-top: 5px solid var(--status-paid);
    background: linear-gradient(180deg, #eef3fd, #dfe7f8);
}

.lane-in_route {
    border-top: 5px solid var(--status-in-route);
    background: linear-gradient(180deg, #faf0e8, #eedfd4);
}

.lane-delivered {
    border-top: 5px solid var(--status-delivered);
    background: linear-gradient(180deg, #edf7f1, #deece4);
}

.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;
}

/* Non-color-only status cue: a leading dot that inherits each status'
   ink color (currentColor), so the pill is scannable beyond the pale fill. */
.status-pill[class*="order-state-"]::before,
.status-pill[class*="payment-"]::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
}

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

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

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

.lane-badge-paid {
    background: rgba(77, 120, 207, 0.14);
    color: var(--status-paid-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;
}

.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);
}

.view-icon {
    position: relative;
    display: block;
    width: 1.1rem;
    height: 1.1rem;
}

.view-icon-cards {
    background:
        linear-gradient(currentColor, currentColor) 0 0 / 0.42rem 0.42rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.68rem 0 / 0.42rem 0.42rem no-repeat,
        linear-gradient(currentColor, currentColor) 0 0.68rem / 0.42rem 0.42rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.68rem 0.68rem / 0.42rem 0.42rem no-repeat;
}

.view-icon-list {
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.view-icon-list::before,
.view-icon-list::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 2px solid currentColor;
}

.view-icon-list::before {
    top: 0.45rem;
}

.view-icon-list::after {
    top: 0.9rem;
}

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

.order-state-deposit {
    background: rgba(45, 159, 177, 0.16);
    color: var(--status-deposit-ink);
}

.payment-paid,
.order-state-paid {
    background: rgba(77, 120, 207, 0.14);
    color: var(--status-paid-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;
}

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

.route-template-create-form {
    margin-bottom: 1rem;
}

.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;
}

.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 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;
}

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

.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 {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.35;
}

.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);
}

.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;
}

.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;
}

.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;
}

.delivery-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
    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.9rem;
    align-items: flex-start;
}

.delivery-card-header {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(25, 51, 43, 0.08);
}

.delivery-card-heading {
    min-width: 0;
}

.delivery-card-heading h3 {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
    line-height: 1.15;
}

.delivery-customer-subcopy {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.delivery-card-header-meta {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.delivery-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.delivery-meta-chip {
    background: rgba(25, 51, 43, 0.08);
    color: var(--ink-soft);
}

.delivery-route-toggle {
    justify-content: center;
    padding: 0.38rem 0.62rem;
}

.delivery-card-body {
    display: grid;
    gap: 0.7rem;
}

.delivery-products-preview {
    margin-top: 0.1rem;
    padding: 0.7rem 0.75rem;
}

.delivery-card-details {
    display: grid;
    gap: 0.65rem;
}

.delivery-detail-row {
    display: grid;
    gap: 0.22rem;
}

.delivery-detail-label {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-address {
    margin: 0;
    color: var(--ink);
    line-height: 1.45;
}

.delivery-message-block {
    display: grid;
    gap: 0.4rem;
}

.delivery-message-compact {
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
}

.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.85rem;
    width: 100%;
}

.driver-actions form {
    margin: 0;
}

.delivery-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(25, 51, 43, 0.08);
    flex-direction: column;
    align-items: stretch;
}

.delivery-card-footer .button-small {
    min-height: 2.45rem;
}

.delivery-products-preview .order-products-list {
    gap: 0.28rem;
    font-size: 0.88rem;
}

.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 {
    display: grid;
    gap: 1.1rem;
}

.order-detail-header {
    margin-bottom: 0;
}

.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: 1rem;
}

.order-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.32fr);
    gap: 1.2rem;
    align-items: start;
}

.order-record-main {
    display: grid;
    gap: 1rem;
}

.order-info-section,
.order-payment-summary {
    min-width: 0;
    display: grid;
    gap: 0.8rem;
    padding-block: 0.1rem 1rem;
    border-bottom: 1px solid rgba(25, 51, 43, 0.1);
}

.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;
}

.order-products-section {
    gap: 0.9rem;
}

.florist-brief-section {
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(47, 124, 98, 0.16);
    border-radius: calc(var(--radius-md) + 4px);
    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%);
    box-shadow: 0 18px 34px rgba(33, 57, 48, 0.08);
}

.florist-brief-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.florist-brief-header h3,
.section-copy-block h4 {
    margin: 0.2rem 0 0;
}

.florist-brief-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.brief-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    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.8rem;
    font-weight: 800;
}

.florist-brief-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.order-products-feature,
.florist-notes-panel {
    min-width: 0;
    display: grid;
    gap: 0.85rem;
}

.section-copy-block h4 {
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1.1;
}

.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 {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(25, 51, 43, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 22px rgba(33, 57, 48, 0.05);
}

.order-product-line-featured:first-child {
    padding-top: 0.95rem;
}

.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;
}

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

.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;
}

.order-product-empty {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 700;
}

.florist-note-stack {
    display: grid;
    gap: 0.8rem;
}

.florist-note-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 18px;
    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(255, 247, 238, 0.98), rgba(255, 253, 249, 0.9));
    border-color: rgba(200, 108, 79, 0.16);
}

.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(96px, 0.36fr) 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 {
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 800;
}

.florist-delivery-quicklist dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.info-row-stack,
.info-rows-two div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

.order-payment-summary {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(47, 124, 98, 0.16);
    border-radius: var(--radius-md);
    background: rgba(247, 252, 248, 0.74);
}

.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-rows div {
    grid-template-columns: 1fr auto;
}

.order-message-section {
    border-bottom: 0;
    padding-bottom: 0;
}

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

.info-rows-two div {
    padding: 0.9rem;
    border: 1px solid rgba(25, 51, 43, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 253, 249, 0.62);
}

.info-rows-two div:first-child {
    border-top: 1px solid rgba(25, 51, 43, 0.1);
    padding-top: 0.9rem;
}

.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;
}

.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;
}

.incident-panel {
    margin-top: 1rem;
}

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

.danger-zone-panel {
    border-color: rgba(141, 59, 44, 0.18);
}

.danger-zone-header {
    align-items: end;
}

.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);
}

.auth-shell {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(520px, 100%);
    padding: 2rem;
}

.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-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-metric-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.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-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.inventory-sidebar {
    display: grid;
    gap: 1rem;
    align-self: start;
}

.inventory-section-header {
    align-items: start;
}

.inventory-table {
    min-width: 980px;
}

.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;
}

.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-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-legend-item {
    grid-template-columns: auto 1fr;
    align-items: start;
}

.inventory-secondary-grid,
.inventory-insights-grid,
.inventory-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-ranking-item {
    display: grid;
    gap: 0.55rem;
}

.inventory-ranking-bar {
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(25, 51, 43, 0.08);
    overflow: hidden;
}

.inventory-ranking-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--leaf), var(--gold));
}

.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-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-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 (min-width: 1081px) {
    .inventory-sidebar {
        position: sticky;
        top: 5.6rem;
    }
}

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "nav"
            "user";
        align-items: stretch;
    }

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

    .topnav,
    .user-block {
        justify-content: flex-start;
    }

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

    .inventory-metric-strip,
    .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;
    }

    .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;
    }

    .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,
    .delivery-filter-form,
    .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 (max-width: 920px) {
    .page-shell {
        width: min(1320px, calc(100% - 1.5rem));
    }

    .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,
    .delivery-filter-form,
    .route-preview-panel,
    .florist-brief-grid,
    .detail-grid,
    .order-record,
    .card-actions,
    .compact-form-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;
    }

    .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.8rem 0.85rem 0.95rem;
        gap: 0.75rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "nav"
            "user";
    }

    .brand-mark {
        padding: 0.72rem 1rem;
        font-size: 1rem;
    }

    .brand-copy {
        margin-top: 0.35rem;
        max-width: 18rem;
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .topbar,
    .dashboard-heading,
    .hero-panel,
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-shell {
        width: min(1320px, calc(100% - 0.85rem));
        margin-top: 0.9rem;
        gap: 1rem;
    }

    .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;
    }

    .florist-brief-header,
    .florist-brief-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .metric-strip,
    .filter-form,
    .board-filter-form,
    .delivery-filter-form,
    .route-preview-panel,
    .history-filter-grid,
    .form-grid,
    .platform-search,
    .order-record,
    .info-rows div,
    .info-rows-two,
    .payment-rows div,
    .florist-brief-grid,
    .order-product-line,
    .tenant-grid,
    .executive-grid,
    .detail-grid,
    .card-actions,
    .compact-form-grid,
    .order-intake-grid,
    .order-payment-grid,
    .status-control-form,
    .incident-grid,
    .driver-grid,
    .stage-overview-legend {
        grid-template-columns: 1fr;
    }

    .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, 255, 255, 0.1);
        border-radius: 1.3rem;
        background: rgba(255, 255, 255, 0.06);
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .nav-shell.is-open .topnav {
        display: grid;
    }

    .topnav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.85rem 1rem;
        border-color: rgba(255, 255, 255, 0.06);
    }

    .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%;
    }

    .button,
    .nav-link,
    .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;
    }

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

    .message {
        width: 100%;
    }

    .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;
    }

    .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;
    }

    .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;
    }

    .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;
    }

    .auth-shell {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .topbar {
        position: static;
    }

    .brand-mark {
        width: 100%;
        justify-content: center;
    }

    .brand-copy {
        font-size: 0.92rem;
    }

    .page-shell {
        width: min(1320px, calc(100% - 0.65rem));
    }

    .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;
    }

    .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);
        padding: 1rem;
    }

    .kanban-board {
        grid-auto-columns: minmax(88vw, 1fr);
    }

    .data-table {
        min-width: 580px;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}
