:root {
    --brand: #e23d28;
    --brand-dark: #b92d1e;
    --ink: #1f2328;
    --muted: #6b7280;
    --line: #e5e7eb;
    --page: #f4f5f7;
    --panel: #0f1720;
    --success-soft: #e8f7ed;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pb-6 {
    padding-bottom: 6rem !important;
}

.topbar {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    backdrop-filter: blur(14px);
}

.brand-dot {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-color: #fff;
}

.storefront {
    background: linear-gradient(180deg, #fbfbfb 0%, #f4f5f7 180px);
}

.restaurant-cover {
    min-height: 280px;
    background: linear-gradient(rgba(0, 0, 0, .28), rgba(0, 0, 0, .52)), var(--cover);
    background-position: center;
    background-size: cover;
    color: #fff;
}

.storefront-hero-card {
    max-width: 720px;
}

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

.store-info-box {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    padding: 12px 14px;
    backdrop-filter: blur(10px);
}

.store-info-box span {
    display: block;
    font-size: .8rem;
    color: rgba(255, 255, 255, .76);
    margin-bottom: 4px;
}

.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    position: sticky;
    top: 64px;
    z-index: 100;
    background: var(--page);
    padding-top: 10px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
}

.category-pills::-webkit-scrollbar,
.admin-mobile-nav::-webkit-scrollbar {
    display: none;
}

.category-pills a,
.admin-mobile-pill {
    flex: 0 0 auto;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

.category-pills a.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.product-card,
.cart-panel,
.admin-card,
.metric,
.order-card,
.login-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 32, .04);
}

.product-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f3f5;
}

.product-price {
    font-size: 1.05rem;
}

.status-pill,
.admin-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .4rem .8rem;
    font-size: .82rem;
    font-weight: 700;
}

.badge-success {
    background: var(--success-soft);
    color: #1f7a3b;
}

.badge-muted,
.badge-light {
    background: #f3f4f6;
    color: #4b5563;
}

.cart-panel {
    position: sticky;
    top: 86px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.mobile-cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--panel);
    color: #fff;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(15, 23, 32, .22);
    z-index: 1030;
}

.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #fff2ef 0%, #f4f5f7 55%);
}

.login-shell {
    max-width: 520px;
}

.login-panel {
    padding: 28px;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    min-height: 100vh;
    background: var(--panel);
    color: #fff;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .76);
    text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    padding: 24px 24px 12px;
}

.admin-content {
    padding: 0 24px 24px;
}

.admin-mobile-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.admin-mobile-pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: 10px;
}

.metric-value {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
}

.admin-list-row,
.order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.admin-list-row:last-child,
.order-item-row:last-child {
    border-bottom: 0;
}

.admin-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* Reseta o visual nativo de <button>/<form><button> para usar .admin-switch-row
   como linha de menu clicável (ex.: menu de "Minha conta" do cliente). */
button.admin-switch-row {
    background: #fff;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

button.admin-switch-row:hover { background: var(--page); }

.catalog-row {
    display: flex;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.catalog-row.simple {
    gap: 0;
}

.catalog-row-media img,
.catalog-row-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
}

.catalog-row-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .82rem;
}

.catalog-row-body {
    flex: 1;
    min-width: 0;
}

.catalog-price {
    font-size: 1.05rem;
    white-space: nowrap;
}

.order-card {
    padding: 18px;
}

.order-card.compact {
    padding: 16px;
}

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

@media (max-width: 991px) {
    .store-info-grid {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        position: static;
        margin-bottom: 88px;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        padding: 18px 16px 8px;
    }

    .admin-content {
        padding: 0 16px 24px;
    }
}

@media (max-width: 767px) {
    .restaurant-cover-mobile {
        min-height: 240px;
    }

    .product-card .d-flex {
        align-items: flex-start;
    }

    .product-img {
        width: 84px;
        height: 84px;
    }

    .catalog-row {
        flex-direction: column;
    }

    .catalog-row-media img,
    .catalog-row-placeholder {
        width: 100%;
        height: 180px;
    }

    .login-panel {
        padding: 22px;
    }
}


.order-card-completed {
    background: #fcfcfd;
    border-color: #dbe7de;
}


.tracking-page {
    background: linear-gradient(180deg, #fff8f6 0%, #f4f5f7 220px);
}

.tracking-shell {
    max-width: 1040px;
}

.tracking-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 32, .04);
}

.tracking-highlight {
    border: 1px solid #fde3dc;
    background: #fff6f3;
    border-radius: 8px;
    padding: 16px 18px;
}

.tracking-steps {
    display: grid;
    gap: 12px;
}

.tracking-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.tracking-step-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #d1d5db;
    flex: 0 0 auto;
}

.tracking-step.completed,
.tracking-step.active {
    color: var(--ink);
}

.tracking-step.completed .tracking-step-dot,
.tracking-step.active .tracking-step-dot {
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(226, 61, 40, .12);
}

.tracking-summary-grid .tracking-mini-card {
    height: 100%;
}

.tracking-mini-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfc;
    padding: 14px 16px;
}

.tracking-mini-card span {
    display: block;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.tracking-item-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.tracking-item-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tracking-footer-note {
    max-width: 760px;
    margin-inline: auto;
}

@media (max-width: 767px) {
    .tracking-card {
        border-radius: 8px;
    }

    .tracking-item-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* ──────────────────────────────────────────────────────────────
   Order Queue Panel
────────────────────────────────────────────────────────────── */

.order-queue-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 380px;
    background: #fff;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
    transform: translateX(0);
    transition: transform .28s ease, opacity .28s ease;
    opacity: 1;
}

.order-queue-panel.oq-hidden {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}

.oq-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
}

.oq-count-label {
    font-size: .78rem;
    font-weight: 500;
    background: var(--brand);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
}

.oq-list {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oq-card {
    background: #fff;
    border: 1.5px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 14px 14px 12px;
    transition: opacity .3s ease, transform .3s ease;
}

.oq-card.oq-card-loading {
    opacity: .5;
    pointer-events: none;
}

.oq-card.oq-card-done {
    opacity: 0;
    transform: translateX(40px);
}

.oq-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 8px;
}

.oq-order-number {
    font-size: .92rem;
    display: block;
}

.oq-time {
    font-size: .75rem;
    color: var(--muted);
    display: block;
}

.oq-total {
    font-size: .92rem;
    white-space: nowrap;
}

.oq-customer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--ink);
    margin-bottom: 2px;
}

.oq-address {
    font-size: .8rem;
    color: var(--muted);
    margin: 0 0 8px;
}

.oq-items {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oq-item-row {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    gap: 8px;
}

.oq-notes {
    font-size: .8rem;
    color: var(--muted);
    margin: 4px 0 6px;
    font-style: italic;
}

.oq-payment {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.oq-change-for {
    display: inline-block;
    font-size: .76rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 9px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.oq-actions {
    display: flex;
    gap: 8px;
}

.btn-oq-accept,
.btn-oq-cancel,
.btn-oq-show-cancel {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}

.btn-oq-accept {
    background: #16a34a;
    color: #fff;
}

.btn-oq-cancel,
.btn-oq-show-cancel {
    background: var(--brand);
    color: #fff;
}

.btn-oq-accept:hover { filter: brightness(1.1); }
.btn-oq-cancel:hover,
.btn-oq-show-cancel:hover { filter: brightness(1.1); }
.btn-oq-accept:disabled,
.btn-oq-cancel:disabled,
.btn-oq-show-cancel:disabled { opacity: .5; cursor: not-allowed; }

/* Badge no nav */
.oq-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    margin-left: 4px;
    line-height: 1;
}

.oq-badge-hidden {
    display: none !important;
}

/* Ajuste do layout admin quando painel está visível */
@media (min-width: 992px) {
    body:has(.order-queue-panel:not(.oq-hidden)) .admin-main {
        margin-right: 380px;
        transition: margin-right .28s ease;
    }
}

/* Mobile: bottom sheet */
@media (max-width: 767px) {
    .order-queue-panel {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        max-height: 80vh;
        border-left: none;
        border-top: 1px solid var(--line);
        border-radius: 16px 16px 0 0;
        transform: translateY(0);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
    }

    .order-queue-panel.oq-hidden {
        transform: translateY(110%);
    }

    .oq-list {
        max-height: calc(80vh - 56px);
    }
}

/* ──────────────────────────────────────────────────────────────
   Order Queue — estimate input (on pending card)
────────────────────────────────────────────────────────────── */

.oq-estimate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.oq-estimate-label {
    font-size: .8rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.oq-estimate-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.oq-estimate-input {
    width: 72px;
    padding: 5px 8px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color .15s;
    -moz-appearance: textfield;
}

.oq-estimate-input::-webkit-outer-spin-button,
.oq-estimate-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.oq-estimate-input:focus { border-color: var(--brand); }

.oq-estimate-unit {
    font-size: .8rem;
    color: var(--muted);
}

/* ──────────────────────────────────────────────────────────────
   Tracking page — estimated delivery time
────────────────────────────────────────────────────────────── */

.tracking-estimate {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 14px 18px;
}

.tracking-estimate-label {
    font-size: .82rem;
    color: #166534;
    font-weight: 500;
    flex: 1;
}

.tracking-estimate-time {
    font-size: 1.6rem;
    font-weight: 800;
    color: #15803d;
    line-height: 1;
}

.tracking-estimate-date {
    font-size: .78rem;
    color: #166534;
    font-weight: 500;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ──────────────────────────────────────────────────────────────
   Order Queue — accepted card (countdown)
────────────────────────────────────────────────────────────── */

.oq-card-accepted {
    border-left-color: #d97706;
}

.oq-countdown-bar {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
}

.oq-countdown-text {
    font-size: .82rem;
    font-weight: 600;
    color: #92400e;
}

/* ──────────────────────────────────────────────────────────────
   Order Queue — cancel reason form
────────────────────────────────────────────────────────────── */

.oq-cancel-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oq-cancel-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-size: .84rem;
    outline: none;
    transition: border-color .15s;
}

.oq-cancel-input:focus {
    border-color: var(--brand);
}

.oq-cancel-input.oq-input-error {
    border-color: var(--brand);
    animation: oq-shake .25s ease;
}

@keyframes oq-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

.oq-cancel-actions {
    display: flex;
    gap: 8px;
}

.btn-oq-confirm-cancel {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    transition: filter .15s;
}

.btn-oq-confirm-cancel:hover { filter: brightness(1.1); }
.btn-oq-confirm-cancel:disabled { opacity: .5; cursor: not-allowed; }

.btn-oq-back {
    padding: 8px 14px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-size: .84rem;
    cursor: pointer;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s;
}

.btn-oq-back:hover { border-color: var(--muted); }

/* ──────────────────────────────────────────────────────────────
   orders.php — cancelled card
────────────────────────────────────────────────────────────── */

.order-card-cancelled {
    opacity: .7;
    border-left: 3px solid var(--muted);
}

/* ──────────────────────────────────────────────────────────────
   Product card improvements
────────────────────────────────────────────────────────────── */

.product-card {
    transition: box-shadow .18s ease, transform .18s ease;
}

.product-card-clickable {
    cursor: pointer;
}

.product-card-clickable:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.product-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────
   Inline card quantity controls
────────────────────────────────────────────────────────────── */

.card-qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn .15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

.card-qty-btn {
    width: 30px;
    height: 30px;
    border: 2px solid var(--brand);
    background: transparent;
    color: var(--brand);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s, color .15s;
    padding: 0;
}

.card-qty-btn:hover {
    background: var(--brand);
    color: #fff;
}

.card-qty-count {
    font-weight: 700;
    font-size: .95rem;
    min-width: 22px;
    text-align: center;
    color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────
   Search bar
────────────────────────────────────────────────────────────── */

.search-wrapper {
    position: relative;
}

.search-bar-wrap {
    position: relative;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-size: .92rem;
    outline: none;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(226, 61, 40, .12);
}

/* ──────────────────────────────────────────────────────────────
   Product detail modal
────────────────────────────────────────────────────────────── */

.product-modal-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

.product-modal-qty {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 6px 16px;
}

.modal-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s;
}

.modal-qty-btn:hover { color: var(--brand); }

.modal-qty-count {
    font-weight: 700;
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
}

/* ──────────────────────────────────────────────────────────────
   Kanban Operacional
────────────────────────────────────────────────────────────── */

.kanban-page {
    background: var(--page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kanban-topbar {
    background: var(--panel);
    color: #fff;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    height: 54px;
}

.kanban-topbar-tag {
    font-size: .72rem;
    font-weight: 600;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
    padding: 2px 9px;
    border-radius: 999px;
    margin-left: 4px;
}

.kanban-topbar-meta {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
}

.kanban-topbar-clock {
    font-size: .9rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    font-variant-numeric: tabular-nums;
    min-width: 44px;
    text-align: right;
}

.brand-dot-sm {
    width: 28px;
    height: 28px;
    font-size: .7rem;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 12px;
    padding: 12px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    height: calc(100vh - 54px);
}

.kanban-col {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.kb-col-header {
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    border-top: 3px solid var(--col-accent, var(--brand));
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
    background: #fafafa;
}

.kb-col-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink);
}

.kb-count {
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: .72rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

.kb-list {
    overflow-y: auto;
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
}

.kb-card {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    transition: opacity .2s, transform .2s;
}

.kb-card.kb-card-loading {
    opacity: .35;
    pointer-events: none;
}

.kb-card-head {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.kb-num {
    font-size: .82rem;
}

.kb-time {
    font-size: .72rem;
    color: var(--muted);
    flex: 1;
}

.kb-total {
    font-size: .82rem;
    white-space: nowrap;
}

.kb-name {
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1px;
}

.kb-address {
    font-size: .74rem;
    color: var(--muted);
    margin-bottom: 6px;
    line-height: 1.3;
}

.kb-items {
    font-size: .76rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 5px 0;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-notes {
    font-size: .72rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 4px;
    line-height: 1.3;
}

.kb-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.kb-payment {
    font-size: .72rem;
    color: var(--muted);
}

.kb-change {
    font-size: .72rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    padding: 1px 7px;
    border-radius: 999px;
}

.kb-btn-advance {
    width: 100%;
    padding: 7px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}

.kb-btn-advance:hover   { filter: brightness(1.1); }
.kb-btn-advance:disabled { opacity: .45; cursor: not-allowed; }

.kb-countdown {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
    font-size: .76rem;
    font-weight: 600;
    color: #92400e;
}

.kb-empty {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    padding: 24px 0;
}

@media (max-width: 991px) {
    .kanban-board {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
        height: auto;
        overflow-y: auto;
    }

    .kanban-col {
        max-height: 70vh;
    }
}

@media (max-width: 575px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Business hours (horarios.php) ──────────────────────────────── */
.bh-grid-header {
    display: grid;
    grid-template-columns: 28px 1fr 130px 130px;
    gap: 8px;
    padding: 0 0 6px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.bh-row {
    display: grid;
    grid-template-columns: 28px 1fr 130px 130px;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.bh-row:last-of-type { border-bottom: none; }

.bh-row-today { background: #fffbf5; margin: 0 -12px; padding: 8px 12px; border-radius: 6px; }

.bh-check-wrap { display: flex; align-items: center; justify-content: center; }

.bh-toggle {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.bh-day-name {
    font-size: .875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bh-today-badge {
    background: var(--brand);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    letter-spacing: .03em;
}

.bh-time { font-size: .8125rem; }

.bh-alert-closed {
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 6px;
    padding: .5rem .75rem;
    font-size: .8125rem;
}

@media (max-width: 575px) {
    .bh-grid-header { grid-template-columns: 28px 1fr 100px 100px; }
    .bh-row         { grid-template-columns: 28px 1fr 100px 100px; }
}

/* ── Orders filter bar ──────────────────────────────────────────── */
.orders-filter-bar { background: #fff; border-radius: 10px; }

/* ── Kanban card loading state ──────────────────────────────────── */
.kb-card-loading { opacity: .5; pointer-events: none; }

/* ── Cover thumbnail preview (settings) ─────────────────────────── */
.cover-thumb { height: 44px; width: 78px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* ── Storefront footer (marca d'água do desenvolvedor) ───────────── */
.storefront-footer { color: var(--muted); font-size: .85rem; }
.storefront-footer-link {
    color: var(--brand);
    text-decoration: underline;
    font-weight: 600;
}
.storefront-footer-link:hover { color: var(--brand-dark); }

/* ── Checkout: stepper de progresso ───────────────────────────────── */
.checkout-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.checkout-step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .82rem;
    font-weight: 700;
    border: 2px solid var(--line);
    color: var(--muted);
    background: #fff;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
}

.checkout-step-label {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.checkout-step-indicator.active .checkout-step-circle {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.checkout-step-indicator.active .checkout-step-label { color: var(--ink); }

.checkout-step-indicator.done .checkout-step-circle {
    border-color: var(--brand);
    color: var(--brand);
    background: #fff;
}

.checkout-step-line {
    flex: 1;
    height: 2px;
    background: var(--line);
    min-width: 16px;
}

@media (max-width: 480px) {
    .checkout-step-label { display: none; }
}

/* ── Checkout: total persistente entre os passos ──────────────────── */
.checkout-running-total {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 14px;
}

/* ── Checkout: cards de sugestão (upsell) ─────────────────────────── */
.checkout-upsell-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    height: 100%;
    background: #fff;
}
