/* Login / signup — same language as the brand pages (requires landing.css tokens) */

/* background: one huge soft gradient circle rising from the bottom edge */
.au-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.au-orb {
  position: absolute; left: 50%; top: calc(100vh - 13vh);
  width: max(150vw, 1500px); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse 38% 9% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 100%),
    linear-gradient(90deg, #ffc9a0 0%, #ff8a3d 30%, #ff5a1f 50%, #ff7a2f 70%, #ffd0a0 100%);
  filter: blur(28px);
  opacity: 0.9;
}

/* card */
.au-main { position: relative; z-index: 1; min-height: 100svh; display: grid; place-items: center; padding: clamp(104px, 12vh, 128px) 16px 48px; }
.au-card {
  --row: 56px; --gap: 8px;
  width: min(540px, 100%); padding: clamp(26px, 4vw, 42px) clamp(26px, 4vw, 42px) clamp(22px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(16, 16, 16, 0.06); border-radius: 32px;
  box-shadow: 0 24px 60px rgba(16, 16, 16, 0.08);
}
.au-title { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -0.045em; line-height: 1.25; color: var(--ink); }
.au-sub { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.au-sub b { color: var(--ink); }
.au-step-label { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--blue); }
.au-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.au-progress i { flex: 1; height: 4px; border-radius: 4px; background: rgba(16, 16, 16, 0.08); transition: background 0.3s; }
.au-progress i.on { background: var(--blue); }

.au-stack { display: flex; flex-direction: column; gap: var(--gap); }
.au-input {
  width: 100%; height: var(--row); padding: 0 22px; border: 0; border-radius: 14px;
  background: #fff; box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.12);
  font-size: 15.5px; color: var(--ink); outline: none; transition: box-shadow 0.15s;
}
.au-input::placeholder { color: #8b8b92; }
.au-input:focus { box-shadow: 0 0 0 1px var(--blue); }
.au-pw { position: relative; }
.au-pw .au-input { padding-right: 52px; }
.au-eye { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; color: #8b8b92; border-radius: 8px; }
.au-eye:hover { color: var(--ink); }
.au-eye svg { width: 18px; height: 18px; }

.au-btns { display: flex; gap: var(--gap); margin-top: var(--gap); }
.au-btn {
  height: var(--row); padding: 0 26px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15.5px; font-weight: 700; white-space: nowrap; transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.au-btn svg { width: 18px; height: 18px; }
.au-btn.primary { flex: 1; background: var(--blue); color: #fff; }
.au-btn.primary:hover { background: var(--ink); }
.au-btn.primary:disabled { opacity: 0.45; cursor: default; background: var(--blue); }
.au-btn.secondary { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.12); }
.au-btn.secondary:hover { box-shadow: 0 0 0 1px var(--ink); }
.au-btn .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }

.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; min-height: 22px; }
.au-msg { font-size: 13.5px; color: var(--muted); }
.au-msg.err { color: #d93036; }
.au-err { margin: 10px 2px 0; }
.au-err:empty { display: none; }
.au-msg.ok { color: #1a8d5f; }
.au-link { font-size: 13.5px; font-weight: 700; color: var(--ink); border-bottom: 1.5px solid currentColor; }
.au-link:hover { color: var(--blue); }
.au-link:disabled { color: #a0a0a6; border-color: transparent; cursor: default; }
.au-switch { margin: 18px 0 0; line-height: 1.2; text-align: center; font-size: 15px; color: var(--muted); }
.au-switch a { margin-left: 4px; font-weight: 700; color: var(--ink); border-bottom: 1.5px solid currentColor; }
.au-switch a:hover { color: var(--blue); }

/* round checkbox */
.au-check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 15px; color: var(--ink); flex: 1; min-width: 0; }
.au-check input {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(16, 16, 16, 0.28); background: #fff center / 12px 12px no-repeat; cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.au-check input:checked {
  box-shadow: none; background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.1 6.1l2 2 3.8-4.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.au-check .req { color: var(--blue); font-weight: 700; font-size: 13px; }

/* terms: one box — "agree all" on top, details indented below */
.au-terms-box { padding: 8px 16px 10px 22px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.12); }
.au-terms-all { height: 52px; font-weight: 800; font-size: 16px; border-bottom: 1px solid rgba(16, 16, 16, 0.08); margin-bottom: 6px; }
.au-terms-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; padding-left: 30px; }
.au-terms-sub .au-check { font-size: 14.5px; color: var(--muted); }
.au-terms-sub .au-check input { width: 18px; height: 18px; background-size: 11px 11px; }
.au-detail { font-size: 12.5px; padding: 5px 10px; border-radius: 8px; color: var(--muted); box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.12); transition: all 0.15s; }
.au-detail:hover { color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

/* 6-digit code */
.au-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.au-code input {
  width: 100%; height: 64px; border: 0; border-radius: 14px; background: #fff; text-align: center;
  font-size: 26px; font-weight: 800; font-family: var(--mono); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.12); outline: none; transition: box-shadow 0.15s;
}
.au-code input:focus { box-shadow: 0 0 0 1.5px var(--blue); }

.au-rules { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 2px 2px; }
.au-rules span { font-size: 13px; color: #a0a0a6; display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.au-rules span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.au-rules span.ok { color: var(--blue); }

.au-done { text-align: center; }
.au-done-mark { width: 76px; height: 76px; margin: 4px auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; animation: pop 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.au-done-mark svg { width: 34px; height: 34px; }

.step { display: none; }
.step.on { display: block; animation: au-step 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes au-step { from { opacity: 0; transform: translateX(14px); } }

/* terms popup */
.au-pop-back { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(16, 16, 16, 0.45); animation: fade 0.2s; }
.au-pop { width: min(720px, 100%); max-height: min(82vh, 820px); display: flex; flex-direction: column; background: var(--paper); border-radius: 28px; box-shadow: 0 24px 64px rgba(16, 16, 16, 0.25); overflow: hidden; animation: pop 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.au-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 32px 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.045em; }
.au-pop-head button { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: background 0.2s; }
.au-pop-head button:hover { background: var(--blue); }
.au-pop-head svg { width: 16px; height: 16px; }
.au-pop-body { overflow-y: auto; padding: 22px 32px 32px; font-size: 15px; line-height: 1.85; color: var(--ink); word-break: keep-all; }
.au-pop-body h4 { margin: 18px 0 4px; font-size: 15.5px; }
.au-pop-body h4:first-child { margin-top: 0; }
.au-pop-body p { margin: 0; color: var(--muted); }

/* ink toast */
body.landing .toast { background: var(--ink); border-radius: 14px; }
body.landing .toast.err { background: var(--ink); }

/* back button (auth pages have no nav bar) */
.au-back {
  position: fixed; top: 22px; left: clamp(16px, 2vw, 28px); z-index: 10;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(16, 16, 16, 0.06); box-shadow: 0 6px 24px rgba(16, 16, 16, 0.06);
  transition: background 0.2s, color 0.2s;
}
.au-back:hover { background: var(--ink); color: #fff; }
.au-back svg { width: 22px; height: 22px; margin-left: -2px; }

@media (max-width: 520px) {
  .au-code input { height: 54px; font-size: 22px; }
  .au-title { font-size: 26px; }
}

@media (max-width: 520px) {
  .au-card { padding: 24px 20px 20px; border-radius: 26px; }
  .au-terms-box { padding: 6px 12px 8px 16px; }
  .au-terms-sub { padding-left: 4px; height: auto; min-height: 44px; }
  .au-terms-sub .au-check { font-size: 14px; }
}
.au-check .req { white-space: nowrap; }
