/* Zero - Auth pages: centered card layout */

:root,
[data-theme="light"] {
  --zero-primary: #8b5cf6;
  --zero-primary-hover: #7c3aed;
  --zero-primary-light: rgba(139, 92, 246, 0.16);
  --zero-accent: #ec4899;
  --auth-bg: linear-gradient(135deg, #f8f9fc 0%, #f3f5fb 45%, #edf1f8 100%);
  --auth-card-bg: #ffffff;
  --auth-text: #1a1d2e;
  --auth-text-muted: #6b7288;
  --auth-border: #e2e5ee;
  --auth-shadow: 0 10px 36px rgba(20, 25, 45, 0.08);
  --auth-input-bg: #f1f3f8;
  --auth-input-color: #1a1d2e;
  --auth-placeholder: #9ca3b5;
  --auth-title-size: 1.95rem;
  --auth-subtitle-size: 0.9rem;
  --auth-card-padding-y: 1.5rem;
  --auth-card-padding-x: 1.75rem;
  --auth-radius-md: 12px;
  --auth-radius-lg: 16px;
  --auth-input-height: 40px;
}

[data-theme="dark"] {
  --auth-bg:
    radial-gradient(1200px 520px at -10% -20%, rgba(139, 92, 246, 0.2), transparent 56%),
    radial-gradient(1100px 520px at 110% 110%, rgba(236, 72, 153, 0.16), transparent 58%),
    linear-gradient(135deg, #060811 0%, #0d1222 45%, #090d19 100%);
  --auth-card-bg: rgba(12, 15, 28, 0.78);
  --auth-text: #f0f4ff;
  --auth-text-muted: #a5b0c8;
  --auth-border: rgba(135, 150, 190, 0.22);
  --auth-shadow: 0 24px 70px rgba(3, 6, 18, 0.7);
  --auth-input-bg: rgba(255, 255, 255, 0.06);
  --auth-input-color: #e2e8f0;
  --auth-placeholder: #7f8aa6;
}

body.auth-layout {
  margin: 0;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--auth-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-layout-inner {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 1.5rem;
  box-sizing: border-box;
  position: relative;
}

.auth-shell {
  width: 100%;
  max-width: 460px;
}

.auth-shell--signup {
  max-width: 620px;
  position: relative;
}

.signup-bg-particles {
  position: absolute;
  inset: -24px;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.signup-bg-particles span {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 72%);
  animation: particleFloat 9s ease-in-out infinite;
}

.signup-bg-particles span:nth-child(1) { left: 10%; top: 12%; animation-delay: 0s; }
.signup-bg-particles span:nth-child(2) { left: 84%; top: 16%; animation-delay: 1.2s; }
.signup-bg-particles span:nth-child(3) { left: 88%; top: 70%; animation-delay: 2.2s; }
.signup-bg-particles span:nth-child(4) { left: 22%; top: 82%; animation-delay: 3.1s; }
.signup-bg-particles span:nth-child(5) { left: 50%; top: 8%; animation-delay: 4.1s; }
.signup-bg-particles span:nth-child(6) { left: 4%; top: 58%; animation-delay: 5.3s; }

@keyframes particleFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.25; }
  50% { transform: translate3d(0, -18px, 0) scale(1.2); opacity: 0.7; }
}

.auth-layout-inner:has(.auth-shell--signup) {
  padding: 1.35rem 1rem 1rem;
}

body.auth-layout:has(.auth-shell--signup) {
  overflow: hidden;
}

.auth-shell--signup::before,
.auth-shell--signup::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

.auth-shell--signup::before {
  width: 210px;
  height: 210px;
  top: -50px;
  left: -70px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(139, 92, 246, 0) 72%);
}

.auth-shell--signup::after {
  width: 200px;
  height: 200px;
  bottom: -65px;
  right: -55px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, rgba(236, 72, 153, 0) 74%);
}

.auth-card-signup .card-body {
  padding: 1.25rem 1.35rem 1.05rem;
}

[data-theme="dark"] .auth-card.auth-card-signup {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.signup-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin: 0.7rem 0 0.55rem;
}

.signup-step-indicator {
  border: 1px solid var(--auth-border);
  background: var(--auth-input-bg);
  border-radius: 10px;
  padding: 0.4rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  color: var(--auth-text-muted);
  transition: transform 0.18s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.signup-step-indicator span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--auth-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.signup-step-indicator small {
  font-size: 0.68rem;
  font-weight: 600;
}

.signup-step-indicator.active {
  border-color: var(--zero-primary);
  color: var(--auth-text);
  box-shadow: 0 0 0 2px var(--zero-primary-light);
  transform: translateY(-1px);
}

.signup-progress-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: hidden;
  margin-bottom: 0.95rem;
}

.signup-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-accent));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.45);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.signup-step-indicator.active span,
.signup-step-indicator.done span {
  background: var(--zero-primary);
  color: #fff;
  border-color: var(--zero-primary);
}

.signup-step-panel {
  display: none;
}

.signup-step-panel.active {
  display: block;
  animation: signupStepIn 0.22s ease-out;
}

.signup-step-panel.active.anim-forward {
  animation: signupStepInForward 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.signup-step-panel.active.anim-back {
  animation: signupStepInBack 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes signupStepIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes signupStepInForward {
  from {
    opacity: 0;
    transform: translateX(14px) scale(0.99);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes signupStepInBack {
  from {
    opacity: 0;
    transform: translateX(-14px) scale(0.99);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

.signup-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.signup-actions .btn {
  flex: 1;
  height: 40px;
}

.signup-wizard-error {
  display: none;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
  font-size: 0.82rem;
}

[data-theme="dark"] .signup-profile-preview,
.signup-profile-preview {
  border: 1px solid var(--auth-border);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.14));
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.preview-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-accent));
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
}

.preview-meta strong {
  display: block;
  font-size: 0.88rem;
  color: var(--auth-text);
  line-height: 1.25;
}

.preview-meta small {
  font-size: 0.74rem;
  color: var(--auth-text-muted);
}

.signup-avatar-vibes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.avatar-vibe {
  border: 1px solid var(--auth-border);
  background: var(--auth-input-bg);
  color: var(--auth-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 9px;
  padding: 0.4rem 0.35rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.avatar-vibe:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.55);
}

.avatar-vibe.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-accent));
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.26);
}

.signup-interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.interest-chip {
  border: 1px solid var(--auth-border);
  background: var(--auth-input-bg);
  color: var(--auth-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.interest-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.55);
}

.interest-chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-accent));
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.24);
}

.avatar-vibe.pulse,
.interest-chip.pulse {
  animation: selectionPulse 0.34s ease-out;
}

@keyframes selectionPulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.28);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(139, 92, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

[data-theme="dark"] .signup-wizard-error {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.32);
}

.auth-wrapper {
  width: 100%;
  max-width: 460px;
}

.auth-shell--wide {
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.auth-shell--wide > .auth-hero-card,
.auth-shell--wide > .auth-card {
  height: 100%;
}

.auth-hero-card {
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  overflow: hidden;
  box-shadow: var(--auth-shadow);
  background: var(--auth-card-bg);
}

.auth-hero-top {
  padding: 1.55rem 1.55rem 1.45rem;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  position: relative;
}

.auth-hero-top h1 {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1.06;
}

.auth-hero-top p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.88;
}

.auth-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.auth-hero-pills span {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 140px;
  backdrop-filter: blur(2px);
}

.auth-hero-pills--cards span {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.auth-hero-pills--cards span strong {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.auth-hero-pills--cards span small {
  font-size: 0.8rem;
  opacity: 0.85;
}

.hero-pill-icon {
  font-style: normal;
  line-height: 1;
}

.auth-hero-stars {
  position: absolute;
  right: 1.6rem;
  top: 1.1rem;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.auth-hero-stars span:first-child {
  font-size: 2.8rem;
  position: absolute;
  right: 1.95rem;
  top: 0.55rem;
}

.auth-hero-stars span:last-child {
  font-size: 6.2rem;
  position: absolute;
  right: -0.25rem;
  top: -0.05rem;
}

.auth-hero-body {
  padding: 2rem 1.55rem 1.6rem;
  color: var(--auth-text-muted);
}

.auth-hero-body p {
  margin: 0 0 1.05rem;
  color: var(--auth-text);
  font-size: 1.05rem;
  font-weight: 800;
}

.auth-hero-body ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  list-style: none;
}

.auth-hero-body li + li {
  margin-top: 0.45rem;
}

.auth-hero-body li {
  position: relative;
  padding-left: 1.3rem;
}

.auth-hero-body li::before {
  content: "✅";
  position: absolute;
  left: 0;
  top: -0.02rem;
  font-size: 0.85rem;
}

.auth-hero-status {
  margin-top: 1.45rem;
  border-radius: 20px;
  border: 1px solid var(--auth-border);
  background: var(--auth-input-bg);
  padding: 1.3rem 1.35rem;
}

.auth-hero-status .label {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
}

.auth-hero-status .value {
  margin-top: 0.25rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--auth-text);
}

.auth-back-link {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: var(--zero-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-back-link:hover {
  color: var(--zero-primary-hover);
}

.auth-theme-btn {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
}

.auth-card {
  width: 100%;
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius-lg);
  box-shadow: var(--auth-shadow);
  border: 1px solid var(--auth-border);
  animation: authCardReveal 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-card .card-body {
  padding: var(--auth-card-padding-y) var(--auth-card-padding-x) 1.25rem;
}

.auth-shell--wide > .auth-card .card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.05rem;
}

.auth-logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--zero-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.auth-logo h2 {
  font-size: 1.55rem;
  font-weight: 760;
  color: var(--auth-text);
  letter-spacing: -0.02em;
  margin: 0 0 0.2rem;
}

.auth-logo .subtitle {
  font-size: var(--auth-subtitle-size);
  color: var(--auth-text-muted);
  margin-bottom: 0;
}

.auth-card-signup .auth-logo h2 {
  font-size: var(--auth-title-size);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0.2rem;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-form .mb-3 {
  margin-bottom: 0.65rem !important;
}

.auth-form .mb-4 {
  margin-bottom: 0.75rem !important;
}

.auth-form .form-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-form .form-control {
  height: var(--auth-input-height);
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  font-size: 0.9rem;
  padding: 0 0.9rem;
  background-color: var(--auth-input-bg);
  color: var(--auth-input-color);
}

.auth-form .form-control:focus {
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px var(--zero-primary-light);
  outline: none;
  background-color: var(--auth-input-bg);
  color: var(--auth-input-color);
}

.auth-form .form-control::placeholder {
  color: var(--auth-placeholder);
}

.password-field {
  position: relative;
}

.password-field-input {
  padding-right: 4.6rem !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--zero-primary);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.25rem;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--zero-primary-hover);
}

.auth-form .phone-intl-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 0;
}

.auth-form .phone-intl-prefix {
  position: relative;
  flex: 0 0 128px;
  max-width: 128px;
  min-width: 0;
  z-index: 5;
}

.auth-form .phone-intl-prefix-display {
  width: 100%;
  height: var(--auth-input-height);
  display: flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--auth-border);
  border-right-width: 0;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.2));
  padding: 0 0.42rem 0 0.5rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
}

[data-theme="dark"] .auth-form .phone-intl-prefix-display {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}

.auth-form .phone-intl-flag {
  width: 18px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.auth-form .phone-intl-code {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--auth-input-color);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.auth-form .phone-intl-caret {
  margin-left: auto;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: var(--auth-text-muted);
  line-height: 1;
  background: rgba(148, 163, 184, 0.09);
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.auth-form .phone-intl-prefix.is-open .phone-intl-caret {
  transform: rotate(180deg);
  color: var(--zero-primary);
  border-color: rgba(139, 92, 246, 0.55);
}

.auth-form .phone-intl-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  width: min(340px, calc(100vw - 2rem));
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  padding: 0.45rem;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.auth-form .phone-intl-search {
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  height: 34px;
  padding: 0 0.72rem;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  background: var(--auth-input-bg);
  color: var(--auth-input-color);
}

.auth-form .phone-intl-search:focus {
  outline: none;
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px var(--zero-primary-light);
}

.auth-form .phone-intl-list {
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 0.2rem;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
}

.auth-form .phone-intl-list::-webkit-scrollbar {
  width: 8px;
}

.auth-form .phone-intl-list::-webkit-scrollbar-track {
  background: transparent;
}

.auth-form .phone-intl-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(99, 102, 241, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

[data-theme="dark"] .auth-form .phone-intl-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.7), rgba(129, 140, 248, 0.65));
}

.auth-form .phone-intl-option {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  width: 100%;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.45rem;
  font-size: 0.8rem;
  color: var(--auth-input-color);
  cursor: pointer;
}

.auth-form .phone-intl-option:hover {
  background: rgba(139, 92, 246, 0.08);
}

.auth-form .phone-intl-option.active {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.3);
}

.auth-form .phone-intl-option-flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 3px;
}

.auth-form .phone-intl-option-meta {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.auth-form .phone-intl-option-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.auth-form .phone-intl-option-dial {
  flex: 0 0 auto;
  color: #475569;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-theme="dark"] .auth-form .phone-intl-option-dial {
  color: #cbd5e1;
}

@media (max-width: 576px) {
  .auth-form .phone-intl-prefix {
    flex: 0 0 112px;
    max-width: 112px;
  }

  .auth-form .phone-intl-code {
    font-size: 0.8rem;
  }

  .auth-form .phone-intl-dropdown {
    left: 0;
    width: min(92vw, 320px);
  }

  .auth-form .phone-intl-list {
    max-height: 200px;
  }
}

.auth-form .phone-intl-number {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-form .phone-intl-number .form-control {
  border-radius: 0 11px 11px 0;
  padding-left: 0.95rem;
}

.auth-form .phone-intl-row:focus-within .phone-intl-prefix-display,
.auth-form .phone-intl-row:focus-within .phone-intl-number .form-control {
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px var(--zero-primary-light);
}

.auth-form .phone-intl-prefix-display:focus,
.auth-form .phone-intl-row .phone-intl-number .form-control:focus {
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px var(--zero-primary-light);
}

.auth-form .form-check {
  padding-left: 1.6rem;
}

.auth-form .form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  border-radius: 4px;
  border: 2px solid var(--auth-border);
  background-color: var(--auth-input-bg);
}

.auth-form .form-check-input:checked {
  background-color: var(--zero-primary);
  border-color: var(--zero-primary);
}

.auth-form .form-check-label {
  font-size: 0.9rem;
  color: var(--auth-text);
}

.auth-form .form-check-label a {
  color: var(--zero-primary);
  text-decoration: none;
}

.auth-form .form-check-label a:hover {
  color: var(--zero-primary-hover);
  text-decoration: none;
}

.auth-link {
  font-size: 0.9rem;
  color: var(--zero-primary);
  text-decoration: none;
}

.auth-link:hover {
  color: var(--zero-primary-hover);
  text-decoration: underline;
}

.auth-card .btn-primary,
.btn-zero-primary,
.btn-zero-outline,
.auth-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  border-radius: var(--auth-radius-md);
}

.btn-zero-primary {
  height: 41px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--zero-primary), var(--zero-primary-hover)) !important;
  border-color: var(--zero-primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.24);
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}

.btn-zero-primary:hover,
.btn-zero-primary:focus {
  background: linear-gradient(135deg, var(--zero-primary-hover), #6d28d9) !important;
  border-color: var(--zero-primary-hover) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.32);
  transform: translateY(-1px);
}

.btn-zero-outline {
  height: 41px;
  font-size: 0.95rem;
  background-color: transparent !important;
  color: var(--zero-primary) !important;
  border: 1.5px solid var(--zero-primary);
  transition: transform 0.14s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-zero-outline:hover,
.btn-zero-outline:focus {
  background-color: var(--zero-primary-light) !important;
  color: var(--zero-primary-hover) !important;
  border-color: var(--zero-primary-hover) !important;
  transform: translateY(-1px);
}

.auth-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--auth-border);
}

.auth-shell--wide > .auth-card .auth-footer {
  margin-top: auto;
}

.auth-footer p {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  margin-bottom: 0.4rem;
}

.auth-card .alert {
  border-radius: 10px;
  font-size: 0.875rem;
  border: none;
}

.auth-card .alert-danger {
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
}

/* No server/client errors yet — summary keeps alert-danger classes but must not take layout */
.auth-card .validation-summary-valid {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  border: none !important;
}

.signup-wizard-error:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.auth-card .alert-info {
  background: var(--zero-primary-light);
  color: var(--zero-primary-hover);
}

.auth-card .alert-success {
  background: rgba(25, 135, 84, 0.08);
  color: #157347;
}

.auth-status-card {
  text-align: center;
  animation: authCardReveal 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-status-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 0.9rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--zero-primary-light);
  color: var(--zero-primary);
}

.auth-status-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.auth-status-icon.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.auth-status-icon.error {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.auth-status-title {
  font-size: 1.34rem;
  font-weight: 750;
  color: var(--auth-text);
  margin-bottom: 0.4rem;
}

.auth-status-text {
  font-size: 0.92rem;
  color: var(--auth-text-muted);
  margin-bottom: 1.1rem;
}

.auth-status-list {
  text-align: left;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.1rem;
  list-style: none;
}

.auth-status-list li {
  position: relative;
  font-size: 0.86rem;
  color: var(--auth-text-muted);
  padding-left: 1.15rem;
}

.auth-status-list li + li {
  margin-top: 0.35rem;
}

.auth-status-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--zero-primary);
}

@keyframes authCardReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.auth-form .form-control,
.auth-form .form-select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.auth-form .form-control:hover,
.auth-form .form-select:hover {
  border-color: color-mix(in srgb, var(--zero-primary) 45%, var(--auth-border));
}

.auth-card .auth-link,
.auth-footer a {
  transition: color 0.2s ease, transform 0.14s ease;
}

.auth-card .auth-link:hover,
.auth-footer a:hover {
  transform: translateY(-1px);
}

@media (max-width: 576px) {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --auth-title-size: 1.6rem;
    --auth-card-padding-y: 1.35rem;
    --auth-card-padding-x: 1.2rem;
  }
  .auth-card .card-body {
    padding: var(--auth-card-padding-y) var(--auth-card-padding-x) 1.15rem;
  }
}

@media (max-width: 900px) {
  .auth-shell--wide {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (max-width: 1400px) {
  .auth-hero-pills--cards span strong { font-size: 1.05rem; }
  .auth-hero-pills--cards span small { font-size: 0.8rem; }
}

/* ── Registration contact method header ───────────────────────── */
.reg-method-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.reg-method-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--auth-border);
  border-radius: 8px;
  padding: 2px;
  width: 140px;
}

.reg-method-tab {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 4px 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--auth-text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s;
  line-height: 1.4;
}

.reg-method-tab.active {
  color: var(--auth-text);
}

.reg-method-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: var(--auth-card-bg);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.form-label-sm {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  color: var(--auth-text-muted);
}

.reg-phone-panel {
  position: relative;
  z-index: 6;
}

.role-chooser {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.role-option {
  display: block;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: var(--auth-input-bg);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s, background 0.2s;
}

.role-option:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.6);
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
}

.role-option-content strong {
  font-size: 0.92rem;
  color: var(--auth-text);
}

.role-option-content small {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
}

.role-option:has(input:checked) {
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px var(--zero-primary-light);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(236, 72, 153, 0.11));
}

.role-option-highlight {
  border-color: rgba(236, 72, 153, 0.5);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.07), rgba(236, 72, 153, 0.08));
}

@media (max-width: 700px) {
  .auth-shell--signup {
    max-width: 100%;
  }
  .auth-layout-inner:has(.auth-shell--signup) {
    padding-top: 0.95rem;
  }
  .auth-card-signup .auth-logo h2 {
    font-size: 1.55rem;
  }
  .signup-step-indicator small {
    font-size: 0.62rem;
  }
  .signup-avatar-vibes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Login tab switcher */
.login-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--auth-border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.login-tab {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.login-tab.active {
  color: var(--auth-text);
}

.login-tab-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--auth-card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

[data-theme="dark"] .login-tab-indicator {
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.auth-field-hint {
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  margin-top: 0.3rem;
  display: block;
}

/* Optional field label hint */
.auth-optional-label {
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  font-weight: 400;
}

/* @ prefix for username input */
.auth-input-prefix {
  background-color: var(--auth-input-bg);
  border-color: var(--auth-border);
  color: var(--auth-text-muted);
  font-size: 0.95rem;
  border-right: none;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  border-left: none;
  box-shadow: none;
}

.input-group:focus-within .auth-input-prefix {
  border-color: var(--zero-primary);
}

.input-group:focus-within .form-control {
  border-color: var(--zero-primary);
}

/* Country/select styling */
.form-select {
  background-color: var(--auth-input-bg);
  color: var(--auth-input-color);
  border-color: var(--auth-border);
  font-size: 0.9rem;
}

.form-select:focus {
  border-color: var(--zero-primary);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

[data-theme="dark"] .form-select {
  background-color: var(--auth-input-bg);
  color: var(--auth-input-color);
  border-color: var(--auth-border);
}

[data-theme="dark"] .form-select option {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* ── Registration loader overlay ──────────────────────────────── */
.register-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.register-loader.active {
  opacity: 1;
  pointer-events: all;
}

.register-loader-card {
  background: var(--auth-card-bg);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  width: min(360px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--auth-border);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.register-loader.active .register-loader-card {
  transform: translateY(0) scale(1);
}

.register-loader-logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zero-primary);
  margin-bottom: 1.5rem;
}

.register-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.register-confetti span {
  position: absolute;
  top: -12px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
}

.register-confetti span:nth-child(1) { left: 10%; background: #8b5cf6; }
.register-confetti span:nth-child(2) { left: 24%; background: #ec4899; }
.register-confetti span:nth-child(3) { left: 38%; background: #22d3ee; }
.register-confetti span:nth-child(4) { left: 56%; background: #f59e0b; }
.register-confetti span:nth-child(5) { left: 72%; background: #34d399; }
.register-confetti span:nth-child(6) { left: 86%; background: #a78bfa; }

.register-confetti.active span:nth-child(1) { animation: confettiDrop 900ms ease-out 0ms; }
.register-confetti.active span:nth-child(2) { animation: confettiDrop 980ms ease-out 60ms; }
.register-confetti.active span:nth-child(3) { animation: confettiDrop 1020ms ease-out 120ms; }
.register-confetti.active span:nth-child(4) { animation: confettiDrop 920ms ease-out 40ms; }
.register-confetti.active span:nth-child(5) { animation: confettiDrop 970ms ease-out 90ms; }
.register-confetti.active span:nth-child(6) { animation: confettiDrop 1010ms ease-out 150ms; }

@keyframes confettiDrop {
  0% {
    opacity: 0;
    transform: translateY(-8px) rotate(0deg);
  }
  10% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(170px) rotate(240deg);
  }
}

.register-loader-ring {
  width: 72px;
  height: 72px;
  color: var(--zero-primary);
  margin-bottom: 1.5rem;
}

.register-loader-ring svg {
  width: 100%;
  height: 100%;
  animation: loaderSpin 1.1s linear infinite;
}

.register-loader-arc {
  animation: loaderDash 1.1s ease-in-out infinite;
  transform-origin: center;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderDash {
  0%   { stroke-dashoffset: 88; }
  50%  { stroke-dashoffset: 22; }
  100% { stroke-dashoffset: 88; }
}

.register-loader-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--auth-text);
  margin: 0 0 0.3rem;
}

.register-loader-sub {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  margin: 0 0 1.5rem;
}

.register-loader-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.register-loader-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: transparent;
  transition: background 0.25s, color 0.25s;
}

.lstep-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--auth-text-muted);
  transition: color 0.25s;
}

.register-loader-step.done {
  background: rgba(0, 136, 204, 0.08);
  color: var(--zero-primary);
}

.register-loader-step.done .lstep-icon {
  color: var(--zero-primary);
}

[data-theme="dark"] .register-loader-step.done {
  background: rgba(0, 136, 204, 0.12);
}


/* ===== ZERO-078: mobile zoom prevention (auth / Identity) ===== */
html,
body {
  touch-action: manipulation;
}
a,
button,
input,
textarea,
select,
label,
.btn,
.form-control,
.password-toggle {
  touch-action: manipulation;
}

@media (max-width: 1024px) {
  input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='image']):not([type='color']),
  textarea,
  select,
  [contenteditable='true'],
  .auth-form .form-control,
  .form-control,
  .auth-form .phone-intl-search,
  .phone-intl-search {
    font-size: 16px !important;
  }
}

/* Legal links sit centered below the card (never beside it or outside the viewport). */
.auth-layout-inner {
  flex-direction: column;
}

.auth-legal-footer {
  width: 100%;
  max-width: 620px;
  margin: 1rem auto 0;
  padding: 0 0.5rem;
  text-align: center;
}

.auth-legal-footer .zero-footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}

/* Clip the decorative glow/particles on the wrapper with overflow-x: clip (not a scroll container, so focusing a
   field can no longer shift the page sideways); the page itself scrolls normally on short screens. */
body.auth-layout:has(.auth-shell--signup) {
  overflow: visible;
}

.auth-layout-inner:has(.auth-shell--signup) {
  overflow-x: clip;
}

/* Header actions (language + theme) on the account pages. */
.auth-top-actions {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 5;
  color: var(--zero-text);
}

.auth-top-actions .auth-theme-btn {
  position: static;
}

/* Leave room for the header actions above the sign-up card. */
.auth-layout-inner:has(.auth-shell--signup) {
  padding-top: 4rem;
}

@media (max-width: 480px) {
  .auth-top-actions {
    top: 0.85rem;
    right: 1rem;
  }

  .auth-back-link {
    top: 1.2rem;
    left: 1rem;
  }
}
