:root {
    --bg: #000000;
    --card: #121212;
    --primary: #FFCC00; /* Amarillo Chori */
    --text: #FFFFFF;
    --success: #00E676;
    --danger: #FF1744;
    --border-color: #333333; /* Borde más visible */
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    padding-bottom: 90px;
    margin: 0;
}

/* FORZAR VISIBILIDAD DE TEXTOS */
.text-muted {
    color: #b0b0b0 !important; /* Gris claro, muy legible */
}

h1, h2, h3, h4, h5, h6 {
    color: #fff;
    font-weight: bold;
}

/* LOGIN */
#login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    background: var(--card); padding: 40px; border: 2px solid var(--primary);
    width: 90%; max-width: 350px; border-radius: 12px; text-align: center;
}
.form-input {
    background: #222; border: 1px solid #444; color: #fff;
    width: 100%; padding: 15px; margin-bottom: 10px; border-radius: 6px;
    font-size: 1.1rem; outline: none;
}
.form-input:focus { border-color: var(--primary); background: #000; }

/* NAVBAR */
.navbar-custom {
    background: #000; border-bottom: 2px solid var(--primary);
    padding: 15px; display: flex; justify-content: space-between; align-items: center;
}

/* TICKET AREA */
#list-pedido {
    min-height: 200px;
    padding: 10px;
    background: #111; 
}

/* CAJA STATS */
.stat-box {
    background: var(--card); 
    border: 1px solid var(--border-color);
    padding: 20px 10px; border-radius: 8px; text-align: center;
    margin-bottom: 10px; box-shadow: 0 4px 10px rgba(255,255,255,0.05);
}
.stat-val { font-size: 1.8rem; font-weight: bold; margin-top: 5px; }

/* LISTAS Y BORDES */
.border-secondary {
    border-color: var(--border-color) !important;
}

/* FOOTER */
.footer-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #000; border-top: 1px solid #333;
    display: flex; justify-content: space-around; padding: 10px 0; z-index: 100;
}
.nav-btn {
    background: none; border: none; color: #888; font-size: 0.8rem;
    display: flex; flex-direction: column; align-items: center; flex: 1;
}
.nav-btn i { font-size: 1.6rem; margin-bottom: 4px; }
.nav-btn.active { color: var(--primary); border-top: 3px solid var(--primary); margin-top: -12px; padding-top: 12px; background: #111; }

.footer-pay {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #000; border-top: 2px solid var(--success);
    padding: 15px; display: flex; justify-content: space-between; align-items: center;
    z-index: 101;
}

/* UTILIDADES */
.d-none { display: none !important; }
.admin-only { display: none !important; }
.text-warning { color: var(--primary) !important; }
.btn-warning { background-color: var(--primary); color: #000; font-weight: bold; border:none; }


/* Animación para indicar que se puede hacer clic */
.badge {
    transition: transform 0.1s, box-shadow 0.2s;
}
.badge:active {
    transform: scale(0.95);
}
/* Efecto parpadeo suave para pedidos parciales */
@keyframes blink { 50% { opacity: 0.8; } }
.blink-anim { animation: blink 2s infinite; } 

/* MEJORA VISUALIZACIÓN PRODUCTOS EN MÓVIL (Punto 3) */
.prod-card-btn {
    background: #252525;
    border: 1px solid #444;
    min-height: 120px; /* Altura mínima pero crece si hay mucho texto */
    height: auto !important; 
    white-space: normal !important; /* Permite que el texto baje de renglón */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px !important;
}

.prod-name {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 5px;
    width: 100%;
    overflow-wrap: break-word; /* Rompe palabras largas si es necesario */
}

/* CATEGORÍAS (Punto 2) */
.cat-title {
    color: var(--primary);
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* CRONÓMETRO (Punto 1) */
.timer-badge {
    background: #333;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    border: 1px solid #555;
}
.timer-warning { color: #ffeb3b; border-color: #ffeb3b; }
.timer-danger { color: #ff1744; border-color: #ff1744; animation: blink 2s infinite; }

/* Agrega esto a tu CSS existente */

/* SELECTOR DE ICONOS VISUAL */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 15px 0;
}
.icon-option {
    background: #333;
    border: 2px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}
.icon-option:hover { background: #444; }
.icon-option.selected {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* TABLA INFORMES */
.table-reports th { background: #222; color: var(--primary); }
.card-report { background: #1a1a1a; border: 1px solid #333; padding: 15px; border-radius: 8px; text-align: center; }
.card-report h4 { font-size: 2rem; margin: 0; }

/* Ajuste para que las tarjetas se vean bien en pantallas pequeñas */
.card {
    min-height: 180px !important;
    border-radius: 12px !important;
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* El nombre de la mesa ahora es más grande */
h4 {
    font-size: 1.4rem !important;
    letter-spacing: 1px;
}

/* Animación sutil para mesas con pedidos pendientes */
.border-danger {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { border-color: #FF1744; }
    50% { border-color: #800b22; }
    100% { border-color: #FF1744; }
}


/* Asegura que las mesas tengan espacio suficiente para el texto grande */
#grid-mesas .card {
    min-height: 190px !important; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px !important;
}

/* Mejora la visibilidad del nombre de la mesa */
#grid-mesas h5 {
    font-size: 1.3rem !important;
    margin-bottom: 5px;
}

/* ==========================================================
   NUEVOS ESTILOS: COCINA OPTIMIZADA Y AJUSTES DE STOCK
   ========================================================== */

/* 1. DISEÑO DE LA COCINA (KDS) */
#v-cocina .card {
    min-height: 120px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-width: 2px !important; /* Resalta el borde por mesa */
}

#v-cocina .card-header {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
}

#v-cocina .card-body {
    background-color: #121212; /* Fondo oscuro para resaltar el texto blanco */
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#v-cocina li {
    font-size: 1.25rem !important; /* Tamaño grande para lectura a distancia */
    font-weight: 600;
    color: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

#v-cocina li:last-child {
    border-bottom: none;
}

/* 2. BOTONES DE INVENTARIO (+/-) */
.btn-adj {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    padding: 0;
    transition: transform 0.1s;
}

.btn-adj:active {
    transform: scale(0.9);
}

/* 3. MEJORAS DE LEGIBILIDAD EN TICKET */
.ticket-item .badge {
    font-size: 0.9rem;
    padding: 0.5em 0.7em;
}

/* Resaltado de notas de pedido */
.nota-pedido {
    background: var(--primary);
    color: #000;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 4px;
}

.mesa-unida {
    border-style: dashed !important;
    opacity: 0.8;
    background: rgba(0, 188, 212, 0.1) !important;
}

.mesa-unida::after {
    content: "VINCULADA";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6rem;
    background: #00bcd4;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
}

