* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--theme-font);
  color: var(--theme-text);
  background:
    radial-gradient(circle at 16% 18%, rgba(79, 70, 229, 0.16), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(20, 184, 166, 0.14), transparent 26%),
    linear-gradient(135deg, #fbf8f2 0%, #f4efe6 48%, #eef7f5 100%);
}

.auth-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(400px, 0.72fr);
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--theme-text);
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--theme-accent-gradient);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
  font-weight: 500;
}

.brand-copy strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.brand-copy span {
  color: var(--theme-muted);
  font-size: 14px;
  font-weight: 600;
}

.hero-card,
.form-card {
  border: 1px solid var(--theme-line);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--theme-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 30px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -16% -18% 28%;
  height: 260px;
  background:
    radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.24), transparent 32%),
    radial-gradient(circle at 72% 20%, rgba(168, 85, 247, 0.20), transparent 34%),
    radial-gradient(circle at 54% 72%, rgba(20, 184, 166, 0.18), transparent 36%);
  filter: blur(8px);
  opacity: 0.72;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--theme-accent-soft);
  color: var(--theme-accent-text);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-family: var(--theme-display-font);
  font-size: clamp(27px, 2.7vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero-text {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--theme-text-soft);
  font-size: 16px;
  line-height: 1.55;
}

.flow-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 28px;
}

.flow-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--theme-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--theme-shadow-soft);
}

.flow-step {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: var(--theme-accent-gradient);
  font-weight: 500;
}

.flow-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.flow-card span {
  color: var(--theme-muted);
  line-height: 1.45;
}

.form-card {
  border-radius: 30px;
  padding: 26px;
  width: 100%;
  max-width: 460px;
  justify-self: end;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 22px;
  border: 1px solid var(--theme-line);
  border-radius: 18px;
  background: var(--theme-card-soft);
}

.tab {
  border: 0;
  border-radius: 13px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--theme-muted);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tab.active {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: var(--theme-accent-gradient);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.16);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.form-heading {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.form-note {
  margin: 0 0 22px;
  color: var(--theme-muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  color: var(--theme-text-soft);
  font-size: 14px;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--theme-control-border);
  border-radius: 15px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--theme-text);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--theme-control-border-strong);
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.09);
  background: #fff;
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  -webkit-text-fill-color: currentColor;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-action {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: var(--theme-accent-gradient);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.18);
}

.secondary-action {
  color: #3730a3 !important;
  -webkit-text-fill-color: #3730a3;
  background: #eef2ff;
  border-color: rgba(79, 70, 229, 0.14);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow-hover);
}

button[disabled] {
  cursor: wait;
  opacity: 0.68;
  transform: none !important;
}

.status {
  display: none;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.status.show {
  display: block;
}

.status.error {
  background: var(--theme-danger-bg);
  color: var(--theme-danger-text);
}

.status.success {
  background: var(--theme-success-bg);
  color: var(--theme-success-text);
}

.hint {
  margin-top: 18px;
  color: var(--theme-muted);
  font-size: var(--theme-font-size-small);
  line-height: 1.45;
  text-align: center;
}

.inline-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 14px;
}

.link-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--theme-accent-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.locale-select {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  min-width: 86px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--theme-control-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow-soft);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .hero-card {
    min-height: auto;
    padding: 28px;
  }

  .form-card {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: min(100% - 20px, 520px);
    gap: 18px;
  }

  .brand {
    margin-bottom: 22px;
  }

  .hero-card,
  .form-card {
    border-radius: 24px;
    padding: 22px;
  }

  h1 {
    font-size: 28px;
  }
}
