/* ==========================================================================
   Auth & onboarding — "01b Refined Classic" theme.
   Standalone pages (no app shell). Uses the shared redesign tokens.
   ========================================================================== */

body.au-body {
  margin: 0;
  min-height: 100vh;
  background: #efece6;
  font-family: var(--rd-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body.au-body * { box-sizing: border-box; }

.au-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.au-inner { width: 100%; max-width: 420px; }

.au-brand {
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none; margin: 0 auto 24px; justify-content: center;
}
.au-brand img { width: 30px; height: 30px; object-fit: contain; }
.au-brandname { font-family: "Bungee", var(--rd-sans); font-size: 26px; line-height: 1; color: var(--ink); }

.au-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  padding: 32px 30px;
}

.au-title { font-family: var(--rd-sans); font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.au-subtitle { font-size: 14px; color: var(--ink-3); margin: 6px 0 0; }
.au-head { margin-bottom: 24px; }

/* Messages / errors */
.au-alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.au-alert-error   { background: #fdecea; color: var(--bad); }
.au-alert-success { background: #e4f3e9; color: var(--ok); }
.au-alert-info    { background: var(--brand-3); color: var(--brand-ink); }
.au-field-error { font-size: 12.5px; color: var(--bad); margin-top: 5px; }

/* Fields */
.au-field { margin-bottom: 16px; }
.au-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.au-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.au-label-row .au-label { margin-bottom: 0; }
.au-input {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: var(--rd-sans);
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 8px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.au-input::placeholder { color: var(--ink-4); }
.au-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-3); }

/* Buttons */
.au-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 16px; font-size: 14px; font-weight: 600;
  border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; font-family: var(--rd-sans);
}
.au-btn-primary { background: var(--brand); color: #fff; margin-top: 8px; }
.au-btn-primary:hover { filter: brightness(0.96); }
.au-btn-oauth { background: #fff; color: var(--ink); border-color: var(--line); }
.au-btn-oauth:hover { background: var(--bg-2); }
.au-btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); width: auto; }
.au-btn-ghost:hover { background: var(--bg-3); }

/* Divider */
.au-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.au-divider::before, .au-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-divider span { font-size: 12px; color: var(--ink-4); }

/* Links & footer */
.au-link { color: var(--brand-ink); font-weight: 600; text-decoration: none; font-size: 13px; }
.au-link:hover { text-decoration: underline; }
.au-footer { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-top: 22px; }
.au-footer .au-link { font-size: 13.5px; }

/* ==========================================================================
   Onboarding wizard
   ========================================================================== */
.ob-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.ob-main {
  min-height: calc(100vh - 57px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
}
.ob-inner { width: 100%; max-width: 520px; }

.ob-progress { margin-bottom: 22px; }
.ob-progress-label { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; }
.ob-progress-track { width: 100%; height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.ob-progress-bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width .45s ease; }

.ob-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; }
.ob-head { text-align: center; margin-bottom: 26px; }
.ob-icon {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--brand-3); color: var(--brand-ink);
  display: grid; place-items: center;
}
.ob-icon svg { width: 26px; height: 26px; }
.ob-title { font-family: var(--rd-sans); font-weight: 700; font-size: 24px; line-height: 1.1; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.ob-sub { font-size: 13.5px; color: var(--ink-3); margin: 8px 0 0; }

.ob-actions { display: flex; gap: 10px; margin-top: 28px; }
.ob-actions .au-btn { margin-top: 0; }
.ob-actions .ob-grow { flex: 1; }

/* Option cards (radio / checkbox) */
.ob-optgrid { display: grid; gap: 10px; }
.ob-optgrid-2 { grid-template-columns: 1fr 1fr; }
.ob-optspan2 { grid-column: 1 / -1; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ob-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ob-opt-box {
  display: block; padding: 12px 14px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .12s, background .12s;
}
.ob-opt-box:hover { border-color: var(--brand-2); }
.ob-opt input:checked + .ob-opt-box {
  border-color: var(--brand); background: var(--brand-3);
}
.ob-opt-big { font-size: 17px; font-weight: 700; color: var(--ink); }
.ob-opt-small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.ob-opt-text { font-size: 13px; color: var(--ink-2); }
.ob-opt input:checked + .ob-opt-box .ob-opt-text,
.ob-opt input:checked + .ob-opt-box .ob-opt-big { color: var(--brand-ink); }

/* Pill (chip) variant for multi-select */
.ob-pill .ob-opt-box { border-radius: 999px; padding: 8px 16px; }

.ob-err { font-size: 12.5px; color: var(--bad); margin-top: 8px; }
.ob-req { color: var(--bad); }

@media (max-width: 520px) {
  .au-card, .ob-card { padding: 26px 20px; }
  .ob-optgrid-2 { grid-template-columns: 1fr; }
}
