/* ==========================================================================
   Comandix — estilos da aplicação (complementa o Bootstrap 5)
   ========================================================================== */

:root {
    --cx-brand: #ea580c;
    --cx-brand-hover: #c2410c;
    --cx-brand-active: #9a3412;
    --cx-brand-soft: #fff1e7;
    --cx-sidebar-bg: #17181c;
    --cx-sidebar-text: #a3a8b3;
    --cx-sidebar-hover: rgba(255, 255, 255, .06);
    --cx-body-bg: #f5f6f8;
    --cx-border: #e7e9ee;
    --cx-sidebar-width: 248px;

    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-bg: var(--cx-body-bg);
    --bs-border-color: var(--cx-border);
    --bs-link-color: var(--cx-brand-hover);
    --bs-link-color-rgb: 194, 65, 12;
    --bs-link-hover-color: var(--cx-brand-active);
    --bs-link-hover-color-rgb: 154, 52, 18;
}

body {
    background: var(--cx-body-bg);
    font-size: .9375rem;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .dropdown-item:hover, .app-nav-link:hover, .page-link:hover { text-decoration: none; }

/* Cores da marca nos componentes do Bootstrap ----------------------------- */
.btn-primary {
    --bs-btn-bg: var(--cx-brand);
    --bs-btn-border-color: var(--cx-brand);
    --bs-btn-hover-bg: var(--cx-brand-hover);
    --bs-btn-hover-border-color: var(--cx-brand-hover);
    --bs-btn-active-bg: var(--cx-brand-active);
    --bs-btn-active-border-color: var(--cx-brand-active);
    --bs-btn-disabled-bg: var(--cx-brand);
    --bs-btn-disabled-border-color: var(--cx-brand);
    --bs-btn-focus-shadow-rgb: 234, 88, 12;
}

.btn-outline-primary {
    --bs-btn-color: var(--cx-brand-hover);
    --bs-btn-border-color: var(--cx-brand);
    --bs-btn-hover-bg: var(--cx-brand);
    --bs-btn-hover-border-color: var(--cx-brand);
    --bs-btn-active-bg: var(--cx-brand-hover);
    --bs-btn-active-border-color: var(--cx-brand-hover);
    --bs-btn-focus-shadow-rgb: 234, 88, 12;
}

.btn-light {
    --bs-btn-bg: #f1f2f5;
    --bs-btn-border-color: #f1f2f5;
    --bs-btn-hover-bg: #e5e7eb;
    --bs-btn-hover-border-color: #e5e7eb;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #fdba74;
    box-shadow: 0 0 0 .25rem rgba(234, 88, 12, .15);
}

.form-check-input:checked {
    background-color: var(--cx-brand);
    border-color: var(--cx-brand);
}

.form-label { font-weight: 500; font-size: .875rem; }

.pagination {
    --bs-pagination-color: var(--cx-brand-hover);
    --bs-pagination-hover-color: var(--cx-brand-active);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(234, 88, 12, .15);
    --bs-pagination-active-bg: var(--cx-brand);
    --bs-pagination-active-border-color: var(--cx-brand);
}

.card {
    --bs-card-border-color: var(--cx-border);
    --bs-card-border-radius: .75rem;
    --bs-card-inner-border-radius: calc(.75rem - 1px);
    --bs-card-cap-bg: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.card-header {
    font-weight: 600;
    padding: .875rem 1.25rem;
}

.table {
    --bs-table-hover-bg: #fafbfc;
}

.table > thead th {
    background: #fafbfc;
    color: #6b7280;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table .min-w-name { min-width: 14rem; }

.badge-status { font-weight: 500; padding: .35em .75em; }
.breadcrumb { font-size: .8125rem; margin-bottom: .25rem; }

/* Estrutura: menu lateral + conteúdo ------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-drawer {
    --bs-offcanvas-width: 264px;
    --bs-offcanvas-bg: var(--cx-sidebar-bg);
    --bs-offcanvas-color: var(--cx-sidebar-text);
}

@media (min-width: 992px) {
    .app-sidebar {
        width: var(--cx-sidebar-width);
        flex-shrink: 0;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        background: var(--cx-sidebar-bg);
    }

    .app-sidebar .app-drawer { height: 100%; }
}

/* O menu rola por dentro, para o rodapé (nome da plataforma) ficar sempre visível. */
.app-sidebar .app-drawer-body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem .875rem;
    height: 100%;
}

.app-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .5rem 1.25rem;
}

.app-brand-link {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.app-brand-link:hover { color: #fff; text-decoration: none; }

.app-brand-icon {
    display: inline-grid;
    place-items: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: .625rem;
    background: var(--cx-brand);
    color: #fff;
    font-size: 1.05rem;
}

/* Logo e nome do restaurante (topo do menu, barra superior no celular e prévia nas Configurações) */
.app-brand-link { min-width: 0; }

.brand-mark {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .625rem;
    background: var(--cx-brand);
    color: #fff;
    font-size: 1.15rem;
    overflow: hidden;
}

/* Fundo branco: logos escuras ou com fundo transparente continuam visíveis no menu escuro. */
.brand-mark.has-logo { background: #fff; padding: .1875rem; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.app-brand-link .brand-name { font-size: 1rem; }

.brand-preview {
    max-width: var(--cx-sidebar-width);
    padding: 1.25rem 1.375rem;
    border-radius: .75rem;
    background: var(--cx-sidebar-bg);
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .16) transparent;
}

.app-sidebar-footer {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    margin-top: .75rem;
    padding: .875rem .5rem 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #8a909c;
    font-size: .8125rem;
    font-weight: 600;
}

.app-sidebar-footer .app-brand-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: .375rem;
    font-size: .75rem;
}

.app-nav-section {
    color: #6b7180;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 1rem .75rem .375rem;
}

.app-nav-section:first-child { padding-top: 0; }

.app-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5625rem .75rem;
    border-radius: .5rem;
    color: var(--cx-sidebar-text);
    font-weight: 500;
}

.app-nav-link .bi { font-size: 1.05rem; opacity: .85; }

.app-nav-link:hover {
    background: var(--cx-sidebar-hover);
    color: #fff;
}

.app-nav-link.active {
    background: rgba(234, 88, 12, .16);
    color: #fff;
}

.app-nav-link.active .bi { color: #fb923c; opacity: 1; }

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 64px;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--cx-border);
}

.app-topbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    color: #1f2937;
    font-weight: 600;
}

.app-topbar-brand .brand-mark { width: 2rem; height: 2rem; border-radius: .5rem; font-size: .95rem; }
.app-topbar-brand .brand-mark.has-logo { padding: .125rem; border: 1px solid var(--cx-border); }
.app-topbar-brand .brand-name { -webkit-line-clamp: 1; }

.app-user-btn {
    display: flex;
    align-items: center;
    gap: .625rem;
    border: 0;
    padding: .25rem .5rem;
}

.app-user-btn:hover, .app-user-btn.show { background: #f3f4f6; }

.app-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--cx-brand-soft);
    color: var(--cx-brand-hover);
    font-size: .8125rem;
    font-weight: 700;
}

.app-content {
    flex: 1;
    width: 100%;
    padding: 1.5rem;
}

@media (max-width: 575.98px) {
    .app-topbar { padding: 0 1rem; }
    .app-content { padding: 1rem; }
}

/* Cabeçalho de página ---------------------------------------------------- */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
}

.page-subtitle {
    color: #6b7280;
    margin: .25rem 0 0;
}

.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding-bottom: 1rem;
}

/* Indicadores ----------------------------------------------------------- */
.stat-icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    font-size: 1.25rem;
}

.stat-icon-brand { background: var(--cx-brand-soft); color: var(--cx-brand-hover); }
.stat-icon-info { background: #e8f4fd; color: #0b6fb8; }
.stat-icon-warning { background: #fff6dd; color: #a16207; }
.stat-icon-success { background: #e7f7ee; color: #15803d; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.stat-label { color: #6b7280; font-size: .8125rem; }

.module-card { transition: border-color .15s, box-shadow .15s; }
.module-card-link:hover { border-color: #fed7aa; box-shadow: 0 4px 12px rgba(16, 24, 40, .06); text-decoration: none; }

.row-muted > td { opacity: .55; }

.sector-badge { font-weight: 500; }
.sector-cozinha { color: #b42318; }
.sector-copa { color: #0b6fb8; }
.sector-nenhum { color: #4b5563; }

/* Botões grandes da tela de esgotados (pensados para toque) */
.availability-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    padding: .875rem 1rem;
    border: 1px solid var(--cx-border);
    border-radius: .75rem;
    background: #fff;
    text-align: left;
}

.availability-tile:hover { border-color: #fdba74; }

.availability-state {
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .625rem;
    border-radius: 999px;
    background: #e7f7ee;
    color: #15803d;
}

.availability-tile.is-sold-out { background: #fef3f2; border-color: #fecdca; }
.availability-tile.is-sold-out .fw-semibold { text-decoration: line-through; color: #6b7280; }
.availability-tile.is-sold-out .availability-state { background: #b42318; color: #fff; }

/* Busca e abas ficam no topo enquanto a lista rola. */
.availability-toolbar { position: sticky; top: 64px; z-index: 5; margin-bottom: 1.25rem; }
.availability-count { font-weight: 400; opacity: .75; }
.availability-count:empty { display: none; }
.availability-section + .availability-section { margin-top: 2rem; }
.availability-section-title { display: flex; align-items: center; gap: .5rem; font-size: 1.0625rem; font-weight: 600; margin-bottom: .25rem; }
.availability-section-title .bi { color: var(--cx-brand); }
.availability-section-hint { font-size: .875rem; color: #6b7280; margin-bottom: .75rem; }
.availability-group + .availability-group { margin-top: 1rem; }
.availability-group-title {
    font-size: .8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #6b7280;
    margin-bottom: .5rem;
}

/* Mapa de mesas --------------------------------------------------------- */
.floor-legend {
    display: flex;
    gap: 1rem;
    margin-top: .375rem;
    font-size: .8125rem;
    color: #6b7280;
}

.dot {
    display: inline-block;
    width: .625rem;
    height: .625rem;
    border-radius: 50%;
    margin-right: .25rem;
}

.dot-free { background: #22c55e; }
.dot-open { background: var(--cx-brand); }
.dot-closing { background: #2563eb; }

.floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: .75rem;
}

.floor-table {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    min-height: 7.5rem;
    padding: .875rem 1rem;
    border: 2px solid var(--cx-border);
    border-radius: .875rem;
    background: #fff;
    color: inherit;
    text-align: left;
    transition: transform .1s, box-shadow .15s;
}

a.floor-table:hover, button.floor-table:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
}

.floor-number { font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.floor-status { font-size: .8125rem; font-weight: 600; }
.floor-total { font-weight: 700; }
.floor-meta { margin-top: auto; font-size: .75rem; color: #6b7280; }

.floor-table.is-free { border-color: #bbf7d0; }
.floor-table.is-free .floor-status { color: #15803d; }

.floor-table.is-open { border-color: #fdba74; background: #fff7ed; }
.floor-table.is-open .floor-status { color: var(--cx-brand-hover); }

.floor-table.is-closing { border-color: #93c5fd; background: #eff6ff; }
.floor-table.is-closing .floor-status { color: #1d4ed8; }

.floor-table.is-mine { box-shadow: inset 0 0 0 2px var(--cx-brand); }

.floor-ready {
    align-self: flex-start;
    margin-top: .25rem;
    padding: .125rem .5rem;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
}

/* Conta da mesa --------------------------------------------------------- */
.tab-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .875rem 1.25rem;
}

.tab-item-qty { font-weight: 700; min-width: 2.25rem; }
.tab-item-body { flex: 1; min-width: 0; }
.tab-item-notes { font-size: .875rem; color: #9a3412; font-style: italic; }
.tab-item-options { font-size: .875rem; color: #9a3412; }

.tab-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .375rem;
    text-align: right;
}

.tab-item-price { font-weight: 600; white-space: nowrap; }
.tab-item.is-canceled .tab-item-name,
.tab-item.is-canceled .tab-item-price { text-decoration: line-through; color: #9ca3af; }

/* Montagem do pedido ---------------------------------------------------- */
.menu-search {
    position: sticky;
    top: 64px;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid var(--cx-border);
    border-radius: .75rem .75rem 0 0;
}

.category-chips {
    display: flex;
    gap: .375rem;
    overflow-x: auto;
    padding-bottom: .375rem;
    scrollbar-width: thin;
}

.category-chips .btn { white-space: nowrap; border-radius: 999px; }

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1.25rem;
    text-align: left;
}

.menu-item-body { min-width: 0; }
.menu-item-side { display: flex; align-items: center; gap: .625rem; flex-shrink: 0; }
.menu-item-add { color: var(--cx-brand); font-size: 1.5rem; }
.menu-item:disabled { opacity: .6; }
.menu-item.is-added { animation: item-added .4s ease; }

@keyframes item-added {
    from { background: var(--cx-brand-soft); }
    to { background: #fff; }
}

@media (min-width: 992px) {
    .order-cart { position: sticky; top: calc(64px + 1.5rem); }
    .order-cart [data-cart-list] { max-height: 55vh; overflow-y: auto; }
}

/* Montagem do lanche (cadastro do produto) */
.composition-search { max-width: 20rem; }
.composition-table { max-height: 28rem; overflow-y: auto; }
.composition-table thead th { position: sticky; top: 0; z-index: 1; background: #f9fafb; }
.composition-table tr.is-used > td { background: #fffaf5; }
.composition-price { width: 9rem; min-width: 8rem; }
.composition-max { width: 5.5rem; min-width: 4.5rem; }

.input-group > .size-flavors { flex: 0 0 auto; width: 8.5rem; }
.choice-table td { vertical-align: top; }
.choice-price { width: 9rem; min-width: 8rem; }

.menu-item-from { display: block; font-size: .6875rem; color: #6b7280; text-align: right; line-height: 1; }
.menu-item-sizes { display: block; font-size: .8125rem; color: var(--cx-brand); }
.menu-item-shortage { display: block; font-size: .8125rem; color: #b42318; }

/* Escolha do tamanho (e, depois, dos ingredientes): no celular abre de baixo para cima. */
.sheet-option { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; cursor: pointer; }
.sheet-option .form-check-input { margin: 0; flex-shrink: 0; }
.sheet-option:has(:checked) { background: var(--cx-brand-soft); border-color: var(--cx-brand); z-index: 1; }
.sheet-section + .sheet-section { margin-top: 1.25rem; }
.sheet-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.sheet-hint { font-size: .8125rem; font-weight: 400; color: #6b7280; }
.sheet-ingredient { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; cursor: pointer; }
.sheet-ingredient .form-check-input { margin: 0; flex-shrink: 0; }
.sheet-ingredient:has(.form-check-input:not(:checked)) .sheet-ingredient-name { text-decoration: line-through; color: #9ca3af; }
.sheet-ingredient:has(.form-check-input:disabled) { cursor: default; }
.sheet-extra { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; }
.sheet-extra.is-selected { background: var(--cx-brand-soft); }
.sheet-extra.is-sold-out { color: #9ca3af; }
.sheet-extra.is-sold-out .fw-semibold { text-decoration: line-through; }
.sheet-option:has(:disabled) { cursor: default; color: #9ca3af; }

/* Pizza: sabores (meio a meio...) e opções da categoria (borda, massa). */
.sheet-groups > .sheet-section,
.sheet-groups + .sheet-section { margin-top: 1.25rem; }
.sheet-flavor { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; }
.sheet-flavor-part {
    flex-shrink: 0;
    min-width: 2.25rem;
    padding: .125rem .375rem;
    border-radius: .375rem;
    background: var(--cx-brand-soft);
    color: var(--cx-brand);
    font-size: .8125rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 575.98px) {
    .modal-dialog.modal-sheet { display: flex; align-items: flex-end; min-height: 100%; margin: 0; }
    .modal-sheet .modal-content { border-radius: 1rem 1rem 0 0; border: 0; }
}

.cart-line { padding: .75rem 1rem; }
.cart-size { font-size: .75rem; }
.cart-options { font-size: .8125rem; color: #9a3412; }
.cart-qty { min-width: 2.25rem; opacity: 1 !important; font-weight: 600; }

.order-cart-bar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .875rem 1.25rem;
    border-radius: .875rem;
    background: var(--cx-brand);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(234, 88, 12, .35);
}

.order-cart-bar:hover { color: #fff; text-decoration: none; }
.order-cart-bar[hidden] { display: none; }

@media (max-width: 991.98px) {
    .order-composer { padding-bottom: 4.5rem; }
}

/* Cardápio do QR da mesa (cliente) --------------------------------------- */
.menu-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--cx-sidebar-bg);
}

.menu-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 64px;
}

.menu-header-table {
    flex-shrink: 0;
    padding: .25rem .875rem;
    border-radius: 999px;
    background: var(--cx-brand);
    color: #fff;
    font-weight: 700;
}

.menu-main { padding-top: 1rem; padding-bottom: 1rem; }

.menu-footer {
    padding: 1rem 1rem 2rem;
    text-align: center;
    font-size: .75rem;
    color: #9ca3af;
}

.menu-guest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: var(--cx-brand-soft);
}

.menu-join #code {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .5em;
    text-align: center;
}

/* Código da conta para o cliente pedir pelo QR (conta da mesa e mapa) */
.access-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: .2em;
    line-height: 1;
}

.floor-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: #6b7280;
}

.floor-requests {
    align-self: flex-start;
    margin-top: .25rem;
    padding: .125rem .5rem;
    border-radius: 999px;
    background: #d97706;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
}

/* Folha de QR das mesas: um cartão por mesa, para recortar */
.qr-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.25rem 1rem;
    border: 1px dashed #c4c8d0;
    border-radius: .75rem;
    background: #fff;
    text-align: center;
    break-inside: avoid;
}

.qr-card-restaurant { font-size: .8125rem; font-weight: 600; color: #6b7280; }
.qr-card-table { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.qr-card-code { width: 170px; height: 170px; }
.qr-card-code svg { display: block; width: 100%; height: 100%; }
.qr-card-hint { font-size: .8125rem; }

@media print {
    .app-sidebar, .app-topbar { display: none !important; }
    body, .app-content { background: #fff; padding: 0; }
    .qr-sheet { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
    .qr-card { padding: 6mm 4mm; }
}

/* Avisos do garçom ----------------------------------------------------- */
.app-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    font-size: 1.2rem;
}

.app-icon-btn:hover, .app-icon-btn.show { background: #f3f4f6; }

.app-icon-btn .notification-badge {
    position: absolute;
    top: .125rem;
    right: -.125rem;
    font-size: .6875rem;
}

.notification-menu { min-width: 18rem; max-height: 60vh; overflow-y: auto; }

.notification-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .5rem;
    align-items: baseline;
    white-space: normal;
}

.notification-push-hint {
    max-width: 18rem;
    margin: 0;
    padding: .25rem 1rem;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* Telas de produção (cozinha/copa)------------------------------------- */
.production-online { color: #15803d; }
.production-online .bi { font-size: .5rem; vertical-align: middle; }
.production-offline { display: none; color: #b42318; font-weight: 600; }
.production.is-offline .production-online { display: none; }
.production.is-offline .production-offline { display: inline; }

.production-column {
    min-height: 60vh;
    padding: .75rem;
    border-radius: 1rem;
    background: #eceef2;
}

.production-column-preparando { background: #fdf3e2; }
.production-column-pronto { background: #e8f6ee; }

.production-column-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .25rem .25rem .75rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .8125rem;
    letter-spacing: .04em;
    color: #374151;
}

.production-empty { padding: 2rem 0; text-align: center; color: #9ca3af; }

.production-card {
    margin-bottom: .75rem;
    padding: .875rem 1rem;
    border-radius: .75rem;
    background: #fff;
    border-left: 6px solid #9ca3af;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

.production-column-preparando .production-card { border-left-color: #f59e0b; }
.production-column-pronto .production-card { border-left-color: #16a34a; }
.production-card.is-warning { border-left-color: #f59e0b; background: #fffbeb; }
.production-card.is-late { border-left-color: #dc2626; background: #fef2f2; }
.production-card.is-late .production-time { color: #dc2626; font-weight: 700; }

.production-card-header { display: flex; justify-content: space-between; align-items: baseline; }
.production-table { font-size: 1.375rem; font-weight: 800; }
.production-time { color: #6b7280; font-size: .875rem; }
.production-card-meta { font-size: .75rem; color: #6b7280; margin-bottom: .5rem; }

.production-items { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: 1.0625rem; }
.production-items li { padding: .25rem 0; border-bottom: 1px dashed #e5e7eb; }
.production-items li:last-child { border-bottom: 0; }
.production-items li.is-done { color: #9ca3af; text-decoration: line-through; }

.production-notes {
    margin-left: 1.75rem;
    color: #b42318;
    font-weight: 700;
    font-size: .9375rem;
    text-transform: uppercase;
}

.production-without,
.production-extra,
.production-choice {
    margin-left: 1.75rem;
    font-weight: 700;
    font-size: .9375rem;
    text-transform: uppercase;
}

.production-without { color: #b42318; }
.production-extra { color: #15803d; }
.production-choice { color: #1d4ed8; }

.production-size {
    display: inline-block;
    margin-left: .25rem;
    padding: 0 .375rem;
    border-radius: .25rem;
    background: #111827;
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: .1em;
}

.production-actions { display: flex; gap: .5rem; }

.print-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

/* Caixa ----------------------------------------------------------------- */
.cashier-tab { display: flex; align-items: center; gap: 1rem; padding: .875rem 1.25rem; }
.cashier-tab-table { min-width: 5.5rem; font-size: 1.125rem; font-weight: 800; }
.cashier-tab.is-closing { background: #eff6ff; }

.bill-summary dd, .bill-summary dt { margin-bottom: .5rem; }
.bill-total-label, .bill-total { font-size: 1.375rem; font-weight: 800; border-top: 1px solid var(--cx-border); padding-top: .5rem; }
.bill-remaining-label, .bill-remaining { font-size: 1.25rem; font-weight: 800; color: var(--cx-brand-hover); }

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}

.payment-methods .btn { padding: .625rem .25rem; font-size: .8125rem; line-height: 1.2; }

@media (max-width: 575.98px) {
    .payment-methods { grid-template-columns: repeat(2, 1fr); }
}

.change-display { font-size: 1.125rem; }
.change-display strong { font-size: 1.5rem; color: #15803d; }
.change-display.is-partial::after { content: " (pagamento parcial)"; font-size: .875rem; color: #6b7280; }

.detail-list dt { color: #6b7280; font-weight: 500; }
.detail-list dd { margin-bottom: .625rem; }
.detail-list dd:last-of-type { margin-bottom: 0; }

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #6b7280;
}

.empty-state > .bi {
    display: block;
    font-size: 2.25rem;
    color: #c4c8d0;
    margin-bottom: .5rem;
}

/* Login e páginas de erro ------------------------------------------------ */
.auth-body {
    background:
        radial-gradient(circle at 15% 20%, rgba(251, 146, 60, .18), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(234, 88, 12, .12), transparent 45%),
        var(--cx-body-bg);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .08);
}

.auth-card-wide { max-width: 960px; }

.auth-logo {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    background: var(--cx-brand);
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(234, 88, 12, .3);
}

.error-code {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--cx-brand);
    letter-spacing: -.04em;
    margin-bottom: .75rem;
}

.error-trace {
    max-height: 320px;
    overflow: auto;
    padding: 1rem;
    border-radius: .5rem;
    background: #1f2937;
    color: #e5e7eb;
    font-size: .75rem;
}
