/* Estilo general del cuerpo de la página */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
}

/* Contenedor principal estilo "tarjeta" */
.container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

h1 {
    color: #1c1e21;
    margin-bottom: 1.5rem;
}

/* Estilo para el selector de ubicación */
select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #dddfe2;
    margin-bottom: 1.5rem;
}

/* Contenedor para los botones */
.button-group {
    display: flex;
    gap: 1rem;
}

/* Estilo base para los botones */
button {
    flex-grow: 1;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: scale(1.05);
}

/* Botón de Entrar (Verde) */
#btnEntrar {
    background-color: #42b72a;
}

/* Botón de Salir (Rojo) */
#btnSalir {
    background-color: #fa383e;
}

/* Párrafo para mostrar el estado */
#status {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #606770;
    min-height: 20px;
}
/* Estilos para el logo */
.logo-container {
    text-align: center; /* Centra la imagen dentro del contenedor */
    margin-bottom: 1.5rem; /* Espacio debajo del logo */
}

.logo-container img {
    max-width: 360px; /* Ajusta el tamaño máximo del logo */
    height: auto; /* Mantiene la proporción */
}

/* Ajustes específicos para el panel de administración */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas pequeñas */
    margin-bottom: 1rem;
}
/* Estilos para el cabecero del dashboard y admin panel */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.header h1 {
    margin: 0;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-actions img {
    max-width: 180px;
    height: auto;
}
/* Estilo para botones primarios (azules) */
.button-primary {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
}
/* --- REGLAS ESPECIALES PARA PANTALLAS PEQUEÑAS (MÓVILES) --- */
@media (max-width: 600px) {
    body {
        margin: 0; /* Elimina los márgenes exteriores en móviles */
    }

    .container {
        width: 100%;
        height: 100%;
        border-radius: 0; /* La tarjeta ocupa toda la pantalla */
        padding: 1.5rem;
        box-shadow: none;
    }

    /* Hacemos el texto de las tablas un poco más pequeño para que quepa */
    table, th, td {
        font-size: 0.8rem;
        padding: 8px 5px; /* Reducimos el espaciado interno */
    }
}

/* --- ESTILOS PARA EL NUEVO POPUP MODAL --- */

/* El fondo oscuro semitransparente */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* La ventana del popup */
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.modal-message {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.modal-close-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

/* Clases para mostrar/ocultar */
.modal-visible {
    opacity: 1;
    visibility: visible;
}

.modal-visible .modal-content {
    transform: scale(1);
}
