:root {
  --bg: #f7f7f7;
  --text-main: #87909f;
  --text-lang: #8b8f98;
  --text-active: #666a73;
  --button: #ff6b53;
  --button-shadow: rgba(255, 107, 83, 0.22);
  --soft-button: #f6cfc5;
  --soft-button-text: #fffaf8;
  --border: #ec856f;
  --danger: #dd846d;
  --title: #2f3c4e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  font-family: "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
}

button,
input,
select {
  font: inherit;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 40px;
}

.screen-home {
  justify-content: flex-start;
}

.logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.logo {
  width: min(360px, 76vw);
  height: auto;
  display: block;
}

.content {
  flex: 1;
  width: 100%;
  display: ruby;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 34px;
  text-align: center;
}

.message {
  max-width: 440px;
  margin: 0;
  color: var(--text-main);
  font-size: clamp(18px, 3.4vw, 21px);
  line-height: 1.4;
  font-weight: 400;
}

.transport {
  width: min(260px, 58vw);
  height: auto;
  display: block;
}

.bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.languages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  color: var(--text-lang);
  font-size: clamp(21px, 4.5vw, 24px);
  line-height: 1.2;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: center;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--text-active);
}

.cta,
.cta-secondary {
  width: 100%;
  border: 0;
  border-radius: 999px;
  font-size: clamp(19px, 4.2vw, 23px);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.cta {
  background: var(--button);
  color: #fff;
  padding: 19px 24px 21px;
  box-shadow: 0 10px 24px var(--button-shadow);
}

.cta strong {
  font-weight: 700;
}

.screen-login,
.screen-otp {
  align-items: stretch;
  padding: 14px 10px 14px;
  color: var(--title);
}

.screen-password {
  align-items: stretch;
  padding: 42px 20px 16px;
  color: var(--title);
}

.screen-success {
  padding: 56px 24px 40px;
}

.screen-recover {
  align-items: stretch;
  padding: 18px 18px 20px;
  color: var(--title);
}

.screen-verify-alt {
  align-items: stretch;
  padding: 14px 10px 24px;
  color: var(--title);
}

.screen-verify-notice {
  align-items: stretch;
  padding: 14px 10px 18px;
  color: var(--title);
}

.login-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.back-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--title);
  font-size: 36px;
  line-height: 1;
  padding: 0 4px 0 0;
  cursor: pointer;
}

.topbar-title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.login-head,
.otp-head,
.password-head {
  text-align: center;
}

.login-head {
  margin-bottom: 28px;
}

.login-title,
.otp-title,
.password-title {
  margin: 0;
  color: var(--title);
  font-size: 22px;
  font-weight: 500;
}

.otp-title,
.password-title {
  margin-bottom: 14px;
  line-height: 1.35;
}

.otp-head {
  margin-top: 26px;
}

.password-head {
  margin-top: 8px;
}

.recover-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.verify-alt-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.verify-notice-topbar {
  margin-bottom: 24px;
}

.verify-alt-topbar-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  color: var(--title);
}

.verify-notice-topbar-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--title);
}

.close-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--title);
  font-size: 36px;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.recover-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.recover-head {
  text-align: center;
  margin-bottom: 32px;
}

.recover-headline {
  margin: 0 0 8px;
  color: var(--title);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.recover-subheadline {
  margin: 0;
  color: #798492;
  font-size: 14px;
  line-height: 1.45;
}

.recover-form {
  flex: 1;
}

.recover-label {
  display: block;
  margin: 0 0 8px;
  color: #4d5866;
  font-size: 14px;
  font-weight: 600;
}

.recover-label-confirm {
  margin-top: 20px;
}

.recover-field {
  position: relative;
  margin-bottom: 12px;
}

.recover-input {
  width: 100%;
  height: 52px;
  border: 2px solid #e0e4e9;
  border-radius: 14px;
  background: #fff;
  color: var(--title);
  font-size: 16px;
  padding: 0 45px 0 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.recover-input:focus {
  border-color: var(--button);
  box-shadow: 0 0 0 3px rgba(255, 107, 83, 0.08);
}

.recover-input::placeholder {
  color: #b4bcc7;
  opacity: 1;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 13px;
  border: 1.8px solid #8b93a1;
  border-radius: 14px / 10px;
}

.toggle-password-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #8b93a1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.toggle-password.is-visible .toggle-password-icon::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 9px;
  width: 1.8px;
  height: 18px;
  background: #8b93a1;
  transform: rotate(45deg);
  transform-origin: center;
}

.recover-rules {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #b0b6c0;
  font-size: 13px;
  line-height: 1.7;
}

.recover-rules li {
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
  transition: color 0.2s ease;
}

.recover-rules li::before {
  content: "○";
  position: absolute;
  left: 0;
  color: #c0c6cf;
}

.recover-rules li.valid {
  color: #4caf50;
}

.recover-rules li.valid::before {
  content: "●";
  color: #4caf50;
}

.recover-note {
  margin: 20px 0 0;
  color: #c0c6cf;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  transition: color 0.2s ease;
}

.recover-note.error {
  color: var(--danger);
}

.recover-footer {
  margin-top: auto;
  padding-top: 30px;
}

.verify-alt-head {
  text-align: center;
  margin-top: 18px;
}

.verify-notice-head {
  text-align: center;
  margin-top: 18px;
}

.verify-alt-title {
  margin: 0 auto 14px;
  max-width: 470px;
  color: #5f6b7c;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

.verify-alt-subtitle {
  margin: 0;
  color: #89929f;
  font-size: 16px;
  line-height: 1.4;
}

.verify-notice-title {
  margin: 0 auto 16px;
  max-width: 470px;
  color: #5f6b7c;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

.verify-notice-subtitle {
  margin: 0;
  color: #89929f;
  font-size: 16px;
  line-height: 1.4;
}

.verify-alt-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.verify-notice-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.verify-alt-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #f3f4f6;
}

.verify-notice-digit {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: var(--title);
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(216, 221, 228, 0.3);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.verify-notice-digit:focus {
  background: #eceef2;
  box-shadow: inset 0 0 0 2px rgba(255, 107, 83, 0.18);
}

.verify-alt-note-wrap {
  margin-top: 48px;
  text-align: center;
}

.verify-notice-note-wrap {
  margin-top: 46px;
  text-align: center;
}

.verify-alt-note {
  margin: 0 auto;
  max-width: 500px;
  color: #9aa2ad;
  font-size: 17px;
  line-height: 1.5;
}

.verify-notice-note {
  margin: 0 auto;
  max-width: 500px;
  color: #9aa2ad;
  font-size: 17px;
  line-height: 1.5;
}

.verify-alt-hidden {
  color: #d93045;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.verify-notice-hidden {
  color: #d93045;
  font-weight: 700;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.verify-alt-timer {
  margin: 126px 0 0;
  text-align: center;
  color: #bcc3cb;
  font-size: 16px;
  line-height: 1.4;
}

.verify-notice-timer {
  margin: 124px 0 0;
  text-align: center;
  color: #bcc3cb;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.verify-notice-timer.is-active {
  color: var(--button);
  cursor: pointer;
}

.verify-notice-footer {
  margin-top: auto;
  padding-top: 28px;
}

.verify-notice-footer .cta-secondary {
  width: 100%;
}

.verify-notice-error {
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.verify-notice-footer .cta-secondary:disabled {
  background: var(--soft-button);
  color: var(--soft-button-text);
  box-shadow: none;
}

.recover-button {
  width: 100%;
  border: none;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  padding: 16px 24px;
  background: var(--soft-button);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.recover-button.active {
  background: var(--button);
  box-shadow: 0 8px 20px var(--button-shadow);
}

.recover-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.success-flow {
  flex: 1;
  width: 100%;
  display: flex;
}

.success-panel {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.success-panel-hidden {
  display: none;
}

.success-title {
  margin: 0;
  color: var(--title);
  font-size: clamp(28px, 5vw, 34px);
  font-weight: 600;
}

.success-text {
  max-width: 430px;
  margin: 0;
  color: #7f8794;
  font-size: clamp(18px, 3.6vw, 22px);
  line-height: 1.55;
  font-weight: 400;
}

.survey-head {
  margin: auto 0 24px;
  text-align: center;
}

.survey-progress {
  margin: 0 0 14px;
  color: #b2bac5;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.survey-title {
  max-width: 430px;
  margin: 0 auto;
  color: var(--title);
  font-size: clamp(24px, 4.8vw, 30px);
  line-height: 1.4;
  font-weight: 600;
}

.survey-options {
  display: grid;
  gap: 14px;
  margin: 0 0 auto;
}

.survey-option {
  width: 100%;
  border: 2px solid rgba(236, 133, 111, 0.22);
  border-radius: 24px;
  background: #fff;
  color: #5f6b7c;
  padding: 18px 20px;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(47, 60, 78, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.survey-option.is-selected {
  border-color: var(--button);
  background: #fff4f1;
  color: var(--title);
  box-shadow: 0 12px 24px rgba(255, 107, 83, 0.12);
}

.survey-option:active {
  transform: scale(0.99);
}

.otp-subtitle,
.password-subtitle {
  margin: 0;
  color: #798492;
  font-size: 16px;
  line-height: 1.4;
}

.field-group,
.password-body {
  margin-bottom: 12px;
}

.field-label,
.password-label {
  display: block;
  margin-bottom: 8px;
  color: #4d5866;
  font-size: 15px;
}

.phone-input,
.password-input {
  width: 100%;
  height: 58px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: transparent;
  color: var(--title);
  font-size: 20px;
  outline: none;
}

.phone-input {
  padding: 0 18px;
}

.password-field {
  position: relative;
}

.password-input {
  border: 0;
  background: #f4f5f7;
  padding: 0 58px 0 20px;
  font-size: 16px;
}

.phone-input::placeholder,
.password-input::placeholder {
  color: #b4bcc7;
  opacity: 1;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.eye-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  margin: 0 auto;
  border: 2px solid #7f8896;
  border-radius: 14px / 10px;
}

.eye-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #7f8896;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.password-toggle.is-visible .eye-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 9px;
  width: 2px;
  height: 18px;
  background: #7f8896;
  transform: rotate(45deg);
  transform-origin: center;
}

.error-text,
.password-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 15px;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  color: #8b93a1;
  font-size: 15px;
  line-height: 1.35;
}

.hint-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #e29a85;
  border-radius: 50%;
  color: #e29a85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.login-spacer {
  flex: 1;
}

.cta-secondary {
  background: var(--soft-button);
  color: var(--soft-button-text);
  padding: 18px 24px 20px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cta-secondary:disabled {
  opacity: 1;
  cursor: default;
}

.cta-secondary.active {
  background: var(--button);
  box-shadow: 0 10px 24px var(--button-shadow);
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.otp-digit {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 14px;
  background: #f1f2f4;
  color: var(--title);
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  outline: none;
}

.otp-digit:focus {
  background: #eceef2;
}

.otp-note {
  margin: 50px 0 0;
  color: #c0c6cf;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

.otp-countdown {
  margin: 110px 0 0;
  color: #b7bfca;
  font-size: 16px;
  text-align: center;
}

.otp-footer,
.password-footer {
  margin-top: auto;
  padding-top: 28px;
}

.success-footer {
  width: 100%;
}

@media (min-width: 768px) {
  body {
    display: grid;
    place-items: center;
    padding: 20px;
  }

  .screen {
    width: 100%;
    max-width: 539px;
    min-height: 947px;
  }
}

/* Добавьте в конец файла styles.css */

/* ===== ЗАГРУЗЧИК (Лоадер) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader-modal {
  background: white;
  border-radius: 32px;
  padding: 32px 28px;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .loader-modal {
  transform: scale(1);
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 16px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #ff6b53;
  border-right: 4px solid #ff6b53;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-modal p {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: #2f3c4e;
}