:root {
    --color-primario: #0056b3;
    --color-oscuro: #004494;
    --fondo-cuerpo: #f0f4f8;
    --texto-principal: #333;
    --texto-suave: #666;
    --borde: #e1e4e8;
    --blanco: #ffffff;
    --rojo-error: #dc3545;
    --sombra-suave: 0 10px 40px rgba(0, 50, 100, 0.1);
    }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    }

body {
    background-color: var(--fondo-cuerpo);
    color: var(--texto-principal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 86, 179, 0.05) 0%, transparent 20%);
}

/* --- BARRA SUPERIOR --- */
.barra-superior {
    color: var(--blanco);
    padding: 0px 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #a9afb6;   
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.barra-superior img { 
    height: 100px;
    padding: 8px;
    border-radius: 6px;
}

.titulo-centro { 
    text-align: center;
    padding: 0 15px;
    color: var(--color-oscuro);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
        
.titulo-centro h1 { 
    font-size: 2rem;
    margin-bottom: 4px;
}

/* --- CONTENEDOR Y TARJETA --- */
.login-contenedor {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.login-tarjeta {
    background-color: var(--blanco);
    width: 100%;
    max-width: 450px; /* Un poco más compacta para elegancia */
    border-radius: 16px; /* Bordes más redondeados */
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 40px;
    transition: transform 0.3s ease;
}

.login-tarjeta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 50, 100, 0.15);
}

.login-tarjeta h2 {  
    font: 1.75rem arial;
    color: var(--color-primario); 
    margin-bottom: 25px; 
    text-align: center;
    font-weight: 700;
    position: relative;
}

/* Detalle decorativo debajo del título */
.login-tarjeta h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--color-primario);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* MENSAJE DE ERROR */
.error-msg {
    display: none; 
    background-color: #fde8e8;
    color: var(--rojo-error);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 5px solid var(--rojo-error);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-in-out;
}
.error-msg.visible { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FORMULARIO E INPUTS */
.login-formulario { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.caja-input { 
    display: flex; 
    flex-direction: column; 
    position: relative;
}

.caja-input label { 
    font-weight: 600; 
    margin-bottom: 8px; 
    color: var(--texto-principal);
    font-size: 0.95rem;
    margin-left: 2px;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eef0f5;
    background-color: #fcfcfc;
    border-radius: 10px;
    font-size: 1rem;
    color: #495057;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus { 
    border-color: var(--color-primario);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}
        
input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: #adb5bd;
}

/* BOTÓN */
.btn-login {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-oscuro) 100%);
    color: var(--blanco);
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-login:hover { 
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}
        
.btn-login:active {
    transform: translateY(1px);
}

/* --- NUEVO: RECUÉRDAME Y OLVIDÓ CONTRASEÑA --- */
.opciones-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px; /* separación desde el input de contraseña */
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--texto-suave);
}

.recuerdame {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    user-select: none;
}

.recuerdame input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primario); /* Color moderno para checkbox */
}

.olvido-pass {
    color: var(--color-primario);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.olvido-pass:hover {
    color: var(--color-oscuro);
    text-decoration: underline;
}


/* RESPONSIVE */
@media (max-width: 600px) {

    .barra-superior {
        flex-wrap: wrap; 
        justify-content: center; 
        padding: 15px 10px; 
    }

    .logo-izq { order: 1; margin-right: auto; }
    .logo-der { order: 2; margin-left: auto; }

    .titulo-centro {
        order: 3; 
        width: 100%; 
        margin-top: 10px; 
    }

    .barra-superior img { height: 60px; }
    .titulo-centro h1 { font-size: 1.3rem; }
    .titulo-centro p { font-size: 0.9rem; }
            
    .login-tarjeta { 
        padding: 25px; 
        border-radius: 12px;
        box-shadow: none; /* Más limpio en móvil */
        border: 1px solid var(--borde);
    }
            
    .login-contenedor {
        padding: 15px;
        align-items: flex-start; /* Sube un poco el form en móviles */
        padding-top: 40px;
    }
            
    .btn-login {
        padding: 14px;
    }
    
}

/*Estilos modal*/
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}


.btn-cerrar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}





   