/* ============================================================
   ACCOUNTITFAST (AIF) — Authentication Pages Stylesheet (CPANEL009)
   Design tokens live in tokens.css (loaded first).
   Login · Signup · App placeholder
   Theme: Orange & Grey · Futuristic
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(255,122,26,.85); color: #fff; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- Background FX ---------------- */
.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 20%, transparent 75%);
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .4; }
.orb-a { width: 520px; height: 520px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(255,122,26,.45), transparent 65%); animation: orbFloat 10s ease-in-out infinite; }
.orb-b { width: 420px; height: 420px; bottom: -140px; left: 30%; background: radial-gradient(circle, rgba(255,92,0,.3), transparent 65%); animation: orbFloat 12s ease-in-out infinite reverse; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-24px) scale(1.06); }
}

.aif-particle {
  position: absolute; color: rgba(255,150,70,.4); font-weight: 700; pointer-events: none;
  animation: particleRise linear infinite; opacity: 0;
}
@keyframes particleRise {
  0%   { transform: translateY(20px); opacity: 0; }
  12%  { opacity: .7; }
  88%  { opacity: .25; }
  100% { transform: translateY(-90px); opacity: 0; }
}

/* ---------------- Layout ---------------- */
.auth-layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.auth-layout > * { min-width: 0; } /* prevents mobile blowout */

/* ---------------- Brand (shared) ---------------- */
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); }
.brand-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad);
  box-shadow: 0 6px 22px -4px rgba(255,122,26,.55);
  animation: markPulse 3.2s ease-in-out infinite;
}
@keyframes markPulse {
  0%,100% { box-shadow: 0 6px 22px -4px rgba(255,122,26,.55); }
  50%     { box-shadow: 0 6px 30px -2px rgba(255,122,26,.85); }
}
.brand-name { font-weight: 800; font-size: 1.14rem; letter-spacing: -.02em; }
.brand-name em { font-style: normal; color: var(--orange); }
.brand-tag { display: block; font-family: var(--font-body); font-size: .62rem; font-weight: 600; letter-spacing: .34em; color: var(--txt-3); margin-top: -3px; }

/* ---------------- Left showcase ---------------- */
.auth-showcase {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px circle at 20% 10%, rgba(255,122,26,.14), transparent 55%),
    radial-gradient(700px circle at 90% 90%, rgba(255,92,0,.1), transparent 55%),
    var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
}
.showcase-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: 46px 54px 40px;
  width: 100%;
}
.showcase-mid { margin: auto 0; padding: 48px 0; position: relative; }
.showcase-mid h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.16;
  margin-bottom: 38px;
  animation: fadeUp .8s var(--ease-out) .1s both;
}

.showcase-panel {
  position: relative; overflow: hidden;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.75), 0 20px 50px -30px rgba(255,122,26,.2);
  animation: fadeUp .8s var(--ease-out) .25s both;
}
.showcase-panel::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.07), transparent);
  transform: skewX(-24deg);
  animation: panelSweep 5.5s ease-in-out infinite;
}
@keyframes panelSweep {
  0%, 55% { left: -80%; }
  85%, 100% { left: 140%; }
}
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sc-head > span:first-child { font-size: .72rem; font-weight: 600; color: var(--txt-3); letter-spacing: .04em; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(46,230,168,.1); border: 1px solid rgba(46,230,168,.3);
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; color: var(--green);
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pingGreen 1.6s infinite; }
@keyframes pingGreen {
  0%  { box-shadow: 0 0 0 0 rgba(46,230,168,.6); }
  70% { box-shadow: 0 0 0 7px rgba(46,230,168,0); }
  100%{ box-shadow: 0 0 0 0 rgba(46,230,168,0); }
}
.sc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.sc-kpi { padding: 13px 15px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.sc-kpi small { display: block; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }
.sc-kpi b { display: block; font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; margin-top: 3px; }
.sc-kpi em { font-style: normal; font-size: .66rem; font-weight: 700; color: var(--green); }
.sc-bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.sc-bars i {
  flex: 1; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, rgba(255,122,26,.25), rgba(255,122,26,.55));
  height: var(--h);
  transform-origin: bottom; transform: scaleY(0);
  animation: barGrow 1s var(--ease-out) forwards;
  animation-delay: calc(.7s + var(--i, 0) * 0s);
}
.sc-bars i:nth-child(1) { animation-delay: .8s; }
.sc-bars i:nth-child(2) { animation-delay: .9s; }
.sc-bars i:nth-child(3) { animation-delay: 1s; }
.sc-bars i:nth-child(4) { animation-delay: 1.1s; }
.sc-bars i:nth-child(5) { animation-delay: 1.2s; }
.sc-bars i:nth-child(6) { animation-delay: 1.3s; }
.sc-bars i:nth-child(7) { animation-delay: 1.4s; }
.sc-bars i.hot { background: var(--grad); box-shadow: 0 0 18px rgba(255,122,26,.5); }
@keyframes barGrow { to { transform: scaleY(1); } }

.sc-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  background: rgba(15,19,27,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.7);
  font-size: .78rem; font-weight: 600;
  animation: floatY 5.5s ease-in-out infinite;
  will-change: transform;
}
.sc-chip small { display: block; font-size: .62rem; font-weight: 500; color: var(--txt-3); }
.sc-chip .ok { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgba(46,230,168,.15); color: var(--green); font-size: .8rem; }
.sc-chip .fx { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgba(255,122,26,.16); font-size: .85rem; }
.chip-a { top: -26px; right: -14px; animation-delay: .4s; }
.chip-b { bottom: -22px; left: -20px; animation-delay: 1.1s; animation-duration: 6.2s; }
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}

.showcase-foot { animation: fadeUp .8s var(--ease-out) .4s both; }
.showcase-foot .quote { font-size: 1.02rem; font-weight: 600; color: var(--txt); max-width: 420px; }
.quote-by { margin-top: 10px; font-size: .8rem; color: var(--txt-3); }
.quote-by b { color: var(--txt-2); }
.sc-stats { display: flex; gap: 26px; margin-top: 26px; }
.sc-stats span { font-size: .78rem; color: var(--txt-3); }
.sc-stats b { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--orange-2); }

/* ---------------- Right side / form ---------------- */
.auth-side {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 84px 32px 48px;
  min-width: 0; /* prevents mobile blowout */
}
.back-home {
  position: absolute; top: 26px; left: 32px;
  font-size: .84rem; font-weight: 600; color: var(--txt-3);
  transition: color .25s ease;
}
.back-home:hover { color: var(--orange-2); }

.auth-card {
  width: min(450px, 100%);
  max-width: 100%;
  padding: 40px 38px 34px;
  background: rgba(15,19,27,.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  box-shadow: 0 50px 110px -40px rgba(0,0,0,.8), 0 24px 70px -40px rgba(255,122,26,.25);
  animation: cardIn .7s var(--ease-out) both;
  position: relative;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.auth-card.shake { animation: cardIn .7s var(--ease-out) both, shake .5s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

.auth-card-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth-card-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.auth-card-brand .brand-name { font-size: 1.05rem; }

.auth-title { font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--txt-2); font-size: .92rem; margin-top: 7px; margin-bottom: 26px; }

/* Social buttons */
.auth-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 10px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: .88rem; font-weight: 600; color: var(--txt);
  transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease;
  white-space: nowrap;
}
.social-btn:hover { transform: translateY(-2px); border-color: rgba(255,122,26,.55); box-shadow: 0 12px 30px -12px rgba(255,122,26,.35); }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3); }

/* Fields */
.field { margin-bottom: 17px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--txt-2); margin-bottom: 7px; }
.field label .optional { font-weight: 400; color: var(--txt-3); font-size: .78rem; }

.input-wrap { position: relative; }
.input-wrap input, .input-wrap select {
  width: 100%;
  padding: 13px 15px 13px 45px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--txt);
  font-family: inherit; font-size: .93rem;
  outline: none;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
  appearance: none;
}
.input-wrap select { cursor: pointer; }
.input-wrap select option, .input-wrap select optgroup { background: var(--panel-2); color: var(--txt); }
.input-wrap input::placeholder { color: var(--txt-3); }
.input-wrap:focus-within {
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(255,122,26,.13);
}
.input-wrap:focus-within input, .input-wrap:focus-within select {
  border-color: rgba(255,122,26,.6);
  background: var(--panel-2);
}
.input-wrap input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0f131b inset;
  -webkit-text-fill-color: #eef1f6;
  transition: background-color 9999s ease-out;
}
.input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--txt-3); pointer-events: none;
  display: flex;
}
.input-wrap .chev {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  color: var(--txt-3); font-size: .7rem; pointer-events: none;
}
.input-wrap select { padding-right: 34px; }

.toggle-pw {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--txt-3); border-radius: 9px;
  transition: color .25s ease, background .25s ease;
}
.toggle-pw:hover { color: var(--orange-2); background: rgba(255,122,26,.08); }
.toggle-pw .eye-off { display: none; }
.toggle-pw.showing .eye { display: none; }
.toggle-pw.showing .eye-off { display: block; }

/* Field errors */
.field .err-msg { display: none; font-size: .78rem; color: var(--red); margin-top: 6px; }
.field.error .err-msg { display: block; }
.field.error .input-wrap input, .field.error .input-wrap select {
  border-color: rgba(255,93,108,.65);
}
.field.error .input-wrap:focus-within { box-shadow: 0 0 0 4px rgba(255,93,108,.12); }

/* Checkbox */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--txt-2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  flex: none; width: 20px; height: 20px; margin-top: 0;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--panel);
  display: grid; place-items: center;
  transition: background .25s ease, border-color .25s ease;
}
.check .box::after {
  content: "✓"; color: #1a0d02; font-size: .72rem; font-weight: 800;
  opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .25s var(--ease-out);
}
.check input:checked + .box { background: var(--grad); border-color: transparent; }
.check input:checked + .box::after { opacity: 1; transform: scale(1); }
.check:focus-within .box { box-shadow: 0 0 0 4px rgba(255,122,26,.16); }
.check a { color: var(--orange-2); font-weight: 600; }
.check a:hover { text-decoration: underline; }

/* Form extras */
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; }
.link-ghost { font-size: .85rem; font-weight: 600; color: var(--orange-2); transition: color .25s; }
.link-ghost:hover { color: var(--orange); text-decoration: underline; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Password strength meter */
.pw-meter { display: flex; gap: 6px; margin-top: 10px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 99px; background: #1e2530; transition: background .35s ease; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: #ff9f43; }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--yellow); }
.pw-meter[data-s="4"] i { background: var(--green); }
.pw-label { font-size: .74rem; color: var(--txt-3); margin-top: 6px; min-height: 18px; }
.pw-label[data-s="1"] { color: var(--red); }
.pw-label[data-s="2"] { color: #ff9f43; }
.pw-label[data-s="3"] { color: var(--yellow); }
.pw-label[data-s="4"] { color: var(--green); }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 700; font-size: .95rem;
  padding: 15px 30px;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s ease, background .3s ease, border-color .3s ease;
  white-space: nowrap;
}
.btn-block { width: 100%; }
.btn-primary {
  background: var(--grad);
  color: #1a0d02;
  box-shadow: 0 10px 34px -8px rgba(255,122,26,.55);
  animation: btnGlow 3s ease-in-out infinite;
}
@keyframes btnGlow {
  0%,100% { box-shadow: 0 10px 34px -8px rgba(255,122,26,.55); }
  50%     { box-shadow: 0 14px 44px -6px rgba(255,122,26,.8); }
}
.btn-primary:hover { transform: translateY(-3px) scale(1.01); }
.btn-primary:active { transform: translateY(-1px) scale(.99); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-24deg);
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine {
  0%, 55% { left: -80%; }
  80%, 100% { left: 130%; }
}
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--txt);
  background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: rgba(255,122,26,.6); background: rgba(255,122,26,.07); transform: translateY(-3px); }
.btn-sm { padding: 11px 20px; font-size: .85rem; border-radius: 11px; }

/* Alerts */
.form-alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: .87rem;
  margin-bottom: 20px;
}
.form-alert > div { min-width: 0; }
.form-alert.error { background: rgba(255,93,108,.09); border: 1px solid rgba(255,93,108,.35); color: #ffb3ba; }
.form-alert.success { background: rgba(46,230,168,.09); border: 1px solid rgba(46,230,168,.35); color: #9df0d0; }
.form-alert p + p { margin-top: 4px; }

/* Demo hint */
.link-hint {
  display: flex; align-items: center; gap: 13px;
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(255,122,26,.32);
}
.link-hint > div { min-width: 0; }
.link-hint .lh-icon { font-size: 1.2rem; }
.demo-hint b { display: block; font-size: .84rem; font-family: var(--font-head); }
.demo-hint p { font-size: .78rem; color: var(--txt-2); }
.demo-hint .dh-fill {
  margin-left: auto;
  font-size: .78rem; font-weight: 700; color: var(--orange-2);
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255,122,26,.4);
  transition: background .25s ease, transform .25s ease;
  white-space: nowrap;
}
.demo-hint .dh-fill:hover { background: rgba(255,122,26,.14); transform: translateY(-1px); }

.auth-alt { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--txt-3); }
.auth-alt a { color: var(--orange-2); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 1000;
  transform: translateX(-50%) translateY(14px);
  padding: 13px 22px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 13px;
  font-size: .86rem; font-weight: 500; color: var(--txt);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.8), 0 10px 30px -18px rgba(255,122,26,.35);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, transform .35s var(--ease-out), visibility .35s;
  max-width: min(420px, calc(100% - 48px));
  text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .auth-showcase { display: none; }
  .auth-layout { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .auth-card { padding: 32px 24px 28px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .auth-side { padding: 84px 18px 40px; }
  .auth-socials { grid-template-columns: 1fr; }
  .field label.check,
  .field label.check > span:last-child { white-space: normal; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   CPANEL025 · Part 21 — signup hardening
   ============================================================ */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ============================================================
   CPANEL029 · Part 25 — MFA challenge (login)
   ============================================================ */
.mfa-code-wrap { margin: 6px 0 4px; }
.mfa-code-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--txt);
  padding: 16px 18px;
  font-size: 1.5rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: .45em;
  text-align: center;
}
.mfa-code-wrap input:focus { border-color: var(--orange-2); outline: none; }
.mfa-mode-row { font-size: .72rem; color: var(--txt-3); margin: 0 0 14px; text-align: center; }
.mfa-switch {
  margin-top: 12px;
  background: none; border: none; padding: 4px;
  color: var(--orange-2);
  font-size: .78rem; font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.mfa-switch:hover { text-decoration: underline; }

/* ============================================================
   AGENDA006-U19 · the workspace's real name on the sign-in card
   Rendered only when the owner has actually set a company name.
   ============================================================ */
.auth-workspace {
  margin: -6px 0 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent, #ff7a1a);
  text-transform: uppercase;
}

/* ============================================================
   AUTH FRAME · login + signup
   Back top-left · brand top-right · card centered · slim footer
   Login stays one static viewport. Signup may scroll (long form).
   ============================================================ */
html:has(body.auth-login),
body.auth-login {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body.auth-login { min-height: 100dvh; }

body.auth-frame .auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.auth-login .auth-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.auth-frame .auth-topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px 0;
}

body.auth-frame .auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(15, 19, 27, .72);
  font-size: .84rem;
  font-weight: 600;
  color: var(--txt-2);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
body.auth-frame .auth-back:hover {
  color: var(--orange-2);
  border-color: rgba(255, 122, 26, .45);
  background: rgba(255, 122, 26, .08);
}

body.auth-frame .auth-brand-tr {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  text-align: left;
}
body.auth-frame .auth-brand-tr .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
body.auth-frame .auth-brand-tr .brand-name {
  font-size: 1.02rem;
  line-height: 1.15;
}
body.auth-frame .auth-brand-tr .brand-tag {
  margin-top: 1px;
  letter-spacing: .22em;
}

body.auth-frame .auth-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

body.auth-login .auth-card {
  width: min(420px, 100%);
  padding: 28px 30px 22px;
  margin: 0;
}

body.auth-frame .auth-card-brand { display: none; }
body.auth-frame .auth-title { font-size: 1.38rem; }
body.auth-frame .auth-sub { margin-top: 4px; margin-bottom: 18px; font-size: .88rem; }
body.auth-frame .auth-socials-one { grid-template-columns: 1fr; }
body.auth-login .auth-divider { margin: 16px 0; }
body.auth-login .field { margin-bottom: 12px; }
body.auth-login .form-row { margin: 2px 0 16px; }
body.auth-frame .auth-alt { margin-top: 16px; font-size: .86rem; }

body.auth-frame .field.error .err-msg,
body.auth-frame .field-note.error {
  display: block;
  font-size: .76rem;
  font-weight: 500;
  color: var(--red);
  margin-top: 6px;
  line-height: 1.35;
}
body.auth-frame .field-note.error { text-align: center; margin: 8px 0 0; }

body.auth-frame .auth-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding: 10px 28px 14px;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 13, .45);
  font-size: .74rem;
  color: var(--txt-3);
}
body.auth-frame .auth-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
body.auth-frame .auth-foot-links a {
  color: var(--txt-3);
  font-weight: 600;
  transition: color .2s ease;
}
body.auth-frame .auth-foot-links a:hover { color: var(--orange-2); }

/* Signup — same chrome, wider card, page may scroll */
body.auth-signup {
  overflow-x: hidden;
  overflow-y: auto;
}
body.auth-signup .auth-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 12px;
  background: linear-gradient(to bottom, rgba(7,9,13,.94), rgba(7,9,13,.78));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body.auth-signup .auth-main {
  align-items: flex-start;
  padding: 8px 20px 28px;
}
body.auth-signup .auth-card {
  width: min(640px, 100%);
  padding: 28px 30px 24px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  body.auth-frame .auth-topbar { padding: 12px 14px 0; }
  body.auth-signup .auth-topbar { padding-bottom: 10px; }
  body.auth-frame .auth-brand-tr .brand-name { font-size: .9rem; }
  body.auth-frame .auth-brand-tr .brand-tag { letter-spacing: .14em; font-size: .56rem; }
  body.auth-frame .auth-brand-tr .brand-mark { width: 34px; height: 34px; }
  body.auth-frame .auth-card { padding: 22px 18px 18px; }
  body.auth-frame .auth-foot {
    justify-content: center;
    text-align: center;
    padding: 8px 14px 12px;
  }
}
@media (max-height: 720px) {
  body.auth-login .auth-topbar { padding-top: 10px; }
  body.auth-login .auth-card { padding: 20px 22px 16px; }
  body.auth-login .auth-title { font-size: 1.22rem; }
  body.auth-login .auth-sub { margin-bottom: 12px; }
  body.auth-login .auth-divider { margin: 12px 0; }
  body.auth-login .field { margin-bottom: 10px; }
  body.auth-login .btn { padding: 12px 22px; }
  body.auth-login .auth-alt { margin-top: 12px; }
}
@media (max-height: 580px) {
  body.auth-login .auth-socials,
  body.auth-login .auth-divider { display: none; }
  body.auth-login .auth-sub { display: none; }
}

/* Terms stay on one line (checkbox + sentence) */
.field label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  white-space: nowrap;
}
.field label.check > span:last-child { white-space: nowrap; }

/* ============================================================
   STEP SIGNUP · world picker + shop name + account
   ============================================================ */
.su-steps {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.su-steps li {
  flex: 1;
  text-align: center;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-3);
  padding: 7px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.su-steps li.on {
  color: #1a0d02;
  background: var(--grad);
  border-color: transparent;
}
.su-steps li.done {
  color: var(--orange-2);
  border-color: rgba(255,122,26,.4);
}

.world-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.world-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--txt);
  transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease;
}
.world-btn .world-ic { font-size: 1.4rem; line-height: 1; }
.world-btn b { font-family: var(--font-head); font-size: .96rem; }
.world-btn em { font-style: normal; font-size: .74rem; color: var(--txt-3); line-height: 1.35; }
.world-btn-shop {
  grid-column: 1 / -1;
  padding: 18px 16px;
  border-color: rgba(255,122,26,.55);
  background: linear-gradient(180deg, rgba(255,122,26,.16), rgba(15,19,27,.55));
  box-shadow: 0 14px 36px -16px rgba(255,122,26,.55);
}
.world-btn-shop:hover {
  transform: translateY(-2px);
  border-color: rgba(255,122,26,.9);
}
.world-btn-soon { opacity: .78; cursor: pointer; }
.world-btn-soon:hover { border-color: rgba(255,122,26,.35); }
.world-soon {
  display: inline-block;
  margin-top: 4px;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-2);
}

body.auth-worlds .auth-card,
body.auth-signup-step .auth-card {
  width: min(520px, 100%);
}

@media (max-width: 540px) {
  .world-grid { grid-template-columns: 1fr 1fr; }
  .su-steps li { font-size: .58rem; letter-spacing: .04em; padding: 6px 2px; }
}

/* Login: compact on phones — not full-bleed / zoomed */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 640px) {
  body.auth-frame .auth-back { min-height: 44px; }
  body.auth-signup .auth-main { padding: 8px 14px 20px; }
  body.auth-signup .auth-card { width: min(100%, 100%); padding: 18px 14px 16px; }
  .world-btn { min-height: 88px; padding: 14px 12px; }
  .input-wrap input, .input-wrap select { font-size: 16px; }
  body.auth-login .auth-main {
    padding: 8px 20px 16px;
    align-items: center;
  }
  body.auth-login .auth-card {
    width: min(340px, 100%);
    max-width: 340px;
    padding: 16px 16px 14px;
    border-radius: 14px;
    box-shadow: 0 20px 50px -28px rgba(0,0,0,.7);
  }
  body.auth-login .auth-title { font-size: 1.12rem; }
  body.auth-login .auth-sub { font-size: .78rem; margin-top: 4px; margin-bottom: 12px; }
  body.auth-login .field { margin-bottom: 10px; }
  body.auth-login .field label { font-size: .72rem; }
  body.auth-login .input-wrap input {
    font-size: 16px;
    padding: 10px 12px 10px 40px;
    border-radius: 10px;
  }
  body.auth-login .btn {
    padding: 11px 16px;
    font-size: .84rem;
    border-radius: 10px;
  }
  body.auth-login .auth-alt { font-size: .78rem; margin-top: 12px; }
  body.auth-login .form-row { font-size: .76rem; margin: 2px 0 12px; }
}
