:root {
    --primary: #ff6b00;
    --primary-dark: #cc5500;
    --bg: #121212;
    --surface: #1e1e1e;
    --surface-light: #2a2a2a;
    --text: #ffffff;
    --text-dim: #b0b0b0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Estados del Restaurante */
    --libre: #28a745;
    --libre-bg: rgba(40, 167, 69, 0.12);
    --libre-border: #28a745;
    
    --ocupada: #ffc107;
    --ocupada-bg: rgba(255, 193, 7, 0.12);
    --ocupada-border: #ffc107;

    --cuenta: #007bff;
    --cuenta-bg: rgba(0, 123, 255, 0.15);
    --cuenta-border: #007bff;

    --error: #dc3545;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* BARRA SUPERIOR */
.header-bar {
    height: 65px;
    background: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    position: sticky;
    top: 0;
}

.brand-area {
    display: flex;
    flex-direction: column;
}

.brand-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Indicador de Conexión (Semáforo) */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-indicator.online {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.status-indicator.reconnecting {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.status-indicator.offline {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
}

.status-indicator.reconnecting .dot {
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* Badge de Usuario */
.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-light);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-icon { font-size: 1.1rem; }

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.user-role {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 800;
}

.btn-cambiar-user {
    background: rgba(255, 107, 0, 0.15);
    color: var(--primary);
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-cambiar-user:hover {
    background: var(--primary);
    color: white;
}

/* CONTENEDOR PRINCIPAL */
.main-container {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.screen-view {
    display: none;
}

.screen-view.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* VISTA 1: LOGIN Y SELECCIÓN DE USUARIO */
.login-card {
    max-width: 650px;
    margin: 40px auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 30px 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.login-title {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 800;
}

.login-sub {
    margin: 0 0 25px 0;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.usuarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.user-select-card {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 20px 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.user-select-card:hover, .user-select-card:active {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.08);
    transform: translateY(-2px);
}

.user-card-icon {
    font-size: 2rem;
}

.user-card-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.user-card-role {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    text-transform: uppercase;
}

.user-card-role.caja {
    background: rgba(255, 107, 0, 0.2);
    color: var(--primary);
}

/* TECLADO DE PIN MODAL */
.pin-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pin-box {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 25px 30px;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    transition: var(--transition);
}

.pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.key-btn {
    height: 60px;
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.key-btn:hover, .key-btn:active {
    background: var(--primary);
    transform: scale(0.96);
}

.key-btn.key-cancel {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.key-btn.key-back {
    font-size: 1.2rem;
    color: var(--text-dim);
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 10px 0;
}

/* VISTA 2: MAPA DE MESAS */
.map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.map-legend {
    display: flex;
    gap: 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.badge-dot.libre { background: var(--libre); }
.badge-dot.ocupada { background: var(--ocupada); }
.badge-dot.cuenta { background: var(--cuenta); }

.btn-action-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-action-primary:hover {
    background: var(--primary-dark);
}

/* ZONAS DEL SALÓN */
.floor-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.zone-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.zone-title {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--primary);
}

.zone-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.locations-grid {
    display: grid;
    gap: 14px;
}

.barra-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(140px * var(--ui-scale, 1))), 1fr));
}

.mesas-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(185px * var(--ui-scale, 1))), 1fr));
}

.extras-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(185px * var(--ui-scale, 1))), 1fr));
}

/* TARJETA DE UBICACIÓN (MESA / BARRA) */
.location-card {
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.location-card:active {
    transform: scale(0.97);
}

/* Estado: LIBRE */
.location-card.libre {
    border-color: rgba(40, 167, 69, 0.3);
    background: var(--libre-bg);
}

.location-card.libre:hover {
    border-color: var(--libre);
    background: rgba(40, 167, 69, 0.2);
}

/* Estado: SELECCIONADA (Para combinar) */
.location-card.seleccionada {
    border-color: var(--primary) !important;
    background: rgba(255, 107, 0, 0.25) !important;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
}

/* Estado: OCUPADA */
.location-card.ocupada {
    border-color: var(--ocupada-border);
    background: var(--ocupada-bg);
}

/* Estado: PREPARANDO */
.location-card.preparando {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

/* Estado: CONSUMIENDO */
.location-card.consumiendo {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.12);
}

/* Estado: CUENTA SOLICITADA */
.location-card.cuenta,
.location-card.cuenta-solicitada {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.18);
    animation: glowCuenta 2s infinite alternate;
}

/* Estado: COBRADO (Espera de cambio / Por limpiar) */
.location-card.cobrado {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.16);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

@keyframes glowCuenta {
    from { box-shadow: 0 0 5px rgba(0, 123, 255, 0.2); }
    to { box-shadow: 0 0 15px rgba(0, 123, 255, 0.5); }
}

.loc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.loc-name {
    font-size: calc(1.08rem * var(--ui-scale, 1));
    font-weight: 800;
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.loc-badge {
    font-size: calc(0.68rem * min(var(--ui-scale, 1), 1.35));
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    max-width: 100%;
    white-space: nowrap;
    flex-shrink: 0;
}

.loc-pending-pill {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
}

.loc-badge.badge-libre { background: var(--libre); color: white; }
.loc-badge.badge-ocupada { background: var(--ocupada); color: #000; }
.loc-badge.badge-preparando { background: #f59e0b; color: #000; font-weight: 800; }
.loc-badge.badge-consumiendo { background: #eab308; color: #000; font-weight: 800; }
.loc-badge.badge-cuenta { background: #3b82f6; color: white; font-weight: 800; }
.loc-badge.badge-cobrado { background: #a855f7; color: white; font-weight: 800; }

.loc-body {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.loc-total-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #10b981;
    margin: 2px 0 4px 0;
    letter-spacing: -0.3px;
}

.location-card.cobrado .loc-total-amount {
    color: #c084fc;
}

.btn-liberar-mesa-card {
    background: #9333ea;
    color: white;
    border: none;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    transition: var(--transition);
}

.btn-liberar-mesa-card:hover {
    background: #7e22ce;
    transform: scale(1.04);
}
    font-size: 0.75rem;
    color: var(--text-dim);
}

.loc-waiter {
    font-weight: 700;
    color: #fff;
}

.loc-merged-tag {
    display: inline-block;
    background: rgba(255, 107, 0, 0.2);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-top: 4px;
}

/* SECCIÓN PARA LLEVAR */
.badge-counter {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 800;
}

.llevar-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.empty-llevar {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
}

.llevar-card-item {
    background: var(--surface-light);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.llevar-card-item:hover {
    background: rgba(255, 107, 0, 0.1);
    border-color: var(--primary);
}

/* BARRA FLOTANTE DE ACCIÓN MULTI-MESA */
.floating-action-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e;
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 16px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    z-index: 500;
    animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { bottom: -60px; opacity: 0; }
    to { bottom: 25px; opacity: 1; }
}

.floating-info {
    display: flex;
    flex-direction: column;
}

.floating-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
}

.floating-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.floating-buttons {
    display: flex;
    gap: 10px;
}

.btn-floating-cancel {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.btn-floating-confirm {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

/* MODALES */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 25px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}

.modal-title {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.modal-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 0 0 15px 0;
}

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

.badge-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
}

.modal-info-box {
    background: var(--surface-light);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}

.info-lbl { color: var(--text-dim); }
.info-val { font-weight: 600; color: #fff; }
.info-val-strong { font-weight: 800; color: var(--primary); }

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.btn-secondary {
    flex: 1;
    background: var(--surface-light);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.notice-box {
    background: rgba(255, 107, 0, 0.1);
    border-left: 3px solid var(--primary);
    padding: 10px;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 15px 0;
    border-radius: 4px;
}

/* RESPONSIVE DESIGN (TABLETS VERTICAL Y HORIZONTAL) */
@media (max-width: 768px) {
    .header-bar {
        padding: 0 12px;
    }
    .brand-title {
        font-size: 1.05rem;
    }
    .user-name {
        font-size: 0.75rem;
    }
    .mesas-grid, .extras-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .barra-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .location-card {
        padding: 10px;
        min-height: 90px;
    }
    .floating-action-bar {
        width: 90%;
        gap: 15px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px 8px;
    }
    .mesas-grid, .extras-grid, .barra-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .loc-name {
        font-size: 0.9rem;
    }
    .loc-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
    }
}

/* ========================================================== */
/* ESTILOS ETAPA 3: COMANDAS, CATÁLOGO, CARRITO Y MODALES     */
/* ========================================================== */

.collapsible-section {
    margin-top: 10px;
}

.btn-toggle-collapsible {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-toggle-collapsible:hover {
    text-decoration: underline;
}

/* BARRA SUPERIOR DE COMANDA */
.comanda-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 12px 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.comanda-nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-back-mapa {
    background: #1d4ed8;
    color: #ffffff;
    border: 2px solid #60a5fa;
    padding: 10px 16px;
    min-height: 44px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-back-mapa:hover {
    background: #2563eb;
    color: #fff;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comanda-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
}

.comanda-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.meta-tag {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: monospace;
    font-weight: 700;
}

.meta-waiter {
    font-weight: 600;
}

.btn-claim-header, .btn-reassign-header {
    background: rgba(255, 107, 0, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.total-acumulado-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.3);
    padding: 5px 14px;
    border-radius: 10px;
}

.lbl-total {
    font-size: 0.65rem;
    font-weight: 800;
    color: #28a745;
    letter-spacing: 0.5px;
}

.val-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: #28a745;
}

/* LAYOUT DE LA COMANDA: CATÁLOGO + CARRITO */
.comanda-body-layout {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (min-width: 961px) {
    .mobile-floating-pill {
        display: none !important;
    }
}

@media (max-width: 960px) {
    .comanda-body-layout {
        grid-template-columns: 1fr;
    }
}

/* COLUMNA CATÁLOGO */
.catalog-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.catalog-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 35px 10px 38px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.btn-clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
}

.categories-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.category-chip {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.category-chip.active, .category-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 64vh;
    overflow-y: auto;
    padding-right: 4px;
}

.product-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
}

.product-card:hover, .product-card:active {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.08);
    transform: translateY(-2px);
}

.product-card-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.product-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    color: #fff;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-price {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary);
}

.product-card-tag {
    font-size: 0.65rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    border-radius: 4px;
}

/* COLUMNA CARRITO */
.cart-column {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.cart-tab {
    flex: 1;
    background: var(--surface-light);
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.cart-tab.active {
    background: var(--primary);
    color: #fff;
}

.tab-badge {
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72rem;
}

.cart-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.cart-section-sub {
    font-size: 0.68rem;
    color: var(--text-dim);
    display: block;
}

.btn-clear-cart {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    padding: 3px 6px;
    border-radius: 5px;
}

.btn-clear-cart:hover {
    color: var(--error);
}

.cart-items-container {
    min-height: 160px;
    max-height: 44vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.empty-cart {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-dim);
}

.empty-cart-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 6px;
    opacity: 0.4;
}

.cart-item-row {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.cart-item-mods {
    font-size: 0.72rem;
    color: var(--primary);
    margin-top: 2px;
}

.cart-item-note {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 2px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 5px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    font-size: 0.88rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
}

.btn-delete-item {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
}

.btn-delete-item:hover {
    color: var(--error);
}

.cart-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lbl-subtotal {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
}

.val-subtotal {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.btn-send-round {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-send-round:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    cursor: not-allowed;
}

.btn-send-round:not(:disabled):hover {
    background: #218838;
}

/* HISTORIAL DE RONDAS CONFIRMADAS */
.historial-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 48vh;
    overflow-y: auto;
}

.historial-round-card {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
}

.round-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 5px;
    margin-bottom: 6px;
}

.round-number {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary);
}

.round-author {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.round-item-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 3px 0;
}

.round-subtotal-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 800;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 5px;
    padding-top: 5px;
    color: #28a745;
}

/* MODALES DE BARBACOA Y MODIFICADORES */
.modal-lg {
    max-width: 600px;
}

.portion-buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 8px;
}

@media (max-width: 540px) {
    .portion-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.btn-portion {
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 4px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-family: inherit;
    transition: var(--transition);
}

.btn-portion.active {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.15);
}

.portion-weight {
    font-size: 0.82rem;
    font-weight: 800;
}

.portion-price {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
}

.parts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 6px 0;
}

.parts-progress {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.part-card {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.part-name {
    font-size: 0.8rem;
    font-weight: 700;
}

.part-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-frac-step {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
}

.btn-frac-step:active {
    background: var(--primary);
}

.part-fraction-display {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
}

.modifier-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.mod-option-btn {
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 8px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.mod-option-btn.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.15);
}

/* MODAL DE DECISIÓN MESAS SIN ASIGNAR */
.decision-icon {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 6px;
}

.decision-sub {
    font-size: 0.88rem;
    color: var(--text-dim);
    text-align: center;
    margin: 2px 0 8px 0;
}

.decision-desc {
    font-size: 0.82rem;
    text-align: center;
    margin-bottom: 16px;
}

.decision-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-decision-primary {
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.btn-decision-secondary {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.btn-decision-cancel {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-text-block {
    display: flex;
    flex-direction: column;
}

.btn-main-text {
    font-size: 0.9rem;
    font-weight: 800;
}

.btn-sub-text {
    font-size: 0.72rem;
    opacity: 0.85;
}

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

.summary-price-box {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.summary-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

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

/* ========================================================== */
/* ETAPA 4: SOLICITUD DE CUENTA, CORRECCIONES, COBRO Y TICKET */
/* ========================================================== */

/* Botones de Cabecera de Comanda */
.comanda-actions-box {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-action-solicitar {
    background: #e65100;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-action-solicitar:hover:not(:disabled) {
    background: #f57c00;
    transform: translateY(-1px);
}

.btn-action-solicitar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #555;
}

.btn-action-precuenta {
    background: var(--surface-light);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action-precuenta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-action-cobrar {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.4);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action-cobrar:hover {
    background: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.6);
}

/* Badge de Estado: Cuenta Solicitada */
.badge-status.badge-cuenta-solicitada {
    background: #f57f17;
    color: #fff;
    animation: pulseOrange 1.8s infinite;
}

@keyframes pulseOrange {
    0% { box-shadow: 0 0 0 0 rgba(245, 127, 23, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(245, 127, 23, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 127, 23, 0); }
}

/* Items en Historial: Cancelados y Botón de Corrección */
.round-item-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.88rem;
}

.round-item-line.cancelled {
    opacity: 0.55;
    text-decoration: line-through;
    color: var(--text-dim);
}

.badge-item-cancelled {
    background: #c62828;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    text-decoration: none;
    display: inline-block;
}

.btn-item-cancel {
    background: transparent;
    color: #e57373;
    border: 1px solid rgba(229, 115, 115, 0.4);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.btn-item-cancel:hover {
    background: #c62828;
    color: white;
    border-color: #c62828;
}

/* Modal de Cobro */
.modal-cobro-card {
    max-width: 820px;
    width: 95vw;
    padding: 22px;
}

.cobro-layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .cobro-layout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.cobro-items-container {
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
}

.cobro-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cobro-totales-box {
    margin-top: 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.cobro-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-dim);
}

.cobro-propina-row {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    margin: 8px 0;
}

.propina-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.propina-chips {
    display: flex;
    gap: 4px;
}

.chip-propina {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.chip-propina:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.input-propina {
    padding: 6px 10px;
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
}

.cobro-gran-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
}

.gran-total-amount {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

/* Pestañas de Pago */
.metodos-pago-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.tab-pago {
    flex: 1;
    padding: 9px 4px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.tab-pago.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.lbl-cobro {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 6px;
    display: block;
}

.billetes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.btn-billete {
    background: var(--surface-light);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-billete:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-billete.exacto {
    background: rgba(46, 125, 50, 0.2);
    border-color: #2e7d32;
    color: #4caf50;
}

.input-monto-recibido {
    font-size: 1.3rem;
    font-weight: 900;
    padding: 10px;
    text-align: right;
}

.cambio-display-box {
    background: rgba(46, 125, 50, 0.12);
    border: 2px solid #2e7d32;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.cambio-lbl {
    font-size: 0.9rem;
    font-weight: 800;
    color: #81c784;
}

.cambio-val {
    font-size: 1.6rem;
    font-weight: 900;
    color: #4caf50;
}

.pago-fijo-info {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-confirm-checkout {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
    transition: var(--transition);
    flex: 1.5;
}

.btn-confirm-checkout:hover {
    background: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.6);
}

/* Papel Térmico para Vista Previa de Ticket (58 mm) */
.ticket-thermal-paper {
    background: #ffffff;
    color: #000000;
    font-family: 'Courier New', Courier, monospace;
    padding: 15px;
    border-radius: 4px;
    max-height: 420px;
    overflow-y: auto;
    font-size: 9pt;
    line-height: 1.25;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* OCULTAR CONTENEDOR DE IMPRESIÓN EN PANTALLA NORMAL */
#ticket-print {
    display: none !important;
}

/* ESTILOS DE IMPRESIÓN (TICKET) ESPECIAL TÉRMICO DE 58 MM */
@media print {
    @page {
        size: 58mm auto;
        margin: 0;
    }
    body {
        background: white !important;
        color: black !important;
        margin: 0;
        padding: 0;
        width: 58mm;
        text-transform: uppercase;
    }
    body > *:not(#ticket-print) {
        display: none !important;
    }
    #ticket-print {
        display: block !important;
        width: 48mm;
        margin: 0 auto;
        padding: 2mm 0;
        background: white !important;
        color: black !important;
        font-family: 'Courier New', Courier, monospace;
        font-weight: 400;
        font-size: 8.5pt;
        line-height: 1.2;
        overflow: hidden;
    }
    #ticket-print.ticket-80mm {
        width: 72mm;
        font-size: 9.5pt;
    }
    .ticket-header {
        text-align: center;
        border-bottom: 1px solid black;
        padding-bottom: 5px;
        margin-bottom: 6px;
    }
    .ticket-header h2 {
        margin: 4px 0;
        font-size: 13pt;
        font-weight: 800;
    }
    .ticket-item {
        display: flex;
        justify-content: space-between;
        font-size: 8.5pt;
        margin-bottom: 2px;
    }
    .ticket-mod-item {
        font-size: 7.5pt;
        padding-left: 8px;
        color: #333;
        margin-bottom: 1px;
    }
    .ticket-total {
        border-top: 2px solid black;
        margin-top: 6px;
        padding-top: 4px;
        font-weight: 800;
        text-align: right;
        font-size: 13pt;
    }
    .ticket-footer {
        text-align: center;
        font-size: 7.5pt;
        margin-top: 10px;
        border-top: 1px solid #000;
        padding-top: 6px;
    }
    .ticket-badge-banner {
        text-align: center;
        font-weight: 800;
        font-size: 10pt;
        border: 1px solid black;
        padding: 2px 0;
        margin-bottom: 6px;
    }
}

/* ========================================================== */
/* ESTILOS RESPONSIVOS PARA COMANDA EN TELÉFONOS (VERTICAL)  */
/* ========================================================== */

.mobile-comanda-nav {
    display: none;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-nav-tab {
    flex: 1;
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-nav-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.35);
}

.btn-mobile-return-catalog {
    display: none;
    width: 100%;
    background: rgba(255, 107, 0, 0.12);
    color: var(--primary);
    border: 1px dashed var(--primary);
    padding: 11px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    margin-bottom: 10px;
    text-align: center;
    font-family: inherit;
}

.mobile-floating-pill {
    display: none;
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 13px 22px;
    border-radius: 35px;
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.55);
    z-index: 999;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 420px;
    animation: bounceIn 0.3s ease;
}

.mobile-floating-pill:active {
    transform: translateX(-50%) scale(0.97);
}

@keyframes bounceIn {
    0% { transform: translateX(-50%) translateY(30px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .mobile-comanda-nav {
        display: flex;
    }

    .comanda-header-bar {
        padding: 8px 12px;
        margin-bottom: 10px;
        gap: 8px;
    }

    .comanda-title {
        font-size: 1.05rem;
    }

    .comanda-nav-left {
        gap: 8px;
    }

    .comanda-nav-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 6px;
    }

    .total-acumulado-box {
        text-align: left;
    }

    .lbl-total {
        font-size: 0.65rem;
    }

    .val-total {
        font-size: 1.15rem;
    }

    /* Manejo de Vista de Pestañas en Móvil */
    .comanda-body-layout.mobile-view-catalogo .catalog-column {
        display: flex !important;
        width: 100%;
    }

    .comanda-body-layout.mobile-view-catalogo .cart-column {
        display: none !important;
    }

    .comanda-body-layout.mobile-view-carrito .catalog-column {
        display: none !important;
    }

    .comanda-body-layout.mobile-view-carrito .cart-column {
        display: flex !important;
        width: 100%;
    }

    .comanda-body-layout.mobile-view-carrito .btn-mobile-return-catalog {
        display: block;
    }

    .comanda-body-layout.mobile-view-catalogo .mobile-floating-pill {
        display: flex;
    }

    .products-grid {
        max-height: calc(100dvh - 250px);
    }

    .cart-items-container {
        max-height: calc(100dvh - 330px);
    }
}

/* ========================================================== */
/* ESTILOS BOTÓN Y MODAL: VENTAS DEL DÍA                      */
/* ========================================================== */

.btn-ventas-dia {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ventas-dia:hover {
    background: #10b981;
    color: white;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.kpi-card {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 4px 0 2px 0;
}

.kpi-value.text-accent { color: var(--primary); }
.kpi-value.text-warning { color: #f59e0b; }
.kpi-value.text-success { color: #10b981; }

.kpi-sub {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.report-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
}

.report-tab-btn {
    background: var(--surface-light);
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: var(--transition);
}

.report-tab-btn.active {
    background: var(--primary);
    color: white;
}

.report-panel {
    animation: fadeIn 0.2s ease;
}

.metodos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.metodo-box {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px;
}

.metodo-box h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

.metodo-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 6px;
    color: var(--text-dim);
}

.metodo-row b {
    font-size: 0.95rem;
}

.val-cash { color: #10b981; }
.val-card { color: #3b82f6; }
.val-transfer { color: #a855f7; }

.table-responsive {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.report-table th {
    background: var(--surface-light);
    color: var(--text-dim);
    padding: 9px 10px;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.report-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.zonas-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.zona-summary-card {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

.btn-table-action {
    background: var(--surface-light);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 0, 0.3);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.btn-table-action:hover {
    background: var(--primary);
    color: white;
}

/* ========================================================== */
/* BLOQUE 3 (AUD-007 / AUD-008 / AUD-009) — MOBILE-FIRST UX   */
/* ========================================================== */

html, body {
    max-width: 100%;
    overflow-x: clip;
}

.app-container,
.main-content,
.screen-view,
.comanda-body-layout,
.catalog-column,
.cart-column,
.catalog-tools,
.search-input-wrapper,
.comanda-header-bar,
.comanda-nav-left,
.comanda-nav-right,
.comanda-table-info {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.comanda-net-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    white-space: nowrap;
}

.comanda-net-badge.offline {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.comanda-net-badge.reconnecting {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.search-input {
    min-height: 44px;
    font-size: 16px;
}

.search-scope-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 107, 0, 0.14);
    border: 1px solid rgba(255, 107, 0, 0.35);
    color: #ffb074;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.categories-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding: 2px 0 6px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-chips::-webkit-scrollbar {
    display: none;
}

.category-chip {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.category-chip:not(.active):hover {
    background: var(--surface);
    color: var(--text-dim);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
    .category-chip:not(.active):hover {
        background: var(--surface-light);
        color: #fff;
    }
}

.product-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    min-height: 104px;
    gap: 8px;
}

.product-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.product-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    color: #f8fafc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-hint {
    font-size: 0.72rem;
    color: #fbbf24;
    margin-top: 3px;
    font-weight: 600;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
}

.product-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
}

.product-card-add {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pos-toast {
    position: fixed;
    left: 50%;
    bottom: 92px;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    z-index: 1050;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    max-width: calc(100vw - 32px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.round-status-banner {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: none;
}

.round-status-banner.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.round-status-banner.success {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.round-status-banner.warning {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fde68a;
}

@media (min-width: 961px) {
    .mobile-floating-pill {
        display: none !important;
    }
}

@media (max-width: 960px) {
    .header-bar {
        position: relative;
        top: auto;
        height: auto !important;
        min-height: 60px;
        z-index: 20;
    }

    .main-content {
        padding: 10px 10px 92px 10px;
    }

    .comanda-header-bar {
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 8px 10px;
        margin-bottom: 10px;
        gap: 8px;
        background: rgba(18, 18, 18, 0.97);
        backdrop-filter: blur(8px);
    }

    .comanda-nav-left {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .btn-back-mapa {
        min-height: 40px;
        padding: 8px 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .title-with-badge {
        flex-wrap: wrap;
        gap: 6px;
    }

    .comanda-meta {
        flex-wrap: wrap;
        gap: 6px;
    }

    .comanda-nav-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 8px;
    }

    .comanda-actions-box {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--card-min-w, 155px)), 1fr));
        gap: 10px;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
        padding-bottom: 16px;
    }

    .mobile-floating-pill {
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        transform: none;
        width: auto;
        max-width: none;
        padding: 12px 16px;
        border-radius: 16px;
        background: var(--primary);
        box-shadow: 0 8px 24px rgba(255, 107, 0, 0.45);
        animation: none;
    }

    .mobile-floating-pill:active {
        transform: scale(0.985);
    }

    .pill-left-col {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.2;
    }

    .pill-count-line {
        font-size: 0.78rem;
        font-weight: 600;
        opacity: 0.95;
    }

    .pill-subtotal-line {
        font-size: 1.15rem;
        font-weight: 800;
    }

    .pill-right-col {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .pill-send-status {
        font-size: 0.72rem;
        background: rgba(0, 0, 0, 0.25);
        padding: 3px 8px;
        border-radius: 999px;
    }

    .pill-cta {
        font-size: 0.95rem;
        font-weight: 800;
    }
}

@media (max-width: 480px) {
    .header-bar {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
}

/* ========================================================== */
/* BLOQUE 3.2 — ERGONOMÍA, LEGIBILIDAD Y CONTROLES PULSABLES  */
/* ========================================================== */

:root {
    --ui-scale: 1;
    --fs-op: calc(16px * min(var(--ui-scale), 2.0));
    --fs-prod: calc(16px * var(--ui-scale));
    --fs-price: calc(18px * var(--ui-scale));
    --fs-action: calc(16px * min(var(--ui-scale), 1.75));
    --fs-meta: calc(13.5px * min(var(--ui-scale), 1.6));
    --fs-cat: calc(15px * min(var(--ui-scale), 1.8));
    --touch-min: calc(44px * min(var(--ui-scale), 1.35));
    --card-min-w: calc(155px * var(--ui-scale));
}

.ui-scale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 3px;
    border-radius: 10px;
}

.ui-scale-btn {
    min-width: 38px;
    min-height: 36px;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.ui-scale-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: #ffffff;
}

/* Tipografía operativa legible en todo el POS */
.product-card-name {
    font-size: var(--fs-prod);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.product-card-price {
    font-size: var(--fs-price);
}

.product-card-hint {
    font-size: var(--fs-meta);
}

.product-card-add {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.category-chip {
    min-height: 46px;
    font-size: var(--fs-op);
    border: 2px solid rgba(255, 255, 255, 0.18);
}

.category-chip.active {
    border-color: #ffffff;
    box-shadow: 0 3px 12px rgba(255, 107, 0, 0.4);
}

.comanda-title {
    font-size: calc(var(--fs-prod) + 2px);
    overflow-wrap: anywhere;
}

.comanda-meta,
.round-author,
.cart-item-mods,
.cart-item-note,
.comanda-net-badge,
.status-indicator {
    font-size: var(--fs-meta);
}

.cart-item-title,
.round-item-line,
.round-subtotal-line,
.lbl-subtotal,
.val-subtotal,
.empty-cart p {
    font-size: var(--fs-op);
    overflow-wrap: anywhere;
}

.cart-item-price {
    font-size: var(--fs-price);
}

/* Botones + / - y eliminar con área táctil >= 44px */
.qty-stepper {
    gap: 10px;
}

.qty-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.35rem;
    font-weight: 800;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: #27272a;
    color: #ffffff;
    cursor: pointer;
}

.qty-btn:active {
    transform: scale(0.95);
    background: var(--primary);
}

.qty-val {
    font-size: var(--fs-price);
    font-weight: 800;
    min-width: 28px;
    text-align: center;
}

.btn-delete-item {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.15rem;
    border: 2px solid rgba(239, 68, 68, 0.45);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.14);
}

/* Identificación inequívoca de pestañas pulsables (Catálogo, Pedido, Ronda Actual, Historial) */
.mobile-comanda-nav,
.cart-tabs {
    gap: 10px;
}

.mobile-nav-tab,
.cart-tab {
    min-height: 48px;
    padding: 10px 14px;
    font-size: var(--fs-action);
    font-weight: 800;
    background: #23272f;
    color: #e2e8f0;
    border: 2px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-tab:active,
.cart-tab:active {
    transform: scale(0.97);
}

.mobile-nav-tab.active,
.cart-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.45);
}

.btn-send-round,
.btn-mobile-return-catalog,
.btn-action-solicitar,
.btn-action-cobrar,
.btn-primary,
.btn-secondary {
    min-height: 46px;
    font-size: var(--fs-action);
}

.modal-title {
    font-size: calc(var(--fs-prod) + 3px);
}

.modal-sub,
.form-group label,
.form-input {
    font-size: var(--fs-op);
}

/* ========================================================== */
/* BLOQUE 3.3 — ESCALA REAL, CANTIDADES EN TARJETA Y PULIDO   */
/* ========================================================== */

/* Categorías con contraste, desplazamiento visible y escala real */
.categories-chips {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.categories-chips::-webkit-scrollbar {
    display: block;
    height: 5px;
}

.categories-chips::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 999px;
}

.category-chip {
    min-height: var(--touch-min);
    font-size: var(--fs-cat);
    padding: 10px 18px;
}

/* Buscador de alto contraste */
.search-input {
    background: #1e2430;
    border: 2px solid #475569;
    min-height: var(--touch-min);
    font-size: var(--fs-op);
    color: #ffffff;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-scope-badge {
    font-size: var(--fs-meta);
    padding: 8px 12px;
}

/* En modo Extra grande (A++) en celular, 1 columna para legibilidad y botones cómodos */
@media (max-width: 640px) {
    :root[data-ui-scale="xl"] .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjetas con cantidades visibles y stepper directo */
.product-card {
    padding: 12px;
    gap: 10px;
}

.product-card.in-round {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(255, 107, 0, 0.14) 0%, rgba(26, 26, 26, 0.98) 100%);
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.22);
}

.product-card-add {
    width: var(--touch-min);
    height: var(--touch-min);
    font-size: calc(var(--fs-price) + 2px);
}

.card-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2px;
}

.card-qty-btn {
    min-width: calc(var(--touch-min) - 6px);
    min-height: calc(var(--touch-min) - 6px);
    border-radius: 9px;
    border: none;
    background: #27272a;
    color: #ffffff;
    font-size: var(--fs-price);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-qty-btn.plus {
    background: var(--primary);
}

.card-qty-btn:active {
    transform: scale(0.94);
}

.card-qty-val {
    min-width: 24px;
    text-align: center;
    font-size: var(--fs-price);
    font-weight: 800;
    color: #ffffff;
}

.card-variant-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 107, 0, 0.22);
    border: 1px solid var(--primary);
    color: #fed7aa;
    font-size: var(--fs-meta);
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Escalado real en Modales, Porciones, Partes, Modificadores, Historial, Mapa y Barra Inferior */
.btn-portion {
    min-height: calc(var(--touch-min) + 12px);
    padding: 10px 8px;
}

.btn-portion .portion-weight {
    font-size: var(--fs-op);
    font-weight: 800;
}

.btn-portion .portion-price {
    font-size: var(--fs-price);
    font-weight: 800;
}

.part-name,
.section-label,
.parts-progress {
    font-size: var(--fs-op);
}

.btn-frac-step,
.mod-option-btn {
    min-height: var(--touch-min);
    font-size: var(--fs-op);
    padding: 8px 14px;
}

.part-fraction-display {
    font-size: var(--fs-op);
    font-weight: 800;
}

.summary-price,
.btn-confirm-checkout,
.val-total {
    font-size: var(--fs-price);
}

.round-number {
    font-size: var(--fs-op);
    font-weight: 800;
}

/* Mapa de Mesas y Estados */
.loc-name {
    font-size: var(--fs-prod);
    font-weight: 800;
}

.loc-badge {
    font-size: var(--fs-meta);
    padding: 4px 9px;
}

.loc-body,
.loc-waiter,
.llevar-card-item {
    font-size: var(--fs-op);
}

.loc-total-amount {
    font-size: var(--fs-price);
}

/* Barra inferior móvil más legible */
.pill-count-line {
    font-size: var(--fs-meta);
}

.pill-subtotal-line {
    font-size: var(--fs-price);
}

.pill-cta {
    font-size: var(--fs-action);
}

.pill-send-status {
    font-size: var(--fs-meta);
}

.btn-back-mapa {
    min-height: var(--touch-min);
    font-size: var(--fs-action);
}

/* ==========================================================
   BLOQUE 5: AISLAMIENTO DE ESCALA EN MODALES ADMINISTRATIVOS
   ========================================================== */
.admin-modal-standard {
    --ui-scale: 1 !important;
    --fs-base: 14px;
    --fs-prod: 15px;
    --fs-price: 16px;
    --fs-btn: 14px;
    --fs-cat: 14px;
    --fs-meta: 13px;
    --btn-min-h: 36px;
    font-size: 14px !important;
}

.admin-modal-standard .modal-card {
    font-size: 14px !important;
}

.admin-modal-standard .report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-modal-standard .report-table th,
.admin-modal-standard .report-table td {
    padding: 8px 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-modal-standard .btn-secondary,
.admin-modal-standard .btn-primary,
.admin-modal-standard button {
    min-height: 34px;
    font-size: 13px;
    padding: 6px 10px;
}

