/* ==========================================================================
   Public site: auth, error (landing lives in home.css)
   ========================================================================== */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 16px; }
.brand .mark { width: 34px; height: 34px; filter: drop-shadow(0 6px 10px rgba(47,91,234,.35)); }
.brand.small .mark { width: 28px; height: 28px; }
.grad { background: linear-gradient(90deg, #2f5bea, #6f8cff 60%, #2f5bea); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* shared bits for auth/error */
.btn-light { --bg: #fff; --fg: var(--ink); }
.btn-light:hover { color: #fff; }
@keyframes settle { to { transform: scale(1.02); } }
@keyframes cardUp { from { opacity: 0; transform: translateY(40px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { background: var(--stone); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; padding: 14px; gap: 14px; }
.auth-main { display: flex; flex-direction: column; padding: 20px clamp(16px, 4vw, 56px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-back { display: inline-flex; gap: 6px; align-items: center; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--paper); box-shadow: var(--sh-1); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.auth-back:hover { color: var(--copper); }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-foot { font-size: 12px; color: var(--mute); text-align: center; }

.auth-card { width: 100%; max-width: 440px; padding: clamp(24px, 3vw, 36px); background: var(--paper); border-radius: 28px; box-shadow: var(--sh-2); animation: cardUp .8s var(--ease) both; }
.auth-card.wide { max-width: 540px; }
.auth-title { margin: 14px 0 8px; font-size: clamp(28px, 3vw, 36px); font-weight: 900; line-height: 1.3; }
.auth-lead { color: var(--ink-2); margin-bottom: 28px; font-size: 14.5px; }
.auth-form { margin-bottom: 22px; }
.auth-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.auth-alt { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }

.pw { position: relative; display: block; }
.pw-toggle { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: var(--mute); border-radius: 10px; }
.pw-toggle:hover, .pw-toggle.on { color: var(--copper); background: var(--copper-soft); }
.pw input { padding-left: 52px !important; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 0 0 24px; padding: 6px; background: var(--paper-2); border-radius: 16px; }
.steps li { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; font-size: 13.5px; font-weight: 800; color: var(--mute); transition: all .3s var(--ease); }
.steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font-size: 12px; }
.steps li.is-on { background: #fff; color: var(--copper); box-shadow: var(--sh-1); }
.steps li.is-on span { background: var(--copper); color: #fff; }
.stepped .step:not(.is-on) { display: none; }
.stepped .step.is-on { animation: fadeUp .5s var(--ease) both; }
.step-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 22px; }

.auth-art { position: sticky; top: 14px; height: calc(100svh - 28px); overflow: hidden; border-radius: 28px; background: #0f1a33; color: #fff; box-shadow: var(--sh-3); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: settle 3s var(--ease) forwards; }
.auth-art-veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,21,48,.85), rgba(12,21,48,.1) 55%), radial-gradient(70% 60% at 0% 100%, rgba(47,91,234,.55), transparent 60%); }
.auth-art-grid, .auth-art .crop { display: none; }
.auth-art-meta { position: absolute; top: 22px; inset-inline: 22px; display: flex; gap: 8px; justify-content: flex-start; }
.auth-art-meta span { padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 700; font-family: var(--f); letter-spacing: 0; }
.auth-art-quote { position: absolute; bottom: 40px; inset-inline-start: 40px; inset-inline-end: 40px; font-size: clamp(32px, 3.6vw, 52px); font-weight: 900; line-height: 1.3; }

/* success */
.done { text-align: center; }
.done .tag { margin: 0 auto; }
.done .stamp { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 24px; background: var(--brand-grad); color: #fff; box-shadow: var(--sh-brand); animation: pop .7s var(--ease) both; }
@keyframes pop { from { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.creds div { padding: 14px; background: var(--paper-2); border-radius: var(--r); }
.creds dt { font-size: 12px; color: var(--mute); font-weight: 700; }
.creds dd { margin: 4px 0 0; font-size: 18px; font-weight: 800; direction: ltr; text-align: center; }

/* ---------------- unit picker: the tower itself ---------------- */
.unitpick { margin-bottom: 6px; }
.unitpick .field-label em { color: var(--copper); font-weight: 800; font-size: 13px; background: var(--copper-soft); padding: 2px 10px; border-radius: 99px; }
.unitpick-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; margin-bottom: 10px; border-radius: var(--r); background: var(--paper-2); border: 1.5px solid transparent; color: var(--mute); }
.unitpick-search:focus-within { border-color: var(--copper); background: #fff; color: var(--copper); }
.unitpick-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; min-width: 0; font-weight: 600; }
.unitpick-tower {
  position: relative; max-height: 320px; overflow: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 18px; background: var(--paper-2);
  scrollbar-width: thin; scrollbar-color: var(--mute-2) transparent;
}
.unitpick-roof { height: 10px; margin: 0 30% 8px; border-radius: 10px 10px 0 0; background: linear-gradient(90deg, #c9d6ff, #2f5bea, #c9d6ff); opacity: .6; }
.unitpick-floor { display: grid; grid-template-columns: 34px 1fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.unitpick-floor[hidden] { display: none; }
.unitpick-fl { display: grid; place-items: center; height: 40px; font-size: 11.5px; font-weight: 800; color: var(--mute); }
.unitpick-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
.unit { position: relative; display: grid; place-items: center; height: 40px; cursor: pointer; border-radius: 11px; background: #fff; font-size: 13.5px; font-weight: 700; box-shadow: 0 1px 2px rgba(20,33,61,.06); transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s; }
.unit input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.unit:hover { background: var(--copper-soft); color: var(--copper); }
.unit:has(input:checked) { background: var(--brand-grad); color: #fff; transform: scale(1.06); box-shadow: var(--sh-brand); }
.unit:has(input:focus-visible) { outline: 3px solid rgba(47,91,234,.4); }
.unit[hidden] { display: none; }
.unitpick-ground { margin-top: 4px; height: 6px; border-radius: 6px; background: var(--line); }
.unitpick-ground span { display: none; }

/* ---------------- error ---------------- */
.err { min-height: 100svh; display: grid; place-items: center; padding: 32px 16px; }
.err > div { text-align: center; display: grid; justify-items: center; }
.err-code { font-size: clamp(110px, 18vw, 220px); font-weight: 900; line-height: 1; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-msg { margin: 14px 0 26px; font-size: 20px; font-weight: 800; line-height: 1.7; max-width: 26em; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; padding: 10px; gap: 0; }
  .auth-art { position: relative; order: -1; top: 0; height: 190px; border-radius: 22px; }
  .auth-art-quote { bottom: 18px; inset-inline-start: 20px; font-size: 22px; }
  .auth-art-quote br { display: none; }
  .auth-art-meta { display: none; }
  .auth-main { padding: 0; margin-top: -40px; position: relative; z-index: 2; }
  .auth-top { position: absolute; top: -136px; inset-inline: 14px; color: #fff; }
  .auth-top .auth-back { background: rgba(255,255,255,.16); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
  .auth-body { padding: 0 0 24px; }
  .auth-card { border-radius: 24px; padding: 22px 18px; }
}
