/* Pre-auth screens (sign up, log in, activation): Linear-style single column on black.
   Scoped by the .auth- prefix; the cabinet theme tokens are deliberately not used
   here so the screen looks identical whatever theme the visitor last had. */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #08090a;
  color: #f7f8f8;
  font-family: var(--font-inter, 'Inter', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
.auth-column {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* The mark: the four brand diamonds, bare on black. The same 48 px cluster sits
   on the splash and above every title, so the hand-over keeps the logo. */
.auth-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
}
.auth-mark svg { display: block; }
/* Splash: a quarter turn clockwise, a short rest, again. 90° of a
   four-fold-symmetric cluster lands on the resting mark, so restarting each
   iteration from 0° is invisible. */
.auth-mark--turning { animation: auth-mark-turn 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes auth-mark-turn {
  from { transform: rotate(0deg); }
  70%, to { transform: rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-mark--turning { animation: none; }
}
.auth-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.auth-title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 590;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 8px;
  color: #f7f8f8;
}
.auth-subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: #8a8f98;
  text-align: center;
  margin: 0;
  overflow-wrap: anywhere;
}
.auth-subtitle strong { color: #d0d6e0; font-weight: 510; }
.auth-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.auth-stack--tight { margin-top: 16px; }
.auth-btn {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 510;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.auth-btn:focus-visible { outline: 2px solid #00dd59; outline-offset: 3px; }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-btn--primary { background: #00dd59; color: #1a2332; }
.auth-btn--primary:hover:not(:disabled) { background: #00c84f; }
.auth-btn--secondary { background: rgba(255,255,255,0.05); color: #f7f8f8; border-color: #23252a; }
.auth-btn--secondary:hover:not(:disabled) { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.auth-btn--ghost { background: transparent; color: #d0d6e0; height: 40px; font-weight: 500; }
.auth-btn--ghost:hover:not(:disabled) { color: #f7f8f8; }
.auth-input {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #23252a;
  background: rgba(255,255,255,0.06);
  color: #f7f8f8;
  font: inherit;
  font-size: 15px;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input::placeholder { color: #8a8f98; }
.auth-input:focus { border-color: #00dd59; box-shadow: 0 0 0 3px rgba(0, 221, 89, 0.18); }
.auth-input[readonly] { color: #d0d6e0; cursor: default; }
.auth-field { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 12px;
  font-weight: 510;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8f98;
}
.auth-segment {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid #23252a;
}
.auth-segment__option { position: relative; }
.auth-segment__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.auth-segment__label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 510;
  color: #8a8f98;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.auth-segment__label:hover { color: #d0d6e0; }
.auth-segment__input:checked + .auth-segment__label { background: rgba(255,255,255,0.10); color: #f7f8f8; }
.auth-segment__input:focus-visible + .auth-segment__label { outline: 2px solid #00dd59; outline-offset: 2px; }
.auth-segment--disabled .auth-segment__label { cursor: default; }
.auth-segment--disabled .auth-segment__label:hover { color: #8a8f98; }
.auth-segment--disabled .auth-segment__input:checked + .auth-segment__label { color: #f7f8f8; }
.auth-legal {
  font-size: 13px;
  line-height: 1.6;
  color: #8a8f98;
  text-align: center;
  margin: 28px 0 0;
}
.auth-legal__docs { white-space: nowrap; }
.auth-legal a, .auth-link { color: #d0d6e0; text-decoration: none; }
.auth-legal a:hover, .auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-footer { font-size: 14px; color: #8a8f98; text-align: center; margin: 24px 0 0; }
.auth-footer a { color: #f7f8f8; font-weight: 500; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-footer--muted { margin-top: 12px; font-size: 13px; }
.auth-footer--muted a { color: #8a8f98; font-weight: 400; }
.auth-error { width: 100%; font-size: 13px; line-height: 1.5; color: #ff7b7b; margin: 0; text-align: center; }
.auth-status { width: 100%; font-size: 13px; line-height: 1.5; color: #8a8f98; margin: 0; text-align: center; }
.auth-notice {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 221, 89, 0.22);
  background: rgba(0, 221, 89, 0.08);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #d0d6e0;
  margin-top: 20px;
}
.auth-notice strong { color: #f7f8f8; }
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #d0d6e0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.auth-check input { margin-top: 3px; accent-color: #00dd59; flex-shrink: 0; }
.auth-check a { color: #d0d6e0; }
.auth-textlinks { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #8a8f98; }
.auth-textbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: #d0d6e0;
  cursor: pointer;
}
.auth-textbtn:hover { color: #f7f8f8; text-decoration: underline; text-underline-offset: 3px; }
.auth-textbtn:disabled { opacity: 0.5; cursor: default; }
.auth-password-wrap { position: relative; width: 100%; }
.auth-password-wrap .auth-input { padding-right: 48px; }
.auth-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #8a8f98;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-eye:hover { color: #f7f8f8; background: #1d1d1d; }
.auth-hint { width: 100%; font-size: 12px; line-height: 1.5; color: #8a8f98; margin: 0; }
.auth-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid #23252a;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  color: #d0d6e0;
}
.auth-identity__dot { width: 8px; height: 8px; border-radius: 999px; background: #00dd59; }
@media (max-width: 420px) {
  .auth-segment { grid-template-columns: repeat(2, 1fr); }
  .auth-title { font-size: 24px; }
  .auth-page { padding: 32px 20px; }
}


/* The code as six cells: the real input lies invisibly over them (see AuthCodeInput). */
.auth-otp { position: relative; display: flex; gap: 8px; width: 100%; cursor: text; margin-bottom: 12px; }
.auth-otp__slot {
  position: relative; flex: 1; min-width: 0; height: 56px; border-radius: 8px;
  border: 1px solid #23252a; background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 590; color: #f7f8f8; font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-otp__slot--filled { border-color: #3a3d44; }
.auth-otp__slot--active { border-color: #00dd59; box-shadow: 0 0 0 3px rgba(0,221,89,0.18); }
.auth-otp__caret { position: absolute; width: 1px; height: 22px; background: #f7f8f8; animation: auth-caret 1s steps(2, start) infinite; }
@keyframes auth-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .auth-otp__caret { animation: none; } }
.auth-otp__input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; color: transparent; caret-color: transparent; background: transparent; border: 0; outline: none;
  font-size: 16px; /* under 16px iOS zooms the page on focus */
}
.auth-otp--disabled { opacity: 0.6; cursor: default; }
