:root {
    --ink: #171717;
    --muted: #667085;
    --line: #e5e7eb;
    --brand: #f56e0e;
    --brand-dark: #d85b05;
    --money: #16803c;
    --money-dark: #0f6b31;
    --accent: #ef4444;
    --paper: #f6f7fb;
    --panel: #ffffff;
    --soft: #f3f4f6;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 250, 242, .95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.wrap {
    width: min(1120px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    margin: 0 auto;
}
.nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    font-weight: 800;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}
.muted { color: var(--muted); }
.btn, button {
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    padding: 11px 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    text-align: center;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn:hover, button:hover {
    background: var(--brand-dark);
    box-shadow: 0 10px 22px rgba(245, 110, 14, .22);
    transform: translateY(-1px);
}
.btn:disabled, button:disabled {
  background: #6b6b6b;
    color: #ff9200fa;
    cursor: not-allowed;
}
.btn.secondary, button.secondary { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.btn.danger, button.danger { background: var(--accent); }
.hero {
    padding: 34px 0 20px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
    align-items: center;
}
.hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: .98; margin: 0 0 14px; letter-spacing: 0; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 20px; }
.hero-logo {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.store-hours {
    display: inline-flex;
    margin-top: -8px !important;
    padding: 8px 11px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand-dark) !important;
    font-weight: 800;
}
.store-closed {
    display: block;
    width: fit-content;
    margin-top: -10px !important;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff3d8;
    border: 1px solid #ecd79a;
    color: #6f5200 !important;
    font-weight: 800;
}
.hero-media {
    min-height: 300px;
    border-radius: 8px;
    background-color: #eef1eb;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}
.hero-media.is-empty {
    border: 1px dashed #cfd5ca;
    box-shadow: none;
}
.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0 18px;
}
.chip {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 700;
}
.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 110px;
}
.section-title { margin: 28px 0 14px; font-size: 24px; }
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.card, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.product { padding: 14px; display: grid; gap: 10px; }
.card.product > img {
    width: 100%;
    aspect-ratio: 2 / 2;
    height: auto;
    border-radius: 6px;
    background: #f3eee6;
    object-fit: contain;
    object-position: center;
}
.product.featured { border-color: rgba(47, 125, 70, .45); }
.product h3 { margin: 0; font-size: 18px; }
.product p { margin: 0; color: var(--muted); min-height: 42px; }
.price { font-size: 18px; font-weight: 800; color: var(--money-dark); }
.cart {
    padding: 16px;
}
.cart h2 { margin: 0 0 12px; }
.cart-drawer {
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    z-index: 70;
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    transform: translate(-50%, -48%) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(30, 37, 32, .28);
}
.cart-open .cart-drawer {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.cart-drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -16px -16px 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.cart-drawer-head h2 {
    margin: 0;
}
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(30, 37, 32, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.cart-open .cart-overlay {
    opacity: 1;
    pointer-events: auto;
}
.cart-open {
    overflow: hidden;
}
.cart-bar {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 60;
    width: min(520px, calc(100% - 28px));
    min-height: 64px;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(33, 93, 52, .18);
    background: var(--brand);
    color: #fff;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    box-shadow: 0 14px 34px rgba(30, 37, 32, .24);
}
.cart-bar:hover {
    background: var(--brand-dark);
}
.cart-open .cart-bar {
    display: none;
}
.cart-bar-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
}
.cart-bar strong,
.cart-bar small {
    display: block;
    text-align: left;
}
.cart-bar small {
    color: rgba(255, 255, 255, .82);
}
.cart-bar-action {
    font-weight: 800;
    white-space: nowrap;
}
.cart h3 {
    margin: 14px 0 8px;
    font-size: 16px;
}
.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cart-item > div {
    min-width: 0;
}
.cart-item .muted {
    overflow-wrap: anywhere;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
    margin: 12px 0;
}
.cart-review {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.payment-options {
    display: grid;
    gap: 8px;
}
.payment-option {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
}
.payment-option input {
    width: auto;
}
.payment-option strong,
.payment-option small {
    display: block;
}
.payment-option small {
    margin-top: 2px;
    color: var(--muted);
}
.payment-option:has(input:checked) {
    border-color: rgba(47, 125, 70, .55);
    background: #f1f8ef;
}
.pickup-card {
    border: 1px solid rgba(47, 125, 70, .35);
    border-radius: 8px;
    background: #f1f8ef;
    padding: 12px;
    margin: 8px 0 12px;
}
.pickup-card strong {
    display: block;
    color: var(--brand-dark);
    margin-bottom: 4px;
}
.pickup-card p {
    margin: 0;
    color: var(--ink);
}
.delivery-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 12px;
    border: 1px solid #e0d2bd;
    border-radius: 8px;
    padding: 12px;
    background: #fffaf2;
}
.delivery-fields[hidden] {
    display: none;
}
.thanks-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(30, 37, 32, .52);
}
.thanks-dialog {
    width: min(420px, 100%);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(30, 37, 32, .28);
    text-align: center;
}
.thanks-dialog h2 {
    margin: 0 0 8px;
}
.thanks-dialog p {
    margin: 0 0 12px;
    color: var(--muted);
}
.thanks-dialog .thanks-hint {
    color: var(--ink);
    background: #f1f8ef;
    border: 1px solid rgba(47, 125, 70, .25);
    border-radius: 8px;
    padding: 10px;
    text-align: left;
    white-space: pre-wrap;
}
.thanks-dialog > strong {
    display: block;
    font-size: 24px;
    color: var(--brand-dark);
    margin-bottom: 16px;
}
.thanks-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.payment-result {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}
.payment-result h3 {
    margin: 0;
}
.payment-result img {
    width: min(220px, 100%);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.order-track {
    padding-top: 28px;
    padding-bottom: 48px;
}
.order-track-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    margin: 18px 0;
}
.track-card {
    margin-top: 14px;
}
.track-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0;
}
.track-steps span {
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--muted);
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    padding: 6px;
}
.track-steps span.active {
    background: #f1f8ef;
    border-color: rgba(47, 125, 70, .45);
    color: var(--brand-dark);
}
.track-payment {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    display: grid;
    gap: 6px;
}
.track-payment strong,
.track-payment span {
    display: block;
}
.track-payment.pending {
    background: #fff8e8;
    border-color: #ecd79a;
}
.track-payment.paid {
    background: #f1f8ef;
    border-color: rgba(47, 125, 70, .45);
}
.track-payment.offline {
    background: var(--soft);
}
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(245, 110, 14, .58);
    box-shadow: 0 0 0 4px rgba(245, 110, 14, .12);
    outline: 0;
}
input[type="checkbox"] { width: auto; }
textarea { min-height: 92px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 12px 0;
    background: #fff3d8;
    border: 1px solid #ecd79a;
}
.alert:empty { display: none; }
.choice-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(30, 37, 32, .45);
    display: grid;
    place-items: center;
    padding: 0;
}
.choice-dialog {
    width: min(680px, 100%);
    height: min(100vh, 920px);
    max-height: 100vh;
    overflow: auto;
    background: #fffaf2;
    border-radius: 0;
    padding: 0 16px 86px;
    box-shadow: 0 22px 50px rgba(30, 37, 32, .22);
}
.choice-modal-drawer {
    position: absolute;
    inset: 0;
    z-index: 4;
    place-items: stretch;
    background: #fffaf2;
}
.choice-modal-drawer .choice-dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    box-shadow: none;
}
.choice-header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #e1d8ca;
    background: #fffaf2;
}
.choice-back {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 24px;
    font-weight: 400;
}
.choice-back:hover {
    background: var(--soft);
}
.choice-product {
    display: grid;
    grid-template-columns: 152px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
}
.choice-product-image {
    width: 152px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: linear-gradient(160deg, #ffe5a9, #f6c84f);
    display: grid;
    place-items: center;
    color: #a83222;
    font-size: 36px;
    overflow: hidden;
}
.choice-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.choice-dialog h2 {
    margin: 0;
    font-size: 22px;
}
.choice-product strong {
    display: block;
    margin-top: 4px;
}
.choice-product p {
    margin: 8px 0 0;
    color: var(--muted);
}
.choice-search {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    margin: 2px 0 12px;
    border: 1px solid #dfd2c0;
    border-radius: 8px;
    background: #fff;
    padding: 0 12px;
}
.choice-search input {
    border: 0;
    padding-left: 0;
}
.choice-group {
    border: 1px solid #e0d2bd;
    border-radius: 8px;
    margin: 10px 0;
    padding: 0;
    background: #fff;
    overflow: hidden;
}
.choice-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #ede8df;
}
.choice-group-head strong {
    display: block;
}
.choice-group-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.choice-group-head em {
    background: #d93825;
    color: #fff;
    border-radius: 4px;
    padding: 3px 7px;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
}
.choice-option {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    min-height: 54px;
    font-weight: 700;
    border-top: 1px solid #efe5d6;
    cursor: pointer;
}
.choice-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.choice-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #f3eee6;
    filter: grayscale(1);
    opacity: .75;
}
.choice-option strong {
    color: var(--muted);
    font-size: 24px;
    font-weight: 400;
}
.choice-option:has(input:checked) {
    background: #fff6e8;
}
.choice-option:has(input:checked) strong::before {
    content: "✓";
}
.choice-option:has(input:checked) strong {
    color: var(--brand-dark);
    font-size: 0;
}
.choice-option:has(input:checked) strong::before {
    font-size: 18px;
}
.choice-group-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.choice-group-badges small {
    min-width: 42px;
    text-align: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #d7c8b6;
    color: var(--muted);
    font-weight: 800;
}
.choice-group-badges small.is-complete {
    background: #e8f5e8;
    border-color: #86b98a;
    color: #216b2f;
}
.choice-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}
.choice-option {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 14px;
    border: 1px solid #e0d2bd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(30, 37, 32, .04);
}
.choice-option-icon {
    display: none;
}
.choice-option-text {
    display: block;
    line-height: 1.25;
}
.choice-option strong {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #d4c6b4;
    border-radius: 999px;
    background: #fffaf2;
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 700;
}
.choice-option:has(input:checked) {
    background: #fff7e8;
    border-color: var(--brand-dark);
    box-shadow: inset 0 0 0 1px var(--brand-dark), 0 2px 10px rgba(168, 50, 34, .12);
}
.choice-option:has(input:checked) strong {
    background: var(--brand-dark);
    color: var(--brand-dark);
}
.choice-option:has(input:checked) strong::before {
    content: "✓";
    color: #fff;
}
.choice-footer {
    position: sticky;
    /* bottom: 0; */
    margin: 14px -16px -86px;
    padding: 12px 16px;
    background: rgba(255, 250, 242, .96);
    border-top: 1px solid #e1d8ca;
}
.choice-footer button {
    width: 100%;
    min-height: 48px;
}
.choice-footer button:disabled,
.choice-footer button.disabled {
   background: #6b6b6b;
    color: #ff9200fa;
    cursor: not-allowed;
}
.rules-builder {
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    padding: 14px;
    background: #fcfcfd;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.rules-builder h3 {
    margin: 0;
}
.rule-group {
    display: grid;
    grid-template-columns: 1.4fr 150px 100px 100px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    background: #fff;
}
.rule-group:first-child {
    margin-top: 0;
}
.rule-group textarea {
    min-height: 74px;
}
.daily-menu-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.turnstile-box {
    margin: 14px 0;
    min-height: 65px;
}
.daily-ifood-marmitas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
    gap: 10px;
    margin-top: 16px;
}
.daily-ifood-marmita {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}
.daily-ifood-marmita.is-linked {
    border-color: rgba(22, 128, 60, .3);
    background: #f0fdf4;
}
.daily-ifood-marmita strong,
.daily-ifood-marmita small {
    display: block;
    overflow-wrap: anywhere;
}
.daily-ifood-marmita small {
    margin-top: 4px;
    color: var(--muted);
}
.daily-ifood-marmita form {
    flex: 0 0 auto;
}
.daily-menu-column {
    min-width: 0;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}
.daily-menu-column header,
.daily-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.daily-menu-column header {
    margin-bottom: 10px;
}
.daily-menu-column h3 {
    margin: 0;
    color: #111827;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.daily-menu-column header span {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    /* border: 1px solid rgba(229, 231, 235, .9); */
    border: 1px solid rgb(255 67 2 / 94%);
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
}
.daily-menu-list {
    display: grid;
    gap: 8px;
}
.daily-menu-item {
    padding: 10px;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    background: #fff;
}
.daily-menu-item.is-on {
    border-color: rgba(22, 128, 60, .28);
    background: #f0fdf4;
}
.daily-menu-item strong,
.daily-menu-item small {
    display: block;
    overflow-wrap: anywhere;
}
.daily-menu-item strong {
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
}
.daily-menu-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}
.daily-menu-item-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.daily-menu-item-info > div {
    min-width: 0;
}
.daily-menu-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: cover;
    border-radius: 7px;
}
.daily-menu-item form {
    flex: 0 0 auto;
}
.daily-menu-item button {
    min-height: 36px;
    padding: 8px 10px;
}
.daily-menu-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.daily-menu-actions .btn,
.daily-menu-actions button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
}
.image-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(112px, 140px);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}
.image-upload > * {
    min-width: 0;
}
.image-upload p {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}
.image-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.image-picker span {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: var(--ink);
    min-height: 42px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    cursor: pointer;
    max-width: 100%;
    text-align: center;
}
.product-image-preview {
    width: min(140px, 100%);
    aspect-ratio: 4 / 3;
    border: 1px dashed #cfd5ca;
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    background: var(--soft);
}
.product-image-preview img,
.product-list-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    min-width: 0;
}
.product-list-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.product-list-item img {
    width: 52px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}
.store-images {
    display: grid;
    gap: 12px;
}
.store-image-preview.is-logo {
    aspect-ratio: 1 / 1;
}
.schedule-builder {
    display: grid;
    gap: 12px;
    border: 1px solid #d8ead9;
    border-radius: 8px;
    padding: 14px;
    background: #f1f8ef;
}
.schedule-builder h3,
.schedule-builder p {
    margin: 0;
}
.schedule-days {
    display: grid;
    gap: 10px;
}
.schedule-day {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 150px 150px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #dfe8da;
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
}
.schedule-toggle {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.schedule-toggle span {
    font-size: 15px;
}

.admin-shell {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(246, 247, 251, 0) 240px),
        /* #b9b9b969; */
        #b9b9b9;
        /* #f6f7fb; */
}
.admin-shell .wrap,
.admin-header,
.admin-main,
.admin-shell .panel,
.admin-shell .card {
    max-width: 100%;
}
.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgb(255 112 8 / 74%);
    border-bottom: 1px solid rgba(226, 232, 240, .72);
    backdrop-filter: blur(22px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.admin-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    min-width: 0;
}
.admin-shell .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
    flex: 0 1 220px;
    min-width: 0;
}
.admin-shell .brand span {
    max-width: min(230px, 100%);
    overflow-wrap: anywhere;
    line-height: 1.18;
}
.admin-shell .brand::before {
    content: "";
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f56e0e, #ffb020);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .48), 0 14px 24px rgba(245, 110, 14, .22);
    flex: 0 0 auto;
}
.admin-shell .brand.has-logo::before {
    display: none;
}
.admin-shell .brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 12px 22px rgba(15, 23, 42, .12);
    background: #fff;
    flex: 0 0 auto;
}
.admin-nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.admin-links {
    display: flex;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    align-items: center;
    padding: 6px;
    border: 1px solid rgba(226, 232, 240, .82);
    border-radius: 999px;
    background: rgba(248, 250, 252, .86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
    scrollbar-width: none;
}
.admin-links::-webkit-scrollbar {
    display: none;
}
.admin-links a {
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.admin-links a.active,
.admin-links a:hover {
    background: #fff;
    color: #111827;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}
.admin-theme-toggle {
    width: 46px;
    min-height: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    white-space: nowrap;
    background: #fff;
    color: #111827;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.admin-theme-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}
.theme-icon {
    width: 18px;
    height: 18px;
    display: block;
    background: currentColor;
}
.theme-icon-moon {
    border-radius: 999px;
    box-shadow: inset -6px 0 0 #fff;
}
.theme-icon-sun {
    display: none;
    border-radius: 999px;
    background:
        radial-gradient(circle, currentColor 0 38%, transparent 40%),
        conic-gradient(from 0deg, transparent 0 7%, currentColor 7% 11%, transparent 11% 20%, currentColor 20% 24%, transparent 24% 33%, currentColor 33% 37%, transparent 37% 46%, currentColor 46% 50%, transparent 50% 59%, currentColor 59% 63%, transparent 63% 72%, currentColor 72% 76%, transparent 76% 85%, currentColor 85% 89%, transparent 89% 100%);
}
.admin-logout {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}
.admin-logout:hover {
    color: #111827;
    background: rgba(255, 255, 255, .74);
}
.admin-main {
    display: grid;
    gap: 28px;
    padding: 28px 0 52px;
    min-width: 0;
}
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    min-width: 0;
    flex-wrap: wrap;
}
.toolbar > *,
.section-heading > *,
.date-filter > * {
    min-width: 0;
}
.toolbar h1,
.toolbar h2,
.section-title {
    color: #111827;
    letter-spacing: 0;
}
.toolbar h1 {
    margin: 0 0 4px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
}
.toolbar h2 {
    margin: 0 0 4px;
    font-size: 22px;
}
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.section-heading .section-title {
    margin-bottom: 0;
}
.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.date-filter label {
    min-width: 180px;
}
.orders-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.orders-filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.orders-filter-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.orders-filter input[type="date"] {
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
}


.orders-filter button,
.orders-filter .btn {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 8px;
    white-space: nowrap;
}


.print-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}


.print-tools form {
    margin: 0;
}


.compact-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f8fafc;
}


.compact-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}


/* switch */
.switch {
    width: 38px;
    height: 20px;
    border-radius: 20px;
    background: #cbd5e1;
    position: relative;
    transition: .2s;
}


.switch::after {
    content: "";
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: .2s;
}


.compact-toggle input {
    display: none;
}


.compact-toggle input:checked + .switch {
    background: #ff4302;
}


.compact-toggle input:checked + .switch::after {
    transform: translateX(18px);
}



/* mobile */
@media(max-width:700px){

    .orders-filter {
        flex-direction: column;
        align-items: stretch;
    }


    .orders-filter-form {
        width: 100%;
    }


    .orders-filter-form label {
        width: 100%;
    }


    .orders-filter button,
    .orders-filter .btn {
        width: 100%;
    }


    .print-tools {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

}
.admin-shell .product {
    padding: 20px;
}
.admin-section {
    margin-bottom: 12px;
}
.order-detail-panel {
    margin-top: 10px;
}
.order-detail-panel .toolbar {
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(229, 231, 235, .72);
}
.order-detail-panel h3 {
    margin-top: 24px;
}
.side-drawer[hidden] {
    display: none;
}
.side-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
}
.side-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
}
.side-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(560px, 100vw);
    height: 100%;
    overflow: auto;
    padding: 22px;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: -28px 0 60px rgba(15, 23, 42, .22);
}
.side-drawer-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.side-drawer-head h2 {
    margin: 0 0 4px;
    color: #111827;
}
.side-drawer .order-form {
    display: grid;
    gap: 12px;
}
.side-drawer .grid,
.side-drawer .order-item-entry {
    grid-template-columns: 1fr;
}
.side-drawer .order-item-entry button {
    min-height: 46px;
}
.side-drawer-open {
    overflow: hidden;
}
.admin-shell .price {
    color: var(--money);
    font-size: 24px;
}
.admin-shell .btn.secondary,
.admin-shell button.secondary,
.btn.secondary:hover,
button.secondary:hover {
    background: #fff;
    color: #111827;
    border-color: #d0d5dd;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}
.admin-shell .btn.danger,
.admin-shell button.danger {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.admin-shell .btn.danger:hover,
.admin-shell button.danger:hover {
    background: #ffe4e6;
    box-shadow: 0 8px 18px rgba(190, 18, 60, .12);
}
.admin-shell .btn.success,
.admin-shell button.success {
    background: #16a34a;
    color: #fff;
    border: 1px solid #15803d;
    box-shadow: 0 10px 22px rgba(22, 163, 74, .18);
}
.admin-shell .btn.success:hover,
.admin-shell button.success:hover {
    background: #15803d;
    border-color: #166534;
    box-shadow: 0 12px 26px rgba(22, 163, 74, .24);
}
.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}
.table-scroll table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}
.right {
    text-align: right;
}
th, td {
    text-align: left;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(229, 231, 235, .82);
    vertical-align: top;
    overflow-wrap: anywhere;
}
th {
    background: #f9fafb;
    font-size: 12px;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: .04em;
}
tbody tr:hover td { background: #fcfcfd; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.order-detail-actions {
    align-items: flex-start;
    justify-content: flex-end;
}
.order-detail-actions form {
    display: grid;
    gap: 8px;
    min-width: min(260px, 100%);
}
.order-detail-actions .btn {
    min-height: 44px;
}
.order-items-fieldset {
    border: 1px solid rgba(229, 231, 235, .85);
    border-radius: 6px;
    padding: 12px;
    margin: 0 0 12px;
    background: transparent;
}
.order-items-fieldset legend {
    padding: 0 8px;
    color: #111827;
    font-weight: 800;
}
.order-item-entry {
    grid-template-columns: minmax(280px, 2fr) 110px minmax(200px, 1fr) 140px;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}
.order-item-entry button {
    min-height: 43px;
    align-self: stretch;
}
.product-picker {
    position: relative;
    grid-column: 1 / -1;
}
.side-drawer .product-picker {
    margin-bottom: 0;
}
.product-picker input {
    padding-right: 32px;
    padding: 8px 12px;
    font-size: 13px;
}
.product-picker::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #667085;
    border-bottom: 1.5px solid #667085;
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
}
.product-picker-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 45;
    max-height: 320px;
    overflow: auto;
    padding: 4px;
    border: 1px solid rgba(229, 231, 235, .85);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}
.product-picker-option {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    color: #111827;
    text-align: left;
    box-shadow: none;
    transform: none;
    border: 1px solid transparent;
}
.product-picker-option:hover,
.product-picker-option:focus {
    background: rgba(107, 114, 128, 0.08);
    border-color: rgba(107, 114, 128, 0.2);
    color: #111827;
    box-shadow: none;
    outline: 0;
    transform: none;
}
.product-picker-option strong,
.product-picker-option small {
    display: block;
}
.product-picker-option strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}
.product-picker-option small {
    margin-top: 1px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: normal;
}
.product-picker-option em {
    color: var(--money);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}
.product-picker-empty {
    margin: 0;
    padding: 14px;
    color: var(--muted);
    text-align: center;
}
.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 800;
    font-size: 12px;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, .22);
}
.kanban {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px 2px 18px;
}
.print-tools {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    margin: -4px 0 12px;
}
.print-tools form {
    margin: 0;
}
.print-tools label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(229, 231, 235, .6);
    border-radius: 6px;
    background: #fff;
    padding: 6px 8px;
    box-shadow: none;
    font-size: 13px;
}

/* Make the checkbox inputs slightly smaller for compact appearance */
.print-tools input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Compact toggle used in orders controls */
.compact-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #0f172a;
}
.compact-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.compact-toggle .switch {
    width: 34px;
    height: 18px;
    background: #e6e9ee;
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
}
.compact-toggle .switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15,23,42,0.15);
    transition: transform 180ms ease, left 180ms ease;
}
.compact-toggle input[type="checkbox"]:checked + .switch {
    background: #10b981;
}
.compact-toggle input[type="checkbox"]:checked + .switch::after {
    transform: translateX(16px);
}
.compact-toggle .compact-text {
    font-size: 13px;
    line-height: 1;
    color: #0f172a;
}

/* Reduce visual weight inside the print-tools container */
.print-tools .compact-toggle {
    padding: 4px 6px;
    border-radius: 6px;
}
.print-frame {
    position: fixed;
    width: 1px;
    height: 1px;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
}
.kanban-column {
    min-width: 0;
    background: rgba(248, 250, 252, .92);
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    padding: 12px;
    scroll-snap-align: start;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}
.kanban-column-cancelled {
    grid-column: 1 / -1;
}
.kanban-column-cancelled .kanban-list {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.kanban-column-header h3 {
    margin: 0;
    color: #111827;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.kanban-column-header span {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, .9);
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
    color: #111827;
}
.kanban-list {
    display: grid;
    gap: 12px;
    align-content: start;
}
.kanban-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, .55);
}
.order-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    padding: 13px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.order-card:hover {
    border-color: rgba(245, 110, 14, .28);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
    transform: translateY(-1px);
}
.order-card[draggable="true"] {
    cursor: grab;
}
.order-card.is-dragging {
    opacity: .55;
    cursor: grabbing;
}
.order-card.is-new {
    animation: orderPulse 1.4s ease-out 1;
}
.kanban-column.is-drop-target {
    border-color: rgba(245, 110, 14, .45);
    background: #fff7ed;
}
.order-card-top,
.order-card-meta,
.order-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.order-card h4 {
    margin: 11px 0 2px;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.order-card p {
    margin: 0;
    font-size: 13px;
}
.order-id {
    font-weight: 800;
    color: #111827;
    font-size: 14px;
}
.source-badge {
    width: fit-content;
    margin-top: 10px !important;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    font-size: 12px !important;
    font-weight: 900;
}
.delivery-badge {
    width: fit-content;
    margin-top: 6px !important;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
    font-size: 12px !important;
    font-weight: 800;
}
.scheduled-badge {
    width: fit-content;
    margin-top: 6px !important;
    padding: 5px 8px;
    border-radius: 7px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fb923c;
    font-size: 12px !important;
    font-weight: 900;
}
.scheduled-preparation {
    color: #c2410c;
    font-size: 12px !important;
    font-weight: 800;
}
.source-balcao {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.source-online {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.order-card-meta {
    margin: 12px 0;
    font-size: 13px;
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}
.order-card-meta strong {
    color: var(--money);
    font-size: 15px;
}
.order-card-meta span {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.order-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}
.order-card-actions .btn,
.order-card-actions select {
    min-height: 40px;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}
.order-card-actions form {
    min-width: 0;
}
.status-analysis { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.status-preparing { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.status-ready { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.status-delivered { color: #475569; background: #f8fafc; border-color: #cbd5e1; }
.status-cancelled { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.order-notification {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    width: min(360px, calc(100% - 36px));
    background: #fff;
    border: 1px solid rgba(245, 110, 14, .30);
    border-left: 5px solid var(--brand);
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
    padding: 13px;
    display: none;
    gap: 8px;
}
.order-notification.is-visible {
    display: grid;
}
.order-notification strong {
    font-size: 15px;
}
.order-notification span {
    color: var(--muted);
    font-size: 13px;
}
.order-notification button {
    justify-self: start;
    min-height: 38px;
}
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 14px;
}
.integration-card {
    align-content: start;
}
.integration-card h2,
.integration-next-steps h2 {
    margin: 0;
    color: #111827;
}
.integration-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.integration-logo {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #ea1d2c;
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(234, 29, 44, .22);
}
.integration-feature-list {
    display: grid;
    gap: 8px;
    margin: 4px 0;
    padding: 0;
    list-style: none;
}
.integration-feature-list li {
    position: relative;
    padding-left: 22px;
    color: #344054;
    font-weight: 700;
}
.integration-feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--brand);
}
.integration-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.integration-actions form {
    display: inline-flex;
}
.integration-config h2 {
    margin: 0;
}
.integration-locked {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    background: #ecfdf5;
    color: #065f46;
}
.integration-locked span {
    color: #047857;
}
.integration-meta {
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfcfd;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.integration-debug {
    gap: 14px;
}
.integration-debug-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.integration-debug-head h2 {
    margin: 0;
}
.integration-debug-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.integration-debug-grid div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfcfd;
}
.integration-debug-grid strong {
    color: #111827;
}
.integration-debug-grid span {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.integration-debug-table code {
    overflow-wrap: anywhere;
    white-space: normal;
}
.debug-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}
.debug-status-success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.debug-status-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.debug-status-error {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}
.debug-context summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 800;
}
.debug-context pre {
    max-width: min(680px, 72vw);
    max-height: 260px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
}
.finance-period {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}
.finance-period label {
    min-width: 180px;
}
.finance-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.finance-kpis article {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}
.finance-kpis span,
.finance-kpis small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.finance-kpis strong {
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 22px;
    line-height: 1.1;
}
.finance-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    gap: 14px;
}
.finance-panel,
.finance-form-panel {
    gap: 14px;
}
.finance-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.finance-section-head h2,
.finance-form-panel h2 {
    margin: 0;
    color: #111827;
}
.finance-filter {
    align-items: end;
    margin-bottom: 14px;
}
.finance-total-row {
    background: #102a63;
    color: #fff;
    font-weight: 900;
}
.finance-total-row td {
    color: #fff;
}
.finance-positive,
.is-positive {
    color: #059669;
}
.finance-negative,
.is-negative {
    color: #dc2626;
}
.finance-row-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.finance-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}
.finance-status.is-paid {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.finance-status.is-open {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.finance-status.is-overdue {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}
.finance-activity-list {
    display: grid;
    gap: 8px;
}
.finance-activity-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    background: #fcfcfd;
    text-decoration: none;
}
.finance-activity-list a > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f8fafc;
    font-weight: 900;
}
.finance-activity-list strong,
.finance-activity-list small {
    display: block;
}
.finance-activity-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.finance-activity-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.finance-activity-list em {
    color: #111827;
    font-style: normal;
    font-weight: 900;
}
.finance-compact-table td,
.finance-compact-table th {
    white-space: nowrap;
}
.sales-filter {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}
.sales-filter label {
    min-width: 170px;
}
.sales-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.sales-kpis article {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}
.sales-kpis span,
.sales-kpis small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.sales-kpis strong {
    overflow: hidden;
    color: #111827;
    font-size: 21px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sales-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.sales-panel {
    gap: 14px;
}
.sales-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sales-section-head h2 {
    margin: 0;
    color: #111827;
}
.sales-bars {
    display: grid;
    gap: 10px;
}
.sales-bar-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfcfd;
}
.sales-bar-row > div,
.sales-bar-row > em {
    position: relative;
    z-index: 1;
}
.sales-bar-row strong,
.sales-bar-row span {
    display: block;
}
.sales-bar-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.sales-bar-row em {
    color: #111827;
    font-style: normal;
    font-weight: 900;
}
.sales-bar-row b {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background: var(--brand);
}
.sales-row-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.sales-channel-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sales-channel-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}
.sales-strength {
    width: 120px;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}
.sales-strength span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}
.sales-day-table td,
.sales-day-table th {
    white-space: nowrap;
}
.integration-next-steps {
    gap: 14px;
}
.integration-step-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.integration-step-list div {
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    background: #fcfcfd;
    padding: 13px;
}
.integration-step-list strong,
.integration-step-list span {
    display: block;
}
.integration-step-list span {
    margin-top: 5px;
    color: var(--muted);
}
@keyframes orderPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 110, 14, .35); }
    100% { box-shadow: 0 10px 26px rgba(15, 23, 42, .07); }
}
.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(245, 110, 14, .16), transparent 360px),
        #f6f7fb;
}
.login-box {
    width: min(420px, 100%);
    padding: 24px;
    border-color: rgba(229, 231, 235, .9);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}
.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.store-user-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 3px 0;
}
.store-user-line a {
    color: var(--brand-dark);
    font-weight: 800;
}
.login-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.login-list-card {
    padding: 18px;
}
.login-list-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.login-list-head h3 {
    margin: 0 0 4px;
}
.login-list {
    display: grid;
    gap: 8px;
}
.login-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}
.login-list-item strong,
.login-list-item span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}
.login-list-item a {
    color: var(--brand-dark);
    font-weight: 800;
}
.login-status {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    border: 1px solid var(--line);
}
.login-status.is-active {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.login-status.is-inactive {
    color: #be123c;
    background: #fff1f2;
    border-color: #fecdd3;
}
.admin-version-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 18px 24px 28px;
    color: var(--muted);
    font-size: .82rem;
}
.admin-version-footer strong {
    color: var(--ink);
}
.admin-toast-stack {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 120;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}
.admin-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .24);
    animation: toastIn .18s ease-out;
}
.admin-toast.toast-success {
    background: #20b86b;
}
.admin-toast.toast-error {
    background: #dc2626;
}
.admin-toast.toast-info {
    background: #2563eb;
}
.admin-toast-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    font-size: .76rem;
    font-weight: 900;
}
.admin-toast strong,
.admin-toast a {
    display: block;
    color: #fff;
    overflow-wrap: anywhere;
}
.admin-toast a {
    margin-top: 4px;
    font-weight: 900;
    text-decoration: underline;
}
.admin-toast button {
    width: 28px;
    min-height: 28px;
    padding: 0;
    background: transparent;
    color: #fff;
    border: 0;
    box-shadow: none;
    font-size: 24px;
    line-height: 1;
}
.admin-toast button:hover {
    background: rgba(255, 255, 255, .14);
    box-shadow: none;
}
.admin-toast.is-leaving {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .18s ease, transform .18s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dark-theme body.admin-shell {
    --ink: #f8fafc;
    --muted: #a8b3c7;
    --line: #273244;
    --paper: #0b1020;
    --panel: #121826;
    --soft: #1a2334;
    --money: #4ade80;
    --money-dark: #86efac;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .58), rgba(11, 16, 32, 0) 260px),
        #1a1c21ed;
    color: var(--ink);
}
.dark-theme .admin-header {
    background: rgba(15, 23, 42, .88);
    border-bottom-color: rgba(71, 85, 105, .72);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
}
.dark-theme .admin-shell .brand,
.dark-theme .toolbar h1,
.dark-theme .toolbar h2,
.dark-theme .section-title,
.dark-theme .order-detail-panel h3,
.dark-theme .integration-card h2,
.dark-theme .integration-next-steps h2,
.dark-theme .order-card h4,
.dark-theme .order-id,
.dark-theme .kanban-column-header h3,
.dark-theme .kanban-column-header span,
.dark-theme .product-picker-option,
.dark-theme .side-drawer-head h2,
.dark-theme .daily-menu-column h3,
.dark-theme .daily-menu-item strong {
    color: #f8fafc;
}
.dark-theme .admin-links {
    background: rgba(15, 23, 42, .74);
    border-color: rgba(71, 85, 105, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.dark-theme .admin-links a {
    color: #a8b3c7;
}
.dark-theme .admin-links a.active,
.dark-theme .admin-links a:hover {
    background: #1f2937;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .20);
}
.dark-theme .admin-theme-toggle {
    background: #020617;
    color: #fff;
    border-color: #334155;
}
.dark-theme .admin-theme-toggle:hover {
    background: #0f172a;
    border-color: #475569;
}
.dark-theme .theme-icon-moon {
    display: none;
}
.dark-theme .theme-icon-sun {
    display: block;
}
.dark-theme .choice-modal,
.dark-theme .choice-modal-drawer,
.dark-theme .choice-dialog,
.dark-theme .choice-header,
.dark-theme .choice-footer {
    background: #111827;
    color: #f8fafc;
}
.dark-theme .choice-dialog h2,
.dark-theme .choice-group-head strong,
.dark-theme .choice-option-text,
.dark-theme .choice-search span {
    color: #f8fafc;
}
.dark-theme .choice-product p,
.dark-theme .choice-group-head span,
.dark-theme .choice-options .muted {
    color: #a8b3c7;
}
.dark-theme .choice-header,
.dark-theme .choice-footer {
    border-color: #273244;
}
.dark-theme .choice-back {
    color: #f8fafc;
}
.dark-theme .choice-back:hover {
    background: #1f2937;
}
.dark-theme .choice-search,
.dark-theme .choice-group,
.dark-theme .choice-option {
    background: #0f172a;
    border-color: #334155;
}
.dark-theme .choice-search input {
    background: transparent;
    color: #f8fafc;
}
.dark-theme .choice-search input::placeholder {
    color: #94a3b8;
}
.dark-theme .choice-group-head {
    background: #1f2937;
}
.dark-theme .choice-group-badges small {
    background: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}
.dark-theme .choice-group-badges small.is-complete {
    background: #052e16;
    border-color: #22c55e;
    color: #86efac;
}
.dark-theme .choice-option strong {
    background: #111827;
    border-color: #475569;
    color: #fb923c;
}
.dark-theme .choice-option:has(input:checked) {
    background: #2a2110;
    border-color: #fb923c;
    box-shadow: inset 0 0 0 1px #fb923c, 0 2px 10px rgba(251, 146, 60, .16);
}
.dark-theme .choice-option:has(input:checked) strong {
    background: #fb923c;
    color: #fb923c;
}
.dark-theme .choice-footer button:disabled,
.dark-theme .choice-footer button.disabled {
    background: #334155;
    color: #94a3b8;
}
.dark-theme .admin-logout {
    color: #a8b3c7;
}
.dark-theme .admin-logout:hover {
    color: #fff;
    background: rgba(30, 41, 59, .86);
}
.dark-theme .admin-shell .panel,
.dark-theme .admin-shell .card,
.dark-theme .order-card,
.dark-theme .kanban-column,
.dark-theme .daily-menu-column,
.dark-theme .daily-menu-item,
.dark-theme .finance-kpis article,
.dark-theme .sales-kpis article,
.dark-theme .image-upload,
.dark-theme .integration-step-list div,
.dark-theme .order-items-fieldset,
.dark-theme .rules-builder,
.dark-theme .rule-group,
.dark-theme .print-tools label,
.dark-theme .order-notification,
.dark-theme table {
    background: #121826;
    border-color: #273244;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}
.dark-theme .kanban-column,
.dark-theme .daily-menu-column,
.dark-theme .order-items-fieldset,
.dark-theme .rules-builder,
.dark-theme .rule-group,
.dark-theme .schedule-builder,
.dark-theme .schedule-day,
.dark-theme .integration-meta,
.dark-theme .integration-debug-grid div,
.dark-theme .integration-step-list div {
    background: #151d2c;
}
.dark-theme .schedule-builder,
.dark-theme .schedule-day,
.dark-theme .image-upload,
.dark-theme .product-image-preview {
    border-color: #334155;
}
.dark-theme .schedule-builder h3,
.dark-theme .schedule-toggle span,
.dark-theme .image-upload strong,
.dark-theme .product-image-preview {
    color: #f8fafc;
}
.dark-theme .schedule-builder p,
.dark-theme .image-upload p {
    color: #a8b3c7;
}
.dark-theme .image-picker span {
    background: #1f2937;
    color: #f8fafc;
    border-color: #334155;
}
.dark-theme input,
.dark-theme select,
.dark-theme textarea,
.dark-theme .product-picker-results {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}
.dark-theme input:focus,
.dark-theme select:focus,
.dark-theme textarea:focus {
    border-color: rgba(245, 110, 14, .72);
    box-shadow: 0 0 0 4px rgba(245, 110, 14, .18);
}
.dark-theme th {
    background: #1f2937;
    color: #cbd5e1;
}
.dark-theme th,
.dark-theme td {
    border-bottom-color: #273244;
}
.dark-theme tbody tr:hover td,
.dark-theme .product-picker-option:hover,
.dark-theme .product-picker-option:focus {
    background: #1e293b;
}
.dark-theme .admin-shell .btn.secondary,
.dark-theme .admin-shell button.secondary,
.dark-theme .btn.secondary:hover,
.dark-theme button.secondary:hover {
    background: #1f2937;
    color: #f8fafc;
    border-color: #334155;
}
.dark-theme .status,
.dark-theme .kanban-column-header span {
    background: #1f2937;
    color: #e2e8f0;
    border-color: #334155;
}
.dark-theme .daily-menu-column header span {
    background: #fff7ed;
    color: #c2410c;
    border-color: #f56e0e;
}
.dark-theme .source-badge {
    background: #3f121b;
    color: #fecdd3;
    border-color: #f43f5e;
}
.dark-theme .delivery-badge {
    background: #1e1b4b;
    color: #c7d2fe;
    border-color: #4f46e5;
}
.dark-theme .scheduled-badge {
    background: #431407;
    color: #fdba74;
    border-color: #f97316;
}
.dark-theme .scheduled-preparation {
    color: #fdba74;
}
.dark-theme .integration-locked {
    background: #052e16;
    color: #dcfce7;
    border-color: #15803d;
}
.dark-theme .integration-locked span {
    color: #86efac;
}
.dark-theme .integration-debug-grid strong {
    color: #f8fafc;
}
.dark-theme .integration-debug-grid span {
    color: #cbd5e1;
}
.dark-theme .finance-section-head h2,
.dark-theme .finance-form-panel h2,
.dark-theme .finance-kpis strong,
.dark-theme .finance-activity-list em {
    color: #f8fafc;
}
.dark-theme .finance-activity-list a,
.dark-theme .finance-activity-list a > span {
    background: #151d2c;
    border-color: #334155;
}
.dark-theme .finance-total-row {
    background: #1e3a8a;
}
.dark-theme .finance-status {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #475569;
}
.dark-theme .finance-status.is-paid {
    background: #052e16;
    color: #86efac;
    border-color: #15803d;
}
.dark-theme .finance-status.is-open {
    background: #172554;
    color: #93c5fd;
    border-color: #1d4ed8;
}
.dark-theme .finance-status.is-overdue {
    background: #3f121b;
    color: #fda4af;
    border-color: #9f1239;
}
.dark-theme .sales-section-head h2,
.dark-theme .sales-kpis strong,
.dark-theme .sales-bar-row em {
    color: #f8fafc;
}
.dark-theme .sales-bar-row,
.dark-theme .sales-channel-tags span {
    background: #151d2c;
    border-color: #334155;
}
.dark-theme .sales-strength {
    background: #334155;
}
.dark-theme .debug-status {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #475569;
}
.dark-theme .debug-status-success {
    background: #052e16;
    color: #86efac;
    border-color: #15803d;
}
.dark-theme .debug-status-warning {
    background: #2a2110;
    color: #fbbf24;
    border-color: #8a6419;
}
.dark-theme .debug-status-error {
    background: #3f121b;
    color: #fda4af;
    border-color: #9f1239;
}
.dark-theme .source-balcao {
    background: #052e16;
    color: #86efac;
    border-color: #15803d;
}
.dark-theme .source-online {
    background: #172554;
    color: #bfdbfe;
    border-color: #1d4ed8;
}
.dark-theme .daily-menu-item {
    background: #111827;
    border-color: #334155;
}
.dark-theme .daily-ifood-marmita {
    background: #111827;
    border-color: #334155;
}
.dark-theme .daily-ifood-marmita.is-linked {
    background: #092516;
    border-color: #22c55e;
}
.dark-theme .daily-menu-item.is-on {
    background: #092516;
    border-color: #22c55e;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .22);
}
.dark-theme .daily-menu-item.is-on strong {
    color: #dcfce7;
}
.dark-theme .daily-menu-item.is-on small {
    color: #86efac;
}
.dark-theme .daily-menu-item:not(.is-on) small {
    color: #bfdbfe;
}
.dark-theme .daily-menu-actions .btn.secondary,
.dark-theme .daily-menu-actions button.secondary {
    background: #223047;
    color: #f8fafc;
    border-color: #475569;
}
.dark-theme .daily-menu-actions .btn.secondary:hover,
.dark-theme .daily-menu-actions button.secondary:hover {
    background: #2f3d55;
}
.dark-theme .admin-shell .daily-menu-actions button.danger {
    background: #3f121b;
    color: #fecdd3;
    border-color: #f43f5e;
}
.dark-theme .admin-shell .daily-menu-actions button.danger:hover {
    background: #5f1725;
}
.dark-theme .kanban-empty {
    background: rgba(15, 23, 42, .72);
    border-color: #334155;
}
.dark-theme .order-card:hover {
    border-color: rgba(245, 110, 14, .48);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .30);
}
.dark-theme .alert {
    background: #2a2110;
    border-color: #8a6419;
    color: #fde68a;
}
.dark-theme .status-analysis { color: #fbbf24; background: #2a2110; border-color: #8a6419; }
.dark-theme .status-preparing { color: #93c5fd; background: #172554; border-color: #1d4ed8; }
.dark-theme .status-ready { color: #86efac; background: #052e16; border-color: #15803d; }
.dark-theme .status-delivered { color: #cbd5e1; background: #1e293b; border-color: #475569; }
.dark-theme .status-cancelled { color: #fda4af; background: #3f121b; border-color: #9f1239; }

@media (max-width: 1100px) {
    .admin-nav {
        align-items: stretch;
        flex-direction: column;
        padding: 14px 0;
        gap: 12px;
    }
    .admin-shell .brand {
        flex-basis: auto;
        min-width: 0;
    }
    .admin-nav-right {
        align-items: stretch;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .admin-links {
        width: 100%;
        border-radius: 16px;
    }
    .finance-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sales-grid {
        grid-template-columns: 1fr;
    }
    .finance-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sales-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-theme-toggle,
    .admin-logout {
        flex: 1 1 auto;
        justify-content: center;
    }
    .admin-shell form.panel.product > .form-grid {
        grid-template-columns: 1fr;
    }
    .image-upload {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .image-picker span {
        width: 100%;
    }
    .product-image-preview {
        width: min(180px, 100%);
    }
    .daily-ifood-marmita {
        align-items: stretch;
        flex-direction: column;
    }
    .daily-ifood-marmita form,
    .daily-ifood-marmita button {
        width: 100%;
    }
    .daily-menu-actions {
        justify-content: flex-start;
    }
    .schedule-day {
        grid-template-columns: 1fr 1fr;
    }
    .schedule-toggle {
        grid-column: 1 / -1;
    }
    .finance-kpis {
        grid-template-columns: 1fr;
    }
    .sales-kpis {
        grid-template-columns: 1fr;
    }
    .finance-period label,
    .finance-period button,
    .sales-filter label,
    .sales-filter button {
        width: 100%;
    }
    .integration-debug-grid {
        grid-template-columns: 1fr;
    }
    .debug-context pre {
        max-width: 100%;
    }
    table, thead, tbody, tr, th, td {
        display: block;
    }
    thead {
        display: none;
    }
    tr {
        border-bottom: 1px solid var(--line);
    }
    td {
        border-bottom: 0;
        padding: 8px 11px;
    }
    td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        margin-bottom: 2px;
    }
}

@media (max-width: 860px) {
    .hero, .layout, .grid, .form-grid { grid-template-columns: 1fr; }
    .hero-media { min-height: 220px; }
    .cart { position: static; }
    .section-heading,
    .date-filter {
        align-items: stretch;
        flex-direction: column;
    }
    .date-filter label,
    .date-filter .btn,
    .date-filter button {
        width: 100%;
    }
    .kanban {
        grid-template-columns: 1fr;
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .kanban-column-cancelled {
        grid-column: auto;
    }
    .kanban-column-cancelled .kanban-list {
        grid-template-columns: 1fr;
    }
    .daily-menu-board { grid-template-columns: 1fr; }
    .rule-group { grid-template-columns: 1fr; }
    .schedule-day { grid-template-columns: 1fr; }
    .integration-step-list { grid-template-columns: 1fr; }
    .image-upload { grid-template-columns: 1fr; }
    .product-image-preview { width: 100%; max-width: 220px; }
    .cart-drawer {
        position: fixed;
        inset: 0;
        left: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        transform: translateY(18px);
        border-radius: 0;
    }
    .cart-open .cart-drawer {
        transform: none;
    }
    .cart-item {
        grid-template-columns: 1fr;
    }
    .cart-item button {
        justify-self: start;
    }
    .cart-review {
        grid-template-columns: 1fr;
    }
    .delivery-fields {
        grid-template-columns: 1fr;
    }
    .choice-product {
        grid-template-columns: 88px 1fr;
    }
    .choice-product-image {
        width: 88px;
    }
    .choice-options {
        grid-template-columns: 1fr;
    }
    .order-track-form,
    .track-steps {
        grid-template-columns: 1fr;
    }
}
