/* Auth and onboarding screens, and Account (claude.ai/design "Auth and Onboarding", "Organisation Screens").
 * Single-card pages restyle app.css's body.solo layout; setup pages use body.solo.onb. Tokens only. */

/* ---------- single card: sign in, sign up, confirm, forgot, reset, invite, legal ---------- */
body.solo { background: var(--color-paper); padding: var(--space-2xl) var(--space-md) var(--space-xl); gap: 1.75rem; }
.solo-brand { gap: 0.625rem; margin: 0; }
.solo-brand .brand-mark { font-size: var(--text-xs); }
.solo-card { max-width: 25rem; border-radius: calc(var(--radius-lg) * 1.5); padding: 1.75rem; box-shadow: none; }
.solo-card.wide-card { max-width: 27.5rem; }
.solo-card.prose-page { max-width: 42rem; }
.solo-card h1 { font-size: var(--text-2xl); line-height: 2rem; font-weight: 600; }
.auth-head h1 { margin: 0; }
.solo-foot { margin: 0; }
.solo-card > .flash { margin-bottom: var(--space-md); }

.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }
.auth-form > * { margin: 0; }
.auth-head p { margin: var(--space-2xs) 0 0; color: var(--color-ink-2); }
.auth-form label:not(.check) { margin: 0; }
.auth-form label.check { align-items: flex-start; flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-ink-2); min-height: var(--control-h); margin: 0; }
.auth-form label.check > input { margin-top: 0.125rem; }
.auth-form label.check > span:not(.field-error) { flex: 1 1 0; min-width: 0; }
.auth-form label.check > .field-error { flex-basis: 100%; }
.auth-form .notice { flex-wrap: nowrap; align-items: flex-start; margin: 0; }
.auth-form .notice a { color: inherit; text-decoration: underline; }
.auth-form .notice .icon { margin-top: 0.125rem; }
.auth-form .cf-turnstile { min-height: 65px; }
.label-row { display: flex; justify-content: space-between; gap: var(--space-xs); }
.label-row a { font-weight: 400; }
.auth-alt { text-align: center; font-size: var(--text-sm); color: var(--color-ink-2); }
.auth-back { display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); font-size: var(--text-sm); text-decoration: none; }
.auth-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent-text); }
.auth-icon.bad { background: var(--color-bad-soft); color: var(--color-bad); }
.auth-form .form-actions { margin: 0; gap: var(--space-xs); }
.auth-form .form-actions form { margin: 0; }
.auth-form .form-actions button.link { min-height: var(--control-h); padding: 0 var(--space-2xs); text-decoration: none; }
.auth-form .hint { margin: 0; font-size: var(--text-xs); }
label .hint + .field-error { margin-top: var(--space-3xs); }

/* ---------- onboarding: own header, 4-part progress, one step per page ---------- */
body.solo.onb { padding: 0; gap: 0; align-items: stretch; }
.onb-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: 0.875rem var(--space-xl); background: var(--color-surface); border-bottom: var(--rule); }
.onb-name { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.onb-name .brand-mark { font-size: var(--text-xs); }
.onb-head form { margin: 0; flex: none; }
.onb-head button.link { color: var(--color-ink-2); font-size: var(--text-sm); text-decoration: none; }
.onb-head button.link:hover { color: var(--color-ink); text-decoration: underline; }
.onb-main { width: 100%; max-width: 40rem; margin: 0 auto; padding: 1.75rem var(--space-xl) 2.5rem; display: flex; flex-direction: column; gap: var(--space-lg); }
.onb-main > .flash { margin: 0; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); }
.onb-steps li { display: flex; flex-direction: column; gap: 0.375rem; }
.onb-steps li::before { content: ""; height: 4px; border-radius: var(--radius-pill); background: var(--color-paper-3); }
.onb-steps li.done::before { background: var(--color-accent); }
.onb-steps a { font-size: var(--text-xs); line-height: 1rem; color: var(--color-ink-3); text-decoration: none; }
.onb-steps a:hover { color: var(--color-ink); text-decoration: underline; }
.onb-steps a[aria-current] { color: var(--color-ink); font-weight: 600; }
.onb-step { display: flex; flex-direction: column; gap: 1.125rem; }
.onb-step > * { margin: 0; }
.onb-step h1 { line-height: 2rem; font-weight: 600; }
.onb-step .panel { margin: 0; }
.onb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-md); padding: 1.25rem; }
.onb-grid label { margin: 0; }
.onb-grid .span { grid-column: 1 / -1; }
.opt { font-weight: 400; color: var(--color-ink-3); }
.onb-grid input[readonly] { background: var(--color-paper-2); color: var(--color-ink-2); }
.onb-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.onb-actions .row { gap: var(--space-xs); align-items: center; }
.onb-actions .quiet, .onb-actions button.link.quiet { min-height: var(--control-h); display: inline-flex; align-items: center; padding: 0 var(--space-2xs); color: var(--color-ink-2); font-weight: 500; text-decoration: none; }
.onb-actions .quiet:hover { color: var(--color-ink); text-decoration: underline; }

/* Invite rows */
.invite-rows { display: flex; flex-direction: column; gap: var(--space-sm); padding: 1.25rem; }
.invite-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: flex-start; }
.invite-email { flex: 1 1 13.75rem; min-width: 0; display: flex; flex-direction: column; }
.invite-email input { width: 100%; }
.invite-row select { flex: 0 0 9.5rem; min-width: 0; }
.invite-row .icon-btn { min-height: var(--control-h); width: var(--control-h); color: var(--color-ink-3); }
[data-remove-row] > * { pointer-events: none; }
.add-row { align-self: flex-start; background: transparent; color: var(--color-ink-2); border: 1px dashed var(--color-rule-strong); padding: 0 0.625rem; gap: 0.375rem; font-weight: 400; }
.add-row:hover { background: var(--color-paper-2); color: var(--color-ink); }
.invite-rows .hint { margin: 0; }

/* Providers */
.provider-list { overflow: hidden; }
.provider { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: 0.875rem var(--space-md); }
.provider + .provider { border-top: var(--rule); }
.provider-icon { width: 2rem; height: 2rem; border-radius: var(--radius); background: var(--color-paper-2); border: var(--rule); display: grid; place-items: center; color: var(--color-ink-2); flex: none; }
.provider-text { flex: 1 1 12.5rem; min-width: 0; display: flex; flex-direction: column; }
.provider-text b { font-weight: 500; }
.provider-text span { font-size: var(--text-sm); color: var(--color-ink-3); overflow-wrap: anywhere; }
.provider .hint { margin: 0; }

/* CSV drop area: the file input covers it, so clicking and dropping are both native. */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); margin: 0; padding: 2.25rem 1.25rem; border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-lg); background: var(--color-surface); text-align: center; cursor: pointer; font-size: var(--text-base); color: var(--color-ink); }
.dropzone > .icon { color: var(--color-ink-2); }
.dropzone:hover, .dropzone:has(input:focus-visible) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.dropzone b { font-weight: 500; }
.dropzone .hint-inline { color: var(--color-ink-3); }
.dropzone .hint { margin: 0; font-size: var(--text-xs); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.paste summary { cursor: pointer; color: var(--color-accent-text); font-weight: 500; font-size: var(--text-sm); width: fit-content; }
.paste textarea { width: 100%; margin-top: var(--space-xs); }

/* ---------- Account ---------- */
.account { max-width: 45rem; }
.account .panel { margin-bottom: var(--space-md); }
.account .stack { display: flex; flex-direction: column; gap: 0.875rem; }
.account .stack > *, .account .stack label { margin: 0; }
.account h2, .account legend { font-size: var(--text-md); line-height: 1.5rem; font-weight: 600; margin: 0; }
.form-actions.end { justify-content: flex-end; margin: 0; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.bare legend { padding: 0; margin-bottom: 0.625rem; }
.theme-cards { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.theme-cards label { flex: 1 1 8.75rem; display: flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; margin: 0; padding: 0 var(--space-sm); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-lg); background: var(--color-surface); cursor: pointer; font-size: var(--text-base); }
.theme-cards label:hover { border-color: var(--color-ink-3); }
.theme-cards label:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.theme-cards label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
fieldset.bare .hint { margin: var(--space-xs) 0 0; }
[data-theme-choice] .form-actions { margin-top: var(--space-sm); }

@media (max-width: 40rem) {
  .onb-head { padding: var(--space-sm) var(--space-md); }
  .onb-main { padding: var(--space-lg) var(--space-md) var(--space-xl); }
  .onb-steps a { font-size: 0.6875rem; }
  .invite-email { flex-basis: 100%; }
  .invite-row select { flex: 1 1 auto; }
  .solo-card { padding: var(--space-lg) var(--space-md); }
}

/* Sign in with Google / Microsoft, above the email form */
.social-signin { display: flex; flex-direction: column; gap: var(--space-xs); }
.auth-or { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-3); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: var(--rule); }

/* ---------- Adab v2: sign in and sign up are a split screen, form left, the product right ---------- */
body.solo { background: var(--color-paper); }
.solo-card { border-radius: var(--radius-xl); padding: 2rem; }
.solo-card h1, .auth-head h1 { font-size: 2rem; line-height: 2.375rem; font-weight: 700; letter-spacing: -0.03em; }
.auth-form button.wide { min-height: 48px; font-size: var(--text-md); }
body.solo.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; gap: 0; align-items: stretch; background: var(--color-surface); }
.split-form { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding: var(--space-xl) var(--space-md); min-height: 100dvh; }
.split-form .solo-brand { align-self: flex-start; margin-left: clamp(0rem, 4vw, 2.5rem); }
body.solo.split .solo-card { margin: auto 0; border: 0; padding: var(--space-md) 0; background: transparent; }
.split-art { position: relative; overflow: hidden; background: var(--color-accent); display: grid; place-items: center; padding: 3rem; perspective: 1600px; color: #fff; }
.split-art::before { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: var(--color-sun); }
.split-art::after { content: ""; position: absolute; left: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 48px; background: #4a64f0; transform: rotate(18deg); }
.split-art-in { position: relative; z-index: 1; width: 100%; max-width: 27.5rem; display: flex; flex-direction: column; gap: 10px; }
.split-card { position: relative; padding: 20px; border-radius: 18px; background: #fff; color: #1b1d2a; box-shadow: 0 40px 70px -30px rgb(10 20 80 / 0.6); display: flex; flex-direction: column; gap: 12px; transform: rotateY(-12deg) rotateX(6deg); margin-bottom: 3.5rem; }
.split-row { display: flex; justify-content: space-between; align-items: center; }
.split-up { font-size: 0.75rem; padding: 3px 9px; border-radius: 999px; background: #e3f5ec; color: #136b47; font-weight: 600; }
.split-big { font-family: var(--font-body); font-size: 2.125rem; letter-spacing: -0.03em; }
.split-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
.split-bars i { flex: 1; border-radius: 5px; background: #c9d1fa; }
.split-bars i:last-child { background: #2d4be0; }
.split-float { position: absolute; right: -24px; bottom: -34px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 24px 40px -18px rgb(10 20 80 / 0.6); display: flex; gap: 10px; align-items: center; font-size: 0.8125rem; animation: split-float 6s ease-in-out infinite; }
.split-float > span:first-child { width: 32px; height: 32px; border-radius: 9px; background: #e3f5ec; color: #18885a; font-weight: 700; display: grid; place-items: center; }
.split-float > span:last-child { display: flex; flex-direction: column; }
.split-float small { color: #6b7080; }
.split-line { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0; }
.split-sub { color: #dce2ff; line-height: 1.55; margin: 0; }
@keyframes split-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 56rem) {
  body.solo.split { grid-template-columns: minmax(0, 1fr); }
  .split-art { display: none; }
}
@media (prefers-reduced-motion: reduce) { .split-float { animation: none; } .split-card { transform: none; } }
