/* ==========================================================================
   Rad Intel auth.css: the split-screen shell shared by login, register,
   reset-password and accept-invite, plus the setup wizard. Tokens come from
   theme.css (linked first on every page). Link before tailwind.css.
   ========================================================================== */

/* ── Split layout ────────────────────────────────────────────────────────── */
.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    overflow: hidden;
    background: linear-gradient(145deg, var(--accent), #1d4ed8);
    color: #ffffff;
}
.auth-aside::before,
.auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.auth-aside::before { top: -120px; right: -120px; width: 360px; height: 360px; }
.auth-aside::after { bottom: -160px; left: -100px; width: 420px; height: 420px; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}
.auth-brand .brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.auth-brand .brand-icon .ico { width: 20px; height: 20px; }
.auth-aside h2 {
    max-width: 460px;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.auth-points { margin: 0; padding: 0; list-style: none; }
.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 14.5px;
    opacity: 0.94;
}
.auth-points .pt-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.18);
}
.auth-points .pt-icon .ico { width: 15px; height: 15px; }
.auth-foot-note { font-size: 12.5px; opacity: 0.75; }

.auth-main {
    position: relative;
    display: grid;
    place-items: center;
    padding: 3.5rem 1.5rem 2rem;
    background: var(--bg);
}
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 {
    margin-bottom: 0.35rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.auth-sub { margin-bottom: 1.5rem; font-size: 14px; color: var(--text-muted); }
.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}
.auth-mobile-brand .brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: #ffffff;
}
.auth-mobile-brand .brand-icon .ico { width: 18px; height: 18px; }
@media (max-width: 991px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-mobile-brand { display: flex; }
    .auth-main { padding-top: 2.5rem; }
}

/* ── Form controls ───────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}
.field .hint { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-ctl);
    background: var(--input-bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[disabled] { color: var(--text-muted); background: var(--surface-2); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.btn-block { width: 100%; height: 42px; font-size: 14px; }
.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-ctl);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.social-btn:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 1rem; }
.auth-foot { margin-top: 1.5rem; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-foot a, .auth-link { color: var(--accent); font-weight: 500; text-decoration: none; }
.auth-foot a:hover, .auth-link:hover { text-decoration: underline; }
.auth-quiet { font-size: 12px; color: var(--text-subtle); text-decoration: none; }
.auth-quiet:hover { color: var(--text-muted); text-decoration: underline; }
.auth-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 2rem;
    font-size: 12px;
}
.auth-links a { color: var(--text-subtle); text-decoration: none; }
.auth-links a:hover { color: var(--text-muted); }
.form-msg { margin-top: 10px; font-size: 13px; text-align: center; }
.form-msg.err { color: var(--neg); }
.form-msg.ok { color: var(--pos); }
.form-msg.warn { color: var(--warn); }
.form-msg a { text-decoration: underline; }
.otp-input {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.45em;
    height: 54px;
    font-family: var(--font-mono);
}
.auth-success {
    text-align: center;
    padding: 1rem 0;
}
.auth-success .success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pos-soft);
    color: var(--pos);
}
.auth-success .success-icon .ico { width: 28px; height: 28px; }
.auth-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--accent);
}
.auth-state-icon .ico { width: 24px; height: 24px; }
.auth-state-icon.neg { background: var(--neg-soft); color: var(--neg); }

/* ── Setup wizard ────────────────────────────────────────────────────────── */
.setup-wrap { max-width: 760px; margin: 0 auto; padding: 36px 16px 64px; }
.setup-head { margin-bottom: 24px; }
.setup-head h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); margin-bottom: 4px; }
.setup-head p { font-size: 14px; color: var(--text-muted); }
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 14px;
}
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.step-badge {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.step-badge.required { background: var(--accent); color: #ffffff; }
.step-badge.optional { background: var(--surface-3); color: var(--text-muted); }
.step-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.step-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.step-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.connected { background: var(--pos); }
.status-dot.disconnected { background: var(--text-subtle); }
.help-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.help-text a { color: var(--accent); }
.help-text code { font-family: var(--font-mono); background: var(--surface-3); padding: 1px 4px; border-radius: 4px; }
.saved-note { font-size: 12px; color: var(--pos); font-weight: 500; }
.pick-group { margin-bottom: 14px; }
.pick-group > label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.pick-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.pick-list .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); }
