/* 24pay — auth (login / register / otp) */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --wm-background: #ffffff;
  --wm-foreground: #06281c;
  --wm-primary: #00c853;
  --wm-primary-hover: #006b45;
  --wm-primary-ink: #053220;
  --wm-muted: #e8fceb;
  --wm-muted-fg: #3d6b56;
  --wm-border: rgba(0, 107, 69, 0.14);
  --wm-input-border: rgba(0, 107, 69, 0.2);
  --wm-ring: #00e676;
  --wm-destructive: #dc2626;
  --wm-radius: 1.35rem;
  --wm-radius-md: 0.75rem;
  --wm-deep: #003d28;
}

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

body.auth-register-page {
  min-height: 100dvh;
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  color: var(--wm-foreground);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(0, 230, 118, 0.12), transparent 55%),
    linear-gradient(180deg, #f4fff7, #ffffff 55%);
}

/* Pages without split layout (OTP / forgot) */
body.auth-register-page > .reg-shell {
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

/* Split layout */
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2.25rem;
  color: #e8fceb;
  background:
    radial-gradient(600px 320px at 20% 10%, rgba(0, 230, 118, 0.28), transparent 60%),
    radial-gradient(500px 280px at 90% 90%, rgba(0, 200, 83, 0.18), transparent 55%),
    linear-gradient(160deg, #004d32 0%, #003022 55%, #02180f 100%);
  overflow: hidden;
}

.auth-aside__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.22), transparent 65%);
  pointer-events: none;
}

.auth-aside__brand {
  position: relative;
  z-index: 1;
}

.auth-aside__brand img,
.auth-aside__brand .brand-logo-img {
  max-height: 52px;
  width: auto;
  filter: brightness(1.05);
}

.auth-aside__copy {
  position: relative;
  z-index: 1;
  margin-top: 3.5rem;
}

.auth-aside__kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00e676;
}

.auth-aside__copy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 14ch;
  color: #fff;
}

.auth-aside__copy p {
  margin: 14px 0 0;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(232, 252, 235, 0.78);
  font-weight: 500;
}

.auth-aside__points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.auth-aside__points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(232, 252, 235, 0.88);
}

.auth-aside__points li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #00e676;
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.16);
}

.auth-aside__foot {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: rgba(232, 252, 235, 0.55);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(0, 230, 118, 0.12), transparent 55%),
    linear-gradient(180deg, #f4fff7, #ffffff 55%);
}

.reg-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.reg-card {
  background: var(--wm-background);
  border: 1px solid var(--wm-border);
  border-radius: calc(var(--wm-radius) + 4px);
  box-shadow: 0 24px 60px rgba(0, 107, 69, 0.1);
  padding: 2rem 1.85rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.reg-brand {
  text-align: center;
  margin-bottom: 1.35rem;
  flex-shrink: 0;
}

.reg-brand .brand-logo--auth,
.reg-brand .brand-icon img {
  max-height: 54px;
  margin: 0 auto;
}

.reg-brand-tagline {
  margin: 0.9rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--wm-foreground);
}

.reg-brand-sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--wm-muted-fg);
  font-weight: 500;
  line-height: 1.45;
}

.reg-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
  flex-shrink: 0;
}

.reg-progress-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--wm-muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reg-step-label { display: none; }

@media (min-width: 480px) {
  .reg-step-label { display: inline; }
}

.reg-progress-item .dot {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  border: 1px solid var(--wm-border);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.reg-progress-item.active .dot {
  border-color: transparent;
  background: linear-gradient(135deg, #00e676, #00c853);
  color: var(--wm-primary-ink);
}

.reg-progress-item.done .dot {
  border-color: rgba(0, 200, 83, 0.35);
  background: rgba(0, 200, 83, 0.12);
  color: var(--wm-primary-hover);
}

.reg-progress-line {
  width: 1.35rem;
  height: 2px;
  background: var(--wm-border);
  border-radius: 2px;
}

.reg-progress-line.done {
  background: var(--wm-primary);
}

.reg-form-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.reg-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.reg-panels { flex: 1; min-height: 0; }

.reg-panel { display: none; }

.reg-panel.is-active {
  display: block;
  animation: regFade 0.22s ease;
}

@keyframes regFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.reg-fields { width: 100%; }

.reg-form .form-group { margin-bottom: 1.05rem; }

.reg-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1;
  color: var(--wm-foreground);
  margin-bottom: 0.5rem;
}

.reg-form .wm-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 2.85rem;
  min-height: 2.85rem;
  border-radius: var(--wm-radius-md);
  border: 1px solid var(--wm-input-border);
  background-color: #ffffff;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--wm-foreground);
  box-shadow: 0 1px 2px rgba(0, 107, 69, 0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.reg-form .wm-input::placeholder {
  color: #7a9a89;
  opacity: 1;
  font-weight: 500;
}

.reg-form .wm-input:focus {
  outline: none;
  border-color: var(--wm-ring);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}

.reg-form .wm-input.is-invalid {
  border-color: var(--wm-destructive);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.wm-password-wrap {
  position: relative;
  width: 100%;
}

.wm-password-wrap .wm-input--password {
  padding-right: 2.75rem;
}

.wm-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--wm-muted-fg);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.wm-password-toggle:hover {
  color: var(--wm-foreground);
  background: var(--wm-muted);
}

.wm-password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.35);
}

.wm-password-toggle .wm-icon-eye-off { display: none; }
.wm-password-toggle.is-visible .wm-icon-eye { display: none; }
.wm-password-toggle.is-visible .wm-icon-eye-off { display: block; }

.reg-phone-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.reg-phone-prefix {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 2.85rem;
  padding: 0 0.85rem;
  border: 1px solid var(--wm-input-border);
  border-right: 0;
  border-radius: var(--wm-radius-md) 0 0 var(--wm-radius-md);
  background: var(--wm-muted);
  font-size: 0.92rem;
  line-height: 1.25rem;
  font-weight: 650;
  color: var(--wm-muted-fg);
}

.reg-form .wm-input.wm-input-phone {
  width: auto;
  flex: 1;
  min-width: 0;
  border-radius: 0 var(--wm-radius-md) var(--wm-radius-md) 0;
}

.reg-phone-row:focus-within .reg-phone-prefix {
  border-color: var(--wm-ring);
}

.reg-phone-row:focus-within .wm-input.wm-input-phone {
  border-color: var(--wm-ring);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}

.reg-form .field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wm-destructive);
}

.reg-form .field-error.show { display: block; }

.reg-form .auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  margin-top: 0.25rem;
}

.reg-form .auth-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.reg-form .auth-checkbox .checkmark {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  margin-top: 0.1rem;
  border: 1.5px solid var(--wm-input-border);
  border-radius: 0.3rem;
  background: #fff;
  position: relative;
}

.reg-form .auth-checkbox input:checked + .checkmark {
  background: var(--wm-primary);
  border-color: var(--wm-primary);
}

.reg-form .auth-checkbox input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #053220;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.reg-form .auth-checkbox span:last-child {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--wm-muted-fg);
}

.reg-form .auth-checkbox a {
  color: var(--wm-primary-hover);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.password-strength { margin-top: 0.35rem; }

.password-strength .strength-bar {
  height: 4px;
  background: var(--wm-border);
  border-radius: 2px;
  overflow: hidden;
}

.password-strength .strength-bar-fill {
  height: 100%;
  width: 0;
  transition: width 0.2s;
}

.strength-weak { width: 25%; background: var(--wm-destructive); }
.strength-fair { width: 50%; background: #f59e0b; }
.strength-good { width: 75%; background: var(--wm-primary); }
.strength-strong { width: 100%; background: #006b45; }

.password-strength .strength-text {
  font-size: 0.75rem;
  color: var(--wm-muted-fg);
  margin-top: 0.25rem;
  display: block;
  font-weight: 600;
}

.reg-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.65rem;
  flex-shrink: 0;
}

.btn-reg {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.95rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.15s;
}

.btn-reg-ghost {
  background: #fff;
  color: var(--wm-foreground);
  border: 1.5px solid var(--wm-input-border);
}

.btn-reg-ghost:hover { background: var(--wm-muted); }

.btn-reg-primary {
  background: linear-gradient(135deg, #00e676, #00c853);
  color: var(--wm-primary-ink);
  box-shadow: 0 10px 24px rgba(0, 200, 83, 0.28);
}

.btn-reg-primary:hover {
  background: linear-gradient(135deg, #00c853, #006b45);
  color: #fff;
  transform: translateY(-1px);
}

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

.btn-reg-ghost.hidden { display: none !important; }

.reg-actions:not(:has(.btn-reg-ghost:not(.hidden))) .btn-reg-primary {
  flex: 1;
  width: 100%;
}

.reg-footer {
  text-align: center;
  margin-top: 1.15rem;
  font-size: 0.9rem;
  color: var(--wm-muted-fg);
  flex-shrink: 0;
  font-weight: 500;
}

.reg-footer a {
  color: var(--wm-primary-hover);
  font-weight: 750;
  text-decoration: none;
}

.reg-footer a:hover { text-decoration: underline; }

.reg-form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.reg-forgot-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--wm-primary-hover);
  text-decoration: none;
  white-space: nowrap;
}

.reg-forgot-link:hover { text-decoration: underline; }

.reg-form .auth-checkbox--inline {
  align-items: center;
  margin-top: 0;
}

.wm-toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 2rem));
}

.wm-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-md);
  box-shadow: 0 12px 28px rgba(0, 107, 69, 0.12);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--wm-foreground);
  opacity: 0;
  transform: translateX(0.75rem);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.wm-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.wm-toast__icon {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-radius: 9999px;
}

.wm-toast--error .wm-toast__icon { background: var(--wm-destructive); }
.wm-toast--success .wm-toast__icon { background: var(--wm-primary); }
.wm-toast__text { flex: 1; min-width: 0; }

.reg-mobile-pill {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 auto 1rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  background: var(--wm-muted);
  border: 1px solid var(--wm-border);
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--wm-foreground);
}

.reg-mobile-pill__prefix {
  color: var(--wm-muted-fg);
  font-weight: 600;
}

.reg-otp-group {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
}

.reg-otp-box {
  box-sizing: border-box;
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 2.85rem;
  text-align: center;
  border-radius: var(--wm-radius-md);
  border: 1px solid var(--wm-input-border);
  background-color: #ffffff;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wm-foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
}

.reg-otp-box:focus {
  outline: none;
  border-color: var(--wm-ring);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}

.reg-otp-box.filled {
  border-color: rgba(0, 200, 83, 0.5);
}

.reg-otp-box.is-invalid {
  border-color: var(--wm-destructive);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.reg-otp-group.shake { animation: regOtpShake 0.45s ease; }

@keyframes regOtpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.reg-otp-timer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--wm-muted-fg);
}

.reg-otp-timer .timer-count {
  color: var(--wm-primary-hover);
  font-weight: 700;
}

.reg-otp-resend {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--wm-primary-hover);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reg-dev-hint {
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--wm-muted-fg);
  background: var(--wm-muted);
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-md);
}

.reg-dev-hint code {
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--wm-primary-hover);
}

.btn-reg.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.fp-reset-box {
  text-align: center;
  padding: 0.25rem 0.25rem 0.5rem;
}

.fp-reset-lead {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--wm-muted-fg);
  font-weight: 500;
}

.fp-reset-email {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--wm-primary-hover);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--wm-muted);
  border: 1px solid var(--wm-border);
}

.fp-reset-email:hover {
  background: #dff8e8;
}

.fp-reset-hint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--wm-muted-fg);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside {
    padding: 1.25rem 1.35rem 1.5rem;
    min-height: auto;
  }
  .auth-aside__copy { margin-top: 1.25rem; }
  .auth-aside__copy h1 { max-width: none; font-size: 1.55rem; }
  .auth-aside__points { display: none; }
  .auth-aside__foot { display: none; }
  .auth-main {
    padding: 1.25rem 1rem 1.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .reg-otp-box {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 2.4rem;
    font-size: 1rem;
  }
  .reg-card { padding: 1.4rem 1.15rem 1.15rem; }
}
