/* =============================================
   DESIGN TOKENS — PALHETA BRUTAL
   ============================================= */
:root {
    /* Cores */
    --color-bg:          #0A0A0A;
    --color-surface:     #141414;
    --color-surface-2:   #1E1E1E;
    --color-border:      #2A2A2A;
    --color-accent:      #FFB300;
    --color-accent-hover:#FFD740;
    --color-text:        #FFFFFF;
    --color-text-muted:  #AAAAAA;
    --color-error:       #E53935;
    --color-success:     #43A047;
    --color-warning:     #FB8C00;

    /* Tipografia */
    --font-heading: 'Bebas Neue', 'Impact', sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Espaçamento (base 4px) */
    --space-1: 4px;  --space-2: 8px;   --space-3: 12px;
    --space-4: 16px; --space-6: 24px;  --space-8: 32px;

    /* Bordas */
    --radius-sm: 4px;  --radius-md: 8px;
    --radius-lg: 16px; --radius-full: 9999px;

    /* Animações */
    --transition-fast:   150ms ease-out;
    --transition-normal: 250ms ease-out;
    --transition-slow:   400ms ease-in-out;
}

/* =============================================
   APP SHELL — HEADER FIXO (mobile-first)
   ============================================= */
html,
body {
    margin: 0;
    padding: 0;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fffdf5;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #1a1a1a;
    border-bottom: 3px solid #ffb347;
}

.app-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffb347;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-logo span {
    /* Esconde texto no mobile muito pequeno */
    display: none;
}

@media (min-width: 400px) {
    .app-logo span {
        display: inline;
    }
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-nav-link {
    color: #ddd;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 0.2s;
}

.app-nav-link:hover {
    color: #ffb347;
}

.app-nav-carrinho {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffb347;
    color: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 700;
}

.app-nav-carrinho:hover {
    background: #ffa020;
    color: #fff;
}

.app-cart-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-nav-label {
    display: none;
}

@media (min-width: 500px) {
    .app-nav-label {
        display: inline;
    }
}

.app-main {
    flex: 1;
    /* Espaço extra no fundo para o botão flutuante não cobrir conteúdo */
    padding-bottom: 80px;
}

/* =============================================
   BOTÃO FLUTUANTE DO CARRINHO (mobile FAB)
   ============================================= */
.float-cart-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #ffb347;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 3px solid #ff8c00;
    transition: background 0.2s;
}

.float-cart-btn:hover {
    background: #ffa020;
}

.float-cart-count {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.float-cart-label {
    font-size: 0.95rem;
}

/* No desktop, o botão fixo some e o do header basta */
@media (min-width: 768px) {
    .float-cart-btn {
        display: none;
    }

    .app-main {
        padding-bottom: 0;
    }
}

/* =============================================
   HERO / BANNER DO CARDÁPIO
   ============================================= */
.cardapio-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #3d2b00 60%, #1a1a1a 100%);
    color: #fff;
    padding: 32px 16px 28px;
    text-align: center;
}

.cardapio-hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.cardapio-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 900;
    color: #ffb347;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cardapio-hero p {
    margin: 0;
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
}

/* =============================================
   FILTROS DE CATEGORIA
   ============================================= */
.cardapio-filtros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.filtro-btn {
    background: #fff;
    border: 2px solid #ddd;
    color: #555;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filtro-btn:hover {
    border-color: #ffb347;
    color: #ffb347;
}

.filtro-btn.ativo {
    background: #ffb347;
    border-color: #ffb347;
    color: #fff;
    font-weight: 700;
}

/* Título da seção quando filtrando */
.cardapio-secao-titulo {
    max-width: 1200px;
    margin: 4px auto 0;
    padding: 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
}

/* =============================================
   GRID DE PRODUTOS (mobile-first)
   ============================================= */
.cardapio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 16px;
    max-width: 1200px;
    margin: 0 auto;
    isolation: isolate;
}

@media (min-width: 500px) {
    .cardapio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .cardapio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 20px 24px;
    }
}

@media (min-width: 1200px) {
    .cardapio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card individual */
.produto-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform var(--transition-normal, 250ms ease-out),
                box-shadow var(--transition-normal, 250ms ease-out);
    will-change: transform;
    cursor: pointer;
}

.produto-card:hover {
    transform: perspective(800px) rotateX(-3deg) rotateY(4deg) translateZ(8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 179, 0, 0.3);
}

.produto-card:active {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) translateZ(4px);
    transition-duration: 80ms;
}

/* Entrada com stagger */
@keyframes card-enter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.produto-card { animation: card-enter 300ms ease-out backwards; }
.produto-card:nth-child(1) { animation-delay: 0ms; }
.produto-card:nth-child(2) { animation-delay: 60ms; }
.produto-card:nth-child(3) { animation-delay: 120ms; }
.produto-card:nth-child(4) { animation-delay: 180ms; }
.produto-card:nth-child(5) { animation-delay: 240ms; }
.produto-card:nth-child(6) { animation-delay: 300ms; }

/* Imagem do produto */
.produto-img-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f0e8;
}

.produto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #fff5e0, #ffe0b2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.produto-card-bebida .produto-img-placeholder {
    background: linear-gradient(135deg, #e0f0ff, #b3d9ff);
}

/* Corpo do card */
.produto-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.produto-categoria-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffb347;
}

.produto-nome {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #2a2a2a;
    line-height: 1.3;
}

.produto-desc {
    margin: 0;
    font-size: 0.83rem;
    color: #777;
    line-height: 1.4;
    flex: 1;
}

.produto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 8px;
}

.preco {
    font-size: 1.2rem;
    font-weight: 900;
    color: #27ae60;
    white-space: nowrap;
}

.btn-adicionar {
    background: #ffb347;
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.btn-adicionar:hover {
    background: #ffa020;
    transform: scale(1.04);
}

.btn-adicionar:active {
    transform: scale(0.97);
}

/* Loading e vazio */
.cardapio-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: #aaa;
}

.cardapio-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ffdac1;
    border-top-color: #ffb347;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.cardapio-vazio {
    padding: 60px 20px;
    text-align: center;
    color: #888;
}

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 500px) {
    .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .skeleton-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 1200px) {
    .skeleton-grid { grid-template-columns: repeat(4, 1fr); }
}

.skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 380px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: #eee;
}

.skeleton-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; background: #eee; border-radius: 4px; width: 100%; }
.skeleton-line.short { width: 60%; }
.skeleton-line.tag { width: 30%; height: 8px; }

.skeleton-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.skeleton-price { height: 24px; width: 80px; background: #eee; border-radius: 4px; }
.skeleton-btn { height: 36px; width: 100px; background: #eee; border-radius: 8px; }

.shimmer {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer-load 1.5s infinite;
}

@keyframes shimmer-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   MODAL DE PERSONALIZAÇÃO (mobile-first)
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    /* Abre da baixo no mobile */
    justify-content: center;
    padding: 0;
}

@media (min-width: 600px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    position: relative;
}

@media (min-width: 600px) {
    .modal-content {
        border-radius: 16px;
        padding: 28px;
    }
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f0f0f0;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: #e0e0e0;
}

.modal-content h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 900;
    color: #2a2a2a;
}

.modal-nome-produto {
    color: #ffb347;
    font-weight: 700;
    margin: 0 0 18px;
    font-size: 1rem;
}

.opcoes-secao {
    margin-bottom: 20px;
}

.opcoes-secao h4 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 700;
}

/* Checkboxes visuais estilo chip */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    transition: all 0.15s;
    user-select: none;
}

.checkbox-item input[type="checkbox"] {
    accent-color: #ffb347;
    width: 16px;
    height: 16px;
}

.checkbox-item.selecionado {
    border-color: #ffb347;
    background: #fff8ee;
    color: #d4830a;
}

/* Adicionais com contador */
.addon-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.addon-contador {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.addon-nome {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
}

.addon-preco {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 700;
    white-space: nowrap;
}

.contador-controles {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #ffb347;
    border-radius: 8px;
    overflow: hidden;
}

.contador-controles button {
    width: 34px;
    height: 34px;
    border: none;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: #ffb347;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contador-controles button:hover {
    background: #fff5e0;
}

.contador-controles span {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    padding: 0 4px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer do modal */
.modal-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preco-destaque {
    font-size: 1.3rem;
    font-weight: 900;
    color: #27ae60;
    text-align: center;
}

.modal-footer-btns {
    display: flex;
    gap: 10px;
}

.btn-cancelar {
    flex: 1;
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-cancelar:hover {
    background: #e0e0e0;
}

.btn-confirmar {
    flex: 2;
    background: #ffb347;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-confirmar:hover {
    background: #ffa020;
}

.btn-confirmar:active {
    transform: scale(0.97);
}

/* Carrinho Page Styles (mantidos) */
.carrinho-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    background: white;
    border-radius: 8px;
}

@media (min-width: 600px) {
    .carrinho-container {
        padding: 2rem;
    }
}

.carrinho-lista {
    list-style: none;
    padding: 0;
}

.carrinho-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.carrinho-item button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.carrinho-total {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-finalizar {
    background: #ffb347;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

@media (min-width: 500px) {
    .btn-finalizar {
        width: auto;
    }
}

/* Floating button antigo (oculta — substituído pelo novo) */
.carrinho-floating-button {
    display: none;
}

.btn-carrinho-icon {
    display: none;
}


/* KDS KANBAN STYLES (Monitor da Cozinha) */
.kds-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #0d0d0d;
    color: #fff;
}

.kds-kanban {
    display: flex;
    gap: 20px;
    height: 100%;
    padding: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kds-column {
    flex: 1;
    min-width: 320px;
    min-height: 0;
    background: #111;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    overflow: hidden;
}

.kds-column-header {
    padding: 15px;
    border-bottom: 2px solid #222;
    text-align: center;
    background: #000;
}

.kds-column-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
}

.bg-recebido { border-top: 4px solid #ff4444; }
.bg-recebido h2 { color: #ff4444; text-shadow: 0 0 10px rgba(255, 68, 68, 0.4); }

.bg-aceito { border-top: 4px solid #a200ff; }
.bg-aceito h2 { color: #a200ff; text-shadow: 0 0 10px rgba(162, 0, 255, 0.4); }

.bg-preparo { border-top: 4px solid #ff9800; }
.bg-preparo h2 { color: #ff9800; text-shadow: 0 0 10px rgba(255, 152, 0, 0.4); }

.bg-pronto { border-top: 4px solid #e6ff00; }
.bg-pronto h2 { color: #e6ff00; text-shadow: 0 0 10px rgba(230, 255, 0, 0.4); }

.kds-column-body {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kds-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #333;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.kds-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.8);
    border-color: #555;
}

.kds-card-header {
    font-weight: 900;
    font-size: 1.2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    color: #fff;
}

.kds-time {
    color: #ff4444;
    font-family: monospace;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.kds-card-items {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #ddd;
}

.kds-card-items li {
    padding: 5px 0;
    border-bottom: 1px dashed #333;
}

.kds-btn {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #aaa;
    border: 1px solid #444;
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.kds-btn:active {
    transform: scale(0.98);
}

.kds-btn-aceitar { border-color: #a200ff; color: #a200ff; }
.kds-btn-aceitar:hover { background: #a200ff; color: #fff; box-shadow: 0 0 15px rgba(162, 0, 255, 0.6); }

.kds-btn-preparo { border-color: #ff9800; color: #ff9800; }
.kds-btn-preparo:hover { background: #ff9800; color: #fff; box-shadow: 0 0 15px rgba(255, 152, 0, 0.6); }

.kds-btn-pronto { border-color: #e6ff00; color: #e6ff00; }
.kds-btn-pronto:hover { background: #e6ff00; color: #000; box-shadow: 0 0 15px rgba(230, 255, 0, 0.6); }

.kds-btn-entregue { border-color: #e6ff00; color: #e6ff00; }
.kds-btn-entregue:hover { background: #e6ff00; color: #000; box-shadow: 0 0 15px rgba(230, 255, 0, 0.6); }

.kds-btn-cancelar-pedido {
    background: transparent;
    color: #ff4444;
    border-color: #ff4444;
    flex: 0 0 44px;
    font-size: 1.1rem;
}
.kds-btn-cancelar-pedido:hover {
    background: #ff4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}

.kds-btn-confirmar-cancelar {
    background: transparent;
    color: #ff4444;
    flex: 2;
    border-color: #ff4444;
    font-weight: 900;
}
.kds-btn-confirmar-cancelar:hover:not(:disabled) {
    background: #ff4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}

.kds-btn-confirmar-cancelar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #555;
}

.kds-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.kds-card-actions .kds-btn {
    flex: 1;
}

.kds-obs {
    font-size: 0.85em;
    color: #aaa;
    padding-left: 10px;
    border-left: 2px solid #555;
    margin-top: 3px;
}

.kds-troco {
    color: #ff4444;
    font-weight: bold;
}

.kds-delivery-info {
    font-size: 0.9em;
    margin-bottom: 8px;
    padding: 7px 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #444;
    line-height: 1.7;
    color: #fff;
    border-radius: 4px;
}

.kds-badge-count {
    display: inline-block;
    background: #222;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #444;
}

@keyframes kds-pulso-novo-neon {
    0% { box-shadow: 0 0 20px rgba(230, 255, 0, 0.8), inset 0 0 10px rgba(230, 255, 0, 0.2); border-color: #e6ff00; }
    50% { box-shadow: 0 0 5px rgba(230, 255, 0, 0), inset 0 0 0 rgba(230, 255, 0, 0); border-color: #555; }
    100% { box-shadow: 0 0 0 rgba(230, 255, 0, 0); border-color: #333; }
}

.kds-card-novo {
    border-color: #e6ff00 !important;
    animation: kds-pulso-novo-neon 1s ease-out 4;
}

.kds-card-zombie {
    border-color: #e74c3c !important;
    background: #1a0000 !important;
    animation: kds-pulso-zombie 2s ease-in-out infinite;
}

@keyframes kds-pulso-zombie {
    0%, 100% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.4); }
    50%       { box-shadow: 0 0 18px rgba(231, 76, 60, 0.9); }
}

/* =============================================
   MODAL DE CANCELAMENTO DO KDS
   ============================================= */
.kds-cancel-modal {
    background: #111;
    border: 2px solid #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
    width: 90%;
    max-width: 440px;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

.kds-cancel-modal-header {
    background: #000;
    color: #ff4444;
    border-bottom: 1px solid #ff4444;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kds-cancel-modal-body {
    padding: 20px;
    color: #fff;
}

.kds-cancel-modal-body p {
    margin: 0 0 8px;
}

.kds-cancel-aviso {
    color: #ff4444;
    font-weight: bold;
    font-size: 0.9rem;
}

.kds-cancel-field {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kds-cancel-field label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #aaa;
}

.kds-cancel-textarea {
    width: 100%;
    border: 1px solid #444;
    background: #000;
    color: #fff;
    padding: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 6px;
}

.kds-cancel-textarea:focus {
    border-color: #ff4444;
    box-shadow: 0 0 8px rgba(255,68,68,0.3);
}

.kds-cancel-erro {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 4px;
}

.kds-cancel-modal-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #333;
    background: #000;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border: 4px solid #000;
    box-shadow: 10px 10px 0px #000;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.opcoes-secao {
    margin-top: 15px;
    border: 2px solid #000;
    padding: 10px;
}

.opcoes-secao h4 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.opcoes-secao label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 1.1rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.preco-destaque {
    font-size: 1.2rem;
    font-weight: 900;
    color: #e74c3c;
}

.btn-cancelar {
    background: #ccc;
    color: #000;
    border: 2px solid #000;
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
}

.btn-confirmar {
    background: #f1c40f;
    color: #000;
    border: 2px solid #000;
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
}

.addon-contador {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dotted #ccc;
    font-size: 1.1rem;
}

.contador-controles {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contador-controles button {
    background: #000;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.contador-controles button:active {
    transform: scale(0.95);
}

.contador-controles span {
    font-weight: 900;
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

/* =========================================
   ESTILOS DE IMPRESSÃO (BOBINA TÉRMICA)
   ========================================= */

@media print {

    /* Configuração da Página para bobinas (tira o cabeçalho/rodapé automático do Chrome) */
    @page {
        margin: 0;
        size: 80mm auto;
        /* Força a renderização em rolo/bobina (tira os headers Date/URL) */
    }

    /* Esconde completamente os containers de interface para não ocuparem espaço (páginas em branco) */
    body.modo-impressao-cupom .kds-top-row,
    body.modo-impressao-cupom .kds-kanban,
    body.modo-impressao-cupom .sidebar,
    body.modo-impressao-cupom #blazor-error-ui {
        display: none !important;
    }

    /* Remove fundos e margens dos containers pais */
    body.modo-impressao-cupom {
        background: white !important;
    }

    body.modo-impressao-cupom,
    body.modo-impressao-cupom #app,
    body.modo-impressao-cupom .kds-page,
    body.modo-impressao-cupom .kds-main,
    body.modo-impressao-cupom .content,
    body.modo-impressao-cupom article {
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        border: none !important;
    }

    /* Exibe o Cupom Térmico de forma fluida (Document Flow) embutido no tamanho da folha */
    body.modo-impressao-cupom .imprimindo-ativo {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        max-width: 80mm !important;
        /* Fixa o tamanho em 8cm (bobina de 80mm) */
        margin: 0 !important;
        padding: 5mm !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* Estilo do layout interno do Cupom (Visível só dentro desse container) */
.cupom-termico {
    display: none;
    /* Só exibido durante o @media print através de JS ou debug */
    background: #fff;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.2;
    padding-bottom: 20px;
}

/* Quando ativo pela classe de impressão JS */
.cupom-termico.imprimindo-ativo {
    display: block;
}

.cupom-termico h1,
.cupom-termico h2,
.cupom-termico h3,
.cupom-termico p {
    margin: 3px 0;
    text-align: center;
}

.cupom-termico hr {
    border: none;
    border-top: 1px dashed #000;
    margin: 8px 0;
}

.cupom-tabela {
    width: 100%;
    margin-top: 10px;
}

.cupom-tabela th,
.cupom-tabela td {
    text-align: left;
    padding: 2px 0;
}

.cupom-tabela td.valor {
    text-align: right;
}

.cupom-total {
    font-size: 16px;
    font-weight: bold;
    text-align: right;
    margin-top: 5px;
}

/* =========================================
   TELA DE LOGIN DO KDS
   ========================================= */

.kds-login-page {
    min-height: 100vh;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.kds-login-card {
    background: #111;
    border: 4px solid #e6ff00;
    padding: 40px;
    max-width: 420px;
    width: 100%;
}

.kds-login-logo {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e6ff00;
    padding-bottom: 20px;
}

.kds-login-logo h1 {
    font-size: 3rem;
    margin: 0 0 10px 0;
}

.kds-login-logo h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #e6ff00;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.kds-login-subtitle {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kds-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kds-login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kds-login-field label {
    color: #e6ff00;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kds-login-input {
    padding: 12px;
    background: #222;
    border: 2px solid #555;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.kds-login-input:focus {
    border-color: #e6ff00;
}

.kds-login-btn {
    background: #e6ff00;
    color: #000;
    font-weight: 900;
    font-size: 1rem;
    padding: 14px;
    border: 2px solid #e6ff00;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s, color 0.2s;
}

.kds-login-btn:hover:not(:disabled) {
    background: #000;
    color: #e6ff00;
}

.kds-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.kds-login-erro {
    background: #3a0000;
    color: #ff6b6b;
    border: 2px solid #ff3333;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* =========================================
   PAINEL ADMINISTRATIVO
   ========================================= */

.admin-page {
    min-height: 100vh;
    background: #0a0a0a;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
}

.admin-header {
    background: #000;
    color: #ffcc00;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #ffcc00;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-header-brand span {
    font-size: 2rem;
}

.admin-header-brand h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffcc00;
}

.admin-header-brand p {
    margin: 0;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.admin-header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border: 2px solid #333;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: #111;
}

.admin-nav-link:hover {
    border-color: #ffcc00;
    color: #ffcc00;
}

.admin-btn-sair {
    background: #ffcc00;
    color: #000;
    border: 2px solid #ffcc00;
    padding: 6px 14px;
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
}

.admin-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 3px solid #000;
    margin-bottom: 24px;
}

.admin-tab {
    background: #111;
    color: #888;
    border: 2px solid #333;
    border-bottom: none;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.admin-tab.active {
    background: #ffcc00;
    color: #000;
    border-color: #ffcc00;
}

.admin-alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-weight: 700;
    border: 2px solid;
}

.admin-alert-ok {
    background: #efffef;
    border-color: #2d8a2d;
    color: #1a5e1a;
}

.admin-alert-erro {
    background: #fff0f0;
    border-color: #cc2222;
    color: #801515;
}

.admin-section {
    background: #111;
    border: 2px solid #333;
    padding: 20px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 12px;
}

.admin-section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffcc00;
}

.admin-btn-novo {
    background: #ffcc00;
    color: #000;
    border: 2px solid #ffcc00;
    padding: 8px 18px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.15s;
}

.admin-btn-novo:hover {
    background: #000;
    color: #ffcc00;
}

.admin-form-card {
    background: #1a1a1a;
    border: 2px dashed #ffcc00;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-form-card h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffcc00;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-field-full {
    grid-column: 1 / -1;
}

.admin-field label {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    padding: 10px;
    border: 2px solid #444;
    background: #0a0a0a;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    border-color: #ffcc00;
}

.admin-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.admin-btn-salvar {
    background: #ffcc00;
    color: #000;
    border: 2px solid #ffcc00;
    padding: 9px 22px;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
}

.admin-btn-salvar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-btn-cancelar {
    background: transparent;
    color: #aaa;
    border: 2px solid #555;
    padding: 9px 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead {
    background: #1a1a1a;
    color: #ffcc00;
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #222;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #141414;
}

.admin-row-inativo {
    opacity: 0.5;
    background: #0f0f0f;
}

.admin-td-id {
    color: #999;
    font-size: 0.8rem;
    width: 40px;
}

.admin-td-preco {
    font-weight: 900;
    font-size: 1rem;
    color: #2ecc71;
}

.admin-td-acoes {
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-badge {
    background: #000;
    color: #ffcc00;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-status-ativo {
    color: #2ecc71;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-status-inativo {
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-btn-editar,
.admin-btn-toggle,
.admin-btn-deletar {
    background: #1a1a1a;
    color: #eee;
    border: 1px solid #444;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s;
    border-radius: 6px;
}

.admin-btn-editar:disabled,
.admin-btn-toggle:disabled,
.admin-btn-deletar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #222;
    border-color: #333;
    color: #888;
}

.admin-btn-editar:hover {
    background: #332b00;
    border-color: #ffcc00;
}

.admin-btn-toggle:hover {
    background: #003310;
    border-color: #2ecc71;
}

.admin-btn-deletar:hover {
    background: #330000;
    border-color: #e74c3c;
}

.admin-vazio {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

@media (max-width: 640px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* =========================================
   DASHBOARD DE RELATÓRIOS
   ========================================= */

.rel-container {
    min-height: 100vh;
    background: #0a0a0a;
    font-family: 'Inter', system-ui, sans-serif;
    color: #fff;
    padding: 0 0 40px 0;
}

.rel-page {
    min-height: 100vh;
    background: #0a0a0a;
    font-family: 'Inter', system-ui, sans-serif;
    color: #fff;
}

.rel-header {
    background: #000;
    color: #ffcc00;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #ffcc00;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rel-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rel-header-brand span {
    font-size: 2rem;
}

.rel-header-brand h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffcc00;
}

.rel-header-brand p {
    margin: 0;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.rel-header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rel-nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border: 2px solid #333;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: #111;
}

.rel-nav-link:hover {
    border-color: #ffcc00;
    color: #ffcc00;
}

.rel-btn-sair {
    background: #ffcc00;
    color: #000;
    border: 2px solid #ffcc00;
    padding: 6px 14px;
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
}

.rel-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* KPI CARDS */
.rel-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rel-kpi-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 20px;
}

.rel-kpi-destaque {
    border-color: #ffcc00;
    background: #1a1a00;
}

.rel-kpi-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    margin-bottom: 10px;
}

.rel-kpi-valor {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffcc00;
    line-height: 1;
    margin-bottom: 6px;
}

.rel-kpi-sub {
    font-size: 0.8rem;
    color: #777;
}

/* ROW */
.rel-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* CARDS */
.rel-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 20px;
}


.rel-card-title {
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffcc00;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

/* GRÁFICO DE BARRAS */
.rel-barras {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding-top: 30px;
    position: relative;
}

.rel-barra-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.rel-barra-valor {
    font-size: 0.65rem;
    color: #aaa;
    text-align: center;
    margin-bottom: 4px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rel-barra-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 2px;
}

.rel-barra {
    width: 100%;
    background: #333;
    min-height: 2px;
    transition: height 0.5s ease;
}

.rel-barra-hoje {
    background: #e6ff00;
}

.rel-barra-label {
    font-size: 0.7rem;
    color: #777;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
}

.rel-barra-label-hoje {
    color: #e6ff00;
    font-weight: 700;
}

.rel-barra-pedidos {
    font-size: 0.65rem;
    color: #555;
    margin-top: 2px;
}

/* PAGAMENTO */
.rel-pagamento-row {
    margin-bottom: 16px;
}

.rel-pagamento-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.rel-pagamento-qtd {
    color: #777;
    font-size: 0.8rem;
}

.rel-pagamento-bar-wrap {
    background: #2a2a2a;
    height: 8px;
    margin-bottom: 4px;
}

.rel-pagamento-bar {
    background: #e6ff00;
    height: 8px;
    min-width: 2px;
    transition: width 0.5s ease;
}

.rel-pagamento-total {
    font-weight: 900;
    font-size: 0.9rem;
    color: #e6ff00;
    text-align: right;
}

/* TABELA RANKING */
.rel-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rel-tabela thead {
    border-bottom: 2px solid #e6ff00;
}

.rel-tabela th {
    padding: 8px 10px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e6ff00;
}

.rel-tabela td {
    padding: 10px;
    border-bottom: 1px solid #222;
    color: #ddd;
}

.rel-td-rank {
    font-size: 1.1rem;
    width: 40px;
}

.rel-td-qtd {
    color: #aaa;
}

.rel-td-total {
    font-weight: 900;
    color: #e6ff00;
    text-align: right;
}

.rel-vazio {
    color: #555;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.rel-footer {
    color: #555;
    font-size: 0.8rem;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.rel-btn-refresh {
    background: transparent;
    color: #e6ff00;
    border: 1px solid #e6ff00;
    padding: 4px 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .rel-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rel-row {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   REORDENAÇÃO DE PRODUTOS (ADMIN)
   ============================================= */
.admin-ordem-ctrl {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.admin-ordem-ctrl span {
    font-size: 0.75rem;
    font-weight: 900;
    color: #444;
    min-width: 24px;
    text-align: center;
}

.admin-btn-ordem {
    background: #fff;
    border: 1.5px solid #999;
    color: #333;
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.admin-btn-ordem:hover:not(:disabled) {
    background: #000;
    color: #e6ff00;
    border-color: #000;
}

.admin-btn-ordem:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* =============================================
   RELATÓRIOS — CABEÇALHO NOVO
   ============================================= */
.rel-container .rel-header {
    background: #000;
    color: #e6ff00;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #e6ff00;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rel-header-left h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #e6ff00;
}

.rel-header-sub {
    font-size: 0.72rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rel-header-right {
    display: flex;
    gap: 10px;
}

.rel-btn-nav {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border: 2px solid #555;
    font-size: 0.82rem;
    transition: border-color 0.2s, color 0.2s;
}

.rel-btn-nav:hover {
    border-color: #e6ff00;
    color: #e6ff00;
}

/* =============================================
   RELATÓRIOS — BARRA DE FILTRO
   ============================================= */
.rel-filtro-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 16px 28px;
    background: #1a1a1a;
    border-bottom: 2px solid #333;
}

.rel-filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rel-filtro-grupo label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

.rel-filtro-input {
    background: #000;
    border: 2px solid #555;
    color: #e6ff00;
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.rel-filtro-input:focus {
    border-color: #e6ff00;
}

.rel-filtro-atalhos {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    padding-bottom: 2px;
}

.rel-btn-atalho {
    background: transparent;
    border: 1.5px solid #444;
    color: #aaa;
    padding: 5px 10px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}

.rel-btn-atalho:hover {
    border-color: #e6ff00;
    color: #e6ff00;
}

.rel-btn-filtrar {
    background: #e6ff00;
    color: #000;
    border: 2px solid #e6ff00;
    padding: 7px 18px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s;
}

.rel-btn-filtrar:hover:not(:disabled) {
    background: #cfea00;
}

.rel-btn-filtrar:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rel-btn-csv {
    background: #111;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    padding: 7px 18px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s;
}

.rel-btn-csv:hover:not(:disabled) {
    background: var(--color-accent);
    color: #000;
}

.rel-btn-csv:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rel-msg-erro {
    color: #ff6b6b;
    font-size: 0.85rem;
    align-self: center;
}

/* Label do período exibido */
.rel-periodo-label {
    padding: 8px 28px;
    font-size: 0.82rem;
    color: #aaa;
    background: #111;
    border-bottom: 1px solid #222;
}

.rel-periodo-label strong {
    color: #e6ff00;
}

/* Loading */
.rel-loading {
    padding: 40px 28px;
    color: #aaa;
    font-size: 1rem;
}

/* KPI cards dentro do container */
.rel-container .rel-kpi-grid {
    padding: 24px 28px 0;
}

.rel-container .rel-kpi-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 20px;
}

.rel-kpi-card.rel-kpi-destaque {
    border-color: #e6ff00;
    background: #1a1a00;
}

.rel-container .rel-row,
.rel-container .rel-card,
.rel-container .rel-card-wide {
    margin-left: 28px;
    margin-right: 28px;
}

.rel-container .rel-row {
    margin-top: 20px;
}

/* Tabela de top produtos */
.rel-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rel-tabela thead tr {
    background: #222;
}

.rel-tabela th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    border-bottom: 2px solid #333;
}

.rel-tabela tbody tr {
    border-bottom: 1px solid #222;
}

.rel-tabela tbody tr:hover {
    background: #1a1a1a;
}

.rel-tabela td {
    padding: 10px 14px;
    vertical-align: middle;
}

.rel-rank {
    font-weight: 900;
    color: #e6ff00;
    width: 40px;
}

.rel-qtd {
    font-weight: 700;
    text-align: center;
}

.rel-fat {
    font-weight: 900;
    color: var(--color-accent);
    text-align: right;
}

/* Empty state */
.rel-empty {
    padding: 30px;
    text-align: center;
    color: #555;
    font-style: italic;
}

/* =============================================
   MÓDULO DE ESTOQUE
   ============================================= */
.est-container {
    min-height: 100vh;
    background: #0f0f0f;
    font-family: var(--font-body);
    color: #f0f0f0;
}

/* Header */
.est-header {
    background: #000;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--color-accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

.est-header h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--color-accent);
    text-transform: uppercase;
}

.est-header-sub {
    font-size: 0.72rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.est-header-right {
    display: flex;
    gap: 10px;
}

.est-btn-nav {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border: 2px solid #555;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.est-btn-nav:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Abas */
.est-tabs {
    display: flex;
    border-bottom: 2px solid #222;
    background: #111;
    overflow-x: auto;
}

.est-tab {
    padding: 12px 22px;
    border: none;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.est-tab:hover {
    color: var(--color-accent);
}

.est-tab.ativo {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    background: rgba(255, 179, 0, 0.06);
}

/* Seção */
.est-section {
    padding: 20px 28px;
}

/* KPI cards */
.est-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.est-kpi-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 18px;
}

.est-kpi-card.est-kpi-alerta {
    border-color: #ff6b6b;
    background: #1a0a0a;
}

.est-kpi-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    margin-bottom: 8px;
}

.est-kpi-valor {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-accent);
}

.est-kpi-alerta .est-kpi-valor {
    color: #ff6b6b;
}

/* Cards de conteúdo */
.est-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 20px;
}

.est-card-title {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

/* Tabelas */
.est-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.est-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.est-table thead tr {
    background: #222;
}

.est-table th {
    padding: 9px 12px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #aaa;
    border-bottom: 2px solid #333;
}

.est-table tbody tr {
    border-bottom: 1px solid #1e1e1e;
}

.est-table tbody tr:hover {
    background: #1a1e1a;
}

.est-table td {
    padding: 9px 12px;
    vertical-align: middle;
}

.est-row-alerta {
    background: #1a0808 !important;
}

.est-row-alerta:hover {
    background: #200a0a !important;
}

.est-td-alerta {
    color: #ff6b6b;
    font-weight: 900;
}

.est-td-motivo {
    font-size: 0.8rem;
    color: #888;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.est-td-acoes {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Badges */
.est-badge-alerta {
    background: #ff6b6b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.est-badge-tipo {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
}

.est-tipo-entrada {
    background: #0a2a0a;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.est-tipo-saida {
    background: #2a0a0a;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

.est-tipo-ajuste {
    background: #1a1a2a;
    color: #7fbbff;
    border: 1px solid #7fbbff;
}

/* Botões de ação */
.est-btn-editar {
    background: #1a1a00;
    color: #e6ff00;
    border: 1px solid #e6ff00;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.est-btn-editar:hover {
    background: #e6ff00;
    color: #000;
}

.est-btn-entrada {
    background: #0a2a0a;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.est-btn-entrada:hover {
    background: var(--color-accent);
    color: #000;
}

.est-btn-deletar {
    background: #2a0a0a;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.est-btn-deletar:hover {
    background: #ff6b6b;
    color: #fff;
}

.est-btn-salvar {
    background: var(--color-accent);
    color: #000;
    border: 2px solid var(--color-accent);
    padding: 9px 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s;
}

.est-btn-salvar:hover {
    background: #5de65d;
}

.est-btn-cancelar {
    background: transparent;
    color: #aaa;
    border: 2px solid #444;
    padding: 9px 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
}

.est-btn-cancelar:hover {
    border-color: #888;
    color: #fff;
}

/* Formulário */
.est-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.est-form-grupo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.est-form-grupo label {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
}

.est-input {
    background: #000;
    border: 2px solid #444;
    color: #f0f0f0;
    padding: 8px 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.est-input:focus {
    border-color: var(--color-accent);
}

select.est-input option {
    background: #111;
}

.est-form-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.est-total-compra {
    padding: 10px 14px;
    background: #0a2a0a;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.est-total-compra strong {
    font-size: 1.1rem;
}

.est-resumo-bar {
    padding: 8px 12px;
    background: #111;
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.est-resumo-bar strong {
    color: var(--color-accent);
}

/* Loading e empty */
.est-loading {
    padding: 40px 28px;
    color: #aaa;
}

.est-empty {
    padding: 20px;
    text-align: center;
    color: #555;
    font-style: italic;
}

/* Mensagens */
.est-msg-ok {
    background: #0a2a0a;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.est-msg-err {
    background: #2a0a0a;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

/* Modal entrada rápida */
.est-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.est-modal {
    background: #1a1a1a;
    border: 2px solid var(--color-accent);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.est-modal h3 {
    margin: 0 0 6px;
    color: var(--color-accent);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.est-modal-sub {
    color: #aaa;
    margin: 0 0 18px;
    font-size: 0.88rem;
}

.est-modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* =====================================================================
   MÓDULO TOTEM - FULLSCREEN DARK/NEON THEME
   ===================================================================== */

/* Layout base Fullscreen — Otimizado para Mobile Safari */
.totem-app-shell {
    position: fixed;
    inset: 0;
    height: 100dvh;
    width: 100vw;
    background: #000;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Tela Principal Grid */
.totem-grid {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    position: relative;
}

.totem-menu-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    min-height: 0;
    /* Ensures the flex child can shrink and trigger overflow scroll */
    -webkit-overflow-scrolling: touch;
    /* Fixes iOS scroll locking */
}

.totem-header {
    margin-bottom: 20px;
}

.totem-logo {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin: 0 0 10px 0;
    color: #ffcc00;
    text-shadow: 0 4px 10px rgba(255, 204, 0, 0.3);
}

.totem-header p {
    font-size: 1.5rem;
    color: #aaa;
    margin: 0;
}

.totem-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    /* Prevent the filters from shrinking and hiding elements */
}

.totem-filters::-webkit-scrollbar {
    height: 6px;
}

.totem-filters::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.totem-btn-filter {
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #333;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
}

.totem-btn-filter.active {
    background: #ffcc00;
    color: #000;
    border-color: #ffcc00;
    transform: scale(1.05);
}

.totem-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 120px;
    /* Space for over-scroll */
    flex: 1;
}

.totem-product-card {
    background: #111;
    border: 2px solid #222;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
    user-select: none;
}

.totem-product-card:active {
    transform: scale(0.95);
    background: #222;
}

.totem-product-card.inativo {
    opacity: 0.3;
    pointer-events: none;
}

.totem-card-img {
    font-size: 4rem;
    background: #222;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.totem-card-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.totem-card-info p {
    color: #888;
    font-size: 1rem;
    line-height: 1.3;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.totem-price {
    font-size: 1.4rem;
    color: #ffcc00;
    font-weight: 900;
}

/* Sidebar do Carrinho */
.totem-sidebar {
    width: 400px;
    background: #111;
    border-left: 2px solid #222;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.totem-sidebar-header {
    padding: 30px;
    border-bottom: 2px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.totem-sidebar-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

.totem-btn-clear {
    background: transparent;
    color: #ff6b6b;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
}

.totem-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.totem-empty-cart {
    text-align: center;
    color: #666;
    margin-top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
}

.totem-cart-item {
    background: #000;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.totem-item-qnty {
    background: #ffcc00;
    color: #000;
    font-weight: 900;
    font-size: 1.4rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.totem-item-details {
    flex: 1;
}

.totem-item-details strong {
    font-size: 1.3rem;
    display: block;
}

.totem-item-obs {
    color: #ff6b6b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

.totem-item-price {
    font-size: 1.3rem;
    font-weight: bold;
}

.totem-btn-remove {
    background: #333;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.5rem;
}

/* Responsividade Totem — Unificada e Otimizada */
@media (max-width: 1024px) {
    .totem-sidebar {
        width: 320px;
    }
}

@media (max-width: 900px) {
    .totem-grid {
        flex-direction: column;
    }

    .totem-sidebar {
        width: 100%;
        height: auto;
        max-height: 35vh;
        border-left: none;
        border-top: 2px solid #222;
    }

    .totem-menu-area {
        padding: 20px;
    }
    
    .totem-logo { font-size: 2.2rem; }
    .totem-header p { font-size: 1rem; }
}

/* Mobile-First Totem (< 600px) — Solução Bottom Sheet + FAB */
@media (max-width: 600px) {
    .totem-sidebar {
        display: none !important; /* Esconde sidebar fixa */
    }

    .totem-menu-area {
        padding: 15px;
        flex: 1;
        overflow-y: auto;
    }

    .totem-products-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding-bottom: 100px; /* Espaço para o FAB */
    }

    .totem-product-card {
        flex-direction: column;
        padding: 12px;
        text-align: center;
        gap: 8px;
    }

    .totem-card-img {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    .totem-card-info h3 { font-size: 0.95rem; margin: 0; }
    .totem-card-info p { display: none; }
    
    .totem-price { font-size: 1rem; }

    /* FAB Carrinho Mobile */
    .totem-mobile-cart-fab {
        position: fixed;
        bottom: calc(20px + env(safe-area-inset-bottom));
        left: 20px;
        right: 20px;
        background: #ffcc00;
        color: #000;
        padding: 18px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 900;
        font-size: 1.1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.5);
        z-index: 1000;
        border: none;
    }

    .totem-mobile-cart-count {
        background: #000;
        color: #ffcc00;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
    }

    /* Bottom Sheet Carrinho */
    .totem-mobile-cart-sheet {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.8);
        backdrop-filter: blur(8px);
        z-index: 1100;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        animation: fadeIn 0.2s ease-out;
    }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    .totem-sheet-content {
        background: #111;
        border-radius: 30px 30px 0 0;
        padding: 20px;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        border-top: 2px solid #333;
        animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    }

    @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

    .totem-sheet-handle {
        width: 40px;
        height: 5px;
        background: #444;
        border-radius: 10px;
        margin: 0 auto 15px;
    }

    .totem-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .totem-sheet-header h2 { font-size: 1.5rem; margin: 0; }
}

.totem-sidebar-footer {
    padding: 30px;
    background: #0a0a0a;
    border-top: 2px solid #222;
}

.totem-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.totem-total-line span {
    font-size: 1.5rem;
    color: #aaa;
}

.totem-total-line strong {
    font-size: 2.5rem;
    color: #ffcc00;
    font-weight: 900;
}

.totem-btn-checkout {
    background: var(--color-accent);
    color: #000;
    border: none;
    width: 100%;
    padding: 25px;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 16px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.totem-btn-checkout:disabled {
    background: #333;
    color: #666;
}

/* Modal Gigante do Produto */
.totem-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.totem-modal {
    background: #111;
    border: 2px solid #333;
    width: 90%;
    max-width: 480px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.totem-modal-header {
    background: #1a1a1a;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    flex-shrink: 0;
}

.totem-modal-header h2 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 900;
}

.totem-close-lg {
    background: transparent;
    color: #666;
    border: none;
    font-size: 3rem;
    line-height: 1;
    padding: 0 10px;
}

.totem-modal-body {
    padding: 40px;
    overflow-y: auto;
}

.totem-modal-desc {
    font-size: 1.4rem;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 20px;
}

.totem-modal-price {
    font-size: 3rem;
    color: #ffcc00;
    font-weight: 900;
    margin-bottom: 40px;
}

.totem-obs-box label {
    font-size: 1.2rem;
    color: #888;
    display: block;
    margin-bottom: 15px;
}

.totem-quick-obs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.totem-chip {
    background: #222;
    color: #fff;
    border: 2px solid #333;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1.2rem;
    font-weight: bold;
}

.totem-chip.on {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.totem-chip.on-green {
    background: rgba(46, 204, 113, 0.2); /* verde = incluído */
    border-color: #2ecc71;
    color: #2ecc71;
}

.totem-chip.on-red {
    background: rgba(231, 76, 60, 0.15); /* vermelho = retirado */
    border-color: #e74c3c;
    color: #e74c3c;
}

.totem-qty-selector {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 20px;
}

.totem-qty-selector span {
    font-size: 1.5rem;
    color: #888;
    flex: 1;
}

.totem-qty-btn {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
}

.totem-qty-btn:active {
    background: #555;
}

.totem-qty-value {
    font-size: 2.5rem !important;
    font-weight: 900;
    color: #fff !important;
    text-align: center;
    width: 60px;
    flex: none !important;
}

.totem-modal-footer {
    padding: 30px;
    background: #0a0a0a;
    border-top: 2px solid #333;
}

.totem-btn-confirm-add {
    background: #ffcc00;
    color: #000;
    border: none;
    width: 100%;
    padding: 25px;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 20px;
    text-transform: uppercase;
}

/* ────────────────────────────────────────────────────────
   FLUXO DE CHECKOUT DO TOTEM
   ──────────────────────────────────────────────────────── */

.totem-flow {
    padding: 120px 40px 60px 40px;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.totem-btn-back {
    position: fixed;
    top: 40px;
    left: 40px;
    background: #111;
    border: 2px solid #555;
    color: #fff;
    font-size: 1.5rem;
    padding: 15px 30px;
    border-radius: 100px;
    z-index: 50;
}

.totem-checkout-box {
    width: 100%;
    max-width: 800px;
    margin: auto 0;
}

.totem-checkout-box h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    color: #ffcc00;
}

.totem-checkout-sub {
    font-size: 1.5rem;
    color: #aaa;
    margin: 5px 0 40px;
}

.totem-checkout-items {
    background: #111;
    border: 2px solid #333;
    border-radius: 20px 20px 0 0;
    padding: 30px;
    max-height: 250px;
    overflow-y: auto;
}

.totem-chk-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #333;
}

.totem-chk-total {
    background: #1a1a1a;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 25px 30px;
    font-size: 1.8rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.totem-chk-total span {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffcc00;
}

.totem-step-title {
    font-size: 2rem;
    margin-bottom: 25px;
}

.totem-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.totem-opt-btn {
    background: #111;
    border: 4px solid #333;
    border-radius: 25px;
    padding: 40px 20px;
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1.4;
    transition: all 0.2s;
}

.totem-opt-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.totem-opt-btn small {
    font-size: 1.1rem;
    color: #888;
    font-weight: normal;
}

.totem-opt-btn.active {
    background: rgba(127, 255, 127, 0.1);
    border-color: var(--color-accent);
}

.totem-input-lg {
    width: 100%;
    background: #111;
    border: 2px solid #333;
    color: #fff;
    font-size: 2rem;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 40px;
}

.totem-btn-next,
.totem-btn-final {
    background: #ffcc00;
    color: #000;
    border: none;
    font-size: 1.8rem;
    font-weight: 900;
    width: 100%;
    padding: 30px;
    border-radius: 20px;
    text-transform: uppercase;
}

.totem-btn-final {
    background: var(--color-accent);
}

.totem-btn-next:disabled,
.totem-btn-final:disabled {
    background: #333;
    color: #666;
}

.totem-err {
    background: #ff4444;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

/* ────────────────────────────────────────────────────────
   TELA DE SUCESSO
   ──────────────────────────────────────────────────────── */

.totem-success {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.t-success-box {
    max-width: 600px;
}

.t-icon {
    font-size: 6rem;
    margin-bottom: 20px;
}

.t-success-box h1 {
    font-size: 3.5rem;
    color: var(--color-accent);
    margin: 0 0 10px;
}

.t-success-box p {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 50px;
}

.t-number-box {
    background: #1a1a1a;
    border: 4px solid #ffcc00;
    padding: 30px;
    border-radius: 30px;
    margin-bottom: 50px;
}

.t-number-box span {
    display: block;
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 10px;
}

.t-number-box strong {
    font-size: 6rem;
    color: #fff;
    line-height: 1;
}

.t-footer-msg {
    font-size: 1.3rem !important;
    color: #666 !important;
}

.t-timer {
    font-size: 1.2rem;
    color: #444;
    margin-top: 40px;
}

/* ================================================================
   RESPONSIVIDADE MOBILE — max-width: 768px
   Corrige telas travadas e overflow em celulares para todas as páginas
   ================================================================ */
@media (max-width: 768px) {

    /* ── ADMIN PANEL ── */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .admin-header-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .admin-nav-link,
    .admin-btn-sair {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }

    .admin-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px;
    }

    .admin-tab {
        font-size: 0.8rem !important;
        padding: 8px 12px !important;
        flex: 1 1 auto;
        min-width: 120px;
        text-align: center;
    }

    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .admin-table {
        min-width: 600px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-form-card {
        padding: 16px;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .admin-body {
        padding: 10px;
    }

    /* ── ESTOQUE ── */
    .estoque-header,
    .estoque-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .estoque-table-wrap,
    .estoque-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .estoque-table {
        min-width: 620px;
    }

    /* ── DASHBOARD FINANCEIRO ── */
    .dash-header {
        flex-direction: column;
        gap: 10px;
    }

    .dash-cards {
        grid-template-columns: 1fr 1fr !important;
    }

    .dash-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

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

    /* ── KDS MONITOR ── */
    .kds-board {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .kds-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .kds-card {
        min-width: unset;
        width: 100%;
    }

    /* ── CARDÁPIO (HOME) ── */
    .cardapio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .produto-footer {
        flex-wrap: wrap;
        gap: 6px;
    }

    .btn-adicionar {
        width: 100%;
        text-align: center;
        padding: 8px !important;
        font-size: 0.8rem !important;
        border-radius: 6px;
    }

    .cardapio-filtros {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .filtro-btn {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .cardapio-hero-inner h1 {
        font-size: 1.6rem;
    }

    /* ── CARRINHO / CHECKOUT ── */
    .carrinho-container {
        padding: 12px !important;
    }

    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        font-size: 16px !important; /* evita auto-zoom no iOS */
    }

    /* ── MODAL GLOBAL ── */
    .modal-content {
        max-width: 95vw !important;
        max-height: 90dvh !important;
        padding: 20px 16px 0 16px !important;
        margin: 10px auto;
        display: flex;
        flex-direction: column;
    }

    .modal-footer {
        padding: 15px 15px calc(15px + env(safe-area-inset-bottom)) 15px !important;
        margin: 0 -16px !important;
        background: #1a1a1a;
        border-top: 1px solid #333;
    }

    /* ── TOTEM ── */
    .totem-checkout-box {
        padding: 20px 16px;
    }

    /* Totem em mobile: empilha grid e sidebar */
    .totem-grid {
        grid-template-columns: 1fr !important;
        gap: 0;
    }

    .totem-menu-area {
        padding-bottom: 10px;
    }

    .totem-sidebar {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: #1a1a1a;
        border-top: 3px solid #ffb347;
        padding: 10px 16px;
        z-index: 100;
        max-height: 50vh;
        overflow-y: auto;
    }

    .totem-sidebar-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0;
    }

    .totem-sidebar-header h2 {
        font-size: 1.1rem;
        margin: 0;
    }

    .totem-btn-clear {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }

    .totem-cart-items {
        max-height: 150px;
        overflow-y: auto;
    }

    .totem-cart-item {
        padding: 8px 0;
        font-size: 0.85rem;
    }

    .totem-sidebar-footer {
        padding: 10px 0;
    }

    .totem-total-line {
        margin-bottom: 6px;
    }

    .totem-total-line span {
        font-size: 0.95rem;
    }

    .totem-total-line strong {
        font-size: 1.3rem;
    }

    .totem-btn-checkout {
        padding: 10px;
        font-size: 1rem;
    }

    /* Modal de personalização em mobile — card compacto */
    .totem-modal-overlay {
        padding: 10px;
        align-items: center;
    }

    .totem-modal {
        width: 100%;
        max-width: 400px;
        max-height: 80vh;
        border-radius: 20px;
        margin: auto;
    }

    .totem-modal-header {
        padding: 16px 20px;
    }

    .totem-modal-header h2 {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .totem-modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 20px !important;
    }

    .totem-modal-desc {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .totem-modal-price {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }

    .totem-modal-footer {
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        background: #0a0a0a;
    }

    .totem-btn-confirm-add {
        font-size: 1.1rem !important;
        padding: 14px !important;
        border-radius: 14px;
    }

    .totem-qty-selector {
        padding: 12px 16px;
        border-radius: 14px;
    }

    .totem-qty-btn {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.4rem;
    }

    .totem-qty-value {
        font-size: 1.4rem !important;
    }

    .totem-chip {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* FAB Carrinho Mobile — Aplicável a Home e Totem */
    .totem-mobile-cart-fab, .home-mobile-cart-fab {
        position: fixed;
        bottom: calc(20px + env(safe-area-inset-bottom));
        left: 20px;
        right: 20px;
        background: #ffcc00;
        color: #000;
        padding: 18px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 900;
        font-size: 1.1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6);
        z-index: 1000;
        border: none;
        text-decoration: none;
    }

    .totem-mobile-cart-count, .home-mobile-cart-count {
        background: #000;
        color: #ffcc00;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
    }

    /* Bottom Sheet Carrinho */
    .totem-mobile-cart-sheet, .home-mobile-cart-sheet {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.85);
        backdrop-filter: blur(8px);
        z-index: 1100;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .totem-sheet-content, .home-sheet-content {
        background: #111;
        border-radius: 30px 30px 0 0;
        padding: 20px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
        max-height: 85dvh;
        display: flex;
        flex-direction: column;
        border-top: 2px solid #333;
    }

    /* ── TOTEM CHECKOUT MOBILE ── */
    .totem-flow {
        padding: 80px 15px 30px 15px !important;
    }

    .totem-btn-back {
        top: 15px !important;
        left: 15px !important;
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }

    .totem-checkout-box h1 {
        font-size: 1.8rem !important;
    }

    .totem-checkout-sub {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .totem-chk-total {
        padding: 15px !important;
        font-size: 1.1rem !important;
        margin-bottom: 25px !important;
    }

    .totem-chk-total span {
        font-size: 1.4rem !important;
    }

    .totem-step-title {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }

    .totem-input-lg {
        padding: 12px 15px !important;
        font-size: 1.1rem !important;
        margin-bottom: 20px !important;
    }

    .totem-opt-btn {
        padding: 15px 10px !important;
        font-size: 1rem !important;
        border-radius: 15px !important;
    }

    .totem-opt-icon {
        font-size: 2rem !important;
        margin-bottom: 5px !important;
    }

    .totem-btn-next, .totem-btn-final {
        padding: 16px !important;
        font-size: 1.1rem !important;
        border-radius: 12px !important;
    }

    .totem-cashback-box h3 {
        font-size: 1rem !important;
    }

    /* ── TOTEM SUCESSO MOBILE ── */
    .t-icon {
        font-size: 3rem !important;
        margin-bottom: 10px !important;
    }

    .totem-success h1 {
        font-size: 1.8rem !important;
    }

    .t-number-box {
        padding: 20px !important;
        border-radius: 20px !important;
        margin-bottom: 25px !important;
    }

    .t-number-box strong {
        font-size: 3rem !important;
    }

    .t-number-box span {
        font-size: 1rem !important;
    }

    .totem-success p {
        font-size: 1rem !important;
        margin-bottom: 15px !important;
    }

    /* ── ESTOQUE ── */
    .est-container {
        padding: 12px !important;
    }

    .est-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .est-header h1 {
        font-size: 1.3rem !important;
    }

    .est-header-right {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .est-btn-nav {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }

    .est-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        overflow-x: visible !important;
    }

    .est-tab {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        flex: 1 1 auto;
        min-width: 80px;
        text-align: center;
        white-space: nowrap;
    }

    .rel-filtro-bar {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .rel-filtro-grupo {
        width: 100% !important;
    }

    .rel-filtro-input {
        width: 100% !important;
    }

    .rel-filtro-atalhos {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .rel-btn-atalho {
        flex: 1 1 auto;
        min-width: 60px;
        text-align: center;
        font-size: 0.8rem !important;
    }

    .rel-btn-filtrar {
        width: 100% !important;
    }

    .est-form-grid {
        grid-template-columns: 1fr !important;
    }

    .est-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .est-kpi-valor {
        font-size: 1.2rem !important;
    }

    .est-card {
        padding: 12px !important;
    }

    .est-modal {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    /* ── KDS ── */
    .kds-kanban {
        gap: 10px;
        padding: 8px;
    }

    .kds-column {
        min-width: 260px;
    }

    .kds-column-header h2 {
        font-size: 1rem;
    }

    .kds-card-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .kds-btn {
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
    }

    .kds-cancel-modal {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    /* ── TABELAS GENÉRICAS ── */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ================================================================
   ESCONDER BARRA DE ERRO PADRÃO DO BLAZOR
   ================================================================ */
#blazor-error-ui {
    display: none !important;
}

/* ================================================================
   SKELETON LOADING — Totem cards
   ================================================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        #1a1a1a 25%,
        #2a2a2a 50%,
        #1a1a1a 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-img   { height: 140px; width: 100%; border-radius: 12px 12px 0 0; }
.skeleton-title { height: 20px; width: 75%; margin: 14px 14px 6px; }
.skeleton-desc  { height: 14px; width: 90%; margin: 0 14px 6px; }
.skeleton-price { height: 24px; width: 40%; margin: 0 14px 14px; }

/* ================================================================
   MOBILE BOTTOM SHEET — Carrinho Totem (< 640px)
   ================================================================ */

/* FAB — botão flutuante carrinho */
.cart-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 16px;
    background: var(--color-accent);
    color: #000;
    font-weight: 900;
    font-size: 0.95rem;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    z-index: 100;
    gap: 8px;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cart-fab:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Overlay escuro */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Bottom Sheet */
.cart-sheet {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #141414;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid #2A2A2A;
    z-index: 200;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    padding: 20px 16px;
}

.cart-sheet.open {
    transform: translateY(0);
}

.cart-sheet-handle {
    width: 40px;
    height: 4px;
    background: #444;
    border-radius: var(--radius-full);
    margin: 0 auto 16px;
}

/* Mostrar FAB + sheet apenas em mobile */
@media (max-width: 639px) {
    .cart-fab     { display: flex; }
    .cart-overlay { display: block; }
    .cart-sheet   { display: block; }
}

/* Grid responsivo Totem — mobile-first */
@media (max-width: 639px) {
    .totem-grid {
        position: relative !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh;
        inset: auto !important;
    }

    .totem-sidebar {
        display: none !important;
    }

    .totem-menu-area {
        padding: 16px;
        overflow-y: auto;
    }

    .produtos-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .totem-sidebar {
        width: 260px;
    }
}


/* ────────────────────────────────────────────────────────
   BRUTAL iOS OVERRIDES — Versão Ultra-Slim & Scroll Livre
   ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Libera o scroll de vez na Home do Totem */
    .totem-app-shell {
        position: relative !important;
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
        display: block !important;
    }

    .totem-grid, .totem-flow, .totem-menu-area {
        height: auto !important;
        min-height: 100dvh !important;
        overflow-y: visible !important;
        display: block !important;
        position: relative !important;
    }

    /* Reduz a barra de categorias gigante */
    .cardapio-filtros, .totem-categories {
        padding: 8px !important;
        gap: 5px !important;
    }

    .filtro-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Popups e Modais "Slim" */
    .modal-content, .totem-modal {
        width: 95vw !important;
        max-height: 80dvh !important;
        padding: 10px !important;
    }

    .totem-modal-header h2, .modal-content h2 {
        font-size: 1.1rem !important;
    }

    .totem-modal-body, .modal-body {
        padding: 10px !important;
    }

    /* Botão Amarelo de Adicionar (Popup) */
    .totem-btn-confirm-add, .btn-confirmar {
        padding: 12px !important;
        font-size: 1rem !important;
        height: 50px !important;
    }

    /* FAB Carrinho — Compacto pílula */
    .home-mobile-cart-fab, .totem-mobile-cart-fab {
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
        min-width: 160px !important;
        height: 45px !important;
    }

    /* Checkout: fontes e inputs normais */
    .totem-checkout-box h1 { font-size: 1.4rem !important; }
    .totem-step-title { font-size: 1rem !important; margin: 10px 0 !important; }
    .totem-input-lg { 
        padding: 10px !important; 
        font-size: 1rem !important; 
        height: 45px !important; 
        margin-bottom: 12px !important; 
    }
    
    .totem-opt-btn { padding: 10px !important; font-size: 0.9rem !important; }
    .totem-opt-icon { font-size: 1.6rem !important; }
    .totem-btn-next, .totem-btn-final { padding: 12px !important; font-size: 1rem !important; height: 50px !important; }

    /* Inputs de pagamento dividido */
    .totem-dividir-pagamento input {
        font-size: 0.9rem !important;
        padding: 5px !important;
        height: 38px !important;
        max-width: 100px !important;
    }
}
