.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding-top: var(--hig-spacing-6);
  padding-bottom: var(--hig-spacing-6);
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.08), rgba(15, 23, 42, 0.05));
}

.auth-page .container-xxl {
  width: 100%;
}

.auth-grid {
  display: grid;
  gap: var(--hig-spacing-6);
  width: 100%;
  align-items: stretch;
  justify-items: stretch;
}

.auth-grid--solo {
  justify-items: center;
}

.auth-grid--solo .auth-card-wrapper {
  max-width: 480px;
}

.auth-card-wrapper {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--hig-spacing-4);
  border-radius: var(--hig-radius-large);
  background: linear-gradient(135deg, var(--hig-color-primary) 0%, #0a4bd9 100%);
  color: rgba(255, 255, 255, 0.94);
  padding: var(--hig-spacing-6);
  box-shadow: var(--hig-shadow-elevated);
  overflow: hidden;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, 0.32), transparent 55%),
    radial-gradient(circle at 80% 120%, rgba(0, 0, 0, 0.18), transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}

.auth-hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-4);
  z-index: 1;
}

.auth-hero__badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-hero__title {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
  margin-bottom: 0;
}

.auth-hero__text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  margin-bottom: 0;
}

.auth-hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-2);
}

.auth-hero__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--hig-spacing-2);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.auth-hero__points i {
  font-size: 18px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-hero__support {
  position: relative;
  margin-top: var(--hig-spacing-3);
  padding: var(--hig-spacing-3) var(--hig-spacing-4);
  border-radius: var(--hig-radius-medium);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.9);
}

.auth-hero__support-title {
  display: block;
  font-weight: 600;
  margin-bottom: var(--hig-spacing-1);
}

.auth-hero__support-description {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

body.dark-theme .auth-page {
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.16), rgba(15, 16, 18, 0.6));
}

body.dark-theme .auth-hero {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.82) 0%, rgba(15, 23, 42, 0.92) 100%);
  color: rgba(255, 255, 255, 0.94);
}

body.dark-theme .auth-hero__badge {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
}

body.dark-theme .auth-hero__support {
  background: rgba(15, 23, 42, 0.55);
  color: rgba(255, 255, 255, 0.88);
}

body.dark-theme .auth-hero__support-description,
body.dark-theme .auth-hero__points li,
body.dark-theme .auth-hero__points i {
  color: rgba(255, 255, 255, 0.88);
}

.auth-card {
  backdrop-filter: blur(12px);
  width: 100%;
  height: 100%;
}

.auth-card .card-body {
  padding: var(--hig-spacing-6);
}

.auth-card.auth-card--register {
  margin-top: 0;
  margin-bottom: 0;
}

.auth-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--hig-spacing-3);
  height: 32px;
}

.auth-card__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hig-color-text);
}

.auth-card__subtitle {
  color: var(--hig-color-text-secondary);
  font-size: 16px;
  margin-bottom: 0;
}

.auth-card__insights {
  border: 1px solid rgba(0, 113, 227, 0.25);
  background: rgba(0, 113, 227, 0.08);
  border-radius: var(--hig-radius-medium);
  padding: var(--hig-spacing-3) var(--hig-spacing-4);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-2);
}

.auth-card__insights-pill {
  align-self: flex-start;
  font-weight: 600;
  font-size: 13px;
  padding: 0 var(--hig-spacing-3);
  height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.16);
  color: var(--hig-color-primary);
}

.auth-card__insights-list {
  margin: 0;
  padding-left: var(--hig-spacing-4);
  color: var(--hig-color-text-secondary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-card__insights-list li {
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-4);
}

.auth-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-2);
}

.auth-form__field .form-control,
.auth-form__field .form-select {
  border-radius: var(--hig-radius-medium);
  border: 1px solid var(--hig-color-border);
  background: var(--hig-color-surface-alt);
  padding: var(--hig-spacing-3) var(--hig-spacing-4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form__field .form-control:focus,
.auth-form__field .form-select:focus {
  border-color: var(--hig-color-primary);
  box-shadow: 0 0 0 4px var(--hig-color-focus);
}


.auth-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--hig-spacing-2);
  padding: var(--hig-spacing-3);
  border-radius: var(--hig-radius-large);
  border: 1px solid var(--hig-color-border);
  background: var(--hig-color-surface-alt);
  margin-bottom: var(--hig-spacing-4);
}

.auth-stepper__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-1);
  padding: var(--hig-spacing-2) var(--hig-spacing-3);
  border-radius: var(--hig-radius-medium);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.auth-stepper__item::before {
  content: attr(data-step-index);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: var(--hig-color-surface);
  color: var(--hig-color-text-muted);
  border: 1px solid var(--hig-color-border);
}

.auth-stepper__label {
  font-weight: 600;
  color: var(--hig-color-text-muted);
}

.auth-stepper__item.is-active,
.auth-stepper__item.is-completed {
  border-color: rgba(0, 113, 227, 0.35);
  background: rgba(0, 113, 227, 0.08);
}

.auth-stepper__item.is-active::before,
.auth-stepper__item.is-completed::before {
  background: var(--hig-color-primary);
  color: #fff;
  border-color: var(--hig-color-primary);
}

.auth-stepper__item.is-active .auth-stepper__label,
.auth-stepper__item.is-completed .auth-stepper__label {
  color: var(--hig-color-text);
}

.auth-step {
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-3);
}

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

.auth-step__header {
  display: flex;
  flex-direction: column;
  gap: var(--hig-spacing-1);
}

.auth-step__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--hig-color-text);
}

.auth-step__subtitle {
  margin: 0;
  color: var(--hig-color-text-muted);
}

.auth-step__actions {
  display: flex;
  gap: var(--hig-spacing-2);
  margin-top: var(--hig-spacing-2);
}

.auth-step__actions .btn {
  height: 48px;
}

.auth-step-summary {
  border: 1px dashed rgba(0, 113, 227, 0.3);
  border-radius: var(--hig-radius-medium);
  background: rgba(0, 113, 227, 0.05);
  padding: var(--hig-spacing-3);
  display: grid;
  gap: var(--hig-spacing-2);
}

.auth-step-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-step-summary__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hig-color-text-muted);
}

.auth-step-summary__value {
  font-weight: 600;
  color: var(--hig-color-text);
}
.auth-input-group {
  border-radius: var(--hig-radius-medium);
  overflow: hidden;
  border: 1px solid var(--hig-color-border);
  background: var(--hig-color-surface-alt);
}

.auth-input-group:focus-within {
  border-color: var(--hig-color-primary);
  box-shadow: 0 0 0 4px var(--hig-color-focus);
}

.auth-input-group .form-control {
  border: none;
  padding: var(--hig-spacing-3) var(--hig-spacing-4);
}

.auth-input-group .form-control:focus {
  border: none;
  box-shadow: none;
}

.auth-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  border: none;
  background: transparent;
  color: var(--hig-color-text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}

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

.auth-password-toggle:focus {
  box-shadow: 0 0 0 4px var(--hig-color-focus);
}

.auth-form__remember,
.auth-form__terms {
  display: flex;
  align-items: center;
  gap: var(--hig-spacing-2);
  margin-bottom: 0;
  padding-left: 0;
}

.auth-form__remember .form-check-input,
.auth-form__terms .form-check-input {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--hig-color-border);
  margin-left: 0;
  float: none;
}

.auth-form__remember .form-check-input:focus,
.auth-form__terms .form-check-input:focus {
  box-shadow: 0 0 0 4px var(--hig-color-focus);
}

.auth-form__terms {
  align-items: flex-start;
}

.auth-form__terms .form-check-label {
  line-height: 1.5;
}

.auth-helper-text {
  margin-top: var(--hig-spacing-1);
  color: var(--hig-color-text-muted) !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--hig-spacing-3);
  color: var(--hig-color-text-muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  justify-content: center;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hig-color-divider);
}

.auth-card__cta .btn {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

@media (min-width: 992px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    align-items: center;
  }

  .auth-card-wrapper {
    margin: 0;
    justify-self: end;
  }

  .auth-grid--solo {
    grid-template-columns: minmax(360px, 480px);
    align-items: stretch;
  }

  .auth-grid--solo .auth-card-wrapper {
    justify-self: center;
  }
}

@media (max-width: 991.98px) {
  .auth-page {
    min-height: auto;
    padding-top: var(--hig-spacing-5);
    padding-bottom: var(--hig-spacing-5);
  }

  .auth-grid {
    gap: var(--hig-spacing-5);
  }

  .auth-card-wrapper {
    max-width: 480px;
  }
}

@media (max-width: 767.98px) {
  .auth-card__title {
    font-size: 26px;
  }
}

@media (max-width: 575.98px) {
  .auth-card .card-body {
    padding: var(--hig-spacing-4);
  }
}
