/**
 * Login, Recuperación y Restablecimiento de Contraseña
 * Mundo Sostenible - 100% Touch & Responsive (1600px max)
 */

/* Contenedor principal de página de autenticación */
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: radial-gradient(circle at top right, rgba(195, 214, 0, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.03), transparent 50%),
                var(--bg-page, #f8fafc);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c3d600 0%, #a2b300 100%);
}

/* Cabecera de la tarjeta */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
    touch-action: manipulation;
}

.auth-logo-link:hover {
    transform: scale(1.03);
}

.auth-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-muted, #64748b);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.45;
}

/* Formulario y campos táctiles (48px+) */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
}

.auth-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px 12px 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main, #0f172a);
    background-color: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    touch-action: manipulation;
}

.auth-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.auth-input:focus ~ .auth-input-icon {
    color: #111827;
}

/* Botón táctil para mostrar/ocultar contraseña (Ojo) */
.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.05rem;
    padding: 10px 12px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    touch-action: manipulation;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password-btn:hover {
    color: #0f172a;
    background-color: #e2e8f0;
}

/* Botón principal de autenticación */
.auth-submit-btn {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}

.auth-submit-btn:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.25);
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Enlace a recuperar contraseña */
.auth-recovery-box {
    text-align: center;
    margin-top: 4px;
}

.auth-recovery-link {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    min-height: 42px;
    transition: color 0.2s ease, background-color 0.2s ease;
    touch-action: manipulation;
}

.auth-recovery-link i {
    color: #94a3b8;
    font-size: 0.85rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-recovery-link:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

.auth-recovery-link:hover i {
    color: var(--primary, #c3d600);
    transform: rotate(-15deg);
}

/* Pie de tarjeta (Volver / Enlaces secundarios) */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-back-link {
    font-size: 0.86rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
}

.auth-back-link:hover {
    color: #0f172a;
    background: #f8fafc;
}

/* Alertas táctiles de login */
.auth-alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 22px;
        border-radius: 16px;
    }
    .auth-title {
        font-size: 1.4rem;
    }
}
