/* ═══════════════════════════════════════════════════════════
   ZynapseLead — Auth Pages (Login / Register)
   Dark split layout — matches landing + dashboard
   ═══════════════════════════════════════════════════════════ */

:root {
    --auth-primary: var(--brand-primary, #00D4FF);
    --auth-accent: var(--brand-accent, #00FF87);
    --auth-cta: var(--brand-cta, #FF6B2B);
    --auth-danger: #EF4444;
    --auth-dark: var(--brand-dark);
    --auth-dark-mid: var(--brand-dark-mid);
    --auth-dark-light: var(--brand-dark-light);
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-muted: var(--brand-muted);
    --auth-text: var(--brand-text);
    --auth-font: 'Inter', sans-serif;
    --auth-display: 'Space Grotesk', sans-serif;
    --auth-mono: 'JetBrains Mono', monospace;
    --auth-radius: 12px;
    --auth-hero-w: 46%;
}

*, *::before, *::after { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: var(--auth-font);
    background: var(--auth-dark);
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body.auth-body h1,
body.auth-body h2,
body.auth-body h3 {
    font-family: var(--auth-display);
    color: #fff;
}

.auth-page {
    display: flex;
    min-height: 100vh;
}

/* ── Hero panel ─────────────────────────────────────── */
.auth-hero {
    display: none;
    width: var(--auth-hero-w);
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--brand-dark-deep) 0%, var(--brand-dark) 40%, var(--brand-dark-mid) 100%);
    border-right: 1px solid var(--auth-border);
    padding: 48px 40px;
}

@media (min-width: 992px) {
    .auth-hero { display: flex; flex-direction: column; justify-content: center; }
}

.auth-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.auth-hero-glow--cyan {
    width: 320px; height: 320px;
    top: -80px; left: -80px;
    background: rgba(var(--brand-primary-rgb), 0.12);
}
.auth-hero-glow--green {
    width: 280px; height: 280px;
    bottom: -60px; right: -40px;
    background: rgba(var(--brand-accent-rgb), 0.08);
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.auth-hero-inner > .brand-logo {
    margin-bottom: 2rem;
    align-self: flex-start;
}

.auth-mobile-logo {
    margin-bottom: 1.25rem;
}

.auth-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 40px;
}
.auth-logo-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--brand-gradient-icon);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--auth-primary);
    font-size: 18px;
}
.auth-logo-text {
    font-family: var(--auth-display);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
}
.auth-logo-text span { color: var(--auth-primary); }

.auth-mockup {
    background: rgba(13, 32, 64, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.auth-mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.auth-mockup-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--auth-muted);
}
.auth-mockup-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--auth-accent);
    animation: auth-pulse 2s ease infinite;
}
@keyframes auth-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.auth-mockup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.auth-mockup-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    padding: 8px 10px;
}
.auth-mockup-stat small { font-size: 10px; color: var(--auth-muted); display: block; }
.auth-mockup-stat strong { font-family: var(--auth-display); font-size: 14px; color: var(--auth-primary); }
.auth-mockup-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 64px;
}
.auth-mockup-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(to top, rgba(0,212,255,0.25), var(--auth-primary));
    animation: auth-bar-grow 1.2s ease backwards;
}
@keyframes auth-bar-grow {
    from { height: 0 !important; }
}
.auth-mockup-bar:nth-child(1) { animation-delay: 0.1s; }
.auth-mockup-bar:nth-child(2) { animation-delay: 0.2s; }
.auth-mockup-bar:nth-child(3) { animation-delay: 0.3s; }
.auth-mockup-bar:nth-child(4) { animation-delay: 0.4s; }
.auth-mockup-bar:nth-child(5) { animation-delay: 0.5s; }
.auth-mockup-bar:nth-child(6) { animation-delay: 0.6s; }
.auth-mockup-bar:nth-child(7) { animation-delay: 0.7s; }
.auth-mockup-bar:nth-child(8) { animation-delay: 0.8s; }

.auth-social-proof {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.auth-avatars {
    display: flex;
}
.auth-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--auth-dark);
    margin-left: -8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
}
.auth-avatar:first-child { margin-left: 0; }
.auth-avatar--1 { background: var(--auth-primary); color: var(--auth-dark); }
.auth-avatar--2 { background: var(--auth-cta); color: #fff; }
.auth-avatar--3 { background: var(--auth-accent); color: var(--auth-dark); }

.auth-hero-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
}
.auth-hero-subtitle {
    font-size: 15px;
    color: var(--auth-muted);
    line-height: 1.65;
    margin: 0;
}
.auth-hero-features {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}
.auth-hero-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--auth-text);
    margin-bottom: 10px;
}
.auth-hero-features li i {
    color: var(--auth-accent);
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Form panel ─────────────────────────────────────── */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--auth-dark);
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 576px) {
    .auth-form-wrap { padding: 48px 32px; }
}

.auth-mobile-logo {
    display: flex;
    margin-bottom: 32px;
}
@media (min-width: 992px) {
    .auth-mobile-logo { display: none; }
}

.auth-card-head {
    margin-bottom: 28px;
}
.auth-card-head h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.auth-card-head p {
    font-size: 14px;
    color: var(--auth-muted);
    margin: 0;
    line-height: 1.6;
}

.auth-alert {
    border-radius: var(--auth-radius);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid;
}
.auth-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
.auth-alert--success {
    background: rgba(0, 255, 135, 0.08);
    border-color: rgba(0, 255, 135, 0.2);
    color: var(--auth-accent);
}

.auth-field { margin-bottom: 18px; }
.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--auth-muted);
    margin-bottom: 8px;
}
.auth-input-wrap { position: relative; }
.auth-input {
    width: 100%;
    background: var(--auth-dark-light);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    color: var(--auth-text);
    font-family: var(--auth-font);
    font-size: 14px;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}
.auth-input::placeholder { color: rgba(138, 155, 176, 0.5); }
.auth-input.is-invalid { border-color: var(--auth-danger); }
.auth-input-wrap .auth-input { padding-right: 48px; }
.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-muted);
    padding: 4px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.auth-toggle-pw:hover { color: var(--auth-primary); }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
}
.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}
.auth-check input {
    width: 16px; height: 16px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}
.auth-link {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-link:hover { color: var(--auth-accent); }

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--auth-radius);
    font-family: var(--auth-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn--primary {
    background: var(--auth-cta);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 107, 43, 0.3);
}
.auth-btn--primary:hover {
    background: #e55a20;
    box-shadow: 0 10px 28px rgba(255, 107, 43, 0.4);
    color: #fff;
}
.auth-btn--cyan {
    background: var(--auth-primary);
    color: var(--auth-dark);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
}
.auth-btn--cyan:hover {
    background: #00bde8;
    color: var(--auth-dark);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 400px) {
    .auth-social-grid { grid-template-columns: 1fr; }
}
.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.auth-social-btn:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.06);
    color: #fff;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-muted);
}
.auth-switch a { font-weight: 700; }

.auth-strength {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    margin-top: 8px;
    overflow: hidden;
}
.auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.3s, background 0.3s;
}
.auth-strength-label {
    font-size: 11px;
    color: var(--auth-muted);
    margin-top: 4px;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--auth-muted);
    line-height: 1.5;
    margin: 16px 0;
    cursor: pointer;
}
.auth-terms input { margin-top: 3px; accent-color: var(--auth-primary); flex-shrink: 0; }
.auth-terms a { color: var(--auth-primary); font-weight: 600; }

.auth-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--auth-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--auth-muted);
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.auth-footer a {
    color: var(--auth-muted);
    text-decoration: none;
}
.auth-footer a:hover { color: var(--auth-primary); }
.auth-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-accent);
    font-weight: 500;
}
.auth-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--auth-accent);
}

/* Background grid on form side */
.auth-main::before {
    content: '';
    position: fixed;
    inset: 0;
    left: var(--auth-hero-w);
    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: 48px 48px;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 991.98px) {
    .auth-main::before { left: 0; }
}
.auth-form-wrap,
.auth-footer { position: relative; z-index: 1; }
