/* ═══════════════════════════════════════════════════
   OppEngine Auth Pages — Shared Design System
   ═══════════════════════════════════════════════════ */

/* ─── Tokens ──────────────────────────────────────── */
:root {
    --bg: #030308;
    --bg-panel: rgba(8, 8, 20, 0.8);
    --bg-form: rgba(12, 12, 28, 0.95);
    --bg-input: rgba(255,255,255,0.04);
    --bg-input-focus: rgba(59,130,246,0.06);
    --border: rgba(255,255,255,0.07);
    --border-focus: rgba(59,130,246,0.5);
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-faint: #475569;
    --accent: #3B82F6;
    --accent-glow: rgba(59,130,246,0.2);
    --purple: #8B5CF6;
    --green: #10B981;
    --amber: #F59E0B;
    --red: #EF4444;
    --font: 'Inter', sans-serif;
    --display: 'Outfit', sans-serif;
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius: 12px;
    --input-h: 50px;
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* ─── Background ──────────────────────────────────── */
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    pointer-events: none;
}
.blob-1 { width: 700px; height: 700px; background: var(--accent); top: -200px; left: -200px; animation: blobPulse 14s ease-in-out infinite; }
.blob-2 { width: 500px; height: 500px; background: var(--purple); bottom: -100px; right: -100px; animation: blobPulse 18s ease-in-out infinite reverse; }
.blob-3 { width: 400px; height: 400px; background: var(--green); top: 40%; left: 40%; animation: blobPulse 11s ease-in-out infinite 3s; }
@keyframes blobPulse {
    0%,100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.1); opacity: 0.18; }
}
.auth-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}

/* ─── Layout ──────────────────────────────────────── */
.auth-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── LEFT panel ──────────────────────────────────── */
.auth-left {
    background: var(--bg-panel);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--border);
    padding: 40px 52px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 52px;
}
.logo-icon { color: var(--accent); font-size: 18px; filter: drop-shadow(0 0 8px rgba(59,130,246,0.6)); }
.auth-left-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.auth-tagline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 28px;
    width: fit-content;
}
.live-dot {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.auth-left-title {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 36px;
    background: linear-gradient(135deg, var(--text) 60%, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stat row */
.auth-stats-row { display: flex; gap: 28px; margin-bottom: 36px; }
.auth-stat-num {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 4px;
}
.auth-stat-label { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Ticker */
.auth-ticker {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 28px;
}
.ticker-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.ticker-items { display: flex; flex-direction: column; gap: 10px; }
.ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}
.ticker-item:hover { background: rgba(255,255,255,0.04); border-color: rgba(59,130,246,0.15); }
.ticker-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.8px; color: var(--accent); margin-bottom: 3px; }
.ticker-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ticker-score {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.score-high { border: 2px solid rgba(16,185,129,0.4); color: var(--green); }
.score-med { border: 2px solid rgba(59,130,246,0.4); color: var(--accent); }
.score-new {
    font-size: 9px; letter-spacing: 0.5px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.3);
    color: var(--purple);
    width: auto; height: auto;
    padding: 4px 8px;
    border-radius: 99px;
    font-weight: 700;
}

/* Testimonial */
.auth-testimonial {
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
}
.auth-testi-text {
    font-size: 13px;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}
.auth-testi-author { display: flex; align-items: center; gap: 10px; }
.auth-testi-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
    font-family: var(--display);
    flex-shrink: 0;
}
.auth-testi-name { font-weight: 700; font-size: 13px; }
.auth-testi-role { font-size: 11px; color: var(--text-faint); }

/* ─── RIGHT panel ─────────────────────────────────── */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    overflow-y: auto;
}
.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}
.auth-form-header { margin-bottom: 32px; }
.auth-form-title {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.auth-form-sub { font-size: 14px; color: var(--text-muted); }

/* Social auth */
.auth-social-btns { display: flex; gap: 10px; margin-bottom: 20px; }
.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s var(--ease);
}
.social-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--border-focus); transform: translateY(-1px); }
.social-btn:active { transform: translateY(0); }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-faint);
    font-size: 12px;
    margin-bottom: 24px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; gap: 12px; }
.form-row-2 .form-group { flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
    opacity: 0.5;
}
.form-input {
    width: 100%;
    height: var(--input-h);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    padding: 0 16px;
    transition: all 0.25s var(--ease);
    outline: none;
    -webkit-appearance: none;
}
.input-with-icon { padding-left: 42px; }
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input.input-valid { border-color: rgba(16,185,129,0.5); }
.form-input.input-error { border-color: rgba(239,68,68,0.5); }
.form-select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; -webkit-appearance: none; appearance: none; }
.form-select option { background: #111; color: var(--text); }
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.toggle-password:hover { opacity: 1; }
.form-error { font-size: 11px; color: var(--red); min-height: 16px; }

/* Password strength */
.password-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 99px; transition: width 0.4s var(--ease), background 0.4s; width: 0%; }
.strength-label { font-size: 11px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }

/* Plan selector */
.plan-selector { display: flex; flex-direction: column; gap: 10px; }
.plan-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.plan-options { display: flex; gap: 8px; }
.plan-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option-content {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.25s var(--ease);
}
.plan-option:hover .plan-option-content { border-color: rgba(59,130,246,0.3); }
.plan-option-selected .plan-option-content {
    background: rgba(59,130,246,0.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.plan-option-name { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.plan-option-price { font-size: 11px; color: var(--text-muted); }

/* Agree checkbox */
.form-agree { margin-top: -4px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-custom {
    width: 18px; height: 18px;
    min-width: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
}
.checkbox-input:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 800;
}
.checkbox-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.form-link { color: var(--accent); }
.form-link:hover { text-decoration: underline; }

/* Submit */
.btn-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: all 0.3s var(--ease);
    overflow: hidden;
    margin-top: 4px;
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    display: none;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-submit.loading #submitText { display: none; }
.btn-submit.loading .btn-spinner { display: block; }

/* Bottom links */
.auth-switch { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 20px; }
.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-faint);
}

/* Success overlay */
.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(3,3,8,0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.success-overlay.show { opacity: 1; pointer-events: all; }
.success-card {
    background: rgba(12,12,28,0.95);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(59,130,246,0.1);
    transform: scale(0.9);
    transition: transform 0.4s var(--ease-bounce);
}
.success-overlay.show .success-card { transform: scale(1); }
.success-icon { font-size: 52px; margin-bottom: 20px; }
.success-title { font-family: var(--display); font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.success-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.success-loader {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
    margin: 0 auto;
}
.success-loader::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    border-radius: 99px;
    animation: loadBar 2s ease-in-out forwards;
}
@keyframes loadBar { from { width: 0%; } to { width: 100%; } }

/* ─── Login specific ─────────────────────────────── */
.auth-login-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -6px;
}
.remember-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-text { font-size: 13px; color: var(--text-muted); }
.forgot-link { font-size: 13px; color: var(--accent); }
.forgot-link:hover { text-decoration: underline; }

/* Login left panel — different content */
.auth-opp-preview {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
}
.opp-preview-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 14px; }
.opp-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    gap: 12px;
}
.opp-preview-item + .opp-preview-item { border-top: 1px solid var(--border); }
.opp-preview-item:hover { background: rgba(255,255,255,0.03); }
.opp-preview-info { flex-grow: 1; }
.opp-preview-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.8px; color: var(--accent); margin-bottom: 3px; }
.opp-preview-name { font-size: 13px; font-weight: 600; }
.opp-preview-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.opp-preview-score {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(16,185,129,0.4);
    color: var(--green);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.opp-preview-score.mid { border-color: rgba(59,130,246,0.4); color: var(--accent); }
.opp-preview-score.low { border-color: rgba(245,158,11,0.4); color: var(--amber); }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right { padding: 40px 24px; min-height: 100vh; }
}
@media (max-width: 480px) {
    .auth-social-btns { flex-direction: column; }
    .form-row-2 { flex-direction: column; }
    .plan-options { flex-direction: column; }
}
