.auth-screen {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}
.auth-topbar {
  height: 58px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(251,250,246,.98);
}
.auth-brand { display: inline-flex; align-items: center; gap: 9px; }
.auth-top-link { font-size: 11px; font-weight: 700; color: var(--blue); }
.auth-main {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 24px 48px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.auth-card.wide { max-width: 780px; }
.auth-context { max-width: 520px; margin: 14px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.auth-heading { margin-bottom: 19px; text-align: center; }
.auth-heading h1 { margin-bottom: 7px; font-size: 23px; letter-spacing: -.04em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.auth-heading strong { color: var(--ink); }
.google-button,
.auth-primary,
.auth-secondary,
.preview-demo-button,
.auth-text-button {
  width: 100%;
  min-height: 38px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 10px;
}
.google-button {
  border: 1px solid var(--line-dark);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.google-button:hover { background: var(--surface-soft); }
.google-button.loading { opacity: .65; }
.google-g {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.auth-primary { border: 1px solid #151515; background: #151515; color: #fff; padding: 0 14px; }
.auth-primary:hover { background: #000; }
.auth-primary:disabled, .auth-secondary:disabled, .google-button:disabled { opacity: .5; cursor: not-allowed; }
.auth-secondary { border: 1px solid var(--line-dark); background: #fff; padding: 0 14px; }
.auth-secondary:hover { background: var(--surface-soft); }
.auth-secondary.full { width: 100%; }
.link-button { display: inline-flex; width: auto; align-items: center; justify-content: center; padding: 0 14px; }
.auth-divider { position: relative; height: 31px; display: grid; place-items: center; margin: 3px 0 7px; }
.auth-divider::before { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { position: relative; padding: 0 10px; background: #fff; color: var(--muted); font-size: 8px; }
.auth-form { display: grid; gap: 12px; }
.auth-field { display: grid; gap: 5px; }
.auth-field label, .auth-label-row label { font-weight: 700; font-size: 9px; }
.auth-field label span { color: var(--red); }
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  min-height: 37px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
  outline: 0;
  font-size: 10px;
}
.auth-field textarea { min-height: 95px; resize: vertical; }
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus { border-color: #77736b; box-shadow: 0 0 0 3px rgba(9,107,216,.09); }
.auth-field input[aria-invalid="true"], .auth-field select[aria-invalid="true"] { border-color: var(--red); }
.auth-label-row { display: flex; justify-content: space-between; align-items: center; }
.auth-label-row a, .auth-inline-row a { color: var(--blue); font-size: 8px; font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-wrap button { position: absolute; top: 1px; bottom: 1px; right: 1px; width: 48px; border: 0; background: transparent; color: var(--blue); font-size: 8px; font-weight: 700; }
.field-error { min-height: 0; color: var(--red); font-size: 8px; }
.field-error:empty { display: none; }
.check-row { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 8px; line-height: 1.45; cursor: pointer; }
.check-row input { margin: 1px 0 0; width: 13px; height: 13px; flex: 0 0 auto; accent-color: #151515; }
.check-row a { color: var(--ink); text-decoration: underline; }
.check-row.compact { align-items: center; }
.auth-inline-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-switch { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 9px; }
.auth-switch a { color: var(--blue); font-weight: 700; }
.auth-message { display: grid; gap: 3px; margin-bottom: 12px; padding: 9px 10px; border: 1px solid #e7b7b2; border-radius: 7px; background: #fff4f2; color: #7b241d; font-size: 9px; line-height: 1.4; }
.auth-message[hidden] { display: none; }
.auth-message.success { border-color: #a8d8b2; background: #eef9f0; color: #1e6330; }
.auth-message.warning { border-color: #dac892; background: #fff9e7; color: #69540e; }
.auth-message strong { font-size: 9px; }
.preview-demo-button { margin-top: 14px; border: 1px dashed var(--line-dark); background: transparent; color: var(--muted); }
.preview-demo-note { margin: 6px 0 0; color: var(--muted); font-size: 7px; text-align: center; }
.auth-symbol { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; font-size: 18px; }
.auth-symbol.error { color: var(--red); border-color: #dfb2ad; background: #fff7f6; }
.auth-instructions { padding: 10px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 7px; }
.auth-instructions p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.auth-helper { margin: 7px 0 0; min-height: 12px; color: var(--muted); font-size: 8px; text-align: center; }
.auth-loading { display: grid; justify-items: center; text-align: center; }
.auth-loading h1 { font-size: 18px; margin: 14px 0 5px; }
.auth-loading p { color: var(--muted); font-size: 9px; }
.spinner { width: 27px; height: 27px; border: 2px solid var(--line); border-top-color: #151515; border-radius: 50%; animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.onboarding-progress { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.onboarding-progress span { height: 3px; border-radius: 999px; background: #dedad2; }
.onboarding-progress span.active { background: #151515; }
.onboarding-progress small { grid-column: 1 / -1; margin-top: 4px; color: var(--muted); font-size: 8px; }
.account-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 15px; }
.account-type-card { position: relative; min-height: 170px; padding: 18px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; text-align: left; }
.account-type-card:hover { border-color: #8e8a82; }
.account-type-card.selected { border-color: #151515; box-shadow: inset 0 0 0 1px #151515; background: #faf9f5; }
.account-type-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid var(--line-dark); border-radius: 7px; font-weight: 800; }
.account-type-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.account-type-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.account-type-check { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; display: none; place-items: center; border-radius: 50%; background: #151515; color: #fff; font-size: 10px; }
.account-type-card.selected .account-type-check { display: grid; }
.auth-text-button { min-height: 32px; margin-top: 5px; border: 0; background: transparent; color: var(--muted); }
.onboarding-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onboarding-field.full { grid-column: 1 / -1; }
.username-wrap { min-height: 37px; display: flex; align-items: center; border: 1px solid var(--line-dark); border-radius: 7px; background: #fff; overflow: hidden; }
.username-wrap:focus-within { border-color: #77736b; box-shadow: 0 0 0 3px rgba(9,107,216,.09); }
.username-wrap span { padding-left: 9px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.username-wrap input { min-height: 35px; border: 0; border-radius: 0; padding-left: 2px; box-shadow: none !important; }
.username-status { color: var(--muted); font-size: 8px; }
.username-status.success { color: var(--green-ink); }
.username-status.error { color: var(--red); }
.onboarding-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.onboarding-actions .auth-primary, .onboarding-actions .auth-secondary { width: auto; min-width: 110px; }

.account-page { max-width: 920px; }
.danger-link { border: 0; background: transparent; color: var(--red); font-size: 9px; font-weight: 700; }
.account-layout { display: grid; grid-template-columns: 180px 1fr; gap: 14px; }
.account-nav { display: grid; align-content: start; gap: 3px; }
.account-nav a { padding: 9px 10px; border-radius: 7px; font-size: 9px; }
.account-nav a.active { background: #eae7df; font-weight: 700; }
.account-panel { padding: 18px; }
.account-panel h2 { font-size: 15px; }
.account-intro { color: var(--muted); font-size: 9px; }
.account-profile-head { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.account-profile-head h2 { margin: 0 0 3px; }
.account-profile-head p { margin: 0; color: var(--muted); font-size: 9px; }
.account-avatar { width: 45px; height: 45px; font-size: 12px; }
.account-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 14px; background: var(--line); border: 1px solid var(--line); }
.account-datum { display: grid; gap: 4px; padding: 12px; background: #fff; }
.account-datum span { color: var(--muted); font-size: 8px; }
.account-datum strong { font-size: 10px; }
.account-note { margin: 14px 0 0; color: var(--muted); font-size: 8px; }
.security-method { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.security-method:first-of-type { margin-top: 12px; }
.method-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; font-weight: 800; }
.security-method div { display: grid; }
.security-method strong { font-size: 10px; }
.security-method small { color: var(--muted); font-size: 8px; }
.method-status { color: var(--green-ink); font-size: 8px; font-weight: 700; }
.account-divider { height: 1px; margin: 16px 0; background: var(--line); }
.legal-copy { margin: 16px 0; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; }
.legal-copy h2 { font-size: 13px; }
.legal-copy p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
