:root {
  --auth-bg-a: #f4f7fb;
  --auth-bg-b: #e8eef6;
  --auth-panel: rgba(255, 255, 255, 0.94);
  --auth-panel-strong: #ffffff;
  --auth-brand-start: #0f3d66;
  --auth-brand-end: #0f766e;
  --auth-brand-glow: rgba(96, 165, 250, 0.22);
  --auth-card-border: rgba(15, 23, 42, 0.08);
  --auth-card-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --auth-text: #162235;
  --auth-muted: #607086;
  --auth-accent: #0f766e;
  --auth-accent-strong: #0c5f5b;
  --auth-accent-soft: rgba(15, 118, 110, 0.14);
  --auth-link: #0f5fd7;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, 0.14), transparent 42%),
    radial-gradient(120% 120% at 100% 0%, rgba(15, 118, 110, 0.14), transparent 38%),
    linear-gradient(180deg, var(--auth-bg-a), var(--auth-bg-b));
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px 0;
}

.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.44), transparent 26%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.38), transparent 18%);
}

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

.auth-stage {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(480px, 1fr);
  gap: 24px;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 30px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(160px 160px at 88% 18%, rgba(255, 255, 255, 0.18), transparent 65%),
    radial-gradient(220px 220px at 20% 100%, rgba(255, 255, 255, 0.14), transparent 70%),
    linear-gradient(155deg, var(--auth-brand-start), var(--auth-brand-end));
  box-shadow: 0 26px 70px rgba(15, 61, 102, 0.24);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-brand-panel::before {
  top: -72px;
  right: -52px;
  width: 220px;
  height: 220px;
  background: var(--auth-brand-glow);
  filter: blur(8px);
}

.auth-brand-panel::after {
  bottom: -80px;
  left: -30px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-brand-panel__top,
.auth-brand-panel__bottom {
  position: relative;
  z-index: 1;
}

.auth-brand-lockup,
.auth-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.auth-brand-lockup {
  color: #fff;
  margin-bottom: 26px;
}

.auth-brand-lockup__logo,
.auth-card-brand__logo {
  display: block;
  object-fit: contain;
  border-radius: 18px;
}

.auth-brand-lockup__logo {
  width: 64px;
  height: 64px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.auth-brand-lockup__copy,
.auth-card-brand__copy {
  display: grid;
  gap: 4px;
}

.auth-brand-lockup__name,
.auth-card-brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.auth-brand-lockup__label {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.auth-brand-copy__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}

.auth-brand-copy__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.auth-brand-copy__text {
  margin: 14px 0 0;
  max-width: 29rem;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.auth-preview-card {
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.auth-preview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-preview-card__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.auth-preview-card__status {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
}

.auth-preview-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-preview-card__metric {
  padding: 12px;
  border-radius: 16px;
  background: rgba(5, 20, 33, 0.16);
}

.auth-preview-card__metric strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.2;
}

.auth-preview-card__metric small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.auth-preview-card__metric-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.auth-preview-card__bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 52px;
  margin-top: 16px;
}

.auth-preview-card__bars span {
  display: block;
  height: var(--auth-bar-size);
  min-height: 16px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.22));
}

.auth-brand-points {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.auth-brand-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.auth-brand-point i {
  font-size: 16px;
  margin-top: 1px;
}

.auth-brand-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
}

.auth-card-shell {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 580px;
  border: 1px solid var(--auth-card-border);
  border-radius: 26px;
  box-shadow: var(--auth-card-shadow);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--auth-panel));
  backdrop-filter: blur(12px);
}

.auth-card--wide {
  max-width: 760px;
}

.auth-card--register {
  max-width: 780px;
}

.auth-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(15, 118, 110, 0.08), transparent 52%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(255, 255, 255, 0));
}

.auth-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--auth-accent);
  font-weight: 800;
}

.auth-title {
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.auth-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--auth-muted);
  font-weight: 600;
  max-width: 34rem;
}

.auth-body {
  padding: 24px 28px 28px;
}

.auth-field-label {
  display: block;
  margin: 0 0 8px 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--auth-text);
}

.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(15, 23, 42, 0.38);
  pointer-events: none;
  font-size: 16px;
}

.auth-input {
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  background: #fff;
  color: var(--auth-text);
  font-weight: 600;
}

.auth-input::placeholder {
  color: rgba(15, 23, 42, 0.36);
  font-weight: 500;
}

.auth-input-group .auth-input {
  padding-right: 48px;
}

.auth-input.with-icon {
  padding-left: 46px;
}

.auth-input:focus,
.form-select.auth-input:focus {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.auth-stacked-input-group {
  gap: 10px;
}

.auth-stacked-input-group > .auth-input--compact {
  max-width: 146px;
  flex: 0 0 146px;
}

.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: rgba(15, 23, 42, 0.58);
  padding: 6px 10px;
  border-radius: 10px;
}

.auth-password-toggle:hover {
  background: rgba(15, 23, 42, 0.05);
}

.auth-submit {
  min-height: 50px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.auth-submit.btn-primary {
  background-color: var(--auth-accent);
  border-color: var(--auth-accent);
}

.auth-submit.btn-primary:hover,
.auth-submit.btn-primary:focus {
  background-color: var(--auth-accent-strong);
  border-color: var(--auth-accent-strong);
}

.auth-submit.btn-success {
  background-color: #1f8a70;
  border-color: #1f8a70;
}

.auth-submit.btn-success:hover,
.auth-submit.btn-success:focus {
  background-color: #18705c;
  border-color: #18705c;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
  margin-bottom: 14px;
}

.auth-inline-actions a,
.auth-register-link,
.auth-links a,
.auth-help-links a {
  color: var(--auth-link);
  font-weight: 700;
  text-decoration: none;
}

.auth-inline-actions a:hover,
.auth-register-link:hover,
.auth-links a:hover,
.auth-help-links a:hover {
  text-decoration: underline;
}

.auth-register {
  margin-top: 16px;
}

.auth-register-text {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.auth-secondary-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
}

.auth-secondary-links a {
  color: var(--auth-link);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-secondary-links a:hover {
  text-decoration: underline;
}

.auth-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-submit--secondary {
  box-shadow: none;
}

.auth-help-links {
  margin-top: 14px;
  text-align: center;
}

.auth-help-links summary {
  list-style: none;
  cursor: pointer;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-help-links summary::-webkit-details-marker {
  display: none;
}

.auth-help-links a {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}

.auth-alert {
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: 16px;
  border: none;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}

.auth-next-step,
.auth-billing,
.auth-webhook-wait {
  border-radius: 18px;
  padding: 15px 16px;
}

.auth-next-step {
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: rgba(248, 250, 252, 0.92);
}

.auth-next-step__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
}

.auth-next-step__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--auth-muted);
  font-weight: 600;
}

.auth-next-step__button {
  margin-top: 12px;
  border-radius: 14px;
  font-weight: 700;
}

.auth-next-step--compact {
  padding: 13px 14px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.auth-password-hint {
  margin: 12px 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--auth-muted);
  font-weight: 600;
}

.auth-collapsible {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
}

.auth-collapsible summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--auth-text);
}

.auth-collapsible summary::-webkit-details-marker {
  display: none;
}

.auth-collapsible__body {
  padding: 0 16px 16px;
}

.auth-journey-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-journey-strip--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-journey-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.auth-journey-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--auth-text);
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 22px;
}

.auth-journey-step.is-active {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.08);
  color: var(--auth-text);
}

.auth-journey-step.is-active span {
  background: var(--auth-accent);
  color: #fff;
}

.auth-journey-step.is-complete {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.06);
  color: var(--auth-text);
}

.auth-journey-step.is-complete span {
  background: rgba(15, 118, 110, 0.16);
  color: var(--auth-accent-strong);
}

.auth-consent .form-check-input {
  margin-top: 0.22rem;
}

.auth-consent .form-check-label {
  font-size: 13px;
  line-height: 1.55;
  color: var(--auth-text);
  font-weight: 600;
}

.auth-billing {
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.88));
}

.auth-billing__head {
  margin-bottom: 8px;
}

.auth-billing__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.auth-billing__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--auth-muted);
  font-weight: 600;
}

.auth-billing__methods {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.auth-billing__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.88);
}

.auth-billing__required {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 600;
}

.auth-webhook-wait {
  border: 1px solid rgba(31, 138, 112, 0.25);
  background: linear-gradient(180deg, rgba(31, 138, 112, 0.1), rgba(255, 255, 255, 0.96));
}

.auth-webhook-wait__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-webhook-wait__title {
  font-size: 15px;
  font-weight: 800;
}

.auth-webhook-wait__timer {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}

.auth-webhook-wait__text {
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--auth-muted);
}

.auth-webhook-wait__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.auth-help {
  margin-top: 12px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.auth-page--register .auth-shell {
  padding-top: 18px;
  padding-bottom: 18px;
}

.auth-page--register .auth-header {
  padding-top: 20px;
  padding-bottom: 14px;
}

.auth-page--register .auth-body {
  padding-top: 20px;
  padding-bottom: 22px;
}

.auth-page--register .auth-input {
  min-height: 46px;
}

@media (max-width: 1080px) {
  .auth-stage {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .auth-brand-panel {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .auth-form-grid,
  .auth-journey-strip,
  .auth-journey-strip--three,
  .auth-action-row {
    grid-template-columns: 1fr;
  }

  .auth-secondary-links {
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 767.98px) {
  .auth-shell {
    padding: 20px 0;
  }

  .auth-header,
  .auth-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-brand-panel {
    padding: 24px 22px;
    border-radius: 24px;
  }

  .auth-title {
    font-size: 27px;
  }

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

  .auth-stacked-input-group {
    flex-direction: column;
  }

  .auth-stacked-input-group > .auth-input--compact {
    max-width: none;
    flex-basis: auto;
  }
}
