:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #202124;
  --text-secondary: #5f6368;
  --muted: #80868b;
  --border: #dadce0;
  --border-strong: #bdc1c6;
  --input-bg: #ffffff;
  --red: #dc2626;
  --red-hover: #b91c1c;
  --red-soft: #fef2f2;
  --red-ring: rgba(220, 38, 38, 0.18);
  --ok: #137333;
  --ok-bg: #e6f4ea;
  --err-bg: #fce8e6;
  --err-text: #c5221f;
  --warn-bg: #fef7e0;
  --warn-text: #b06000;
  --info-bg: #e8f0fe;
  --info-text: #1967d2;
  --radius: 8px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 480px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.75rem 0 3.5rem;
}

.page-header {
  margin-bottom: 2.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.subtitle {
  margin: 0.65rem 0 1.75rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 36em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
}

.steps {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}

.steps__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
}

.steps__item:not(:last-child) {
  margin-right: 0.85rem;
  padding-right: 0.85rem;
}

.steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: var(--border);
  transform: translateY(-50%);
}

.steps__num {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.steps__item.is-active {
  color: var(--red);
}

.steps__item.is-active .steps__num {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.steps__item.is-done {
  color: var(--text-secondary);
}

.steps__item.is-done .steps__num {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.form-lead {
  margin: 0 0 1.15rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
}

.form-lead strong {
  color: var(--text);
  font-weight: 600;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.field__input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input::placeholder {
  color: #9aa0a6;
}

.field__input:hover {
  border-color: var(--border-strong);
}

.field__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-ring);
}

.field__input--otp {
  letter-spacing: 0.28em;
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
}

.field__hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.actions--split {
  justify-content: space-between;
  align-items: center;
}

.actions__right {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s,
    box-shadow 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--red);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--red-hover);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn--danger {
  background: var(--red);
  color: #fff;
}

.btn--danger:hover:not(:disabled) {
  background: var(--red-hover);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn--text {
  background: transparent;
  color: var(--red);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.btn--text:hover:not(:disabled) {
  background: var(--red-soft);
}

.alert {
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 4px;
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.alert--error {
  background: var(--err-bg);
  border-color: #f5c2c0;
  color: var(--err-text);
}

.alert--warn {
  background: var(--warn-bg);
  border-color: #fce8b2;
  color: var(--warn-text);
}

.alert--info {
  background: var(--info-bg);
  border-color: #d2e3fc;
  color: var(--info-text);
}

.success {
  text-align: center;
  padding: 1.25rem 0.25rem 0.5rem;
}

.success__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
}

.success__title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.success__text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
}

.info {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.info__title {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.info__list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

.info__list li + li {
  margin-top: 0.35rem;
}

.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.btn--secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: var(--border-strong);
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.dialog[hidden] {
  display: none;
}

.dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.45);
}

.dialog__panel {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(32, 33, 36, 0.18);
  padding: 1.35rem 1.35rem 1.2rem;
}

.dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.dialog__text {
  margin: 0 0 1.25rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .page {
    width: calc(100% - 1.5rem);
    padding: 1.75rem 0 2.5rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .panel {
    padding: 1.15rem;
  }

  .actions--split {
    flex-direction: column;
    align-items: stretch;
  }

  .actions__right {
    width: 100%;
    flex-direction: column;
  }

  .actions__right .btn,
  .actions--split > .btn {
    width: 100%;
  }

  .btn--text {
    text-align: center;
  }
}
