/* ==========================================================================
   VARIABLES COOPERATIVAS CORPORATIVAS - CAFÉ HOSPITAL LA LUZ
   ========================================================================== */
:root {
    --azul: #0056b3;
    --amarillo: #ffcc00;
    --blanco: #ffffff;
    --morado: #8e44ad;
    --verde: #27ae60;
    --gris-oscuro: #2c3e50;
    --gris-claro: #f4f6f9;
}

/* ==========================================================================
   REGLAS GENERALES Y COMPONENTES TÁCTILES BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--gris-claro);
    color: var(--gris-oscuro);
    line-height: 1.4;
}

.btn-tactil {
    padding: 14px 20px;
    font-size: 1.05rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: var(--blanco);
    display: inline-block;
    text-align: center;
    touch-action: manipulation;
    transition: background 0.15s ease, transform 0.05s ease;
}

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

/* Identificadores Visuales por Código de Color Solicitado */
.btn-pagado { background-color: var(--amarillo); color: #000000; box-shadow: 0 4px 0 #e1b12c; }
.btn-pagado:active { box-shadow: 0 1px 0 #e1b12c; transform: translateY(3px); }

.btn-nomina { background-color: var(--morado); box-shadow: 0 4px 0 #6d2193; }
.btn-nomina:active { box-shadow: 0 1px 0 #6d2193; transform: translateY(3px); }

.btn-cortesia { background-color: var(--verde); box-shadow: 0 4px 0 #1e7e34; }
.btn-cortesia:active { box-shadow: 0 1px 0 #1e7e34; transform: translateY(3px); }

.btn-colaborador { background-color: var(--azul); box-shadow: 0 4px 0 #003d82; }
.btn-colaborador:active { box-shadow: 0 1px 0 #003d82; transform: translateY(3px); }

/* Alertas Operativas */
.exito-box, .error-box {
    max-width: 650px;
    margin: 15px auto;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.exito-box { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.error-box { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.footer-hll {
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
    margin-top: 60px;
    border-top: 4px solid var(--amarillo);
    clear: both;
}

/* ==========================================================================
   REJILLA PREMIUM DEL MENÚ PRINCIPAL (DASHBOARD)
   ========================================================================== */
.dashboard-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
    padding: 15px 0;
}

.menu-btn {
    background: #ffffff;
    color: var(--gris-oscuro);
    border: 3px solid var(--azul);
    padding: 35px 20px;
    border-radius: 14px;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    min-height: 140px;
    touch-action: manipulation;
    transition: background 0.1s ease, transform 0.05s ease;
}

.menu-btn:active {
    background: var(--amarillo);
    border-color: var(--amarillo);
    transform: scale(0.96);
}
/* ==========================================================================
   REJILLA PREMIUM DEL MAPA DE MESAS (MESAS.PHP)
   ========================================================================== */
.grid-mesas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px 0;
    width: 100%;
}

.mesa-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    touch-action: manipulation;
    transition: transform 0.05s ease;
    border-bottom: 5px solid #bdc3c7;
}

.mesa-card:active {
    transform: scale(0.95);
}

/* Colores de Estado del Mapa de Mesas Solicitados */
.mesa-libre {
    background-color: #ffffff;
    color: var(--verde);
    border: 3px solid var(--verde);
    border-bottom: 6px solid #1e7e34;
}

.mesa-ocupada {
    background-color: #ff4757;
    color: #ffffff;
    border: 3px solid #ff4757;
    border-bottom: 6px solid #c0392b;
}

/* ==========================================================================
   PREVENTIVO INTERFAZ TÁCTIL AUTO-DESPLEGABLE (Z-INDEX FORZADO)
   ========================================================================== */
.teclado-modal {
    position: fixed;
    bottom: -450px;
    left: 50%;
    transform: translateX(-50%);
    width: 96%;
    max-width: 780px;
    background: #1e272e;
    padding: 15px 10px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    z-index: 9999999 !important; /* Levanta al teclado al frente de todo elemento */
    transition: bottom 0.25s cubic-bezier(0.1, 0.76, 0.55, 0.94);
    border-top: 4px solid #0056b3;
}

.teclado-modal.mostrar {
    bottom: 0;
}

/* Ocultar elementos heredados durante procesos de impresión térmica */
@media print {
    .no-print {
        display: none !important;
    }
}
/* Envoltura intermedia: Empuja el footer siempre hacia la base */
.content-wrapper {
    flex: 1;
}