/* ==========================================================================
   LA MARMITA DE AHLAM - SISTEMA DE CARRITO Y COMANDAS PARA CLIENTES
   ========================================================================== */

:root {
    --cart-primary: #8B2500;
    --cart-primary-dark: #661a00;
    --cart-secondary: #c98b2c;
    --cart-wood: #2c1810;
    --cart-cream: #faf7f2;
    --cart-green: #2e7d32;
    --cart-danger: #c62828;
    --cart-shadow: 0 10px 30px rgba(0,0,0,0.15);
    --cart-radius: 16px;
    --cart-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Indicador y Barra Superior de Mesa Activa */
.table-active-banner {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    background: rgba(44, 24, 16, 0.94);
    color: #fdf8f0;
    padding: 5px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(201, 139, 44, 0.45);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: slideDownBanner 0.3s ease-out;
}

.table-banner-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.table-active-banner .table-info {
    color: #fdf8f0;
    letter-spacing: 0.2px;
}

.btn-call-waiter-banner {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-call-waiter-banner:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.btn-call-waiter-banner.active-called {
    background: #16a34a !important;
    border-color: #22c55e !important;
    cursor: default;
}

@keyframes slideDownBanner {
    from { opacity: 0; transform: translate(-50%, -15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 2. Botón de Añadir y Stepper en Tarjetas de Platos */
.dish-price-action-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dish-card-action {
    display: inline-flex;
    align-items: center;
}

.btn-dish-add {
    background: linear-gradient(135deg, #8B2500, #a83200);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: var(--cart-transition);
    box-shadow: 0 4px 12px rgba(139, 37, 0, 0.25);
}

@media (max-width: 480px) {
    .btn-dish-add {
        padding: 5px 10px;
        font-size: 0.76rem;
    }
}

.btn-dish-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 37, 0, 0.4);
    background: linear-gradient(135deg, #a83200, #c43b00);
}

.btn-dish-add:active {
    transform: scale(0.96);
}

.btn-dish-add.out-of-stock {
    background: #757575 !important;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.btn-dish-night-notice {
    background: rgba(139, 37, 0, 0.08);
    color: var(--cart-primary, #8B2500);
    border: 1px dashed rgba(139, 37, 0, 0.45);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 6px;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
    user-select: none;
    letter-spacing: 0.2px;
    cursor: default;
    box-shadow: 0 2px 6px rgba(139, 37, 0, 0.05);
    line-height: 1.25;
}

.btn-dish-night-label {
    white-space: nowrap;
}

.btn-dish-night-hours {
    white-space: nowrap;
    font-size: 0.92em;
    font-weight: 600;
    opacity: 0.88;
}

@media (max-width: 480px) {
    .btn-dish-night-notice {
        padding: 3px 8px;
        font-size: 0.70rem;
        gap: 3px 5px;
    }
}

/* Integración en tarjeta: cuando hay aviso Solo Noche, se ubica ordenadamente en su propia fila */
.dish-header.has-night-notice,
.dish-header:has(.btn-dish-night-notice) {
    flex-wrap: wrap !important;
    align-items: baseline !important;
    row-gap: 6px !important;
}

.dish-price-action-box.has-night-notice,
.dish-price-action-box:has(.btn-dish-night-notice) {
    display: contents !important;
}

.dish-header.has-night-notice .dish-title,
.dish-header:has(.btn-dish-night-notice) .dish-title {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.dish-header.has-night-notice .bistro-leader,
.dish-header:has(.btn-dish-night-notice) .bistro-leader {
    order: 2 !important;
}

.dish-header.has-night-notice .dish-price,
.dish-header:has(.btn-dish-night-notice) .dish-price {
    order: 3 !important;
    margin-left: auto !important;
    white-space: nowrap !important;
}

.dish-header.has-night-notice .dish-card-action,
.dish-header:has(.btn-dish-night-notice) .dish-card-action,
.dish-card-action.is-night-action {
    order: 4 !important;
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
    display: flex !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}

/* Stepper Interactivo en la Tarjeta de Plato */
.dish-card-stepper {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #2c1810, #3d2015);
    color: #fff;
    border-radius: 24px;
    padding: 3px 5px;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(44, 24, 16, 0.25);
    border: 1px solid rgba(201, 139, 44, 0.4);
    animation: stepperPopIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stepperPopIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.card-stepper-btn {
    background: #8B2500;
    color: #fff;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    padding: 0;
}

.card-stepper-btn:hover {
    background: #a83200;
    transform: scale(1.1);
}

.card-stepper-btn:active {
    transform: scale(0.92);
}

.card-stepper-btn.minus {
    background: rgba(255, 255, 255, 0.16);
    color: #fdfbf7;
}

.card-stepper-btn.minus:hover {
    background: #c62828;
    color: #fff;
}

.card-stepper-count {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffd285;
    padding: 0 3px;
    min-width: 22px;
    text-align: center;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

/* 3. Botones Flotantes (Llamar Camarero + Carrito) */
.marmita-floating-actions {
    position: fixed;
    bottom: 22px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.waiter-floating-btn {
    background: linear-gradient(135deg, #2c1810, #3d2015);
    color: #fdf8f0;
    border: 1.5px solid rgba(234, 88, 12, 0.7);
    padding: 11px 18px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    font-size: 0.84rem;
    font-weight: 800;
    transition: var(--cart-transition);
    text-decoration: none;
}

.waiter-floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
    background: linear-gradient(135deg, #c2410c, #ea580c);
    border-color: #ffd285;
    box-shadow: 0 12px 28px rgba(194, 65, 12, 0.4);
    color: #ffffff;
}

.waiter-floating-btn.active-called {
    background: linear-gradient(135deg, #15803d, #16a34a) !important;
    border-color: #86efac !important;
    color: #ffffff;
    cursor: default;
}

.waiter-bell-icon {
    font-size: 1.15rem;
    display: inline-block;
    animation: ringBell 2.5s infinite;
}

@keyframes ringBell {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(15deg); }
    90% { transform: rotate(-15deg); }
    95% { transform: rotate(10deg); }
}

.cart-floating-btn {
    background: linear-gradient(135deg, #8B2500, #2c1810);
    color: #fff;
    border: 2px solid rgba(201, 139, 44, 0.5);
    padding: 11px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: var(--cart-transition);
    text-decoration: none;
}

.cart-floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 35px rgba(139, 37, 0, 0.45);
    color: #fff;
}

.cart-floating-btn .cart-icon-wrap {
    position: relative;
    font-size: 1.35rem;
    line-height: 1;
}

.cart-floating-btn .cart-badge-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff5252;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.cart-floating-btn .cart-total-text {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #ffd285;
}

@media (max-width: 480px) {
    .marmita-floating-actions {
        bottom: 16px;
        right: 14px;
        gap: 8px;
    }
    .waiter-floating-btn {
        padding: 9px 13px;
        font-size: 0.78rem;
    }
    .cart-floating-btn {
        padding: 9px 13px;
        font-size: 0.78rem;
    }
}

/* Bloqueo estricto del scroll de fondo cuando el carrito o modales están abiertos */
html.marmita-cart-open,
body.marmita-cart-open {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* 4. Panel Lateral Deslizante del Carrito (Drawer) */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    touch-action: none;
    overscroll-behavior: contain;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #fff;
    z-index: 10001;
    box-shadow: -8px 0 35px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    background: linear-gradient(135deg, #2c1810, #422518);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #c98b2c;
    touch-action: none;
    overscroll-behavior: contain;
    flex-shrink: 0;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-family: var(--font-serif);
    color: #ffffff !important;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-header .btn-close-cart {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cart-header .btn-close-cart:hover {
    background: rgba(255,255,255,0.25);
}

.cart-table-pill {
    background: #c98b2c;
    color: #2c1810;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 5. Lista de Productos en el Carrito */
.cart-items-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding: 18px 20px;
    background: #fdfbf7;
}

.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8c827a;
}
.cart-empty-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.cart-item-row {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid #ede5da;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cart-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cart-item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c1810;
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 800;
    color: #8B2500;
    font-size: 0.95rem;
}

.cart-item-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
}
.cart-item-type-badge.bebida {
    background: #e3f2fd;
    color: #1976d2;
}
.cart-item-type-badge.plato {
    background: #fff3e0;
    color: #e65100;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f0ea;
    border-radius: 20px;
    padding: 2px 8px;
}

.qty-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #2c1810;
    font-weight: 800;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #8B2500;
    color: #fff;
    border-color: #8B2500;
}

.qty-num {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.cart-item-notes-input {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #e0d8cc;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.8rem;
    color: #444;
    background: #faf8f5;
}

/* 6. Footer y Resumen del Carrito */
.cart-footer {
    background: #fff;
    padding: 18px 24px;
    border-top: 1px solid #ede5da;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.cart-drawer-waiter-bar {
    background: rgba(234, 88, 12, 0.08);
    border: 1px dashed rgba(234, 88, 12, 0.4);
    border-radius: 10px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.btn-drawer-waiter-call {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-drawer-waiter-call:hover {
    background: linear-gradient(135deg, #ea580c, #f97316);
    transform: scale(1.03);
}

.btn-drawer-waiter-call.active-called {
    background: #16a34a !important;
    cursor: default;
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.15rem;
    color: #2c1810;
}

.cart-total-line strong {
    font-size: 1.45rem;
    color: #8B2500;
    font-family: var(--font-serif);
}

.cart-general-notes {
    width: 100%;
    border: 1px solid #dcd3c5;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    resize: vertical;
    min-height: 50px;
    box-sizing: border-box;
}

.btn-send-order {
    width: 100%;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--cart-transition);
}

.btn-send-order:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.45);
}

/* 7. Modal de Confirmación y Modal de Éxito */
.marmita-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: var(--cart-transition);
}

.marmita-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.marmita-modal-card {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.marmita-modal-overlay.active .marmita-modal-card {
    transform: scale(1);
}

.marmita-modal-header {
    background: linear-gradient(135deg, #2c1810, #4a2717);
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative;
}

.marmita-modal-header .btn-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.marmita-modal-header .btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
}

.marmita-modal-header .btn-modal-close:active {
    transform: scale(0.95);
}

.marmita-modal-header h4 {
    margin: 0;
    font-size: 1.35rem;
    font-family: var(--font-serif);
}

.marmita-modal-body {
    padding: 22px 24px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-order-summary-box {
    background: #faf7f2;
    border: 1px solid #ebd9c5;
    border-radius: 12px;
    padding: 14px;
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
}

.marmita-modal-footer {
    padding: 16px 24px 22px;
    display: flex;
    gap: 12px;
}

.btn-modal-cancel {
    flex: 1;
    background: #ede7de;
    color: #555;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal-cancel:hover {
    background: #ded5c8;
}

.btn-modal-confirm {
    flex: 2;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46,125,50,0.3);
    transition: var(--cart-transition);
}

.btn-modal-confirm:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

/* Ocultar banner de cookies en la carta con mesa/QR activa para no obstaculizar el botón flotante */
body:has(.cart-floating-btn) #cookieConsentBanner,
body:has(meta[name="marmita-table-num"]) #cookieConsentBanner,
#cookieConsentBanner.hidden-qr-order {
    display: none !important;
}

/* ==========================================================================
   7. MODAL Y PANTALLA DE BLOQUEO DE PIN DE 2 DÍGITOS PARA ACCESO QR
   ========================================================================== */
.marmita-pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: pinFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pinFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.marmita-pin-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-align: center;
    position: relative;
    user-select: none;
}

.marmita-pin-header {
    background: linear-gradient(135deg, #8B2500 0%, #c2410c 100%);
    padding: 24px 20px 20px;
    color: #fff;
    position: relative;
}

.marmita-pin-header.blocked {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
}

.marmita-pin-icon {
    font-size: 2.8rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.marmita-pin-header h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.marmita-pin-table-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.marmita-pin-body {
    padding: 22px 24px 24px;
}

.marmita-pin-instructions {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 18px;
    font-weight: 500;
}

/* Grupo de 2 Dígitos Grandes */
.marmita-pin-inputs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.marmita-pin-input-box {
    width: 72px;
    height: 82px;
    font-size: 2.8rem;
    font-weight: 900;
    text-align: center;
    border: 2.5px solid #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
    caret-color: transparent;
    -webkit-appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.marmita-pin-input-box:focus {
    border-color: #ea580c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.18), inset 0 2px 4px rgba(0,0,0,0.02);
    transform: translateY(-2px);
}

.marmita-pin-inputs.shake {
    animation: pinShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pinShake {
    10%, 90% { transform: translate3d(-3px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Indicador de Intentos */
.marmita-pin-attempts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.marmita-pin-dots {
    display: flex;
    gap: 6px;
}

.marmita-pin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.2s ease;
}

.marmita-pin-dot.active {
    background: #16a34a;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.marmita-pin-dot.warning {
    background: #ea580c;
    box-shadow: 0 0 6px rgba(234, 88, 12, 0.4);
}

.marmita-pin-dot.danger {
    background: #dc2626;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

/* Alerta de Error */
.marmita-pin-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    animation: pinFadeIn 0.2s ease;
}

/* Teclado Numérico Táctil Integrado */
.marmita-pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.marmita-pin-key {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 0;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.marmita-pin-key:active {
    background: #cbd5e1;
    transform: scale(0.96);
}

.marmita-pin-key.key-action {
    background: #e2e8f0;
    font-size: 1.1rem;
    color: #475569;
}

/* Pantalla de Bloqueo tras 3 Fallos */
.marmita-pin-blocked-box {
    text-align: center;
    padding: 10px 0;
}

.marmita-pin-blocked-box p {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
    margin: 10px 0 18px;
}

.marmita-pin-btn-waiter {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
    transition: all 0.2s ease;
}

.marmita-pin-btn-waiter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.4);
}

.marmita-pin-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.marmita-pin-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.marmita-pin-btn-guest {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.marmita-pin-btn-guest:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* 10. Banner Informativo de Horario de Pizzas (Noche 20:00 a 23:00) */
.pizza-night-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.pizza-night-banner.is-closed-night {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1.5px solid rgba(217, 119, 6, 0.5);
    color: #78350F;
}

.pizza-night-banner.is-open-night {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1.5px solid rgba(34, 197, 94, 0.5);
    color: #14532D;
}

.pizza-night-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.86rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.pizza-night-banner.is-closed-night .pizza-night-banner-badge {
    color: #b45309;
}

.pizza-night-banner.is-open-night .pizza-night-banner-badge {
    color: #15803d;
}

.pizza-night-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.pizza-night-banner-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: inherit;
}

.pizza-night-banner-text strong {
    display: block;
    font-size: 0.94rem;
    margin-bottom: 3px;
    color: inherit;
}

@media (max-width: 600px) {
    .pizza-night-banner {
        padding: 12px 14px;
        margin-bottom: 18px;
    }
    .pizza-night-banner-badge {
        font-size: 0.80rem;
    }
    .pizza-night-banner-text {
        font-size: 0.82rem;
    }
}



