.auth-section {
  padding: 34px 0 72px;
}

.auth-section .auth-card,
.auth-shell .auth-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(96, 210, 255, 0.08), transparent 28%),
    radial-gradient(circle at left bottom, rgba(255, 79, 216, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.auth-section .auth-card > *,
.auth-shell .auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-section .auth-card {
  max-width: 720px;
  margin: 0 auto;
}

.auth-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px;
  border-radius: 30px;
}

.auth-shell--wide {
  max-width: 1120px;
}

.auth-hero,
.auth-header,
.auth-card__header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-hero h1,
.auth-header h1,
.auth-card__header h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.auth-card__header h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.auth-hero p,
.auth-header p,
.auth-card__header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.72;
  font-size: 15px;
}

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

.auth-card h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
}

.auth-card--full {
  grid-column: 1 / -1;
}

.auth-card--form {
  padding: 26px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form--login {
  gap: 16px;
}

.field,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-card .field + .field,
.auth-card .form-group + .form-group {
  margin-top: 16px;
}

.field label,
.form-group label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.field input,
.field select,
.form-group input,
.form-group select,
.form-group textarea,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(6, 10, 22, 0.96), rgba(11, 16, 31, 0.92));
  color: #fff;
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field textarea,
.form-group textarea {
  min-height: 130px;
  padding: 14px 16px;
  resize: vertical;
}

.field select,
.form-group select {
  padding-right: 44px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.65) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.65) 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% - 2px), calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field input::placeholder,
.field textarea::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(180, 120, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(139, 93, 255, 0.16),
    0 16px 28px rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.checkbox input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #b86dff;
}

.checkbox--stacked {
  flex: 1;
}

.auth-card--consent > .checkbox {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.016));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-consent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.auth-actions--login {
  justify-content: flex-start;
}

.auth-actions--subtle {
  margin-top: -2px;
}

.auth-actions--full {
  grid-column: 1 / -1;
  justify-content: center;
}

.auth-actions--register {
  margin-top: 2px;
}

.auth-shell .primary-btn,
.auth-shell .secondary-btn,
.auth-section .primary-btn,
.auth-section .secondary-btn,
.auth-section .btn,
.auth-inline-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.auth-shell .primary-btn,
.auth-section .primary-btn,
.auth-section .btn--primary {
  border: none;
  background: linear-gradient(90deg, #ff4fd8, #8b5dff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(171, 91, 255, 0.26);
  cursor: pointer;
}

.auth-shell .secondary-btn,
.auth-section .secondary-btn,
.auth-section .btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  color: #fff;
}

.auth-shell .primary-btn:hover,
.auth-section .primary-btn:hover,
.auth-section .btn--primary:hover,
.auth-shell .secondary-btn:hover,
.auth-section .secondary-btn:hover,
.auth-section .btn:hover {
  transform: translateY(-1px);
}

.secondary-btn--soft {
  background: rgba(255, 255, 255, 0.035) !important;
}

.auth-inline-link-btn {
  min-width: 220px;
}

.btn--full {
  width: 100%;
}

.auth-card__footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card__footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.auth-alert,
.auth-section .alert {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.auth-alert h2,
.auth-section .alert h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.auth-alert p,
.auth-section .alert p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.auth-alert p + p,
.auth-section .alert p + p {
  margin-top: 12px;
}

.auth-alert-success,
.auth-section .alert--success {
  border-color: rgba(92, 225, 155, 0.25);
  background: linear-gradient(180deg, rgba(92, 225, 155, 0.08), rgba(255, 255, 255, 0.02));
}

.auth-alert-error,
.auth-section .alert--error {
  border-color: rgba(255, 111, 145, 0.26);
  background: linear-gradient(180deg, rgba(255, 111, 145, 0.08), rgba(255, 255, 255, 0.02));
}

.auth-error-list,
.auth-section .alert__list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-error-list li + li,
.auth-section .alert__list li + li {
  margin-top: 8px;
}

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

  .auth-card--full,
  .auth-actions--full {
    grid-column: 1;
  }

  .auth-shell {
    padding: 28px 22px;
  }
}

@media (max-width: 780px) {
  .auth-consent-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .auth-inline-link-btn {
    width: 100%;
    min-width: 0;
  }

  .auth-actions,
  .auth-actions--login,
  .auth-actions--full {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-shell .primary-btn,
  .auth-shell .secondary-btn,
  .auth-section .primary-btn,
  .auth-section .secondary-btn,
  .auth-section .btn,
  .auth-inline-link-btn {
    width: 100%;
  }
}
