/* ============================================================
   login.css – Estilos de la pantalla de login
   Suite de Herramientas de IA – Motorpress
   ============================================================ */

html,
body {
    height: 100%;
    background: var(--bg-base);
    overflow: hidden;
}

.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 56, 116, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(1, 153, 210, 0.04) 0%, transparent 70%),
        var(--bg-base);
    position: relative;
    overflow: hidden;
}

/* Fondo animado sutil */
.login-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 80px,
            rgba(0, 56, 116, 0.01) 80px,
            rgba(0, 56, 116, 0.01) 81px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 80px,
            rgba(0, 56, 116, 0.01) 80px,
            rgba(0, 56, 116, 0.01) 81px);
    pointer-events: none;
}

/* Card principal */
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        var(--shadow-lg),
        0 0 60px rgba(217, 119, 6, 0.08);
    position: relative;
    z-index: 1;
    animation: fadeUp 0.4s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Branding */
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.login-logo-mark {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow:
        0 0 30px rgba(217, 119, 6, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.login-brand-text h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.login-brand-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Headline */
.login-headline {
    margin-bottom: 24px;
}

.login-headline h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-headline p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Formulario */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form .form-control {
    height: 46px;
    font-size: 15px;
    padding-right: 48px;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
}

.password-toggle.visible {
    color: var(--accent);
}

.login-form .btn {
    width: 100%;
    height: 46px;
    font-size: 14.5px;
    justify-content: center;
    margin-top: 4px;
    position: relative;
}

.login-form .btn.loading::after {
    content: '';
    position: absolute;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Botón de volver al login (si se necesita en otros contextos) */
.login-back {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
}

.login-back:hover {
    text-decoration: underline;
}

/* Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }

    .login-headline h2 {
        font-size: 19px;
    }
}