/* Account pages (code, password reset, terms) — same look as the sign-in pop-up. */

.auth-body {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(244, 220, 60, .10), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgba(244, 220, 60, .05), transparent 70%),
    var(--night);
  color: var(--on-night);
}
.auth-body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.auth-body > * { position: relative; }

.auth-main {
  flex: 1 1 auto;
  display: grid; place-items: center;
  padding: clamp(24px, 6vh, 72px) 16px;
}
.auth-card { width: min(880px, 100%); max-height: none; animation: dialogIn .5s cubic-bezier(.2, .7, .2, 1); }
.auth-card .signin { padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px); }
.auth-card .sd__hello h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 750; letter-spacing: -0.03em; color: #fff; }
.auth-card .sd__hello p { margin-top: 10px; color: #c7ced8; font-size: 15px; line-height: 1.6; }

/* Steps list on the left panel */
.auth-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.auth-steps li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; color: #c7ced8; }
.auth-steps li::before {
  content: counter(s); width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: var(--accent); border: 1px solid rgba(244, 220, 60, .45); background: rgba(10, 14, 19, .5);
}
.auth-steps li.is-done::before { content: "✓"; background: #4cc38a; border-color: #4cc38a; color: #0a0e13; }
.auth-steps li.is-now::before { background: var(--accent); border-color: var(--accent); color: #0a0e13; }
.auth-steps b { color: #fff; font-weight: 600; display: block; }

/* Messages */
.auth-messages { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.auth-msg { padding: 11px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; border: 1px solid; }
.auth-msg--info, .auth-msg--success { background: rgba(76, 195, 138, .10); border-color: rgba(76, 195, 138, .30); color: #b9ecd2; }
.auth-msg--warning { background: rgba(244, 220, 60, .10); border-color: rgba(244, 220, 60, .32); color: #f1e3a0; }
.auth-msg--error { background: rgba(239, 107, 107, .12); border-color: rgba(239, 107, 107, .35); color: #ffb4b4; }
.auth-card .alert ul, .auth-card .errorlist { list-style: none; margin: 0; padding: 0; }
.auth-card .field .errorlist li, .field-error { margin-top: 6px; font-size: 13.5px; color: #ffb4b4; }

/* Form bits */
.auth-card form { margin-top: 22px; display: grid; gap: 16px; }
.auth-card .field input { width: 100%; }
.auth-help { font-size: 13px; color: var(--on-night-2); line-height: 1.5; }
.auth-help ul { margin: 6px 0 0; padding-left: 18px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; margin-top: 4px; }
.auth-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.auth-links a.is-muted { color: var(--on-night-2); font-weight: 500; }
.auth-links a.is-muted:hover { color: #fff; }

/* One-time code input: big, spaced digits; works with SMS autofill and paste */
.otp-input {
  text-align: center;
  font-size: 30px !important;
  font-weight: 700;
  letter-spacing: .5em;
  padding-left: .5em !important;   /* balance the trailing letter-spacing */
  min-height: 64px !important;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
.otp-input::placeholder { color: #3b4655; letter-spacing: .5em; }

/* Status screens (email sent, password changed, link expired) */
.auth-status { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 12px 0 4px; }
.auth-status__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2, .9, .3, 1.4); }
.auth-status__icon svg { width: 30px; height: 30px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-status__icon--ok { background: rgba(76, 195, 138, .15); color: #4cc38a; }
.auth-status__icon--ok svg { stroke: #4cc38a; }
.auth-status__icon--mail { background: rgba(244, 220, 60, .14); }
.auth-status__icon--mail svg { stroke: var(--accent); }
.auth-status__icon--warn { background: rgba(239, 107, 107, .14); }
.auth-status__icon--warn svg { stroke: #ef6b6b; }
.auth-status h2 { font-size: 24px; color: #fff; margin-top: 6px; }
.auth-status p { color: var(--on-night-2); max-width: 42ch; }
.auth-status .btn { margin-top: 14px; }

.auth-foot { text-align: center; padding: 18px 16px 26px; font-size: 13px; color: var(--on-night-2); }
.auth-foot a { color: #cfd6df; text-decoration: none; }
.auth-foot a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 760px) {
  .auth-card .sd__hello p, .auth-steps { display: none; }
  .auth-card .sd__brand .sd__secure { display: none; }
  .otp-input { font-size: 26px !important; letter-spacing: .4em; }
}

/* ---------- Terms of Service ---------- */
.legal { width: min(1100px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.legal__head { grid-column: 1 / -1; }
.legal__head .kicker { color: var(--accent); }
.legal__head h1 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 750; letter-spacing: -0.035em; color: #fff; }
.legal__head p { margin-top: 12px; color: var(--on-night-2); font-size: 17px; max-width: 60ch; }
.legal__toc { position: sticky; top: 88px; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--night-line); }
.legal__toc b { display: block; font-size: 12.5px; color: var(--on-night-2); font-weight: 600; margin-bottom: 10px; }
.legal__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal__toc a { display: block; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: #cfd6df; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.legal__toc a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.legal__toc a.is-on { background: rgba(244, 220, 60, .12); color: var(--accent); }
.legal__doc {
  padding: clamp(24px, 4vw, 48px);
  border-radius: 20px;
  background: rgba(18, 24, 33, .85);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  color: #d3d9e1; font-size: 16px; line-height: 1.75;
}
.legal__doc h3 { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 36px 0 10px; scroll-margin-top: 90px; }
.legal__doc h3:first-child { margin-top: 0; font-size: 24px; }
.legal__doc p { margin: 0 0 14px; }
.legal__doc ul { margin: 0 0 14px; padding-left: 20px; }
.legal__doc li { margin-bottom: 8px; }
.legal__doc strong { color: #fff; }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .legal__toc { display: none; }
}
