/* Pantallas de acceso / registro / recuperación (Merkur) */

.auth-lang-switch a.active {
    color: #0f172a;
    font-weight: 700;
}

.auth-page-heading {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.auth-page-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
}

.auth-page-header-row .auth-page-heading {
    margin: 0;
    flex: 1 1 auto;
    min-width: min(100%, 10rem);
    line-height: 1.25;
}

.auth-page-header-row .auth-lang-row {
    margin-bottom: 0;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .auth-page-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-page-header-row .auth-lang-row {
        justify-content: flex-end;
    }
}

.auth-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.auth-lang-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    color: #64748b;
}

.auth-form-card.card {
    border-radius: 0.75rem;
    border: 1px solid #e8edf3;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: 1.35rem 1.4rem 1.25rem;
}

.auth-form-card .form-group {
    margin-bottom: 1.1rem;
}

.auth-form-card .form-group > label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-form-card input[type="text"],
.auth-form-card input[type="email"],
.auth-form-card input[type="password"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.65rem 0.9rem;
    font-size: 0.9375rem;
    color: #0f172a;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-form-card input[type="text"]:hover,
.auth-form-card input[type="email"]:hover,
.auth-form-card input[type="password"]:hover {
    border-color: #cbd5e1;
}

.auth-form-card input[type="text"]:focus,
.auth-form-card input[type="email"]:focus,
.auth-form-card input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.auth-form-card .form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

.auth-form-card .auth-inline-error {
    margin-top: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #991b1b;
}

.auth-form-card .auth-inline-error[hidden] {
    display: none !important;
}

.auth-form-card .auth-inline-error ul {
    margin: 0;
    padding-left: 1.15rem;
}

.auth-form-card .auth-inline-error li {
    margin: 0.15rem 0;
}

.auth-form-card .auth-submit {
    margin-top: 1.25rem;
}

.auth-form-card .auth-submit .btn-primary {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.65rem;
    font-weight: 600;
}

.auth-form-card .auth-links {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #475569;
}

.auth-form-card .auth-links a {
    color: #475569;
}

.auth-form-card .auth-links a:hover {
    color: #2563eb;
}

.auth-form-card .auth-login-msg--error {
    margin: 0 0 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-form-card .auth-back-link {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-form-card .auth-back-link a {
    color: #475569;
}

.auth-form-card .auth-back-link a:hover {
    color: #2563eb;
}

.auth-alert-in-card {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

/* Registro: tipo de persona (chips) */
.auth-registro-form .reg-field__label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    color: #0f172a;
    margin-bottom: 0.65rem;
}

.auth-registro-form .reg-person-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-registro-form .reg-person-option {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: min(100%, 9.5rem);
    -webkit-tap-highlight-color: transparent;
}

.auth-registro-form .reg-person-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.auth-registro-form .reg-person-option__card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 3.35rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid #e2e8f0;
    background: #fafafa;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    pointer-events: none;
    user-select: none;
}

.auth-registro-form .reg-person-option__title {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
    color: #334155;
}

.auth-registro-form .reg-person-option__sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: #64748b;
    margin-top: 0.25rem;
}

.auth-registro-form .reg-person-option:hover .reg-person-option__card {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.auth-registro-form .reg-person-option input:focus-visible + .reg-person-option__card {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.auth-registro-form .reg-person-option input:checked + .reg-person-option__card {
    border-color: #2563eb;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
}

.auth-registro-form .reg-person-option input:checked + .reg-person-option__card .reg-person-option__title {
    color: #1e40af;
}

.auth-registro-form .reg-person-option input:checked + .reg-person-option__card .reg-person-option__sub {
    color: #3b82f6;
}
