* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-900: #0f3d2e;
    --green-800: #1e5a44;
    --green-700: #2b7a5a;
    --green-100: #d4e9e2;
    --cream: #f6f2ec;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --text: #1e3932;
    --muted: #5a625d;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    min-height: 100dvh;
    background:
        linear-gradient(rgba(15, 61, 46, 0.72), rgba(15, 61, 46, 0.88)),
        url('../images/background_2.jpg') center/cover fixed no-repeat;
}

body.drawer-open {
    overflow: hidden;
}

.menu-container {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.menu-header {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
}

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

.brand-lockup--textonly {
    gap: 0;
}

.eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-700);
    font-weight: 700;
    margin-bottom: 4px;
}

.menu-header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.28rem, 1.8vw, 1.76rem);
    color: var(--green-900);
}

.header-menu-button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(30, 57, 50, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.header-menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--green-900);
}

.site-info-drawer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 24, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.site-info-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.site-info-panel {
    width: min(460px, 100%);
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 50px rgba(0, 0, 0, 0.18);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    overflow: auto;
}

.site-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.drawer-kicker {
    color: var(--green-700);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.74rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.site-info-head h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    color: var(--green-900);
}

.drawer-close-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
}

.info-stack {
    display: grid;
    gap: 14px;
    align-content: start;
}

.info-card {
    padding: 16px 16px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(246, 242, 236, 0.76);
}

.info-card h3 {
    font-size: 1rem;
    color: var(--green-900);
    margin-bottom: 8px;
}

.info-card p {
    color: var(--muted);
    line-height: 1.6;
}

.global-search-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 0 0;
    background: transparent;
}

.global-search-card {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.search-input-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 22px;
    color: var(--green-900);
    background: rgba(212, 233, 226, 0.7);
    font-size: 1.05rem;
    font-weight: 700;
}

.global-search-input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    min-width: 0;
}

.global-search-input:focus {
    outline: none;
}

.global-search-input::placeholder {
    color: #76817a;
}

.clear-search-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--green-900);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.clear-search-button.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.clear-search-button:hover {
    background: rgba(212, 233, 226, 0.72);
}

#content-container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 132px;
}

.site-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 18;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.46);
    color: var(--green-900);
    text-align: center;
    font-weight: 700;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

button {
    font: inherit;
}

button,
a,
.category-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid var(--green-700);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .menu-header {
        padding: 14px 16px 10px;
        gap: 12px;
    }

    .eyebrow {
        font-size: 0.68rem;
        line-height: 1.35;
    }

    .site-info-panel {
        padding: 18px;
    }

    .global-search-shell {
        padding-top: 10px;
    }

    .global-search-card,
    #content-container {
        width: min(100% - 20px, 1400px);
    }

    .search-input-wrap {
        padding: 8px 10px;
    }

    .search-icon,
    .clear-search-button {
        width: 36px;
        height: 36px;
    }

    #content-container {
        padding-bottom: 148px;
    }

    .site-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        font-size: 0.92rem;
        padding-inline: 14px;
    }
}


.tool-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tool-switch-button {
    border: 1px solid var(--border);
    background: rgba(246, 242, 236, 0.9);
    color: var(--green-900);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
}

.tool-switch-button.is-active {
    background: var(--green-900);
    color: white;
    border-color: var(--green-900);
}

.info-card a {
    color: var(--green-800);
    font-weight: 700;
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

.global-search-shell {
    background: transparent;
}

.global-search-card {
    background: transparent;
}

.search-input-wrap {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: none;
}

.search-icon {
    background: rgba(255, 255, 255, 0.58);
    color: var(--green-900);
}

.global-search-input,
.clear-search-button {
    color: var(--green-900);
}

.global-search-input::placeholder {
    color: rgba(30, 57, 50, 0.72);
}

.floating-cart-button {
    position: fixed;
    right: 12px;
    bottom: 136px;
    z-index: 28;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 50%;
    background: var(--green-900);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.floating-cart-button.is-visible {
    display: inline-flex;
}

.floating-cart-icon {
    font-size: 1.4rem;
}

.floating-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f6c453;
    color: #163127;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 24, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cart-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cart-panel {
    width: min(460px, 100%);
    height: 100%;
    background: rgba(255, 255, 255, 0.99);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 50px rgba(0, 0, 0, 0.18);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
}

.cart-head,
.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cart-body {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.cart-items {
    display: grid;
    gap: 12px;
    align-content: start;
}

.cart-item,
.cart-empty-state {
    background: rgba(246, 242, 236, 0.76);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}

.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.cart-item-copy h3 {
    font-size: 1rem;
    color: var(--green-900);
    margin-bottom: 4px;
}

.cart-item-copy p,
.cart-item-copy span,
.cart-empty-state p {
    color: var(--muted);
}

.cart-item-actions {
    display: grid;
    align-content: start;
    justify-items: end;
    gap: 8px;
}

.cart-item-actions strong,
.cart-total-row strong {
    color: var(--green-900);
    font-size: 1.1rem;
}

.cart-remove-button,
.cart-clear-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
}

.cart-remove-button {
    background: rgba(30, 57, 50, 0.1);
    color: var(--green-900);
}

.cart-clear-button {
    width: 100%;
    background: var(--green-900);
    color: white;
}

@media (max-width: 768px) {
    .tool-switcher {
        grid-template-columns: 1fr;
    }

    .floating-cart-button {
        right: 8px;
        bottom: 176px;
        width: 58px;
        height: 58px;
    }

    .category-floating-ui {
        right: 8px;
    }

    .cart-panel {
        padding: 18px;
    }
}


.cart-line-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.cart-line {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.cart-line strong {
    color: var(--green-900);
}

.cart-line--muted {
    color: var(--muted);
    font-style: italic;
}

.cart-edit-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    background: var(--green-900);
    color: white;
}

.editor-drawer {
    position: fixed;
    inset: 0;
    z-index: 46;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 24, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.editor-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.editor-panel {
    width: min(520px, 100%);
    height: 100%;
    background: rgba(255, 255, 255, 0.99);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 50px rgba(0, 0, 0, 0.18);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
}

.editor-head,
.editor-total-row,
.editor-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.editor-body {
    overflow: auto;
    display: grid;
    gap: 16px;
    align-content: start;
    padding-right: 4px;
}

.editor-section {
    background: rgba(246, 242, 236, 0.76);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.editor-section h3 {
    color: var(--green-900);
    font-size: 1rem;
}

.editor-section p,
#editor-product-subtitle {
    color: var(--muted);
}

.milk-option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.milk-option-button,
.toggle-pill,
.stepper-button {
    border: 1px solid var(--border);
    background: white;
    color: var(--green-900);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.milk-option-button.is-active,
.toggle-pill.is-active {
    background: var(--green-900);
    color: white;
    border-color: var(--green-900);
}

.addon-counter-list {
    display: grid;
    gap: 10px;
}

.editor-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.editor-section-head h3 {
    margin: 0;
}

.editor-section-toggle {
    border: 0;
    background: rgba(255,255,255,0.92);
    color: var(--green-900);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

.addon-group-body.is-collapsed {
    display: none;
}

.addon-counter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.addon-copy strong {
    color: var(--green-900);
    font-size: 0.95rem;
}

.addon-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper-button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stepper-value {
    min-width: 24px;
    text-align: center;
    color: var(--green-900);
    font-weight: 800;
}

@media (max-width: 768px) {
    .editor-panel {
        padding: 18px;
    }
}


.cart-item.is-selected {
    border-color: rgba(30, 57, 50, 0.32);
    box-shadow: inset 0 0 0 1px rgba(30, 57, 50, 0.08);
}

.cart-select-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-900);
    font-size: 0.82rem;
    font-weight: 700;
}

.cart-select-toggle input {
    accent-color: var(--green-900);
}

.cart-footer {
    display: grid;
    gap: 12px;
}

.cart-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cart-secondary-button {
    border: 1px solid rgba(30, 57, 50, 0.14);
    border-radius: 12px;
    padding: 11px 12px;
    cursor: pointer;
    font-weight: 700;
    background: rgba(30, 57, 50, 0.08);
    color: var(--green-900);
}

.editor-text-input {
    width: 100%;
    border: 1px solid rgba(30, 57, 50, 0.14);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--green-900);
    background: rgba(255,255,255,0.96);
}

.orders-drawer {
    position: fixed;
    inset: 0;
    z-index: 47;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 24, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.orders-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.orders-panel {
    width: min(520px, 100%);
    height: 100%;
    background: rgba(255, 255, 255, 0.99);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 50px rgba(0, 0, 0, 0.18);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
}

.orders-body {
    overflow: auto;
    display: grid;
    gap: 16px;
    align-content: start;
    padding-right: 4px;
}

.orders-list {
    display: grid;
    gap: 12px;
}

.order-card {
    background: rgba(246, 242, 236, 0.76);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 12px;
}

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

.order-card-head h3,
.order-line strong {
    color: var(--green-900);
}

.order-card-head p,
.order-line span {
    color: var(--muted);
}

.order-card-items {
    display: grid;
    gap: 8px;
}

@media (max-width: 768px) {
    .cart-footer-actions {
        grid-template-columns: 1fr;
    }

    .orders-panel {
        padding: 18px;
    }
}


.cart-clear-button:disabled,
.cart-secondary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cart-footer-note {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: -4px;
}

.cart-line--discount span,
.cart-line--discount strong {
    color: var(--green-800);
    font-weight: 800;
}

.order-meta {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
}



.cart-secondary-button--danger {
    background: rgba(148, 27, 12, 0.08);
    color: #7a1f14;
    border-color: rgba(148, 27, 12, 0.18);
}

.order-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}


.qr-capture-stack {
    display: grid;
    gap: 12px;
}

.qr-capture-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,0.75);
}

.qr-capture-copy strong {
    display: block;
    color: var(--green-900);
    margin-bottom: 4px;
}

.qr-capture-copy p {
    margin: 0;
}

.qr-capture-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 640px) {
    .qr-capture-card {
        grid-template-columns: 1fr;
    }

    .qr-capture-actions {
        justify-content: stretch;
    }

    .qr-capture-actions .cart-secondary-button {
        flex: 1 1 0;
    }
}


.camera-capture-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 15, 0.72);
    backdrop-filter: blur(4px);
    z-index: 80;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
}

.camera-capture-modal.is-open {
    display: flex;
}

.camera-capture-panel {
    width: min(100%, 720px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #f7f4ee;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 22px 50px rgba(0,0,0,0.28);
    display: grid;
    gap: 16px;
    margin: auto 0;
}

.camera-capture-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.camera-capture-head--minimal {
    align-items: center;
}

.camera-capture-head h2 {
    color: var(--green-900);
}

.camera-capture-note {
    color: var(--muted);
    margin: 0;
}

.camera-preview-shell,
.camera-preview-result {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #0b1713;
    aspect-ratio: 3 / 4;
    width: min(100%, 420px);
    margin: 0 auto;
}

#camera-capture-video,
#camera-capture-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-crop-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(76%, 320px);
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255,255,255,0.95);
    border-radius: 22px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.34);
}

.camera-crop-frame::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(255,255,255,0.8);
    border-radius: 14px;
}

.camera-capture-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-preview-thumb {
    margin-top: 10px;
    width: 92px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.88);
}

@media (max-width: 640px) {
    .camera-capture-modal {
        padding: 10px;
    }

    .camera-capture-panel {
        border-radius: 22px;
        padding: 16px;
        max-height: calc(100vh - 20px);
    }

    .camera-preview-shell,
    .camera-preview-result {
        width: 100%;
        max-width: 100%;
    }

    .camera-crop-frame {
        width: min(82%, 300px);
    }

    .camera-capture-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(247,244,238,0.78), #f7f4ee 30%);
        padding-top: 10px;
    }

    .camera-capture-actions > button {
        flex: 1 1 0;
    }
}


.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(30,57,50,0.1);
    color: var(--green-900);
    font-weight: 700;
    cursor: pointer;
}

.cart-item-qty span {
    min-width: 14px;
    text-align: center;
    font-weight: 700;
    color: var(--green-900);
}


.saved-locals-toolbar {
    display: flex;
    gap: 10px;
}

.saved-locals-block {
    display: grid;
    gap: 10px;
}

.saved-locals-label {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.saved-locals-list, .stats-list {
    display: grid;
    gap: 10px;
}

.saved-locals-empty, .stats-empty-state {
    color: var(--muted);
    background: rgba(255,255,255,0.8);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 14px;
}

.saved-local-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.saved-local-checkbox {
    accent-color: var(--green-900);
}

.saved-local-remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(148,27,12,0.08);
    color: #7a1f14;
    cursor: pointer;
}

.orders-toolbar {
    display: grid;
    gap: 10px;
}

.stats-drawer {
    position: fixed;
    inset: 0;
    z-index: 48;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 24, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.stats-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.stats-panel {
    width: min(560px, 100%);
    height: 100%;
    background: rgba(255,255,255,0.99);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 50px rgba(0,0,0,0.18);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
}

.stats-body {
    overflow: auto;
    display: grid;
    gap: 16px;
    align-content: start;
    padding-right: 4px;
}

.stats-filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stats-filter-tab {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.84);
    color: var(--green-900);
    border-radius: 12px;
    padding: 11px 12px;
    font-weight: 700;
    cursor: pointer;
}

.stats-filter-tab.is-active {
    background: var(--green-900);
    color: white;
    border-color: var(--green-900);
}

.stats-filter-inputs {
    display: grid;
}

.stats-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stats-summary-row strong {
    color: var(--green-900);
    font-size: 1.3rem;
}

.stats-chart {
    display: grid;
    gap: 12px;
}

.stats-bar-row {
    display: grid;
    gap: 8px;
}

.stats-bar-head, .stats-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stats-bar-head strong, .stats-list-item strong {
    color: var(--green-900);
}

.stats-bar-head span, .stats-list-item span {
    color: var(--muted);
}

.stats-bar-track {
    height: 14px;
    background: rgba(30,57,50,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green-700), var(--green-900));
}

@media (max-width: 768px) {
    .stats-panel {
        padding: 18px;
    }
    .stats-summary-row {
        grid-template-columns: 1fr;
    }
}


.scroll-top-button {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    bottom: calc(94px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(30, 57, 50, 0.92);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    z-index: 1200;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.scroll-top-button.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-button:hover {
    background: rgba(17, 36, 31, 0.96);
}

@media (max-width: 768px) {
    .scroll-top-button {
        left: max(10px, env(safe-area-inset-left));
        bottom: calc(88px + env(safe-area-inset-bottom));
        width: 46px;
        height: 46px;
    }
}


.foam-base-chooser {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
}
.foam-base-chooser label {
  font-size: 0.78rem;
  color: rgba(30,57,50,0.72);
}
.foam-base-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(30,57,50,0.14);
  background: rgba(255,255,255,0.9);
  padding: 0.5rem 0.75rem;
  font: inherit;
}
