body { font-family: sans-serif; margin: 0; background: #f4f4f9; color: #333; }
.card { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin: 20px; }
.hidden { display: none; }



/* Vista Admin */
.header-admin { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
input { display: block; width: 100%; margin-bottom: 10px; padding: 10px; box-sizing: border-box; }
button { background: #007bff; color: white; border: none; padding: 12px; cursor: pointer; border-radius: 5px; }
.btn-rojo { background: #dc3545; }


.grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 10px;
}

.card-imagen {
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}



/* Vista Cliente Específica */
#vista-cliente {
    width: 100%;
    max-width: 600px; /* Tamaño máximo para que no se deforme en tablets */
    margin: 0 auto;
    background: #000; /* Fondo negro para que resalten las fotos */
    min-height: 100vh;
}

#titulo-restaurante {
    text-align: center;
    color: white;
    padding: 20px 10px;
    margin: 0;
    font-size: 1.5rem;
    background: #1a1a1a;
    position: sticky; /* Se queda arriba mientras scrolleas */
    top: 0;
    z-index: 10;
}

.cliente-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.img-full-width {
    width: 100%;
    height: auto;
    display: block; /* Elimina espacios pequeños entre imágenes */
    margin-bottom: 2px; /* Pequeña separación estética */
}

/* Para errores o avisos */
.aviso, .error-pantalla {
    color: white;
    text-align: center;
    padding-top: 50px;
}





.header-admin {
    display: flex;
    justify-content: space-between; /* Empuja los elementos a los extremos */
    align-items: center;           /* Alinea verticalmente al centro */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.header-admin h2 {
    margin: 0; /* Quita márgenes por defecto para que no se vea desfasado */
}

.btn-logout-top {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-logout-top:hover {
    background-color: #cc0000;
}




/* Botones de orden (flechas) */
.btn-orden {
    background-color: #000000 !important; /* Fondo negro */
    color: #ffffff !important;           /* Flecha blanca */
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.2em;
    transition: background 0.3s;
}

.btn-orden:hover {
    background-color: #333333 !important; /* Gris oscuro al pasar el mouse */
}

/* Ajuste adicional para que el contenedor de botones de la imagen se vea bien */
.card-imagen div {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    justify-content: center;
}





.btn-cambiar-pass {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-cambiar-pass:hover {
    background-color: #5a6268;
}

#form-cambio-pass input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Importante para que el padding no desborde el ancho */
}



.btn-agregar {
    background-color: #28a745; /* Verde éxito */
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    padding: 15px 30px;
    border: none;
    border-radius: 50px; /* Bordes redondeados */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.3s;
}

.btn-agregar:hover {
    background-color: #218838;
    transform: scale(1.05); /* Efecto de aumento sutil */
}

.btn-agregar:active {
    transform: scale(0.95);
}




/* Contenedor del fondo */
#loader-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Por encima de todo */
}

/* El círculo que gira */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #28a745; /* Color verde como tu botón */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}



.btn-verde-puro {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-gris {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-verde-puro:hover { background-color: #218838; }
.btn-gris:hover { background-color: #5a6268; }




/* Botón flotante de WhatsApp */
.btn-whatsapp {
    position: fixed;
    bottom: 30px; /* Un poco más arriba */
    right: 30px;
    width: 80px;  /* Aumentado de 60px a 80px */
    height: 80px; /* Aumentado de 60px a 80px */
    z-index: 9999;
    transition: transform 0.3s ease;

}

.btn-whatsapp img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 5px 8px rgba(0,0,0,0.4));
}

.btn-whatsapp:hover {
    transform: scale(1.15);
}

/* Ajuste para móviles */
@media (max-width: 600px) {
    .btn-whatsapp {
        width: 70px;
        height: 70px;
        bottom: 20px;
        right: 20px;
    }
}









/* Contenedor principal */
#login-box.card {
    max-width: 380px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 20px; /* Bordes muy redondeados */
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); /* Sombra suave */
    border: none;
}

/* Logo arriba */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.img-logo-main {
    max-width: 350px;
    height: auto;
    border-radius: 12px;
}

/* Estilo de los inputs */
.form-moderno .input-group {
    margin-bottom: 15px;
}

.form-moderno input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px; /* Redondeado moderno */
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.form-moderno input:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Botón Ingresar */
.btn-login-moderno {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #1e293b; /* Color oscuro elegante */
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.btn-login-moderno:hover {
    background: #0f172a;
}

/* Enlace Registrarme */
.container-registro {
    text-align: center;
    margin-top: 20px;
}

.txt-registro {
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
}

.link-azul {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.link-azul:hover {
    text-decoration: underline;
}


.btn-azul {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}

.btn-azul:hover {
    background-color: #0056b3;
}





#admin-qr-img {
    transition: transform 0.2s;
    display: block;
    margin: 0 auto;
}

#admin-qr-img:hover {
    transform: scale(1.05); /* Efecto sutil de aumento al pasar el mouse */
}


#admin-qr-img-texto {
    color: #007bff; /* Azul */
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline; /* Opcional: para que parezca un link */
}

#admin-qr-img-texto:hover {
    color: #0056b3; /* Un azul más oscuro al pasar el mouse */
}



.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    display: none; /* Se controla con JS */
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

/* Evita que los inputs se peguen a los bordes dentro del modal */
.modal-content input {
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}


.hidden {
    display: none !important;
}



#btn-ver-pagina {
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
}

#btn-ver-pagina:hover {
    opacity: 0.9;
}





#modal-escanner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999; /* Asegúrate que sea muy alto */
    display: none; /* Se controla por JS */
    align-items: center;
    justify-content: center;
}



