/* ============================================================
   AUTH PAGES — login / register / forgot-password
   Same particle bg as landing, centered glass card.
   ============================================================ */

.auth-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--z-nav);
    padding: var(--space-s) var(--pad-inline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    background: rgba(8, 9, 13, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(96px, 12vh, 130px) var(--pad-inline) var(--space-xl);
    position: relative;
    z-index: var(--z-content);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-l);
    box-shadow: var(--shadow-lg), var(--glow);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.auth-head { text-align: center; margin-bottom: var(--space-m); }
.auth-head .kicker { margin-bottom: var(--space-2xs); }
.auth-title {
    font-size: var(--fs-h3);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3xs);
}
.auth-head p {
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}
.auth-form .field { gap: var(--space-3xs); }
.auth-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: var(--space-s);
}

/* Submit row */
.auth-submit { margin-top: var(--space-2xs); }

/* Footer links */
.auth-footer {
    margin-top: var(--space-m);
    padding-top: var(--space-s);
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    flex-wrap: wrap;
    font-size: var(--fs-sm);
    color: var(--text-dim);
}
.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer .divider { color: var(--text-faint); }

/* Password strength meter */
.pw-meter {
    margin-top: 6px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
}
.pw-meter-bar {
    height: 100%;
    width: 0%;
    background: var(--danger);
    border-radius: 100px;
    transition: width var(--dur-base) var(--ease), background var(--dur-base);
}
.pw-meter-bar.s-2 { background: #fb923c; }
.pw-meter-bar.s-3 { background: var(--warning); }
.pw-meter-bar.s-4 { background: var(--info); }
.pw-meter-bar.s-5 { background: var(--success); }
.pw-meter-text {
    margin-top: 4px;
    font-size: var(--fs-xs);
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* OTP boxes — 6 digit inputs */
.otp-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.otp-input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: 700;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color var(--dur-fast), background var(--dur-fast);
}
.otp-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(172, 205, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(172, 205, 255, 0.12);
}
.otp-input.filled {
    border-color: var(--accent);
    color: var(--accent-bright);
}

.otp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-xs);
    color: var(--text-dim);
    margin-top: var(--space-2xs);
}
.otp-resend {
    color: var(--accent);
    background: none;
    border: 0;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    padding: 4px 0;
}
.otp-resend:disabled {
    color: var(--text-dim);
    cursor: not-allowed;
}

/* Inline button spinner (loading state) */
.btn .btn-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    opacity: 0.7;
}

/* Cloudflare Turnstile captcha widget — Round 3.
   Centered above the submit button in every auth form. */
.cf-turnstile-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xs);
}
.cf-turnstile { min-height: 65px; }    /* avoid layout shift while loading */

/* Demo credentials hint */
.demo-hint {
    margin-top: var(--space-s);
    padding: 0.5rem 0.75rem;
    background: rgba(34, 211, 238, 0.06);
    border: 1px dashed rgba(34, 211, 238, 0.3);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--info);
    text-align: center;
    line-height: 1.5;
}
