:root {
  --auth-accent: #5dd89e;
  --auth-accent-dark: #22b77c;
  --auth-ink: #111827;
  --auth-muted: #6b7280;
  --auth-line: #e5e7eb;
  --auth-panel: rgba(255, 255, 255, 0.94);
  --auth-home-ink: #ffffff;
  --auth-home-line: rgba(255, 255, 255, 0.26);
  --auth-home-dark: #173c72;
}

* {
  box-sizing: border-box;
}

body.venix-auth {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--auth-ink);
  background:
    linear-gradient(45deg, rgba(42, 27, 161, 0.7), rgba(29, 210, 177, 0.7) 100%),
    url("/theme/venix/images/home.jpeg") center center / cover no-repeat fixed;
  background-color: var(--auth-home-dark);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.auth-site-nav,
.auth-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-site-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.home-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.auth-site-nav nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.auth-site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.home-nav-button {
  color: #253047 !important;
  background: #fff;
}

.auth-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  place-content: center;
  padding: 22px 0 42px;
}

.auth-story {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 56px;
  overflow: hidden;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 8px;
  pointer-events: none;
}

.auth-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-ink);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  width: fit-content;
}

.auth-brand img {
  width: 36px;
  height: 36px;
}

.auth-story-main {
  position: relative;
  max-width: 680px;
}

.auth-kicker {
  margin: 0 0 16px;
  color: var(--auth-accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.auth-story h1 {
  margin: 0;
  max-width: 620px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-story-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.7;
}

.auth-illustration {
  width: min(460px, 76%);
  margin-top: 34px;
  filter: drop-shadow(0 22px 36px rgba(17, 24, 39, 0.12));
}

.auth-highlights {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.auth-highlight {
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
}

.auth-highlight strong {
  display: block;
  font-size: 14px;
}

.auth-highlight span {
  display: block;
  margin-top: 5px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-panel-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  padding: 34px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: var(--auth-panel);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

.auth-panel-wide {
  max-width: 560px;
}

.auth-paid-registration-panel {
  max-width: 600px;
  transition: max-width 0.2s ease;
}

.auth-paid-registration-panel.is-payment-step {
  max-width: 760px;
}

.auth-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-title + .auth-form {
  margin-top: 24px;
}

.auth-subtitle {
  margin: 10px 0 26px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-step-panel {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.auth-step-panel[hidden] {
  display: none;
}

.auth-registration-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-registration-progress::before {
  position: absolute;
  top: 17px;
  right: calc(25% + 18px);
  left: calc(25% + 18px);
  height: 2px;
  background: var(--auth-line);
  content: "";
}

.auth-registration-progress:has(li:nth-child(2).is-active)::before {
  background: var(--auth-accent-dark);
}

.auth-registration-progress li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  min-width: 0;
  gap: 7px;
  color: var(--auth-muted);
  outline: none;
}

.auth-registration-progress li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--auth-line);
  border-radius: 50%;
  background: #fff;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-registration-progress li > strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.auth-registration-progress li.is-active,
.auth-registration-progress li.is-complete {
  color: #0f6848;
}

.auth-registration-progress li.is-active > span {
  border-color: var(--auth-accent-dark);
  background: #effbf5;
  color: #0f6848;
}

.auth-registration-progress li.is-complete > span {
  border-color: var(--auth-accent-dark);
  background: var(--auth-accent-dark);
  color: #fff;
}

.auth-registration-progress li:focus-visible > span {
  box-shadow: 0 0 0 4px rgba(93, 216, 158, 0.18);
}

.auth-registration-next {
  gap: 8px;
}

.auth-payment-step {
  gap: 18px;
}

.auth-step-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.auth-step-actions .auth-button {
  gap: 7px;
}

.auth-registration-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 13px 2px;
  border-top: 1px solid var(--auth-line);
  border-bottom: 1px solid var(--auth-line);
}

.auth-registration-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.auth-registration-summary span {
  color: var(--auth-muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-registration-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--auth-ink);
  font-size: 14px;
  line-height: 1.4;
}

.auth-registration-summary-amount {
  text-align: right;
}

.auth-registration-summary-amount strong {
  color: #0f6848;
  font-size: 20px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.auth-input,
.auth-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  color: var(--auth-ink);
  font-size: 14px;
  outline: none;
  padding: 10px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus,
.auth-field input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(93, 216, 158, 0.18);
}

.auth-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-row > input {
  min-width: 0;
  flex: 1 1 auto;
}

.auth-row .auth-field,
.auth-row .auth-input {
  flex: 1;
}

.auth-row-inline .auth-button,
.auth-row-inline .auth-captcha {
  flex: 0 0 auto;
}

.auth-row-inline .auth-button {
  min-width: 112px;
}

.auth-captcha {
  width: 104px;
  height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.auth-link {
  color: var(--auth-accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: #13875c;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--auth-accent);
  color: #062016;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 18px;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-button:hover {
  background: #4ec991;
  box-shadow: 0 12px 22px rgba(93, 216, 158, 0.28);
  transform: translateY(-1px);
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.auth-button-secondary {
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
}

.auth-button-secondary:hover {
  background: #f9fafb;
  box-shadow: none;
}

.auth-button-block {
  width: 100%;
}

.auth-message {
  display: none;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message.is-visible {
  display: block;
}

.auth-message.success {
  background: rgba(93, 216, 158, 0.16);
  color: #0f6848;
}

.auth-message.error {
  background: rgba(251, 44, 54, 0.1);
  color: #b4232a;
}

.auth-message.warning {
  background: rgba(239, 177, 0, 0.14);
  color: #805d00;
}

.auth-invite-recognized {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(34, 183, 124, 0.24);
  border-radius: 8px;
  background: rgba(93, 216, 158, 0.12);
  color: #0f6848;
  font-size: 13px;
  line-height: 1.5;
}

.auth-invite-recognized i {
  flex: 0 0 auto;
  font-size: 20px;
}

.auth-choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-choice-group legend {
  width: 100%;
  margin: 0 0 9px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.auth-package-list,
.auth-payment-methods {
  display: grid;
  gap: 9px;
}

.auth-package-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.auth-package-option:has(input:checked) {
  border-color: var(--auth-accent-dark);
  background: rgba(93, 216, 158, 0.06);
  box-shadow: 0 0 0 3px rgba(93, 216, 158, 0.14);
}

.auth-package-option input,
.auth-payment-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--auth-accent-dark);
}

.auth-package-option > input {
  margin-top: 4px;
}

.auth-package-card {
  display: grid;
  min-width: 0;
  gap: 13px;
}

.auth-package-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.auth-package-identity {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.auth-package-identity > strong {
  overflow-wrap: anywhere;
  color: var(--auth-ink);
  font-size: 16px;
  line-height: 1.35;
}

.auth-package-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(93, 216, 158, 0.14);
  color: #0f6848;
  font-size: 12px;
  font-weight: 800;
}

.auth-package-price {
  flex: 0 0 auto;
  text-align: right;
}

.auth-package-price strong,
.auth-package-price small {
  display: block;
  white-space: nowrap;
}

.auth-package-price strong {
  color: #0f6848;
  font-size: 20px;
  line-height: 1.2;
}

.auth-package-price small {
  margin-top: 5px;
  color: var(--auth-muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-package-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding: 5px 0;
  border-top: 1px solid var(--auth-line);
  border-bottom: 1px solid var(--auth-line);
}

.auth-package-features > span {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px 10px 7px 0;
}

.auth-package-features > span + span {
  padding-left: 12px;
  border-left: 1px solid var(--auth-line);
}

.auth-package-features > span:last-child {
  padding-right: 0;
}

.auth-package-features small,
.auth-package-features strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-package-features small {
  color: var(--auth-muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-package-features strong {
  color: var(--auth-ink);
  font-size: 13px;
  line-height: 1.35;
}

.auth-paid-registration-panel .auth-package-features {
  display: none;
}

.auth-paid-registration-panel .auth-package-option:has(input:checked) .auth-package-features {
  display: grid;
}

.auth-payment-methods {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.auth-payment-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.auth-payment-option input {
  position: absolute;
  inset: 13px auto auto 13px;
  z-index: 1;
}

.auth-payment-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 42px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.auth-payment-option input:checked + span {
  border-color: var(--auth-accent-dark);
  background: rgba(93, 216, 158, 0.1);
  color: #0f6848;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.5);
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal-panel {
  width: min(680px, 100%);
  max-height: min(760px, 86vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 26px 80px rgba(17, 24, 39, 0.26);
}

.auth-modal-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.auth-modal-panel ol {
  margin: 0;
  padding-left: 20px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.auth-payment-modal-panel {
  position: relative;
  width: min(420px, 100%);
  text-align: center;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font-size: 20px;
}

.auth-payment-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 8px;
  background: rgba(93, 216, 158, 0.16);
  color: #13875c;
  font-size: 27px;
}

.auth-payment-status {
  margin: 0 auto 18px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-payment-qrcode {
  display: grid;
  width: min(244px, 100%);
  min-height: 0;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.auth-payment-qrcode[hidden],
.auth-usdt-payment[hidden],
.auth-payment-open[hidden] {
  display: none;
}

.auth-payment-qrcode img,
.auth-payment-qrcode canvas {
  display: block;
  max-width: 100%;
}

.auth-payment-open {
  gap: 7px;
  width: 100%;
}

.auth-usdt-payment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  text-align: left;
}

.auth-usdt-payment > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.auth-usdt-payment span,
.auth-usdt-payment p {
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-usdt-payment strong {
  color: var(--auth-ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.auth-usdt-address-row,
.auth-usdt-payment > p {
  grid-column: 1 / -1;
}

.auth-usdt-address-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.auth-usdt-address-copy code {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--auth-ink);
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.auth-usdt-address-copy button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  background: #fff;
  color: #0f6848;
  cursor: pointer;
  font-size: 18px;
}

.auth-usdt-payment > p {
  margin: 0;
  line-height: 1.55;
}

.auth-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (min-width: 720px) {
  .auth-paid-registration-panel .auth-package-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .auth-paid-registration-panel .auth-package-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-paid-registration-panel .auth-package-features > span:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--auth-line);
    border-left: 0;
  }
}

@media (max-width: 980px) {
  body.venix-auth {
    background:
      linear-gradient(45deg, rgba(42, 27, 161, 0.74), rgba(29, 210, 177, 0.72) 100%),
      url("/theme/venix/images/home.jpeg") center center / cover no-repeat fixed;
  }

  .auth-site-nav {
    align-items: center;
    flex-direction: row;
    padding: 18px 0;
  }

  .auth-site-nav nav {
    justify-content: flex-end;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel-wrap {
    padding: 0;
  }
}

@media (max-width: 560px) {
  .auth-site-nav,
  .auth-shell {
    width: min(100% - 28px, 1180px);
  }

  .auth-site-nav nav {
    width: auto;
    gap: 6px;
  }

  .auth-site-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 13px;
  }

  .home-brand {
    gap: 8px;
    font-size: 16px;
  }

  .home-brand img {
    width: 30px;
    height: 30px;
  }

  .auth-shell {
    padding: 14px 0 30px;
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-actions,
  .auth-row:not(.auth-row-inline),
  .auth-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-row-inline {
    align-items: center;
    flex-direction: row;
  }

  .auth-captcha {
    width: 100%;
  }

  .auth-row-inline .auth-captcha {
    width: 104px;
  }

  .auth-payment-methods {
    grid-template-columns: 1fr;
  }

  .auth-package-head {
    gap: 9px;
  }

  .auth-package-price strong {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .auth-step-actions,
  .auth-registration-summary {
    grid-template-columns: 1fr;
  }

  .auth-registration-summary-amount {
    text-align: left;
  }

  .auth-package-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-package-features > span:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--auth-line);
    border-left: 0;
  }
}
