/* Tallentex Login — TXO 2027-28 */

html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

:root {
  /* TALLENTEX / ALLEN Overseas logo palette */
  --brand-navy: #1a3584;
  --brand-navy-deep: #0e3f88;
  --brand-ink: #0a1f4d;
  --brand-yellow: #ffe346;
  --brand-gold: #f5c400;
  --brand-teal: #1eaab1;
  --brand-cyan: #1e8dbe;
  --brand-lime: #86cc21;
  --brand-lime-deep: #6fa80b;

  --page:
    radial-gradient(900px 480px at 88% -6%, rgba(255, 227, 70, 0.28) 0%, rgba(255, 227, 70, 0) 58%),
    radial-gradient(780px 420px at 8% 12%, rgba(30, 170, 177, 0.16) 0%, rgba(30, 170, 177, 0) 55%),
    radial-gradient(1000px 520px at 70% 100%, rgba(30, 141, 190, 0.12) 0%, rgba(30, 141, 190, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, #eef6fb 48%, #e5f3f4 100%);
  --body-bg: #eef6fb;
  --surface: #ffffff;
  --surface-2: #f3faff;
  --tint: #e6f6f7;
  --ink: #0a1f4d;
  --ink-2: #4a5a78;
  --ink-3: #5c6b86;
  --ink-brand: #1a3584;
  --line: rgba(26, 53, 132, 0.1);
  --line-2: rgba(26, 53, 132, 0.14);
  --chip: rgba(26, 53, 132, 0.07);
  --accent-ink: #1e8dbe;
  --accent-ink-strong: #1a3584;
  --header: rgba(238, 246, 251, 0.92);
  --btn-grad: linear-gradient(120deg, #1eaab1 0%, #1e8dbe 38%, #1a3584 100%);
  --panel-grad: linear-gradient(150deg, #0a1f4d 0%, #1a3584 48%, #1e8dbe 100%);
  --footer-grad: linear-gradient(#0a1f4d, #061433);
  --danger: #c0392b;
  --success-bg: #eef9e4;
  --success-ink: #3f7a12;
  --error-bg: #fce9e9;
  --error-ink: #9a1b1b;
  --warn-bg: #fff8d6;
  --warn-ink: #9a7a00;
  --step-idle: #dceef3;
  --step-idle-ink: #5c6b86;
  --seg: #e6f6f7;
  --ok-bg: rgba(134, 204, 33, 0.14);
  --ok-line: rgba(111, 168, 11, 0.32);
  --ok-ink: #3f7a12;
  --err-bg: rgba(192, 57, 43, 0.08);
  --err-line: rgba(192, 57, 43, 0.3);
  --err-ink: #b23b2c;
  --line-dash: rgba(26, 53, 132, 0.22);
  --avatar-bg: #e6f6f7;
  --pay-grad: linear-gradient(120deg, #ffe346 0%, #f5c400 55%, #e8a800 100%);
  --play-grad: linear-gradient(135deg, #ffe346 0%, #86cc21 45%, #1eaab1 100%);
  --spark: #ffe346;
}

[data-theme="dark"] {
  --page:
    radial-gradient(900px 480px at 88% -6%, rgba(255, 227, 70, 0.12) 0%, rgba(255, 227, 70, 0) 58%),
    radial-gradient(780px 420px at 8% 12%, rgba(30, 170, 177, 0.14) 0%, rgba(30, 170, 177, 0) 55%),
    linear-gradient(180deg, #061433 0%, #0a1f4d 55%, #071a3a 100%);
  --body-bg: #061433;
  --surface: #0f274f;
  --surface-2: #14305c;
  --tint: #16445a;
  --ink: #eef8ff;
  --ink-2: #a8c5d8;
  --ink-3: #8fb0c6;
  --ink-brand: #ffe346;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.14);
  --chip: rgba(255, 255, 255, 0.08);
  --accent-ink: #5ec8e8;
  --accent-ink-strong: #ffe346;
  --header: rgba(6, 20, 51, 0.92);
  --btn-grad: linear-gradient(120deg, #1eaab1 0%, #1e8dbe 40%, #1a3584 100%);
  --success-bg: rgba(134, 204, 33, 0.16);
  --success-ink: #c6ef7a;
  --error-bg: rgba(220, 38, 38, 0.15);
  --error-ink: #ef9d9d;
  --warn-bg: rgba(255, 227, 70, 0.14);
  --warn-ink: #ffe346;
  --step-idle: #16445a;
  --step-idle-ink: #a8c5d8;
  --seg: #16445a;
  --ok-bg: rgba(134, 204, 33, 0.18);
  --ok-line: rgba(198, 239, 122, 0.35);
  --ok-ink: #c6ef7a;
  --err-bg: rgba(192, 57, 43, 0.16);
  --err-line: rgba(239, 157, 157, 0.35);
  --err-ink: #ef9d9d;
  --line-dash: rgba(255, 255, 255, 0.22);
  --avatar-bg: #16445a;
  --pay-grad: linear-gradient(120deg, #ffe346 0%, #f5c400 55%, #e8a800 100%);
  --spark: #ffe346;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--body-bg);
}

body.login-page {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--page);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent-ink-strong);
  text-decoration: underline;
}

input::placeholder {
  color: var(--ink-3);
}

/* Header */
.login-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.login-header__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px clamp(14px, 4vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.login-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-header__logo {
  height: auto;
  width: 205px;
  display: block;
}

.login-header__logo[hidden] {
  display: none !important;
}

.login-header__chip {
  margin-left: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-brand);
  background: var(--chip);
  border: 1px solid var(--line-2);
  padding: 5px 9px;
  border-radius: 999px;
}

.login-theme-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-brand);
  font-size: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-theme-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 31, 77, 0.08);
}

.login-theme-btn:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* Main */
.login-main {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 44px) clamp(14px, 4vw, 24px) 48px;
}

.login-card {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    rgba(10, 31, 77, 0.05) 0 2px 6px,
    rgba(10, 31, 77, 0.4) 0 24px 50px -34px;
  animation: cardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Form panel */
.login-form-panel {
  padding: clamp(26px, 6vw, 46px) clamp(20px, 6vw, 46px) clamp(24px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.login-form-panel form {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin: 0;
}

.login-form-panel__title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.9px;
  color: var(--ink);
}

.login-form-panel__subtitle {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.login-field label .req {
  color: var(--danger);
}

.login-input {
  min-height: 56px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input--mono {
  font-family: inherit;
}

.login-input:focus {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px rgba(26, 53, 132, 0.18);
}

.login-input.is-invalid {
  border-color: var(--danger);
}

.login-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-pwd-wrap .login-input {
  padding-right: 56px;
}

.login-pwd-toggle {
  position: absolute;
  right: 6px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  font-size: 16px;
  color: var(--ink-3);
  display: grid;
  place-items: center;
}

.login-pwd-toggle:hover {
  color: var(--ink-brand);
  background: var(--chip);
}

.login-pwd-toggle:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  margin: 0;
}

.login-remember input {
  width: 20px;
  height: 20px;
  accent-color: #1a3584;
  cursor: pointer;
}

.login-forgot {
  font-size: 14px;
  font-weight: 700;
}

.login-submit {
  min-height: 58px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: var(--btn-grad);
  box-shadow:
    rgba(10, 31, 77, 0.1) 0 1px 2px,
    rgba(30, 46, 122, 0.55) 0 12px 24px -14px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    rgba(10, 31, 77, 0.12) 0 2px 4px,
    rgba(30, 46, 122, 0.6) 0 16px 28px -12px;
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

.login-exallen {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.login-exallen a {
  font-weight: 700;
}

.login-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.login-help i {
  font-size: 15px;
  color: var(--accent-ink);
  margin-top: 2px;
}

.login-help p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.login-alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 600;
}

.login-alert--success {
  background: var(--success-bg);
  color: var(--success-ink);
}

.login-alert--error {
  background: var(--error-bg);
  color: var(--error-ink);
}

.login-alert--warning {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.login-field-error {
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 600;
  margin-top: 2px;
}

/* Creative panel */
.login-creative {
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  padding: clamp(22px, 4vw, 36px) clamp(16px, 4vw, 32px) clamp(18px, 3vw, 28px);
  background: var(--panel-grad);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.login-creative__glow {
  position: absolute;
  inset: -25% -20% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 227, 70, 0.38), rgba(30, 170, 177, 0.22) 42%, rgba(30, 141, 190, 0) 70%);
  animation: glow 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.login-creative__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(184, 232, 234, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 232, 234, 0.45) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  animation: loginCreativeGridDrift 18s linear infinite;
}

@keyframes loginCreativeGridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 28px 28px;
  }
}

.login-creative__copy {
  position: relative;
  z-index: 1;
}

.login-creative__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 2.4px;
  font-weight: 700;
  color: var(--brand-yellow, #ffe346);
}

.login-creative__title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.12;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.9px;
  text-wrap: pretty;
}

.login-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  padding: 0 0 6px;
  z-index: 1;
}

.login-stage__icons {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
}

.login-stage__icon {
  position: absolute;
  color: #b8e8ea;
  font-size: 22px;
  will-change: transform;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.login-stage__icon--trophy {
  top: 12%;
  left: 6%;
  font-size: 26px;
  color: #ffe346;
  animation: loginStageIconA 6.5s ease-in-out infinite;
}

.login-stage__icon--reward {
  top: 28%;
  right: 4%;
  font-size: 24px;
  color: #86cc21;
  animation: loginStageIconB 7.2s ease-in-out infinite;
}

.login-stage__icon--money {
  bottom: 22%;
  left: 8%;
  font-size: 22px;
  color: #ffe346;
  animation: loginStageIconC 5.8s ease-in-out infinite;
}

.login-stage__icon--trophy-alt {
  top: 48%;
  right: 8%;
  font-size: 20px;
  color: #1eaab1;
  animation: loginStageIconA 8s ease-in-out infinite reverse;
}

.login-stage__icon--money-alt {
  bottom: 12%;
  right: 12%;
  font-size: 18px;
  color: #86cc21;
  animation: loginStageIconB 6.8s ease-in-out infinite reverse;
}

@keyframes loginStageIconA {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(5px, -8px) rotate(10deg);
  }
}

@keyframes loginStageIconB {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-6px, -6px) rotate(-8deg);
  }
}

@keyframes loginStageIconC {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4px, 6px) scale(1.08);
  }
}

.login-stage__img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(48vh, 360px);
  object-fit: contain;
  object-position: center bottom;
  display: block;
  margin: 0 auto;
  background: transparent;
  /* Downward contact shadow only — no left/right black bars */
  filter: drop-shadow(0 20px 14px rgba(6, 20, 51, 0.4));
  animation: loginStageFloat 5.2s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  /* Very light bottom blend only — keep subject filled */
  -webkit-mask-image: linear-gradient(
    to top,
    transparent 0%,
    #000 8%,
    #000 100%
  );
  mask-image: linear-gradient(
    to top,
    transparent 0%,
    #000 8%,
    #000 100%
  );
}

/* Soft ground pool under the student for a grounded look */
.login-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1%;
  z-index: 0;
  width: min(58%, 260px);
  height: 40px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(3, 10, 28, 0.5) 0%,
    rgba(10, 31, 77, 0.26) 40%,
    transparent 74%
  );
  filter: blur(8px);
  pointer-events: none;
}

@keyframes loginStageFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.login-stage__scene,
.login-stage__shadow,
.login-stage__layer,
.login-stage__card,
.login-stage__orb {
  display: none !important;
}

.login-pills {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 16px);
  pointer-events: none;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dce3f7;
  font-size: 12.5px;
  font-weight: 600;
}

.login-pill i {
  color: #5ec8e8;
}

/* Footer — copyright only */
.login-footer {
  margin-top: auto;
  flex: none;
  background: transparent;
  border: 0;
  padding: 14px 16px 18px;
  text-align: center;
}

.login-footer__accent,
.login-footer__inner,
.login-footer__logo,
.login-footer__links {
  display: none !important;
}

.login-footer__copy {
  margin: 0;
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ink-3, #5f6584);
}

/* Animations */
@keyframes lift {
  from {
    transform: translateZ(0);
  }
  to {
    transform: translateZ(20px);
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: perspective(1200px) translateY(22px) rotateX(5deg);
  }
  to {
    opacity: 1;
    transform: perspective(1200px) translateY(0) rotateX(0deg);
  }
}

@media (max-width: 720px) {
  .login-creative {
    display: none !important;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-stage__img {
    animation: none;
  }

  .login-creative__grid,
  .login-stage__icon {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-creative__grid,
  .login-stage__icon,
  .login-stage__img,
  .login-creative__glow {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ========== Registration flow ========== */

body.reg-page {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--page);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

.reg-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(22px, 5vw, 40px) clamp(14px, 4vw, 24px) 20px;
}

.reg-copyright {
  margin: auto 0 0;
  padding: 8px 12px 4px;
  width: 100%;
  max-width: 720px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ink-3, #5f6584);
}

.reg-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.reg-steps__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.reg-steps__bar {
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--step-idle);
}

.reg-steps__item.is-done .reg-steps__bar {
  background: linear-gradient(90deg, var(--brand-teal, #1eaab1), var(--brand-cyan, #1e8dbe));
}

.reg-steps__item:last-child .reg-steps__bar {
  display: none;
}

.reg-steps__num {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--step-idle-ink);
  background: var(--step-idle);
}

.reg-steps__item.is-active .reg-steps__num {
  color: #0a1f4d;
  background: linear-gradient(140deg, #ffe346, #f5c400);
  box-shadow: 0 4px 12px -4px rgba(245, 196, 0, 0.55), 0 0 0 4px rgba(255, 227, 70, 0.28);
}

.reg-steps__item.is-done .reg-steps__num {
  color: #fff;
  background: linear-gradient(140deg, #1eaab1, #1a3584);
}

.reg-steps__label {
  font-size: clamp(10.5px, 2.6vw, 12.5px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-3);
  max-width: 96px;
  text-wrap: pretty;
}

.reg-steps__item.is-active .reg-steps__label {
  color: var(--ink);
}

.reg-card {
  position: relative;
  overflow: hidden;
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(22px, 5vw, 34px) clamp(18px, 5vw, 36px) clamp(22px, 5vw, 32px);
  box-shadow: 0 2px 6px rgba(10, 31, 77, 0.05), 0 22px 46px -32px rgba(10, 31, 77, 0.4);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reg-card--wide {
  width: min(560px, 100%);
}

.reg-card--xl {
  width: min(680px, 100%);
  gap: 26px;
}

.reg-card__glow {
  position: absolute;
  inset: -40% -30% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 141, 190, 0.16), rgba(30, 141, 190, 0) 70%);
  animation: glow 8s ease-in-out infinite;
  pointer-events: none;
}

.reg-card__title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(22px, 5.5vw, 27px);
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--ink);
}

.reg-card__subtitle {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.reg-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--seg);
  border: 1px solid var(--line);
}

.reg-seg__tab {
  min-height: 44px;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  font-family: inherit;
  font-size: clamp(11px, 2.8vw, 12.5px);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  color: var(--ink-2);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.reg-seg__tab:hover {
  color: var(--ink);
  text-decoration: none;
}

.reg-seg__tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 31, 77, 0.08), inset 0 0 0 1px rgba(30, 141, 190, 0.55);
  text-decoration: none;
}

.reg-seg__tab.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  position: relative;
  z-index: 1;
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.reg-field label,
.reg-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.reg-field .req,
.reg-label .req {
  color: #e0533f;
}

.reg-input,
.reg-select {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  font-weight: 600;
  cursor: pointer;
  /* Country options ("+260 Zambia") outrun the narrow ISD column -- clip with an
     ellipsis instead of cutting a label off mid-word. */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.reg-input--mono,
.reg-select--mono {
  font-family: inherit;
  font-weight: 600;
}

.reg-input--otp {
  letter-spacing: normal;
  font-size: 14px;
  font-weight: 600;
}

.reg-card--mobile-verify .reg-input,
.reg-card--mobile-verify .reg-select,
.reg-card--mobile-verify .reg-input--mono,
.reg-card--mobile-verify .reg-select--mono,
.reg-card--mobile-verify .reg-input--otp,
.reg-card--mobile-verify .reg-link-btn,
.reg-card--mobile-verify .reg-otp-timer,
.reg-card--mobile-verify .reg-btn {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: normal;
}

.reg-card--mobile-verify .reg-input,
.reg-card--mobile-verify .reg-select,
.reg-card--mobile-verify .reg-input--mono,
.reg-card--mobile-verify .reg-select--mono,
.reg-card--mobile-verify .reg-input--otp {
  font-weight: 600;
}

.reg-card--mobile-verify .reg-otp-timer {
  font-weight: 700;
  color: #dc2626;
}

.reg-input:focus,
.reg-select:focus {
  border-color: #1a3584;
  box-shadow: 0 0 0 4px rgba(26, 53, 132, 0.16);
}

.reg-input.is-invalid,
.reg-select.is-invalid {
  border-color: var(--danger);
}

.reg-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.reg-select-wrap > i {
  position: absolute;
  right: 17px;
  font-size: 12px;
  color: var(--ink-3);
  pointer-events: none;
}

.reg-grid-isd {
  display: grid;
  /* Wide enough for a Non-GCC option such as "+260 Zambia" plus the select2 arrow; the
     GCC codes are short enough that the extra width costs nothing. */
  grid-template-columns: minmax(170px, 0.48fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.reg-grid-isd--lg {
  grid-template-columns: minmax(170px, 0.48fr) minmax(0, 1fr);
}

.reg-grid-isd > *,
.reg-grid-isd--lg > * {
  min-width: 0;
}

.reg-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.reg-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  padding: 2px 0;
  margin: 0;
}

.reg-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  accent-color: #1a3584;
  cursor: pointer;
}

.reg-check span {
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink-2);
  text-wrap: pretty;
}

.reg-btn {
  min-height: 54px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  background: var(--btn-grad);
  box-shadow: 0 1px 2px rgba(10, 31, 77, 0.1), 0 12px 24px -14px rgba(30, 46, 122, 0.55);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  text-decoration: none;
}

.reg-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(10, 31, 77, 0.1), 0 16px 30px -16px rgba(30, 46, 122, 0.62);
}

.reg-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.reg-btn--pay {
  min-height: 56px;
  font-size: 17px;
  color: #24170a;
  background: var(--pay-grad);
  box-shadow: 0 1px 2px rgba(10, 31, 77, 0.1), 0 12px 24px -14px rgba(242, 145, 0, 0.65);
}

.reg-btn--pay:hover {
  color: #24170a;
  box-shadow: 0 2px 4px rgba(10, 31, 77, 0.1), 0 16px 30px -16px rgba(242, 145, 0, 0.7);
}

.reg-link-btn {
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-ink);
}

.reg-link-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reg-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.reg-otp-timer {
  margin: 0;
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  font-family: inherit;
  white-space: nowrap;
}

.reg-link-btn:hover {
  color: var(--accent-ink-strong);
}

.reg-link-btn--center {
  align-self: center;
  padding: 0 14px;
  border-radius: 12px;
}

.reg-link-btn--center:hover {
  background: var(--tint);
}

.reg-foot-note {
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
}

.reg-foot-note a {
  font-weight: 700;
}

.reg-field-error {
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 600;
}

.reg-hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.reg-divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.reg-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
}

.reg-notice i {
  font-size: 15px;
  color: var(--ok-ink);
}

.reg-notice p {
  margin: 0;
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ok-ink);
  text-wrap: pretty;
}

.reg-notice__close {
  width: 32px;
  height: 32px;
  flex: none;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ok-ink);
  font-size: 14px;
}

.reg-notice__close:hover {
  background: rgba(21, 122, 61, 0.12);
}

.reg-help-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--err-bg);
  border: 1px solid var(--err-line);
}

.reg-help-box[hidden] {
  display: none !important;
}

.reg-help-box > i {
  font-size: 15px;
  margin-top: 2px;
  color: var(--err-ink);
}

.reg-help-box p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--err-ink);
}

.reg-help-box ul {
  margin: 8px 0 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.reg-title-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.reg-info-btn {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink-3);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.reg-info-btn.is-open,
.reg-info-btn:hover {
  color: var(--accent-ink);
  border-color: rgba(30, 141, 190, 0.9);
}

.reg-fee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.reg-fee__meta {
  display: flex;
  align-items: center;
  gap: 13px;
}

.reg-fee__icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  background: var(--tint);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--accent-ink);
}

.reg-fee__meta p {
  margin: 0;
}

.reg-fee__label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-3);
}

.reg-fee__desc {
  margin-top: 3px !important;
  font-size: 13px;
  color: var(--ink-2);
}

.reg-fee__amount {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  white-space: nowrap;
}

.reg-secure {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.reg-secure i {
  font-size: 14px;
  margin-top: 2px;
  color: var(--accent-ink);
}

.reg-secure p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.reg-pay-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reg-section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--accent-ink);
}

.reg-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reg-avatar__wrap {
  position: relative;
  width: 108px;
  height: 108px;
}

.reg-avatar__preview {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2px dashed var(--line-dash);
  background: var(--avatar-bg);
  display: grid;
  place-items: center;
  font-size: 40px;
  color: var(--ink-3);
  overflow: hidden;
  object-fit: cover;
}

.reg-avatar__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reg-avatar__cam {
  position: absolute;
  right: -2px;
  bottom: 6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(140deg, #1a3584, #0e3f88);
  box-shadow: 0 4px 12px -4px rgba(26, 53, 132, 0.55);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.reg-avatar__cam:hover {
  transform: scale(1.08);
}

.reg-avatar__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reg-avatar__optional {
  font-weight: 600;
  color: var(--ink-3);
}

.reg-avatar__info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.reg-avatar__info {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1a3584;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.reg-avatar__info:hover,
.reg-avatar__info[aria-expanded="true"] {
  color: #1eaab1;
  transform: scale(1.08);
}

.reg-avatar__popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(26, 53, 132, 0.1));
  box-shadow: 0 10px 28px -12px rgba(10, 31, 77, 0.35);
  text-align: left;
}

.reg-avatar__popover::before {
  content: none;
}

.reg-avatar__popover-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a3584;
}

.reg-avatar__tips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reg-avatar__tips li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-2, #565C7C);
}

.reg-avatar__tips li i {
  margin-top: 2px;
  flex: none;
  font-size: 11px;
  color: #1a3584;
}

.reg-avatar__hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
}

[data-theme="dark"] .reg-avatar__info {
  color: #7C93E8;
}

[data-theme="dark"] .reg-avatar__info:hover,
[data-theme="dark"] .reg-avatar__info[aria-expanded="true"] {
  color: #1eaab1;
}

[data-theme="dark"] .reg-avatar__popover-title,
[data-theme="dark"] .reg-avatar__tips li i {
  color: #9eb0f0;
}

.reg-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.reg-pwd-wrap .reg-input {
  padding-right: 52px;
}

.reg-pwd-toggle {
  position: absolute;
  right: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink-3);
  display: grid;
  place-items: center;
}

.reg-pwd-toggle:hover {
  background: var(--tint);
  color: var(--ink-brand);
}

.reg-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.reg-btn--pay .reg-spinner {
  border-color: rgba(36, 23, 10, 0.25);
  border-top-color: #24170a;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Select2 restyle — School picker (step 4) */
.reg-page .select2-container {
  width: 100% !important;
}

.reg-page .select2-container--default .select2-selection--single {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  padding: 0 44px 0 16px;
  display: flex;
  align-items: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-page .select2-container--default.select2-container--focus .select2-selection--single,
.reg-page .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #1a3584;
  box-shadow: 0 0 0 4px rgba(26, 53, 132, 0.16);
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--ink);
  line-height: 1.3;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  padding-right: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--ink-3);
  font-weight: 500;
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 14px;
  width: 20px;
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--ink-3) transparent transparent transparent;
  border-width: 6px 5px 0 5px;
  margin-left: -5px;
  margin-top: -3px;
}

.reg-page .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--ink-3) transparent;
  border-width: 0 5px 6px 5px;
  margin-top: -3px;
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__clear {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  height: 22px;
  width: 22px;
  line-height: 20px;
  font-size: 16px;
  color: var(--ink-3);
  background: transparent !important;
  border-radius: 8px;
  padding: 0 !important;
  float: none;
}

.reg-page .select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: var(--ink);
  background: var(--tint) !important;
}

.reg-page .select2-dropdown {
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(10, 31, 77, 0.06), 0 20px 40px -26px rgba(10, 31, 77, 0.45);
  overflow: hidden;
  margin-top: 8px;
  padding: 10px;
  z-index: 40;
}

.reg-page .select2-container--open .select2-dropdown--below {
  border-top: 1px solid var(--line-2);
}

.reg-page .select2-container--default .select2-search--dropdown {
  padding: 0 0 8px;
}

.reg-page .select2-container--default .select2-search--dropdown .select2-search__field {
  width: 100% !important;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
}

.reg-page .select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #1a3584;
  box-shadow: 0 0 0 4px rgba(26, 53, 132, 0.16);
}

.reg-page .select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--ink-3);
}

.reg-page .select2-results {
  padding: 0;
}

.reg-page .select2-results__options {
  max-height: 208px;
}

.reg-page .select2-container--default .select2-results__option {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 2px 0;
}

.reg-page .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--tint);
  color: var(--ink);
}

.reg-page .select2-container--default .select2-results__option--selected {
  background: linear-gradient(140deg, #1a3584, #0e3f88);
  color: #fff;
}

.reg-page .select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
  background: linear-gradient(140deg, #1a3584, #0e3f88);
  color: #fff;
}

.reg-page .select2-container--default .select2-results__message {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 10px 4px;
}

@media (max-width: 720px) {
  .reg-grid-isd,
  .reg-grid-isd--lg {
    grid-template-columns: 1fr;
  }

  .login-input,
  .reg-input,
  .reg-select {
    font-size: 16px;
  }
}

.hidden {
  display: none !important;
}

.reg-spinner.is-visible,
.reg-btn .reg-spinner[style*="display: block"],
.reg-btn .reg-spinner[style*="display: inline"] {
  display: inline-block;
}

/* ========== Forgot Form Number / Forgot Password ========== */

.forgot-wrap {
  width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin: auto 0;
  padding: clamp(8px, 2vw, 16px) 0;
}

.forgot-intro {
  width: 100%;
  text-align: center;
}

.forgot-intro__title,
.forgot-intro__title--solo {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.9px;
  color: var(--ink-brand);
  text-align: center;
  text-wrap: pretty;
}

.forgot-intro__sub {
  margin: 10px auto 0;
  max-width: 520px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.forgot-card {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(22px, 5vw, 30px) clamp(18px, 5vw, 32px) clamp(20px, 5vw, 28px);
  box-shadow: 0 2px 6px rgba(10, 31, 77, 0.05), 0 22px 46px -32px rgba(10, 31, 77, 0.4);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.forgot-card--narrow {
  width: min(520px, 100%);
}

.forgot-card__glow {
  position: absolute;
  inset: -40% -30% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 141, 190, 0.16), rgba(30, 141, 190, 0) 70%);
  animation: glow 8s ease-in-out infinite;
  pointer-events: none;
}

.forgot-card__lead {
  position: relative;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.forgot-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.forgot-mobile-row {
  display: grid;
  grid-template-columns: minmax(118px, 148px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.forgot-mobile-row > .reg-field {
  min-width: 0;
}

.forgot-mobile-row .reg-select-wrap,
.forgot-mobile-row .reg-select,
.forgot-mobile-row .reg-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.forgot-mobile-row .reg-select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

@media (max-width: 720px) {
  .forgot-mobile-row {
    grid-template-columns: 1fr;
  }
}

.forgot-mono {
  font-family: inherit !important;
}

.forgot-submit {
  width: 100%;
  margin-top: 2px;
}

.forgot-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(10, 31, 77, 0.1), 0 16px 30px -16px rgba(30, 46, 122, 0.62);
}

.forgot-links {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.forgot-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-ink);
}

.forgot-links a > i {
  font-size: 12px;
}

.forgot-links a:hover {
  color: var(--accent-ink-strong);
}

.forgot-help {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.forgot-help > i {
  font-size: 14px;
  margin-top: 2px;
  color: var(--accent-ink);
  flex: none;
}

.forgot-help p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.forgot-alert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
}

.forgot-alert[hidden] {
  display: none !important;
}

.forgot-alert p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: pretty;
}

.forgot-alert--ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok-ink);
}

.forgot-alert--ok i {
  color: var(--ok-ink);
  font-size: 15px;
  flex: none;
}

.forgot-alert--err {
  background: var(--err-bg, rgba(192, 57, 43, 0.08));
  border: 1px solid var(--err-line, rgba(192, 57, 43, 0.3));
  color: var(--err-ink, #b23b2c);
}

.forgot-alert--err i {
  color: var(--err-ink, #b23b2c);
  font-size: 15px;
  flex: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#verify-otp-block[hidden] {
  display: none !important;
}

/* —— Error pages (404) —— */
body.error-page {
  min-height: 100vh;
}

.error-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 48px) clamp(16px, 4vw, 24px);
  position: relative;
}

.error-panel {
  position: relative;
  width: min(560px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 40px) clamp(20px, 4vw, 36px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(10, 31, 77, 0.05), 0 24px 48px -28px rgba(10, 31, 77, 0.35);
  overflow: hidden;
  animation: errorIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-kicker {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(88px, 22vw, 132px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, #1eaab1 0%, #ffe346 45%, #1a3584 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: errorFloat 5.5s ease-in-out infinite;
  user-select: none;
}

[data-theme="dark"] .error-kicker {
  background: linear-gradient(135deg, #5ec8e8 0%, #1e8dbe 45%, #b8e8ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.error-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 141, 190, 0.28), rgba(30, 141, 190, 0) 68%);
  pointer-events: none;
  animation: errorPulse 6s ease-in-out infinite;
}

.error-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: -8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--ink-brand);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.error-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: pretty;
}

.error-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 38ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.error-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease;
}

.error-btn--primary {
  color: #fff !important;
  background: var(--btn-grad);
  box-shadow: 0 1px 2px rgba(10, 31, 77, 0.1), 0 12px 24px -14px rgba(26, 53, 132, 0.55);
}

.error-btn--primary:hover {
  transform: translateY(-2px);
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(10, 31, 77, 0.12), 0 16px 28px -14px rgba(26, 53, 132, 0.65);
}

.error-btn--ghost {
  color: var(--ink-brand) !important;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}

.error-btn--ghost:hover {
  transform: translateY(-1px);
  background: var(--tint);
  color: var(--accent-ink-strong) !important;
}

.error-help {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

.error-help a {
  font-weight: 600;
}

@keyframes errorIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes errorFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes errorPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-panel,
  .error-kicker,
  .error-glow {
    animation: none;
  }
}

/* —— Login transit loader (full-bleed navy) —— */
.login-transit {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  color: #eef2ff;
  background: #061433;
  animation: loginTransitFade 0.4s ease both;
}

.login-transit[hidden] {
  display: none !important;
}

.login-transit__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(30, 141, 190, 0.34), transparent 58%),
    radial-gradient(900px 560px at 92% 108%, rgba(26, 53, 132, 0.4), transparent 55%),
    linear-gradient(125deg, #061433 0%, #0a1f4d 28%, #1a3584 58%, #1a3584 78%, #0a1f4d 100%);
  background-size: 100% 100%, 100% 100%, 220% 220%;
  animation: loginTransitGradient 10s ease-in-out infinite alternate;
}

.login-transit__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}

.login-transit__orb--1 {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(30, 141, 190, 0.45), rgba(30, 141, 190, 0) 68%);
  animation: loginTransitOrb 9s ease-in-out infinite;
}

.login-transit__orb--2 {
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  right: -6%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(26, 53, 132, 0.5), rgba(26, 53, 132, 0) 70%);
  animation: loginTransitOrb 11s ease-in-out infinite reverse;
}

.login-transit__orb--3 {
  width: min(30vw, 240px);
  height: min(30vw, 240px);
  left: 42%;
  top: 58%;
  background: radial-gradient(circle, rgba(199, 211, 250, 0.22), rgba(199, 211, 250, 0) 70%);
  animation: loginTransitOrb 7s ease-in-out infinite 0.6s;
}

.login-transit__sheen {
  position: absolute;
  inset: -20% -40%;
  background: linear-gradient(
    105deg,
    transparent 36%,
    rgba(255, 255, 255, 0.07) 48%,
    rgba(30, 141, 190, 0.14) 52%,
    transparent 64%
  );
  transform: translateX(-30%);
  animation: loginTransitSheen 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.login-transit__grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(199, 211, 250, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 211, 250, 0.18) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 42%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 20%, transparent 78%);
}

.login-transit__content {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 40px) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: loginTransitIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-transit__mark {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 141, 190, 0.28), rgba(26, 53, 132, 0.55));
  border: 1px solid rgba(199, 211, 250, 0.22);
  color: #b8e8ea;
  font-size: 28px;
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.55);
}

.login-transit__mark-ring {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  border: 1px solid rgba(30, 141, 190, 0.35);
  animation: loginTransitPulse 2.2s ease-in-out infinite;
}

.login-transit__brand {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(199, 211, 250, 0.72);
}

.login-transit__title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.08;
  text-wrap: pretty;
}

.login-transit__msg {
  margin: 0 0 8px;
  min-height: 1.5em;
  max-width: 36ch;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(238, 242, 255, 0.78);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.login-transit__msg.is-swap {
  opacity: 0;
  transform: translateY(8px);
}

.login-transit__steps {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.login-transit__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(199, 211, 250, 0.55);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.login-transit__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: rgba(199, 211, 250, 0.28);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.login-transit__steps li.is-active {
  color: #fff;
  background: rgba(30, 141, 190, 0.16);
  border-color: rgba(30, 141, 190, 0.38);
  transform: translateX(4px);
}

.login-transit__steps li.is-active .login-transit__dot {
  background: #1e8dbe;
  box-shadow: 0 0 0 5px rgba(30, 141, 190, 0.22);
}

.login-transit__steps li.is-done {
  color: #a6efce;
  background: rgba(47, 163, 122, 0.1);
  border-color: rgba(47, 163, 122, 0.28);
}

.login-transit__steps li.is-done .login-transit__dot {
  background: #2fa37a;
  box-shadow: none;
}

.login-transit__progress {
  width: min(280px, 72%);
  margin-top: 18px;
}

.login-transit__progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(199, 211, 250, 0.08);
}

.login-transit__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1eaab1 0%, #ffe346 45%, #86cc21 78%, #1e8dbe 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 16px rgba(255, 227, 70, 0.45);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation: loginTransitFillShine 2.2s linear infinite;
}

.login-transit__prep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(199, 211, 250, 0.16);
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.55);
}

.login-transit__spinner {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid rgba(199, 211, 250, 0.22);
  border-top-color: #b8e8ea;
  border-right-color: #1e8dbe;
  animation: loginTransitSpin 0.85s linear infinite;
  box-shadow: 0 0 12px rgba(30, 141, 190, 0.35);
}

.login-transit__prep-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #eef2ff;
  white-space: nowrap;
}

.login-submit.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

body.login-transit-open {
  overflow: hidden;
}

@keyframes loginTransitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loginTransitFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes loginTransitIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginTransitGradient {
  0% {
    background-position: 0% 40%, 100% 60%, 0% 50%;
  }
  100% {
    background-position: 20% 60%, 70% 30%, 100% 50%;
  }
}

@keyframes loginTransitOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.08);
  }
}

@keyframes loginTransitSheen {
  0% {
    transform: translateX(-45%);
  }
  100% {
    transform: translateX(45%);
  }
}

@keyframes loginTransitFillShine {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes loginTransitPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-transit,
  .login-transit__bg,
  .login-transit__orb,
  .login-transit__sheen,
  .login-transit__content,
  .login-transit__mark-ring,
  .login-transit__fill,
  .login-transit__spinner {
    animation: none;
  }

  .login-transit__fill,
  .login-transit__msg,
  .login-transit__steps li {
    transition: none;
  }
}
