:root {
    --color-primario: #9b111e;
    --color-secundario: #1a1a1a;
    --color-texto: #333;
    --color-fondo: #f8f9fa;
    --shadow: 0 4px 10px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; 
}

.parteArriba {
    flex: 0 0 60px; 
    background-color: var(--color-primario);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo-arriba {
    height: 45px;
}

.btn-contacto-arriba {
    background-color: white;
    color: var(--color-primario);
    padding: 6px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.contenedor-login {
    flex: 1; 
    display: flex;
}

.login-izquierdo {
    flex: 1.2; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

/* AQUÍ HEMOS HECHO EL CUADRO MÁS PEQUEÑO */
.caja-login {
    width: 100%;
    max-width: 320px; /* Antes estaba en 380px */
    padding: 25px; /* Antes estaba en 30px */
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid #eee;
}

.logo-formulario {
    height: 45px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--color-secundario);
}

.subtitulo {
    font-size: 13px;
    margin-bottom: 20px;
    color: #666;
}

.grupo-input {
    margin-bottom: 15px;
}

.grupo-input label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.grupo-input input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: #f4f7fb;
}

.grupo-input input:focus {
    outline: none;
    border-color: var(--color-primario);
    background-color: white;
}

.contenedor-password {
    position: relative;
    display: flex;
    align-items: center;
}

.contenedor-password input {
    padding-right: 40px; 
}

.btn-ojo {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.3s ease;
}

.btn-ojo:hover {
    color: var(--color-primario);
}

.btn-ojo:focus {
    outline: none;
    color: var(--color-primario);
}

.opciones-formulario {
    margin-bottom: 20px;
}

.enlace-recuperar {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
}

.btn-enviar {
    width: 100%;
    padding: 12px;
    background-color: var(--color-primario);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.login-derecho {
    flex: 0.8; 
    position: relative;
    background: url('../img/edificio.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capa-superpuesta {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(155, 17, 30, 0.6); 
}

.contenido-derecho {
    position: relative;
    z-index: 2;
}

.logo-grande-fondo {
    width: 150px; 
    opacity: 0.7;
}

.contacto-inferior {
    flex: 0 0 240px; 
    background-color: #f4f4f4;
    padding: 25px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.texto-contacto {
    flex: 0.8;
}

.texto-contacto h2 {
    font-size: 20px;
    color: var(--color-secundario);
    margin-bottom: 8px;
}

.texto-contacto p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.detalles-contacto {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px; 
}

.item-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #007bff;
}

.item-info a {
    color: #007bff;
    text-decoration: none;
}

.espacio-mapa {
    flex: 1.5; 
    display: flex;
    justify-content: flex-end;
    height: 100%;
}

.caja-mapa {
    width: 100%;
    max-width: 500px; 
    height: 100%; 
    min-height: 180px;
    background-color: #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.caja-mapa iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.pie-principal {
    flex: 0 0 30px;
    background-color: var(--color-primario);
    color: white;
    text-align: center;
    line-height: 30px; 
    font-size: 10px;
    letter-spacing: 0.5px;
}

@media (max-height: 750px) {
    body {
        height: auto;
        overflow: auto; 
    }
    .contenedor-login {
        min-height: 450px;
    }
}
/* =========================================================================
   Añadidos Zona Privada V3 (no forman parte del prototipo new1):
   mensajes de la API en la pantalla de login.
   ========================================================================= */

.mensaje-login {
    margin: 12px 0 4px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.mensaje-error {
    background-color: #fdecea;
    color: #8a1621;
    border: 1px solid #f5c2c7;
}

.mensaje-aviso {
    background-color: #fff8e1;
    color: #7a5c00;
    border: 1px solid #ffe08a;
}

.btn-enviar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
