/* ===========================================
   auth.css  —  Estilos compartidos de
   login.php, set_password.php,
   nueva_clave.php, recuperar.php
   =========================================== */

:root {
    --azul:   #2A3172;
    --rojo:   #B11D23;
    --gris-bg:#f4f4f4;
}

body {
    background: var(--gris-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Tarjeta base */
.auth-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 350px;
    text-align: center;
    border-top: 5px solid var(--azul);
}

/* Modificadores por pantalla */
.auth-card--login    { border-top-color: var(--rojo); }
.auth-card--recover  { border-top-color: var(--azul); }
.auth-card--newpass  { border-top-color: var(--azul); }
.auth-card--setpass  { background: #fff; border-top-color: var(--rojo); }
.auth-card--setpass-bg { background: var(--azul); } /* el body de set_password tiene fondo azul oscuro */

/* Logo circular */
.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    border: 3px solid var(--azul);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.logo-container--small { width: 100px; height: 100px; }
.logo-container--red   { border-color: var(--rojo); }
.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tipografía */
.auth-card h2,
.auth-card h3 {
    color: var(--azul);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: 1px;
}
.auth-card h2 { font-size: 1.4rem; margin-bottom: 25px; }
.auth-card p  { color: #555; font-size: 0.9rem; margin-bottom: 25px; line-height: 1.4; }

/* Inputs */
.auth-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}
.auth-card input:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 5px rgba(42, 49, 114, 0.2);
}

/* Botón principal */
.auth-card button,
.auth-card .btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: var(--azul);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.1s ease;
}
.auth-card button:hover,
.auth-card .btn:hover {
    background: var(--rojo);
    transform: translateY(-2px);
}
/* Variante de botón rojo (set_password y nueva_clave usan rojo en lugar de azul) */
.auth-card button.btn--red,
.auth-card .btn--red {
    background: var(--rojo);
}
.auth-card button.btn--red:hover,
.auth-card .btn--red:hover { background: #8a161b; }

/* Enlaces */
.forgot-password,
.back-link {
    display: block;
    margin-top: 20px;
    color: var(--azul);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s ease;
}
.forgot-password:hover,
.back-link:hover {
    color: var(--rojo);
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-align: center;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Texto pequeño bajo inputs */
.pwd-hint {
    color: #666;
    font-size: 0.78rem;
    margin: -5px 0 10px;
}

/* Mensaje de éxito grande (set_password) */
.success-msg { color: #28a745; font-weight: bold; }

/* Pie de marca */
.brand-footer {
    margin-top: 25px;
    color: #a0aec0;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}
.brand-footer--light { color: #b8c0e0; }