/*
 * PIF Auth — estilos del login (alineado con paleta OEBBS).
 *
 * Paleta:
 *   - #1e3a8a  navy primario (sidebar Escala valorativa)
 *   - #0d6efd  azul interactivo (botones, links)
 *   - #0a2554  azul muy oscuro (texto destacado)
 *   - #cfe2ff  azul muy claro (highlight)
 *   - #f7f9fc  fondo sutil
 *   - #ffffff  blanco
 */

/* ============== Wrappers ============== */

.pif-auth-wrap,
.pif-gate-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    min-height: 60vh;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============== Card ============== */

.pif-auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 28px rgba(10, 37, 84, 0.12), 0 2px 6px rgba(10, 37, 84, 0.06);
    padding: 24px 22px 20px;
    border-top: 4px solid #1e3a8a;
}

.pif-auth-card-gate {
    max-width: 440px;
    padding: 28px 26px 22px;
}

/* ============== Brand ============== */

.pif-auth-brand {
    text-align: center;
    margin-bottom: 14px;
}

.pif-auth-brand-mark {
    display: inline-block;
    background: linear-gradient(135deg, #1e3a8a 0%, #0d6efd 100%);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 10px 22px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.pif-auth-brand-tag {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #5a6478;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============== Títulos ============== */

.pif-auth-title {
    color: #0a2554;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: center;
    line-height: 1.3;
}

.pif-auth-desc {
    color: #5a6478;
    font-size: 0.95rem;
    text-align: center;
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ============== Campos ============== */

.pif-auth-card .pif-field {
    margin-bottom: 14px;
}

.pif-auth-card .pif-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a2554;
    margin-bottom: 6px;
}

.pif-auth-card .pif-field input[type="email"],
.pif-auth-card .pif-field input[type="password"],
.pif-auth-card .pif-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #ffffff;
    color: #0a2554;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.pif-auth-card .pif-field input[type="email"]:focus,
.pif-auth-card .pif-field input[type="password"]:focus,
.pif-auth-card .pif-field input[type="text"]:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    outline: none;
}

.pif-auth-card .pif-field input::placeholder {
    color: #a8b1c0;
    font-size: 0.9rem;
}

/* ============== Recordar sesión ============== */

.pif-check-row {
    margin: 4px 0 14px;
}

.pif-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #5a6478;
    cursor: pointer;
    user-select: none;
}

.pif-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0d6efd;
    cursor: pointer;
}

/* ============== Botones ============== */

.pif-btn-row {
    margin-top: 4px;
}

.pif-btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.pif-btn-primary,
.pif-btn:not(.pif-btn-sec):not(.pif-btn-sm) {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #0d6efd 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.pif-btn-primary:hover,
.pif-btn:not(.pif-btn-sec):not(.pif-btn-sm):hover {
    background: linear-gradient(135deg, #0a2554 0%, #0d6efd 100%);
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.pif-btn-primary:active {
    transform: translateY(1px);
}

.pif-btn-sec {
    background: #f0f4f8;
    color: #0a2554;
    border: 1px solid #d0d7de;
}

.pif-btn-sec:hover {
    background: #e7eef5;
}

.pif-btn-sm {
    padding: 7px 14px;
    font-size: 0.85rem;
}

/* ============== Help / mensajes ============== */

.pif-auth-help {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
    text-align: center;
}

.pif-auth-help-text {
    font-size: 0.85rem;
    color: #5a6478;
    line-height: 1.55;
    margin: 0 0 6px;
}

.pif-auth-help-text strong {
    color: #0a2554;
}

.pif-auth-help-text-muted {
    font-size: 0.8rem;
    color: #8a93a4;
}

/* ============== Flashes ============== */

.pif-flash {
    width: 100%;
    max-width: 460px;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-align: center;
    box-sizing: border-box;
}

.pif-flash-ok {
    background: #d1f2dd;
    color: #155724;
    border: 1px solid #b3e5c2;
}

.pif-flash-err {
    background: #fde2e3;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.pif-flash-info {
    background: #cfe2ff;
    color: #0a2554;
    border: 1px solid #9ec5fe;
}

/* ============== Widget logged-in ============== */

.pif-auth-widget {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-left: 4px solid #1e3a8a;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(10, 37, 84, 0.04);
    max-width: 360px;
}

.pif-auth-widget p {
    margin: 0 0 4px;
    color: #0a2554;
}

.pif-auth-widget .pif-muted {
    color: #5a6478;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.pif-auth-widget form {
    margin-top: 10px;
}

.pif-auth-widget .pif-btn-sec {
    width: auto;
    background: #f0f4f8;
    color: #0a2554;
    border: 1px solid #d0d7de;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.pif-auth-widget .pif-btn-sec:hover {
    background: #e7eef5;
}

/* ============== Notice ============== */

.pif-notice {
    background: #f0f4f8;
    border-left: 4px solid #1e3a8a;
    padding: 12px 16px;
    color: #0a2554;
    border-radius: 4px;
}

/* ============== Cambiar clave (mensaje estático) ============== */

.pif-cambiar-clave-card {
    max-width: 560px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    border-top: 4px solid #1e3a8a;
    box-shadow: 0 6px 24px rgba(10, 37, 84, 0.10);
    padding: 28px 30px;
}

.pif-cambiar-clave-card h3 {
    color: #0a2554;
    font-size: 1.3rem;
    margin: 0 0 6px;
    font-weight: 700;
}

/* ============== Responsive ============== */

@media (max-width: 520px) {
    .pif-auth-card {
        padding: 24px 18px 20px;
        border-radius: 8px;
    }
    .pif-auth-title {
        font-size: 1.3rem;
    }
    .pif-auth-brand-mark {
        font-size: 1.2rem;
        padding: 8px 18px;
    }
}
