/* ====================================================================
   Auth pages — estilo unificado tipo menudeo (joinet.com /mi-cuenta/)
   Cubre: login, registro, recuperar-password, restablecer-password,
          activar-cuenta.
   Usa el header/footer del sitio (NavbarView/FooterView). Esta hoja
   solo estiliza el card central y los formularios.
   ==================================================================== */

.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 16px;
    background: #f7f7f8;
}

.auth-card {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 44px;
    box-sizing: border-box;
}

.auth-card.auth-card--wide { max-width: 880px; }

.auth-header { text-align: center; margin-bottom: 28px; }

.auth-title {
    color: #dc2626;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.auth-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.auth-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-form-group { display: flex; flex-direction: column; gap: 6px; }

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-label {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}
.auth-label .required { color: #dc2626; margin-left: 2px; }

.auth-input,
.auth-select {
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 15px;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease;
    font-family: inherit;
}

.auth-input::placeholder { color: #9ca3af; }

.auth-input:focus,
.auth-select:focus {
    outline: none;
    border-color: #dc2626;
    background: #fff;
}

.auth-input:disabled { opacity: .7; cursor: not-allowed; }

/* Checkbox / opciones */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
    user-select: none;
    cursor: pointer;
}
.auth-remember input[type=checkbox] {
    width: 16px; height: 16px; accent-color: #dc2626;
}

.auth-link {
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }

/* Botón principal */
.auth-btn {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background .15s ease, transform .05s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    font-family: inherit;
}
.auth-btn:hover { background: #b91c1c; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

.auth-btn--dark { background: #111827; }
.auth-btn--dark:hover { background: #000; }

/* Divider con texto centrado */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 13px;
    margin: 18px 0 12px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-secondary {
    text-align: center;
    margin-top: 10px;
}

/* Alerts */
.auth-alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-alert--error  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert--success{ background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert--info   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Captcha visual */
.auth-captcha {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 14px;
}
.auth-captcha-question {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}
.auth-captcha input {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    width: 80px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}
.auth-captcha input:focus { outline: none; border-color: #dc2626; }
.auth-captcha-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sección de registro multi-grupo */
.auth-section {
    border-top: 1px solid #f3f4f6;
    padding-top: 22px;
    margin-top: 22px;
}
.auth-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.auth-section-title {
    color: #dc2626;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Volver al login link */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
}
.auth-back:hover { color: #dc2626; }

/* Responsive */
@media (max-width: 600px) {
    .auth-page { padding: 32px 12px; }
    .auth-card { padding: 32px 22px; border-radius: 12px; }
    .auth-title { font-size: 24px; }
    .auth-form-row { grid-template-columns: 1fr; }
}
