/* Shared styles for login / register / select-interests / pending-approval. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary:   #4f46e5;
    --primary-2: #7c3aed;
    --accent:    #06b6d4;
    --dark:      #0f172a;
    --dark-2:    #1e293b;
    --dark-3:    #334155;
    --text:      #f1f5f9;
    --text-muted:#94a3b8;
    --border:    rgba(255,255,255,0.08);
    --glass:     rgba(255,255,255,0.04);
    --glass-hov: rgba(255,255,255,0.07);
    --error-bg:  rgba(239,68,68,0.12);
    --error-col: #fca5a5;
    --radius:    12px;
    --font:      'Poppins', sans-serif;
}

html { font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: hidden;   /* never hide vertical overflow: tall forms must stay scrollable */
}

/* ── Left brand panel ─────────────────────────── */
.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #12131f 100%);
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px; left: -80px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(79,70,229,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -100px; right: -60px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
    z-index: 1;
}

.brand-logo img { width: 48px; height: 48px; }

.brand-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.brand-logo-text span { color: var(--accent); }

.brand-headline {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    z-index: 1;
}

.brand-headline .grad {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 48px;
    z-index: 1;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.feature-list li .icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(79,70,229,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 13px;
    flex-shrink: 0;
}

.back-home {
    position: absolute;
    bottom: 36px; left: 60px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex; align-items: center; gap: 6px;
    transition: color 0.2s;
    z-index: 1;
}
.back-home:hover { color: var(--text); }

/* ── Right login panel ────────────────────────── */
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    background: var(--dark-2);
    overflow-y: auto;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

/* Google button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    margin-bottom: 28px;
}

.btn-google:hover {
    background: var(--glass-hov);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
    color: var(--text);
}

.btn-google svg { flex-shrink: 0; }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    background: rgba(79,70,229,0.06);
}

input::placeholder { color: #475569; }

.forgot-row {
    text-align: right;
    margin-top: 8px;
}
.forgot-row a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-row a:hover { color: var(--accent); }

/* Submit */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.02em;
}

.btn-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Error */
.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--error-bg);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 24px;
    color: var(--error-col);
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-error i { margin-top: 2px; flex-shrink: 0; }

/* Register link */
.register-link {
    text-align: center;
    margin-top: 28px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.register-link a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.register-link a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
    body { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .login-panel { padding: 40px 24px; min-height: 100vh; }
}

/* ── Shared additions for register / interests / pending pages ── */
input[type="text"] {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}
input[type="text"]:focus { border-color: var(--primary); background: rgba(79,70,229,0.06); }

.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

.btn-outline {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 20px; margin-top: 12px;
    background: transparent; color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font); font-size: 0.95rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--accent); background: var(--glass); }

.google-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin: -12px 0 24px; }
.new-user-bottom .divider { margin-top: 28px; margin-bottom: 0; }

.status-icon {
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    font-size: 1.6rem; margin-bottom: 22px;
    background: rgba(6,182,212,0.12); color: var(--accent); border: 1px solid rgba(6,182,212,0.25);
}
.status-text { color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; font-size: 0.95rem; }
.status-text strong { color: var(--text); font-weight: 600; }
.steps { list-style: none; margin: 22px 0 28px; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.steps li i { color: var(--accent); margin-top: 3px; width: 16px; text-align: center; flex-shrink: 0; }
.steps li.done i { color: #22c55e; }

.choice-grid { display: grid; gap: 10px; margin-bottom: 22px; }
.choice {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
    background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: 0.95rem; transition: border-color 0.2s, background 0.2s;
}
.choice:hover { border-color: rgba(255,255,255,0.18); }
.choice input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.choice i { color: var(--accent); width: 18px; text-align: center; }
.choice:has(input:checked) { border-color: var(--primary); background: rgba(79,70,229,0.10); }

/* "New here?" shortcut at the top of the login form — phones only, where the
   create-account button at the bottom ends up below the fold. */
.new-user-top { display: none; }
@media (max-width: 900px) {
    .login-panel { justify-content: flex-start; padding: 28px 20px 40px; }
    .new-user-top {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        margin: -12px 0 24px; padding: 13px 16px;
        background: rgba(6,182,212,0.10); border: 1px solid rgba(6,182,212,0.35);
        border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 0.95rem;
    }
    .new-user-top strong { color: var(--accent); font-weight: 600; }
}

/* Phones: compact enough that the whole register / login form fits on one screen. */
.pw-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 0.8rem;
    font-weight: 600; padding: 6px 8px; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
@media (max-width: 900px) {
    .login-panel { padding: 20px 20px 28px; min-height: 0; }
    .login-title { font-size: 1.45rem; margin-bottom: 4px; }
    .login-subtitle { margin-bottom: 18px; font-size: 0.85rem; }
    .btn-google, .btn-submit, .btn-outline { padding-top: 11px; padding-bottom: 11px; }
    .divider { margin: 16px 0; }
    .new-user-bottom { display: none; }   /* phones get the bar at the top instead */
    .form-group { margin-bottom: 12px; }
    label { margin-bottom: 5px; }
    input[type="text"], input[type="email"], input[type="password"] { padding-top: 11px; padding-bottom: 11px; }
    .field-hint { display: none; }
    .register-link { margin-top: 14px; }
    .new-user-top { margin: -6px 0 16px; padding: 11px 14px; }
    .google-note { display: none; }       /* saves a line; the subtitle already says it */
}
