/* ═══════════════════════════════════════════════════════════════
   CVEJob.com — Auth Pages (Login / Register)
   Premium glassmorphism + animated background
   ═══════════════════════════════════════════════════════════════ */

/* ─── Animated Background ──────────────────────────────────── */
.auth-wrapper {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
    overflow: hidden;
}

.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: authOrbFloat 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.auth-wrapper::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-600), transparent 70%);
    top: -10%;
    right: -5%;
    animation-duration: 10s;
}

.auth-wrapper::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-600), transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-duration: 12s;
    animation-delay: -4s;
}

/* Third orb via a child element */
.auth-bg-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
    background: radial-gradient(circle, var(--cyan-400), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: authOrbFloat 14s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes authOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -40px) scale(1.1); }
    50%      { transform: translate(-20px, 20px) scale(0.95); }
    75%      { transform: translate(15px, 35px) scale(1.05); }
}

/* ─── Grid Overlay (subtle) ────────────────────────────────── */
.auth-wrapper .auth-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ─── Auth Card ────────────────────────────────────────────── */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(99, 102, 241, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: authCardAppear 0.7s var(--ease-out) both;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-2xl);
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.3),
        transparent 40%,
        transparent 60%,
        rgba(236, 72, 153, 0.3)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes authCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Logo ─────────────────────────────────────────────────── */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.auth-logo .brand-icon {
    width: 48px;
    height: 48px;
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.auth-logo .brand-text {
    font-size: var(--text-2xl);
}

/* ─── Heading ──────────────────────────────────────────────── */
.auth-heading {
    text-align: center;
    margin-bottom: var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-subheading {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
}

/* ─── Form Overrides ───────────────────────────────────────── */
.auth-card .form-group {
    margin-bottom: var(--space-5);
}

.auth-card .form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.auth-card .form-input {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-default);
}

.auth-card .form-input:focus {
    border-color: var(--primary-500);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.15),
        0 0 20px rgba(99, 102, 241, 0.08);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.auth-card .form-input::placeholder {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ─── Submit Button ────────────────────────────────────────── */
.auth-submit {
    width: 100%;
    margin-top: var(--space-6);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: 700;
    border-radius: var(--radius-xl);
    letter-spacing: 0.01em;
    position: relative;
}

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

/* Loading state */
.auth-submit.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-submit.is-loading .btn-text {
    visibility: hidden;
}

.auth-submit.is-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ─── Divider ──────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

/* ─── Footer Link ──────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: var(--space-8);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-400);
    font-weight: 600;
    transition: all var(--duration-fast) var(--ease-default);
}

.auth-footer a:hover {
    color: var(--primary-300);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── Error State ──────────────────────────────────────────── */
.auth-card .form-input.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.auth-error {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    color: #ef4444;
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
    animation: slideDown 0.3s var(--ease-out);
}

/* ─── Password Strength Indicator ──────────────────────────── */
.password-strength {
    height: 3px;
    border-radius: 2px;
    background: var(--border-default);
    margin-top: var(--space-2);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s var(--ease-default), background 0.4s var(--ease-default);
    width: 0%;
}

.password-strength-bar.weak { width: 33%; background: var(--danger); }
.password-strength-bar.medium { width: 66%; background: var(--warning); }
.password-strength-bar.strong { width: 100%; background: var(--success); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: var(--space-6) var(--space-4);
        min-height: calc(100vh - 70px);
    }

    .auth-card {
        padding: var(--space-8) var(--space-6);
        border-radius: var(--radius-xl);
    }

    .auth-heading {
        font-size: var(--text-2xl);
    }

    .auth-wrapper::before {
        width: 300px;
        height: 300px;
    }

    .auth-wrapper::after {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: var(--space-6) var(--space-5);
    }
}
