/**
 * Pantallas públicas del portal agencia (login, registro de recuperación).
 * Prefijo auth- para no chocar con .logo, .card, body, etc. de agency.css
 */
@import url('../../css/design-tokens.css');

.auth-portal {
    font-family: var(--font-ui), var(--font-body), system-ui, sans-serif;
    background: linear-gradient(135deg, var(--brand-light) 0%, #e8eef5 100%);
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--brand-dark);
    box-sizing: border-box;
}

.auth-portal *,
.auth-portal *::before,
.auth-portal *::after {
    box-sizing: border-box;
}

.auth-portal .auth-lang {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.auth-portal .auth-lang a {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.auth-portal .auth-lang a:hover:not(.active) {
    color: #00d9d9;
}

.auth-portal .auth-lang a.active {
    background: #0a2540;
    color: #fff;
}

.auth-portal .auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.auth-portal .auth-card-header {
    padding: 2rem 2rem 1.25rem;
    text-align: center;
}

.auth-portal .auth-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0;
    min-height: 60px;
}

.auth-portal .auth-brand img {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.auth-portal .auth-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a2540;
    letter-spacing: -0.02em;
}

.auth-portal .auth-body {
    padding: 0 2rem 2rem;
}

.auth-portal .auth-intro {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 1.5rem;
}

.auth-portal .auth-alert {
    padding: 1rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-portal .auth-alert--error {
    background: #fee2e2;
    color: #991b1b;
}

.auth-portal .auth-alert--success {
    background: #dcfce7;
    color: #166534;
}

/* Pista bajo el campo: siempre dentro del .form-group, sin márgenes negativos */
.auth-portal .auth-form-hint {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.auth-portal .form-group {
    margin-bottom: 1.35rem;
}

.auth-portal .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.auth-portal .auth-forgot-row {
    text-align: right;
    margin: -0.15rem 0 1.35rem;
    font-size: 0.9rem;
}

.auth-portal .auth-forgot-row a {
    color: #0a2540;
    font-weight: 600;
    text-decoration: none;
}

.auth-portal .auth-forgot-row a:hover {
    text-decoration: underline;
    color: #00a8a8;
}

.auth-portal .auth-stack-link {
    display: block;
    text-align: center;
    margin-top: 1.15rem;
    color: #64748b;
    font-size: 0.9rem;
    text-decoration: none;
}

.auth-portal .auth-stack-link:hover {
    text-decoration: underline;
    color: #0a2540;
}

.auth-portal .auth-stack-link + .auth-stack-link {
    margin-top: 0.65rem;
}

.auth-portal .auth-register {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-portal .auth-register a {
    color: #0a2540;
    font-weight: 600;
    text-decoration: none;
}

.auth-portal .auth-register a:hover {
    text-decoration: underline;
}

.auth-portal .btn-primary {
    width: 100%;
}

@media (max-width: 480px) {
    .auth-portal {
        padding: 1.25rem;
        align-items: flex-start;
        padding-top: 4rem;
    }

    .auth-portal .auth-lang {
        top: 1rem;
        right: 1rem;
    }

    .auth-portal .auth-card-header,
    .auth-portal .auth-body {
        padding-left: 1.35rem;
        padding-right: 1.35rem;
    }
}
