/*
 *  Auth pages — shared shell styles (sign-in / sign-up / verify-otp /
 *  forgot-* / reset-* / account-locked / recovery-success).
 *
 *  Everything is scoped under `.auth-shell` so the auth pages can use the
 *  marketing-brand `--page-*` / `--hero-*` token system without polluting
 *  the dashboard's design-tokens.css.
 *
 *  Companion of /Users/gateri/Downloads/apps-web/*.html — preserves the
 *  HTML class names (.topbar, .signin, .signin__left, .terminal, .otp-grid,
 *  etc.) so JSX from those designs lands here unchanged.
 *
 *  Fonts (.logo__text / .signin__left-title / .signin__title) are mapped to
 *  --font-logo, which is wired to PassionSansPD in design-tokens.css.
 *  --font-body falls back to the portal's body stack.
 */

.auth-shell {
  /* HERO tokens — constants, never theme. Used by the dark left column. */
  --hero-bg: #140342;
  --hero-text: #ffffff;
  --hero-text-dim: rgba(255, 255, 255, 0.72);
  --hero-text-faint: rgba(255, 255, 255, 0.45);
  --hero-border: rgba(255, 255, 255, 0.1);
  --hero-surface: rgba(255, 255, 255, 0.06);

  --page-bg: #ffffff;
  --page-surface: #ffffff;
  --page-soft: #f7f4fb;
  --page-text: #140342;
  --page-text-dim: rgba(20, 3, 66, 0.65);
  --page-text-faint: rgba(20, 3, 66, 0.45);
  --page-border: rgba(20, 3, 66, 0.1);
  --page-surface-hover: rgba(20, 3, 66, 0.05);
  --page-input-bg: #ffffff;
  --page-input-border: rgba(20, 3, 66, 0.14);

  --brand-blue: #3901fb;
  --brand-violet: #693efe;
  --brand-indigo: #3333ff;
  --brand-lilac: #9a7dfe;

  /* PassionSansPD is logo-only; all auth headings + body use Inter Tight. */
  --auth-font-display: var(--font-interTight, "Inter Tight"), system-ui, sans-serif;
  --auth-font-body: var(--font-interTight, "Inter Tight"), system-ui, sans-serif;
  --radius-btn: 8px;
  --radius-control: 10px;
  --radius-input: 10px;
  --radius-pill: 999px;
  --container-px: clamp(20px, 4vw, 56px);

  background: var(--page-bg);
  color: var(--page-text);
  font-family: var(--auth-font-body);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.dark .auth-shell {
  --page-bg: #0a0125;
  --page-surface: #1c0a4f;
  --page-soft: #140342;
  --page-text: #ffffff;
  --page-text-dim: rgba(255, 255, 255, 0.72);
  --page-text-faint: rgba(255, 255, 255, 0.45);
  --page-border: rgba(255, 255, 255, 0.1);
  --page-surface-hover: rgba(255, 255, 255, 0.06);
  --page-input-bg: rgba(255, 255, 255, 0.04);
  --page-input-border: rgba(255, 255, 255, 0.14);
}

.auth-shell a {
  color: inherit;
}
.auth-shell button {
  font-family: inherit;
}

/* =====================================================================
   TOPBAR
   ===================================================================== */
.auth-shell .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--container-px);
  gap: 16px;
  flex-wrap: wrap;
  background: var(--page-bg);
}
@media (min-width: 960px) {
  .auth-shell .topbar {
    background: linear-gradient(
      to right,
      var(--hero-bg) 0,
      var(--hero-bg) 50%,
      var(--page-bg) 50%,
      var(--page-bg) 100%
    );
  }
}

.auth-shell .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  color: var(--page-text);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
@media (min-width: 960px) {
  .auth-shell .logo {
    color: var(--hero-text);
  }
}
.auth-shell .logo:hover {
  opacity: 0.85;
}
.auth-shell .logo__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.auth-shell .logo__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.auth-shell .logo__text {
  font-family: var(--font-logo);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: inherit;
}

.auth-shell .topbar__controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-shell .icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--page-text);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-shell .icon-btn:hover {
  background: var(--page-surface-hover);
}
.auth-shell .icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}
.auth-shell .theme-toggle__sun {
  display: inline-flex;
}
.auth-shell .theme-toggle__moon {
  display: none;
}
.dark .auth-shell .theme-toggle__sun {
  display: none;
}
.dark .auth-shell .theme-toggle__moon {
  display: inline-flex;
}

.auth-shell .lang {
  position: relative;
}
.auth-shell .lang__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--page-text);
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.auth-shell .lang__trigger:hover {
  background: var(--page-surface-hover);
}
.auth-shell .lang__trigger svg {
  width: 10px;
  height: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.auth-shell .lang.is-open .lang__trigger svg {
  transform: rotate(180deg);
}
.auth-shell .lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-btn);
  padding: 4px;
  box-shadow: 0 12px 32px -8px rgba(20, 3, 66, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 100;
}
.auth-shell .lang.is-open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.auth-shell .lang__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  font-family: inherit;
}
.auth-shell .lang__option:hover {
  background: var(--page-surface-hover);
}
.auth-shell .lang__option[aria-selected="true"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-violet);
}

.auth-shell .topbar__signup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--page-text);
  text-decoration: none;
  border-radius: var(--radius-btn);
}
.auth-shell .topbar__signup:hover {
  color: var(--brand-violet);
}
.dark .auth-shell .topbar__signup:hover {
  color: var(--brand-lilac);
}

/* =====================================================================
   MAIN SPLIT — marketing left, form right.
   ===================================================================== */
.auth-shell .signin {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}
@media (min-width: 960px) {
  .auth-shell .signin {
    grid-template-columns: 1fr 1fr;
  }
}

/* LEFT */
.auth-shell .signin__left {
  position: relative;
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: clamp(36px, 5vw, 72px) var(--container-px);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 3vw, 36px);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 960px) {
  .auth-shell .signin__left {
    display: flex;
  }
}
.auth-shell .signin__left::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(105, 62, 254, 0.55) 0%,
    rgba(57, 1, 251, 0.28) 35%,
    transparent 70%
  );
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}
.auth-shell .signin__left-inner {
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}
.auth-shell .signin__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-lilac);
  margin-bottom: 18px;
}
.auth-shell .signin__left-title {
  font-family: var(--auth-font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--hero-text);
  margin: 0 0 18px;
}
.auth-shell .signin__left-tagline {
  color: var(--hero-text-dim);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 32px;
}

.auth-shell .signin__features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--hero-border);
  padding-top: 24px;
}
.auth-shell .signin__feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.auth-shell .signin__feature-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(105, 62, 254, 0.22);
  color: var(--brand-lilac);
}
.auth-shell .signin__feature-icon svg {
  width: 14px;
  height: 14px;
}
.auth-shell .signin__feature-text {
  font-size: 14px;
  line-height: 1.5;
}
.auth-shell .signin__feature-text strong {
  font-weight: 600;
  color: var(--hero-text);
}
.auth-shell .signin__feature-text span {
  color: var(--hero-text-dim);
}

.auth-shell .signin__preview {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-shell .signin__preview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.auth-shell .signin__preview-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-text-dim);
}
.auth-shell .signin__preview-delta {
  font-size: 12px;
  font-weight: 600;
  color: #4ade80;
}
.auth-shell .signin__preview-value {
  font-family: var(--auth-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hero-text);
}
.auth-shell .signin__preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}
.auth-shell .signin__preview-bars span {
  flex: 1;
  background: var(--brand-violet);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}
.auth-shell .signin__preview-foot {
  font-size: 12px;
  color: var(--hero-text-faint);
}

.auth-shell .signin__preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.auth-shell .signin__preview-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.auth-shell .signin__preview-item svg {
  width: 14px;
  height: 14px;
  color: #4ade80;
  flex: 0 0 auto;
}
.auth-shell .signin__preview-item-label {
  color: var(--hero-text-dim);
}
.auth-shell .signin__preview-item-value {
  font-family: var(--auth-font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--hero-text);
}

.auth-shell .signin__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 7px 14px;
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--hero-text-dim);
  align-self: flex-start;
}
.auth-shell .signin__status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}
.auth-shell .signin__status strong {
  font-weight: 600;
  color: var(--hero-text);
}
.auth-shell .signin__status-link {
  color: var(--brand-lilac);
  font-weight: 500;
  text-decoration: none;
  margin-left: 2px;
}
.auth-shell .signin__status-link:hover {
  text-decoration: underline;
}

/* RIGHT (FORM) */
.auth-shell .signin__right {
  padding: clamp(36px, 5vw, 72px) var(--container-px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--page-bg);
}
.auth-shell .signin__form-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.auth-shell .signin__title {
  font-family: var(--auth-font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--page-text);
  margin: 0 0 8px;
}
.auth-shell .signin__subtitle {
  color: var(--page-text-dim);
  font-size: 15px;
  margin: 0 0 28px;
}

.auth-shell .signin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 4px;
  background: var(--page-soft);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-btn);
  margin-bottom: 22px;
}
.auth-shell .signin-tabs__btn {
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--page-text-dim);
  font-size: 14px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
  font-family: inherit;
}
.auth-shell .signin-tabs__btn--active {
  background: var(--brand-violet);
  color: white;
  box-shadow: 0 2px 8px rgba(105, 62, 254, 0.32);
}

.auth-shell .signin__field {
  margin-bottom: 14px;
}
.auth-shell .signin__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* Stack two-column field rows below 520px — the 4-cell PIN grid + eye
   toggle can't fit comfortably side-by-side at narrow widths. Slice 0A
   UX-consistency update (owner directive 2026-06). */
@media (max-width: 520px) {
  .auth-shell .signin__field-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
.auth-shell .signin__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--page-text);
  margin-bottom: 6px;
}
.auth-shell .signin__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--page-input-border);
  background: var(--page-input-bg);
  color: var(--page-text);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 14.5px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.auth-shell .signin__input::placeholder {
  color: var(--page-text-faint);
}
.auth-shell .signin__input:focus {
  outline: none;
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 3px rgba(105, 62, 254, 0.16);
}

.auth-shell .signin__phone-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.4fr) 1fr;
  gap: 8px;
}
.auth-shell .signin__country {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 32px 12px 14px;
  border: 1px solid var(--page-input-border);
  background: var(--page-input-bg);
  color: var(--page-text);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 14.5px;
  cursor: pointer;
  gap: 8px;
}
.auth-shell .signin__country::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--page-text-dim);
  border-bottom: 1.5px solid var(--page-text-dim);
  transform: translateY(-70%) rotate(45deg);
}
.auth-shell .signin__country-flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  flex: 0 0 auto;
  display: block;
}

.auth-shell .signin__pwd-wrap {
  position: relative;
}
.auth-shell .signin__pwd-wrap .signin__input {
  padding-right: 44px;
}
.auth-shell .signin__pwd-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--page-text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.auth-shell .signin__pwd-toggle:hover {
  background: var(--page-soft);
  color: var(--page-text);
}
.auth-shell .signin__pwd-toggle svg {
  width: 16px;
  height: 16px;
}
.auth-shell .signin__pwd-toggle .icon-eye-off {
  display: none;
}
.auth-shell .signin__pwd-toggle.is-revealed .icon-eye {
  display: none;
}
.auth-shell .signin__pwd-toggle.is-revealed .icon-eye-off {
  display: block;
}

.auth-shell .signin__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 22px;
  gap: 12px;
}
.auth-shell .signin__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--page-text-dim);
  cursor: pointer;
  user-select: none;
}
.auth-shell .signin__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-violet);
  cursor: pointer;
}
.auth-shell .signin__forgot {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--brand-violet);
  text-decoration: none;
}
.dark .auth-shell .signin__forgot {
  color: var(--brand-lilac);
}
.auth-shell .signin__forgot:hover {
  text-decoration: underline;
}

.auth-shell .signin__terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 18px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--page-text-dim);
  cursor: pointer;
  user-select: none;
}
.auth-shell .signin__terms input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand-violet);
  cursor: pointer;
  flex: 0 0 auto;
}
.auth-shell .signin__terms a {
  color: var(--brand-violet);
  font-weight: 500;
  text-decoration: none;
}
.dark .auth-shell .signin__terms a {
  color: var(--brand-lilac);
}
.auth-shell .signin__terms a:hover {
  text-decoration: underline;
}

.auth-shell .signin__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--page-text);
  color: var(--page-bg);
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
  text-decoration: none;
}
.auth-shell .signin__submit:hover {
  background: var(--brand-violet);
}
.auth-shell .signin__submit:active {
  transform: scale(0.99);
}
.auth-shell .signin__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-shell .signin__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
}
.auth-shell .signin__divider::before,
.auth-shell .signin__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--page-border);
}
.auth-shell .signin__divider span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--page-text-faint);
}

.auth-shell .signin__social {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.auth-shell .signin__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid var(--page-input-border);
  background: var(--page-input-bg);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.auth-shell .signin__social-btn:hover:not(:disabled) {
  background: var(--page-soft);
  border-color: var(--page-text-faint);
}
.auth-shell .signin__social-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.auth-shell .signin__social-btn svg {
  width: 18px;
  height: 18px;
}

.auth-shell .signin__alt {
  text-align: center;
  font-size: 13.5px;
  color: var(--page-text-dim);
  margin: 0;
}
.auth-shell .signin__alt a {
  color: var(--brand-violet);
  font-weight: 500;
  text-decoration: none;
}
.dark .auth-shell .signin__alt a {
  color: var(--brand-lilac);
}
.auth-shell .signin__alt a:hover {
  text-decoration: underline;
}

/* Icon chip / eyebrow / security note / back link — single-form pages */
.auth-shell .signin__icon-chip {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(105, 62, 254, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-violet);
  margin: 0 0 20px;
}
.dark .auth-shell .signin__icon-chip {
  background: rgba(105, 62, 254, 0.22);
  color: var(--brand-lilac);
}
.auth-shell .signin__icon-chip svg {
  width: 26px;
  height: 26px;
}
.auth-shell .signin__form-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-violet);
  margin-bottom: 12px;
}
.dark .auth-shell .signin__form-eyebrow {
  color: var(--brand-lilac);
}
.auth-shell .signin__security-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--page-text-faint);
  margin: 14px 0 22px;
}
.auth-shell .signin__back {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--brand-violet);
  text-decoration: none;
}
.dark .auth-shell .signin__back {
  color: var(--brand-lilac);
}
.auth-shell .signin__back:hover {
  text-decoration: underline;
}

/* =====================================================================
   BANNERS
   ===================================================================== */
.auth-shell .banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-shell .banner__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.auth-shell .banner--warn {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.28);
  color: #92400e;
}
.dark .auth-shell .banner--warn {
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(234, 179, 8, 0.34);
  color: #fcd34d;
}
.auth-shell .banner--error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.24);
  color: #991b1b;
}
.dark .auth-shell .banner--error {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
.auth-shell .banner--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #166534;
}
.dark .auth-shell .banner--success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

/* =====================================================================
   OTP GRID — verify-otp / reset-pin / reset-password
   ===================================================================== */
.auth-shell .otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.auth-shell .otp-input {
  width: 100%;
  height: 56px;
  text-align: center;
  font-family: var(--auth-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--page-text);
  background: var(--page-input-bg);
  border: 1px solid var(--page-input-border);
  border-radius: var(--radius-input);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.auth-shell .otp-input:focus {
  outline: none;
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 3px rgba(105, 62, 254, 0.16);
}
.auth-shell .otp-input.is-filled {
  border-color: var(--brand-violet);
}
@media (max-width: 460px) {
  .auth-shell .otp-input {
    height: 48px;
    font-size: 18px;
  }
  .auth-shell .otp-grid {
    gap: 6px;
  }
}
.auth-shell .otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--page-text-dim);
  margin: 14px 0 0;
  flex-wrap: wrap;
}
.auth-shell .otp-meta strong {
  font-variant-numeric: tabular-nums;
  color: var(--page-text);
  font-weight: 600;
  margin-left: 4px;
}
.auth-shell .otp-meta a,
.auth-shell .otp-meta button.otp-resend {
  color: var(--brand-violet);
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.dark .auth-shell .otp-meta a,
.dark .auth-shell .otp-meta button.otp-resend {
  color: var(--brand-lilac);
}
.auth-shell .otp-meta a:hover,
.auth-shell .otp-meta button.otp-resend:hover {
  text-decoration: underline;
}

/* =====================================================================
   PIN SEGMENTED GRID — sign-in / sign-up / reset-pin
   ─────────────────────────────────────────────────────────────────────
   Slice 0A UX-consistency update (owner directive 2026-06): PIN is fixed
   at 4 digits, displayed as 4 segmented cells (parallel to the 6-cell
   OTP grid). Masked by default via type="password"; eye toggle reveals
   all cells together.
   ===================================================================== */
.auth-shell .pin-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 4px;
}
.auth-shell .pin-wrap .pin-grid {
  flex: 1 1 auto;
  min-width: 0;
}
.auth-shell .pin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.auth-shell .pin-input {
  width: 100%;
  height: 56px;
  text-align: center;
  font-family: var(--auth-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--page-text);
  background: var(--page-input-bg);
  border: 1px solid var(--page-input-border);
  border-radius: var(--radius-input);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  /* Hide spinner buttons that appear on numeric inputs in some browsers. */
  -moz-appearance: textfield;
}
.auth-shell .pin-input::-webkit-outer-spin-button,
.auth-shell .pin-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.auth-shell .pin-input:focus {
  outline: none;
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 3px rgba(105, 62, 254, 0.16);
}
.auth-shell .pin-input.is-filled {
  border-color: var(--brand-violet);
}
.auth-shell .pin-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--page-input-bg);
  border: 1px solid var(--page-input-border);
  border-radius: var(--radius-input);
  color: var(--page-text-dim);
  cursor: pointer;
  padding: 0;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.auth-shell .pin-toggle:hover {
  border-color: var(--brand-violet);
  color: var(--brand-violet);
}
.auth-shell .pin-toggle .icon-eye {
  display: block;
  width: 18px;
  height: 18px;
}
.auth-shell .pin-toggle .icon-eye-off {
  display: none;
  width: 18px;
  height: 18px;
}
.auth-shell .pin-toggle.is-revealed .icon-eye {
  display: none;
}
.auth-shell .pin-toggle.is-revealed .icon-eye-off {
  display: block;
}
@media (max-width: 460px) {
  .auth-shell .pin-input {
    height: 48px;
    font-size: 18px;
  }
  .auth-shell .pin-grid {
    gap: 6px;
  }
  .auth-shell .pin-wrap {
    gap: 6px;
  }
  .auth-shell .pin-toggle {
    width: 40px;
    height: 48px;
  }
}
/* Note: PIN + Confirm PIN no longer share a .signin__field-row — they
   stack vertically by default (owner directive 2026-06). The .signin__
   field-row class is preserved in CSS for any future row needs. */

/* =====================================================================
   FOOTER
   ===================================================================== */
.auth-shell .footer {
  padding: 20px var(--container-px);
  border-top: 1px solid var(--page-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--page-text-dim);
}
.auth-shell .footer__links {
  display: flex;
  gap: 18px;
}
.auth-shell .footer__links a {
  color: var(--page-text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-shell .footer__links a:hover {
  color: var(--page-text);
}

/* =====================================================================
   TERMINAL CARDS — account-locked / recovery-success
   ===================================================================== */
.auth-shell .terminal {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 5vw, 72px) var(--container-px);
  background: var(--page-bg);
}
.auth-shell .terminal__card {
  width: 100%;
  max-width: 480px;
  background: var(--page-surface);
  border: 1px solid var(--page-border);
  border-radius: 20px;
  padding: clamp(32px, 5vw, 48px);
  text-align: center;
  box-shadow: 0 12px 32px -16px rgba(20, 3, 66, 0.18);
}
.dark .auth-shell .terminal__card {
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
}
.auth-shell .terminal__badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.auth-shell .terminal__badge svg {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}
.auth-shell .terminal__badge--success {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.dark .auth-shell .terminal__badge--success {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.auth-shell .terminal__badge--danger {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.dark .auth-shell .terminal__badge--danger {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}
.auth-shell .terminal__title {
  font-family: var(--auth-font-display);
  font-size: clamp(1.6rem, 2.6vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--page-text);
  margin: 0 0 12px;
}
.auth-shell .terminal__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--page-text-dim);
  margin: 0 0 28px;
}
.auth-shell .terminal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-shell .terminal__actions .signin__submit {
  width: 100%;
}
.auth-shell .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--page-bg);
  color: var(--page-text);
  border: 1px solid var(--page-input-border);
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.auth-shell .btn-secondary:hover {
  background: var(--page-surface-hover);
  border-color: var(--page-text-faint);
}
.auth-shell .terminal__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--brand-violet);
  text-decoration: none;
}
.dark .auth-shell .terminal__link {
  color: var(--brand-lilac);
}
.auth-shell .terminal__link:hover {
  text-decoration: underline;
}

/* Centered topbar variant — for terminal pages there is no half-and-half
   gradient to line up with. */
.auth-shell.is-centered .topbar {
  background: var(--hero-bg);
}
.auth-shell.is-centered .logo,
.auth-shell.is-centered .logo__text,
.auth-shell.is-centered .icon-btn,
.auth-shell.is-centered .lang__trigger,
.auth-shell.is-centered .topbar__signup {
  color: var(--hero-text);
}
.auth-shell.is-centered .icon-btn:hover,
.auth-shell.is-centered .lang__trigger:hover {
  background: var(--hero-surface);
}
.auth-shell.is-centered .topbar__signup:hover {
  color: var(--brand-lilac);
}

/* =====================================================================
   OTP PREFIX DISPLAY (Slice 0A addition — owner-approved per
   docs/phase-07/slice-0a-visual-parity-checklist.md §6.
   Required by backend Slice 0A handoff §1: every OTP SMS now carries a
   "<PREFIX>-<6 digits>" body so the user has an anti-phishing visual anchor.
   This block surfaces the prefix prominently above the OTP grid on
   /verify-otp. Uses existing token system — no new tokens introduced.)
   ===================================================================== */
.auth-shell .signin__prefix-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
}
.auth-shell .signin__prefix-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-violet);
}
.dark .auth-shell .signin__prefix-label {
  color: var(--brand-lilac);
}
.auth-shell .signin__prefix-value {
  font-family: var(--auth-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--page-text);
  padding: 6px 18px;
  background: var(--page-soft);
  border: 1px solid var(--page-input-border);
  border-radius: var(--radius-btn);
  font-variant-numeric: tabular-nums;
}
