/* ── Auth Pages ─────────────────────────────────────────────────── */
:root {
    --accent: #6366f1; --accent-hover: #4f46e5; --accent-glow: rgba(99,102,241,.2);
    --bg-base: #020817; --bg-surface: #0f172a; --bg-raised: #1e293b;
    --border: #1e293b; --border-bright: #334155;
    --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b;
    --danger: #ef4444; --success: #10b981;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Space Grotesk', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--text-primary); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow-x: hidden; }

/* Grid bg */
body::before {
    content: ''; position: fixed; inset: 0; z-index: 0;
    background-image: linear-gradient(rgba(99,102,241,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
/* Glow blob */
body::after {
    content: ''; position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(ellipse, rgba(99,102,241,.15) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

.auth-wrapper { position: relative; z-index: 1; width: 100%; max-width: 460px; }

/* Brand */
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; justify-content: center; }
.auth-brand-icon { width: 40px; height: 40px; }
.auth-brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; }

/* Card */
.auth-card { background: var(--bg-surface); border: 1px solid var(--border-bright); border-radius: 20px; padding: 36px; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.auth-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; }
.auth-footer { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.auth-footer a { color: var(--accent); }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-control { display: block; width: 100%; padding: 10px 14px; background: var(--bg-raised); border: 1px solid var(--border-bright); border-radius: 8px; color: var(--text-primary); font-size: 14px; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; background: var(--accent); color: white; font-size: 14.5px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; font-family: inherit; transition: background .2s, transform .15s; margin-top: 8px; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* OAuth Buttons */
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 12px; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-bright); }
.oauth-grid { display: flex; flex-direction: column; gap: 10px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: var(--bg-raised); border: 1px solid var(--border-bright); border-radius: 8px; color: var(--text-primary); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: border-color .2s, background .2s; cursor: pointer; }
.oauth-btn:hover { border-color: var(--accent); background: rgba(99,102,241,.06); color: var(--text-primary); }
.oauth-icon { width: 20px; height: 20px; object-fit: contain; }

/* Flash */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.flash--error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #f87171; }
.flash--success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25); color: #34d399; }
.flash--info { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25); color: #60a5fa; }

/* Company selector */
.company-selector { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; margin-bottom: 20px; }
.company-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-raised); border: 2px solid transparent; border-radius: 10px; cursor: pointer; transition: all .2s; }
.company-option:hover { border-color: var(--border-bright); }
.company-option input[type=radio] { display: none; }
.company-option.selected { border-color: var(--accent); background: rgba(99,102,241,.08); }
.company-option-logo { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.company-option-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-option-info { flex: 1; min-width: 0; }
.company-option-name { font-size: 14px; font-weight: 500; }
.company-option-plan { font-size: 11px; color: var(--text-muted); }

/* Invite code */
.invite-code-input { font-family: 'Fira Code', monospace; text-transform: uppercase; letter-spacing: .1em; font-size: 15px; text-align: center; }
