/* CONFIGURACIÓN GLOBAL */
* {
    box-sizing: border-box; /* Evita que el padding rompa el ancho */
}

body {
    background: radial-gradient(circle, #0d1b2a 0%, #000814 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh; /* Cambio de height a min-height para que crezca */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px; /* Espacio de seguridad para móviles */
}

/* Pantalla de Carga */
#splash {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #0d1b2a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.5s ease;
}

/* Contenedor Login y Tarjetas del Sistema */
.login-card, .container-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 20px;
    width: 100%; /* Por defecto ocupa el ancho disponible */
    max-width: 400px; /* Límite para que no se vea gigante en PC */
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Botones Principales */
.btn-ingresar {
    background-color: #001d3d;
    color: white;
    border: none;
    padding: 12px; /* Un poco más alto para facilitar el toque en móvil */
    width: 100%;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.btn-recuperar {
    color: #00a8e8;
    text-decoration: none;
    font-style: italic;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 10px;
}

/* --- SECCIÓN RESPONSIVE --- */

@media (max-width: 768px) {
    body {
        /* En páginas de contenido largo, alineamos al inicio */
        align-items: flex-start; 
        padding-top: 40px;
    }

    .login-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    /* Manejo de Tablas de GuíaLex para que no se desborden */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        margin-bottom: 1rem;
        background: white;
        border-radius: 8px;
    }

    /* Inputs más grandes en móvil para evitar el zoom de iOS */
    input, select {
        font-size: 16px !important;
        padding: 10px !important;
    }
}

/* Ajuste opcional para páginas de administración (más anchas que el login) */
.admin-panel {
    max-width: 1000px;
    width: 95%;
}