/* ==========================================================================
   SunTeam v2 — Auth (login / password recovery / signup)
   ========================================================================== */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: #FBFAF6; position: relative; overflow-x: hidden; }

/* animated warm background */
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(rgba(17,19,24,.06) 1px, transparent 1px) 0 0 / 24px 24px, #FBFAF6; }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, #FBFAF6); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: orb 18s ease-in-out infinite; }
.orb.o1 { width: 520px; height: 520px; background: #FFE14D; top: -180px; inset-inline-start: -120px; }
.orb.o2 { width: 420px; height: 420px; background: #FFD400; bottom: -160px; inset-inline-end: 8%; animation-delay: -6s; opacity: .4; }
.orb.o3 { width: 300px; height: 300px; background: #FFC4A8; top: 30%; inset-inline-end: -80px; animation-delay: -12s; opacity: .35; }
@keyframes orb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 40px) scale(1.08); } }

/* top bar */
.auth-top { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 32px) 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-logo img { height: 40px; }
.auth-top-links { display: flex; align-items: center; gap: 14px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.auth-top-links > a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.auth-top-links .ic { color: var(--accent-ink); }

/* shell */
.auth-shell { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(18px, 4vw, 40px) clamp(16px, 3vw, 32px);
  display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.auth-main { display: flex; justify-content: center; }
.auth-card {
  width: 100%; padding: clamp(24px, 4vw, 40px); border-radius: 32px;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(1.6) blur(22px); -webkit-backdrop-filter: saturate(1.6) blur(22px);
  box-shadow: 0 40px 80px -40px rgba(17,19,24,.28), 0 2px 6px rgba(17,19,24,.04), inset 0 0 0 1px rgba(255,255,255,.9);
}
.auth-head { margin-bottom: 24px; }
.auth-badge { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--sun-400); color: var(--ink-900); box-shadow: var(--sh-sun); margin-bottom: 18px; }
.auth-badge .ic { width: 26px; height: 26px; }
.auth-head h1 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); font-weight: 900; line-height: 1.35; }
.auth-head p { color: var(--text-3); margin-top: 6px; font-size: var(--fs-sm); line-height: 1.9; }

/* segmented switch (marketer / preferred customer) */
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 18px; background: var(--surface-sunk); margin-bottom: 22px; }
.auth-switch a { height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-3); transition: all .2s; }
.auth-switch a.is-active { background: #fff; color: var(--text); box-shadow: var(--sh-1), 0 4px 12px -6px rgba(17,19,24,.18); }
.auth-switch a .ic { width: 18px; height: 18px; }

/* form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field label { display: flex; justify-content: space-between; align-items: center; }
.auth-form .field label a { font-size: var(--fs-xs); color: var(--accent-ink); font-weight: 700; }
.auth-form .input { height: 56px; font-size: var(--fs-lg); background: #fff; border-radius: 16px; }
.auth-form .input-group .ic { inset-inline-start: 16px; }
.auth-form .input-group .input { padding-inline-start: 48px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-inline-end: 92px; }
.pass-toggle { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); height: 40px; padding-inline: 12px; border-radius: 12px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; background: var(--surface-sunk); }
.pass-toggle:hover { background: var(--ink-200); }
.input-group .pass-toggle .ic { position: static; transform: none; color: inherit; }
.auth-form .btn-lg { width: 100%; height: 58px; border-radius: 18px; font-size: var(--fs-lg); }
.btn.is-busy { opacity: .75; pointer-events: none; }
.btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin-slow .7s linear infinite; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; margin: 6px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-alt .btn { width: 100%; border-radius: 16px; }
.auth-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(17,19,24,.04); font-size: var(--fs-xs); color: var(--text-2); line-height: 1.9; }
.auth-note .ic { color: var(--mint); flex: none; margin-top: 2px; }
.auth .flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; margin-bottom: 16px; font-weight: 600; font-size: var(--fs-sm); line-height: 1.9; }
.auth .flash-ok { background: var(--mint-soft); color: var(--mint); }
.auth .flash-bad { background: var(--rose-soft); color: var(--rose); }

/* brand stage */
.auth-stage { position: relative; display: flex; flex-direction: column; align-items: stretch; }
.stage-sun { position: relative; width: min(440px, 100%); aspect-ratio: 1; margin: 0 auto; }
.stage-rays { position: absolute; inset: -8%; border-radius: 50%; background: repeating-conic-gradient(rgba(242,194,0,.22) 0 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 50%, #000 51%, #000 68%, transparent 69%); mask: radial-gradient(circle, transparent 50%, #000 51%, #000 68%, transparent 69%); animation: spin-slow 70s linear infinite; }
.stage-product { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.chip-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 18px; font-size: var(--fs-sm); animation: float 8s ease-in-out infinite; z-index: 2; }
.chip-float b { display: block; line-height: 1.5; }
.chip-float small { display: block; font-size: var(--fs-xs); color: var(--text-3); }
.cf-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.chip-float .avatar { width: 30px; height: 30px; font-size: 11px; }
.chip-float.c1 { top: 8%; inset-inline-end: 4%; }
.chip-float.c2 { top: 42%; inset-inline-start: -2%; animation-delay: -3s; }
.chip-float.c3 { top: 62%; inset-inline-end: 0; animation-delay: -5s; }
.stage-copy { position: relative; z-index: 2; padding-top: 8px; }
.stage-copy .eyebrow { margin-bottom: 12px; }
.stage-copy h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); font-weight: 900; line-height: 1.25; }
.stage-copy p { color: var(--text-2); margin-top: 10px; max-width: 440px; line-height: 2; }

.auth-legal { text-align: center; font-size: 11px; color: var(--text-3); padding: 0 16px 20px; line-height: 1.9; }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-stage { display: none; }
  .auth-card { max-width: 520px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .auth-card { padding: 22px 18px; border-radius: 26px; }
  .auth-logo img { height: 34px; }
}

/* ---------- wide mode (signup wizard) ---------- */
.auth-wide .auth-shell { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.auth-wide .auth-main { display: block; }
.auth-wide .auth-card { max-width: none; }
.auth-wide .auth-stage { position: sticky; top: 24px; }
.auth-wide .stage-sun { width: 300px; }
.auth-wide .chip-float.c2 { inset-inline-start: -10%; }
.auth-wide .stage-copy h2 { font-size: 1.5rem; }
@media (max-width: 1100px) { .auth-wide .auth-shell { grid-template-columns: 1fr; } .auth-wide .auth-stage { display: none; } }

/* ---------- signup wizard ---------- */
.wiz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; counter-reset: none; }
.wiz-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); text-align: center; }
.wiz-steps li::before { content: ""; position: absolute; top: 17px; inset-inline-start: 50%; width: 100%; height: 3px; border-radius: 3px; background: var(--line-strong); z-index: 0; }
.wiz-steps li:last-child::before { display: none; }
.wiz-steps b { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--text-3); font-size: var(--fs-sm); transition: all .3s var(--ease); }
.wiz-steps li.is-active { color: var(--text); }
.wiz-steps li.is-active b { background: var(--sun-400); color: var(--ink-900); box-shadow: 0 0 0 6px rgba(255,212,0,.25); }
.wiz-steps li.is-done b { background: var(--mint); color: #fff; box-shadow: none; }
.wiz-steps li.is-done::before { background: var(--mint); }
.wiz-panel { display: flex; flex-direction: column; gap: 14px; animation: wiz-in .35s var(--ease); }
@keyframes wiz-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wiz-card { padding: 22px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.wiz-title { display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); font-weight: 800; margin-bottom: 6px; }
.wiz-title .ic { color: var(--accent-ink); }
.wiz-sub { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.9; margin-bottom: 14px; }
.wiz-sub a { color: var(--accent-ink); font-weight: 700; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 4px; }
.wiz-nav .btn:only-child { margin-inline-start: auto; }
.wiz .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.wiz .form-grid .span-2 { grid-column: span 2; }
.wiz .field label i { color: var(--rose); font-style: normal; }
.wiz .input { height: 50px; font-size: var(--fs-md); }
.wiz textarea.input { height: auto; min-height: 84px; padding-block: 12px; line-height: 1.9; resize: vertical; }
.wiz select.input { appearance: auto; }
.wiz .field.has-error .input { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.field-err { font-size: var(--fs-xs); color: var(--rose); font-weight: 700; }
.intro-row { display: flex; gap: 8px; }
.intro-row .btn { height: 50px; flex: none; }
.intro-result { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600; }
.intro-result.is-ok { background: var(--mint-soft); color: var(--mint); }
.intro-result.is-ok b { color: var(--text); }
.intro-result.is-bad { background: var(--rose-soft); color: var(--rose); }
.dob { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 6px; }
.dob .input { padding-inline: 10px; }
.terms { display: flex; flex-direction: column; gap: 10px; }
.term-card { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: var(--fs-sm); font-weight: 600; line-height: 1.9; transition: box-shadow .2s, background .2s; }
.term-card input { position: absolute; opacity: 0; pointer-events: none; }
.term-card:has(input:checked) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--mint); }
.addr-check { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line-strong); color: transparent; margin-top: 2px; transition: all .2s; }
.term-card input:checked ~ .addr-check { background: var(--mint); box-shadow: none; color: #fff; }
.term-card input:focus-visible ~ .addr-check { outline: 2.5px solid var(--sun-500); outline-offset: 2px; }
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.review div { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.review dt { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.review dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.result-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 36px 22px; }
.result-done .result-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; box-shadow: 0 0 0 10px var(--mint-soft); }
.result-done .result-ico .ic { width: 40px; height: 40px; stroke-width: 2.6; }
.done-code { font-size: var(--fs-3xl); font-weight: 900; background: var(--amber-soft); padding: 8px 24px; border-radius: var(--r-md); direction: ltr; }
.wiz .flash ul { margin: 6px 0 0; padding-inline-start: 18px; list-style: disc; }
@media (max-width: 600px) {
  .wiz .form-grid, .review { grid-template-columns: 1fr; }
  .wiz .form-grid .span-2 { grid-column: span 1; }
  .wiz-steps span { font-size: 10px; }
  .intro-row { flex-direction: column; }
  .wiz-nav .btn { flex: 1; }
}
/* preferred-customer auth helpers */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: var(--fs-xs); color: var(--text-3); }
.auth-note a { color: var(--accent-ink); text-decoration: underline; }
.pc-perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-perks li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--amber-soft); text-align: center; font-size: var(--fs-xs); font-weight: 700; }
.pc-perks .ic { color: var(--accent-ink); }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }
