/**
 * Autenticación — login minimalista y profesional
 */
body.hif-app.hif-guest-body.hif-auth-pro {
    padding-top: 0;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: #eef2f6;
}

body.hif-auth-pro .hif-portal-header.hif-guest-header {
    display: none !important;
}

.hif-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    background: #F8FAFC;
}

.hif-auth-page__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

.hif-auth-page__logo {
    display: block;
    height: auto;
    max-height: 72px;
    width: auto;
    max-width: min(280px, 85vw);
    object-fit: contain;
    margin: 0 auto 0.65rem;
}

.hif-auth-page__logo-fallback {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0B4F6C;
    margin-bottom: 0.65rem;
    letter-spacing: 0.04em;
}

.hif-auth-page__logo-fallback,
.hif-institution-logo-fallback {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0B4F6C;
}

.hif-auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 12px 32px rgba(15, 61, 94, 0.08);
    padding: 2rem 1.75rem 1.75rem;
    color: #0f172a;
}

.hif-auth-card__context {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 0.5rem;
}

.hif-auth-card__title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 1.5rem;
    line-height: 1.25;
}

.hif-auth-card__body {
    padding: 0;
}

.hif-auth-field .form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #475569;
    margin-bottom: 0.35rem;
}

.hif-auth-field .form-control {
    border-radius: 0.5rem;
    border-color: #cbd5e1;
    padding: 0.6rem 0.85rem;
    font-size: 0.9375rem;
    min-height: 2.75rem;
}

.hif-auth-field .form-control:focus {
    border-color: #1f7db3;
    box-shadow: 0 0 0 3px rgba(31, 125, 179, 0.12);
}

.hif-auth-field .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.hif-auth-field .input-group .btn-outline-secondary {
    border-color: #cbd5e1;
    color: #64748b;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.hif-auth-submit {
    min-height: 2.75rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    background: #0f3d5e;
    border: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.hif-auth-submit:hover,
.hif-auth-submit:focus {
    background: #134a6e;
    box-shadow: 0 4px 12px rgba(15, 61, 94, 0.25);
}

.hif-auth-token-input {
    font-size: 1.375rem !important;
    font-weight: 600;
    letter-spacing: 0.4em !important;
    text-align: center;
    padding: 0.7rem !important;
    font-variant-numeric: tabular-nums;
}

.hif-auth-note {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

.hif-auth-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hif-auth-links a {
    color: #1f7db3;
    font-weight: 500;
    font-size: 0.8125rem;
    text-decoration: none;
}

.hif-auth-links a:hover {
    color: #0B4F6C;
    text-decoration: underline;
}

.hif-auth-links--row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.5rem;
}

.hif-auth-links--row .hif-auth-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
    user-select: none;
}

.hif-auth-page__footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

body.hif-auth-pro .form-check-label {
    font-size: 0.875rem;
    color: #475569;
}

body.hif-auth-pro .alert {
    font-size: 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .hif-auth-card {
        padding: 1.5rem 1.25rem 1.35rem;
    }

    .hif-auth-card__title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
}
