:root {
  color-scheme: light;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 12px 40px;
}

.layout {
  width: 100%;
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(248, 250, 252, 0.55) 45%,
    rgba(241, 245, 249, 0.42) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow:
    0 10px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  z-index: 500;
}

.site-header__inner {
  padding: 4px 12px 6px 6px;
  display: grid;
  grid-template-columns: minmax(0, 145px) minmax(0, 1fr) minmax(120px, auto);
  align-items: center;
  gap: 20px;
}

/* Кнопки авторизации всегда в правой колонке (как на главной с выбором города),
   даже если средний блок (город / страница) отсутствует */
@media (min-width: 481px) {
  .site-header__inner .auth-actions {
    grid-column: 3;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  justify-self: start;
  margin-left: 12px;
  margin-top: 10px;
  transform: none;
  flex-shrink: 0;
}

.brand__logo {
  display: block;
  width: 110px;
  height: auto;
  max-height: 42px;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 768px) {
  .site-header__inner {
    padding: 8px 16px 10px 10px;
    grid-template-columns: minmax(0, 285px) minmax(0, 1fr) minmax(120px, auto);
  }

  .brand {
    margin-top: 4px;
    margin-left: 10%;
    transform: none;
  }

  /* Логотип на ПК: размер −10% (178×81), сдвиг вправо 10% */
  .brand__logo {
    width: 178px;
    height: 81px;
    min-width: 178px;
    min-height: 81px;
    max-width: 178px;
    max-height: 81px;
    object-fit: contain;
  }
}

@media (min-width: 900px) {
  .brand__logo {
    width: 178px;
    height: 81px;
    min-width: 178px;
    min-height: 81px;
    max-width: 178px;
    max-height: 81px;
  }
}

.city {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  align-items: center;
}

.city__label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.city__select {
  max-width: 320px;
}

.city__select--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.city__trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 148px;
  max-width: 220px;
  padding: 8px 34px 8px 12px !important;
  border: 1px solid #dbe3f0 !important;
  border-radius: 12px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232563eb' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 12px center !important;
  color: #0f172a !important;
  font: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: border-color 0.15s ease;
}

.city__trigger:hover,
.city__trigger:active,
.city__trigger:focus,
.city__trigger:focus-visible {
  border-color: #93c5fd !important;
  background-color: #fff !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  outline: none;
}

.city__trigger:focus-visible {
  border-color: #2563eb !important;
}

.city__trigger-label {
  font-size: 10px;
  line-height: 1;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.city__trigger-value {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
}

.auth-loading {
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: 8px;
}

/* Кнопки «Войти» и «Зарегистрироваться» — столбиком, «Зарегистрироваться» под «Войти» */
.auth-actions:has(a.ghost-btn) {
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* Уменьшенный размер кнопок «Войти» и «Зарегистрироваться» в шапке */
.auth-actions:has(a.ghost-btn) .ghost-btn {
  padding: 6px 12px;
  font-size: 0.875rem;
  border-radius: 8px;
}

.ghost-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  box-shadow: none;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ghost-btn:hover,
.ghost-btn:active {
  background: #f9fafb;
  filter: none;
  transform: translateY(-1px);
  box-shadow: none;
}

.ghost-btn--primary {
  border-color: rgba(37, 99, 235, 0.55);
  color: #1d4ed8;
}

.ghost-btn--primary:hover {
  border-color: rgba(37, 99, 235, 0.75);
  background: rgba(37, 99, 235, 0.06);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.ghost-link:hover {
  background: #f9fafb;
}

@media (max-width: 480px) {
  body {
    padding-top: 10px;
  }

  .site-header__inner {
    padding: 8px 10px 8px 6px;
    gap: 10px;
  }

  .brand__logo {
    width: 100px;
    max-height: 40px;
  }

  .brand {
    margin-left: 8px;
    margin-top: 4px;
  }

  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
    gap: 16px;
    grid-template-areas:
      "brand auth"
      "city city";
  }

  .site-header__inner--no-city {
    grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
    grid-template-areas: "brand auth";
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .auth-actions {
    grid-area: auth;
    justify-self: end;
  }

  .city {
    grid-area: city;
    align-items: stretch;
  }

  .city__select {
    max-width: 100%;
  }

  .city__trigger {
    max-width: none;
    width: 100%;
  }
}

.app {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo {
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  background: #ffffff;
  padding: 12px;
}

.promo__viewport {
  overflow: hidden;
  border-radius: 16px;
}

.promo__track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 420ms ease;
}

.promo__slide {
  flex: 0 0 100%;
  display: block;
}

.promo__img {
  width: 100%;
  aspect-ratio: 10 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}



.promo__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.promo__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.promo__dot[aria-current="true"] {
  background: #2563eb;
  border-color: #2563eb;
}

.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 16px 18px;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.06);
}

@media (min-width: 600px) {
  .card {
    padding: 22px 22px 20px;
  }
}

.card--results {
  margin-top: 2px;
  position: relative;
  border: 1px solid rgba(22, 163, 74, 0.32);
  border-left: 4px solid #16a34a;
  /* Без градиента и без тени — иначе визуально «зелёное свечение» */
  background: #ffffff;
  box-shadow: none !important;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(20px, 5.2vw, 26px);
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  max-width: 520px;
}

.subtitle--my-applications {
  margin: 0 0 1px;
  font-size: 11px;
}

.tg-contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin: 0 0 20px;
  border-radius: 16px;
  border: 1px solid #bae6fd;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.tg-contact-card:hover {
  box-shadow: 0 8px 26px rgba(34, 158, 217, 0.18);
  transform: translateY(-1px);
}

.tg-contact-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tg-contact-card__icon {
  flex-shrink: 0;
  line-height: 0;
}

.tg-contact-card__icon svg {
  display: block;
  width: 48px;
  height: 48px;
}

.tg-contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tg-contact-card__title {
  font-weight: 600;
  font-size: 16px;
  color: #0c4a6e;
  letter-spacing: 0.01em;
}

.tg-contact-card__handle {
  color: #0284c7;
}

.tg-contact-card__text {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

.partners-grid {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.partners-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.partners-grid__item img {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  padding: 6px;
}

.partners-grid__item span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .partners-grid__item img {
    width: 64px;
    height: 64px;
  }
}

.phone-contact-card {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.phone-contact-card:hover {
  box-shadow: 0 8px 26px rgba(21, 128, 61, 0.16);
}

.phone-contact-card .tg-contact-card__title {
  color: #14532d;
}

.phone-contact-card__number {
  color: #15803d;
}

.email-contact-card {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.email-contact-card:hover {
  box-shadow: 0 8px 26px rgba(180, 83, 9, 0.16);
}

.email-contact-card .tg-contact-card__title {
  color: #78350f;
}

.email-contact-card__address {
  color: #b45309;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 10px;
}

.badge {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f9fafb;
}

.badge--accent {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 12px;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: #111827;
}

.label-left {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.inline-note {
  display: inline-block;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  color: #b45309;
  white-space: nowrap;
  min-width: clamp(160px, 26vw, 220px);
  min-height: 10px; /* чтобы предупреждения не сдвигали поля при появлении */
}

.inline-note--error {
  color: #b91c1c;
  white-space: nowrap; /* чтобы не менялась высота блока */
  font-size: 10px;
  line-height: 1.2;
}

.inline-note.is-empty {
  visibility: hidden;
  /* Пустой плейсхолдер не резервирует ~160px — иначе на узких экранах подпись «Первоначальный взнос» переносится */
  min-width: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

label span.hint {
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
}

input[type="number"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    transform 0.04s ease;
  appearance: textfield;
}

/* iOS Safari: при font-size >= 16px не делает auto-zoom на фокусе */
.card--calculator input[type="number"] {
  font-size: 16px;
}

input[type="number"]:focus,
select:focus {
  border-color: #2563eb;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.7);
  transform: translateY(-1px);
  background: #ffffff;
}

.card--calculator #category:invalid {
  color: #9ca3af;
}

.card--calculator #category option {
  color: #111827;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.range {
  width: 100%;
  margin-top: 6px;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  /* Заполненная часть (слева) и незаполненная (справа) */
  background: linear-gradient(
    to right,
    #2563eb 0%,
    #2563eb var(--range-fill, 0%),
    #e5e7eb var(--range-fill, 0%),
    #e5e7eb 100%
  );
  outline: none;
}

.range::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.range::-webkit-slider-thumb:hover,
.range::-moz-range-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.45);
}

.actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}

.actions .primary-btn,
.actions .reset-btn {
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  box-shadow:
    0 12px 30px rgba(37, 99, 235, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.12s ease;
}

button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px rgba(37, 99, 235, 0.4);
}

button:active {
  filter: brightness(0.98);
  transform: translateY(1px);
  box-shadow:
    0 8px 22px rgba(30, 64, 175, 0.45);
}

.reset-btn {
  padding-inline: 14px;
  background: none;
  color: #4b5563;
  box-shadow: none;
  border-radius: 999px;
  border: 1px dashed #d1d5db;
}

.reset-btn:hover {
  background: #f9fafb;
  filter: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.primary-btn {
  box-shadow: none;
}

.primary-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}

.primary-btn:disabled:hover,
.primary-btn:disabled:active {
  opacity: 0.52;
  filter: none;
  transform: none;
  box-shadow: none;
}

.primary-btn:hover,
.primary-btn:active {
  box-shadow: none;
}

.summary {
  margin-top: 10px;
  font-size: 12px;
  color: #4b5563;
  display: block;
  line-height: 1.5;
}

.downpayment-note,
.term-note {
  margin: 0;
}

.guarantors-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.guarantors-recommendation {
  color: #b45309;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 600;
  min-width: clamp(200px, 28vw, 360px);
  max-width: 360px;
  padding-right: 8px;
  white-space: normal;
}

.field-note {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

.guarantors-btns {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 3px;
  background: #f3f4f6;
  flex-shrink: 0;
}

.guarantors-btn {
  min-width: 36px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  box-shadow: none;
  filter: none;
  text-transform: none;
  letter-spacing: normal;
}

.guarantors-btn:focus,
.guarantors-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.guarantors-btn:hover {
  color: #374151;
  background: #e5e7eb;
  filter: none;
  transform: none;
  box-shadow: none;
}

.guarantors-btn:active {
  filter: none;
  transform: none;
  box-shadow: none;
}

.guarantors-btn.is-active {
  color: #2563eb;
  background: #e5e7eb;
  font-size: 14px;
  padding: 7px 12px;
  min-width: 38px;
}

.summary span.value {
  color: #111827;
  font-weight: 500;
}

.summary span.strong {
  color: #2563eb;
}

.error {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #b91c1c;
  opacity: 1;
}

.error span {
  color: #b91c1c;
  opacity: 1;
}

.results-title {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.results-section {
  margin-bottom: 18px;
}

.results-section:last-of-type {
  margin-bottom: 0;
}

.results-section h2 {
  margin: 0 0 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.results-section h2 span.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
}

.results-disclaimer {
  margin-left: auto;
  margin-right: 4px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.results-section h2 span.count {
  font-size: 11px;
  color: #9ca3af;
}

/* Счетчики количества банков справа не показываем (упрощаем заголовок) */
.results-section h2 span.count {
  display: none;
}

.bank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.bank-card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 22px 18px 12px;
  background: #f9fafb;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 8px 16px;
  align-items: center;
  min-width: 0;
}

@media (max-width: 540px) {
  .bank-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bank-card--unsuitable {
  opacity: 0.52;
  background: #f3f4f6;
}

.bank-card--unsuitable .apply-btn,
.bank-card--unsuitable .apply-btn:hover,
.bank-card--unsuitable .apply-btn:active {
  background: #9ca3af;
  cursor: not-allowed;
  filter: none;
  transform: none;
  pointer-events: none;
}

.bank-card__reason {
  display: block;
  margin-top: 2px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.bank-card--best {
  position: relative;
}

.bank-card--best::before {
  content: "лучшее предложение";
  position: absolute;
  top: 6px;
  left: 18px;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.bank-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.bank-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.bank-name {
  font-size: 14px;
  font-weight: 600;
}

.bank-kirgu-logo-wrap {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.bank-kirgu-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.bank-kirgu-logo-wrap--05ru {
  gap: 0;
}

.bank-kirgu-logo--05ru {
  height: 56px;
  margin-top: -5px;
}

.bank-kirgu-tag {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}

.bank-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: #6b7280;
}

.bank-meta__row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.bank-meta__row .chip {
  font-size: 9px;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  white-space: nowrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #ffffff;
}

.chip--accent {
  border-color: #2563eb;
  color: #1d4ed8;
}

.chip--guarantor {
  border-color: #166534;
  background: #dcfce7;
  color: #14532d;
}

.bank-values {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 11px;
}

.bank-values__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-height: 1.25em;
  line-height: 1.25;
}

.bank-values__row--total {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.bank-values__row--small {
  font-size: 11px;
  color: #4b5563;
}

.bank-values__row--markup .bank-values__num {
  font-size: 11px;
  color: #2563eb;
  margin-left: auto;
}

.bank-values__num {
  flex-shrink: 0;
  white-space: nowrap;
}

.bank-values .total {
  font-size: 11px;
  font-weight: 600;
  color: #111827;
}

.bank-values .overpay {
  font-size: 10px;
  color: #4b5563;
}

.bank-values .markup,
.bank-values .bank-markup {
  font-size: 10px;
  color: #2563eb;
}

.bank-values .bank-row--small {
  font-size: 10px;
  color: #4b5563;
}

.apply-btn {
  margin-top: 6px;
  padding: 9px 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: none;
}

.apply-btn:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  filter: brightness(1.03);
  box-shadow: none;
}

.apply-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.empty-state {
  font-size: 12px;
  color: #6b7280;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
}

.bad-bank-card {
  border-radius: 10px;
  border: 1px solid #fecaca;
  padding: 7px 9px;
  background: #fef2f2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  align-items: baseline;
}

.bad-bank-name {
  font-weight: 500;
}

.bad-bank-reason {
  font-size: 11px;
  color: #fca5a5;
  text-align: right;
}

.site-footer {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 16px 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
}

.site-footer__nav a {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.35);
  padding-bottom: 2px;
}

.site-footer__nav a:hover {
  border-bottom-color: rgba(37, 99, 235, 0.75);
}

.site-footer__meta {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

/* Auth header */
.auth-user {
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 8px;
}

.auth-user--link {
  color: inherit;
  text-decoration: none;
}

.auth-user--link:hover {
  text-decoration: underline;
}

.auth-notify-wrap {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.auth-notify-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.menu-notify-bell {
  margin-left: 6px;
  font-size: 12px;
  color: #f59e0b;
}

.notify-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.auth-menu-wrap {
  position: relative;
}

.auth-menu-btn {
  cursor: pointer;
}

.auth-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 600;
  overflow: hidden;
}

.auth-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  text-decoration: none;
  color: #111827;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  font-size: inherit;
  line-height: inherit;
  box-sizing: border-box;
  margin: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.auth-menu-item:hover {
  background: #f3f4f6;
}

.auth-menu-item:focus {
  outline: none;
}

.auth-menu-item:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.auth-menu-item--logout {
  text-transform: none;
  font-weight: 500;
}

.confirm-edit-hint {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.confirm-edit-hint a {
  color: #1d4ed8;
  text-decoration: underline;
}

.bank-row {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.profile-reminder {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-reminder--compact {
  padding: 0.32rem 0.65rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.profile-reminder--compact p {
  margin: 0.15rem 0;
  font-size: 0.85rem;
}

.profile-reminder--compact .profile-verse {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

.profile-verse {
  margin: 0.5rem 0 0;
  font-style: italic;
  color: #92400e;
}

.selfie-upload-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.selfie-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#selfieUploadBtn {
  width: 140px;
}

.selfie-upload-note {
  margin: 0;
  font-size: 0.75rem;
  color: #9a3412;
  font-weight: 600;
  text-align: center;
  max-width: 140px;
}

.selfie-status {
  width: 100%;
  text-align: center;
}

.selfie-preview {
  --selfie-box-width: 140px;
  --selfie-box-height: 86px;
  flex: 0 0 auto;
  width: var(--selfie-box-width);
  height: var(--selfie-box-height);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.selfie-preview::before {
  content: "";
  width: 44px;
  height: 44px;
  background-image: url("assets/dowloand.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.selfie-preview.has-image::before {
  display: none;
}

.selfie-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
}

.selfie-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.selfie-status { font-size: 0.9rem; }
.selfie-status--ok { color: #059669; }
.selfie-status--err { color: #dc2626; }

.field--selfie { margin-bottom: 1.25rem; }

.field--profile-docs {
  margin-bottom: 1.25rem;
}

.profile-docs-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 8px;
  max-width: 360px;
}

.profile-doc-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.profile-doc-item__label {
  font-size: 0.72rem;
  line-height: 1.25;
  color: #374151;
  font-weight: 600;
  text-align: center;
}

.profile-doc-item__frame {
  position: relative;
  width: 100%;
}

.profile-doc-item__preview {
  width: 100%;
  height: 96px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.profile-doc-item__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}

.profile-doc-item__remove[hidden] {
  display: none !important;
}

.profile-doc-item__remove-icon {
  display: block;
  width: 11px;
  height: 11px;
  pointer-events: none;
}

.profile-doc-item__remove:hover,
.profile-doc-item__remove:active,
.profile-doc-item__remove:focus,
.profile-doc-item__remove:focus-visible {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: none;
  filter: none;
}

.profile-doc-item__remove:hover {
  transform: scale(1.05);
}

.profile-doc-item__remove:active {
  transform: scale(0.96);
}

.profile-doc-item__remove:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.profile-doc-item__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.profile-docs-row .selfie-preview {
  --selfie-box-width: 100%;
  --selfie-box-height: 96px;
  width: 100%;
  height: 96px;
  flex: none;
}

.profile-docs-row .selfie-status,
.profile-doc-item__status {
  font-size: 0.72rem;
  text-align: center;
  width: 100%;
}

.profile-docs-row .selfie-preview:not(.has-image) {
  cursor: pointer;
}

.profile-doc-item[data-doc-key$="selfie"] .selfie-preview:not(.has-image)::before,
.profile-doc-item[data-doc-key$="passportMain"] .selfie-preview:not(.has-image)::before,
.profile-doc-item[data-doc-key$="passportReg"] .selfie-preview:not(.has-image)::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-doc-item[data-doc-key$="selfie"] .selfie-preview:not(.has-image)::before {
  background-image: url("assets/selfi.jpeg");
}

.profile-doc-item[data-doc-key$="passportMain"] .selfie-preview:not(.has-image)::before {
  background-image: url("assets/pasport.jpeg");
}

.profile-doc-item[data-doc-key$="passportReg"] .selfie-preview:not(.has-image)::before {
  background-image: url("assets/propiska.jpeg");
}

.profile-docs-row .selfie-preview:not(.has-image),
.profile-docs-row .profile-doc-item__preview:not(.has-image) {
  border: none;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 640px) {
  .profile-docs-row {
    max-width: 100%;
  }

  .profile-doc-item__preview,
  .profile-docs-row .selfie-preview {
    height: 88px;
    --selfie-box-height: 88px;
  }
}

.field-hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 6px 0;
}

.selfie-example {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.selfie-example-btn {
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.selfie-example-btn:hover,
.selfie-example-btn:active {
  box-shadow: none;
  filter: none;
  transform: none;
  background: transparent;
}

.selfie-example img,
.selfie-example-btn img {
  width: 140px;
  height: 86px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.selfie-example p {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

@media (max-width: 480px) {
  .selfie-preview {
    --selfie-box-width: 140px;
    --selfie-box-height: 86px;
  }
}

.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.img-lightbox[hidden] {
  display: none;
}

.img-lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.img-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.img-lightbox__close:hover,
.img-lightbox__close:active {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
}

.form-error a {
  color: #1d4ed8;
  text-decoration: underline;
}

.required { color: #dc2626; }

.app-calc-fields {
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.app-calc-fields p { margin: 4px 0; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] {
  display: none;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.modal__box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.modal__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
}
.modal__text {
  margin: 0 0 20px;
  color: #374151;
  line-height: 1.5;
}

.modal--soft .modal__backdrop {
  background: rgba(15, 23, 42, 0.32);
}

.modal--soft .modal__box {
  max-width: 420px;
  border: 1px solid #e8ecf1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.modal--soft .modal__title {
  color: #0f172a;
  font-weight: 600;
}

body.city-confirm-open {
  /* фон можно листать — браузерный скроллбар не скрываем, чтобы сайт не прыгал */
}

.city-confirm-modal.modal {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.city-confirm-modal__box {
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
  max-height: min(80vh, 720px);
  overflow: hidden;
}

.city-confirm-modal__box--wide,
.modal__box.city-confirm-modal__box--wide {
  max-width: min(720px, calc(100vw - 32px));
  width: 100%;
  text-align: left;
  padding: 16px 16px 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.city-confirm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin-bottom: 12px;
  padding-right: 0;
}

.city-confirm-modal__head .modal__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  text-align: left;
}

.city-confirm-modal__body-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.city-confirm-modal__scroll-wrap {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
}

.city-confirm-modal__body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #60a5fa #e8eef7;
}

.city-confirm-modal__body::-webkit-scrollbar {
  width: 8px;
}

.city-confirm-modal__body::-webkit-scrollbar-track {
  background: #e8eef7;
  border-radius: 999px;
}

.city-confirm-modal__body::-webkit-scrollbar-thumb {
  background: #60a5fa;
  border-radius: 999px;
}

.city-confirm-modal__rail {
  display: none;
  position: relative;
  flex: 0 0 3px;
  width: 3px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.city-confirm-modal__thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-height: 24px;
  border-radius: 999px;
  background: #3b82f6;
}

.city-confirm-modal__scroll-hint {
  display: none !important;
}

.city-confirm-modal__close,
.city-confirm-modal__close:hover,
.city-confirm-modal__close:active,
.city-confirm-modal__close:focus,
.city-confirm-modal__close:focus-visible {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 1.4rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.city-confirm-modal__close:hover,
.city-confirm-modal__close:focus-visible {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.city-confirm-modal__ask {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #1f2937;
  line-height: 1.5;
}

.city-confirm-modal__change {
  display: inline;
  margin-left: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  vertical-align: baseline;
  background: none !important;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  cursor: pointer;
  color: #2563eb;
  text-decoration: underline;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
.city-confirm-modal__change:hover,
.city-confirm-modal__change:active,
.city-confirm-modal__change:focus,
.city-confirm-modal__change:focus-visible {
  background: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  outline: none;
  color: #1d4ed8;
}

.city-confirm-modal__edit-label {
  display: none;
}

.city-confirm-modal__box--wide .modal__title {
  margin: 0;
  font-size: 1.15rem;
}

.city-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.city-picker-grid__region {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: 0.01em;
}

.city-picker-grid__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.city-picker-grid__city,
.city-picker-grid__city:hover,
.city-picker-grid__city:active,
.city-picker-grid__city:focus,
.city-picker-grid__city:focus-visible {
  width: 100%;
  margin: 0;
  padding: 10px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #0f172a !important;
  font: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.city-picker-grid__city:hover,
.city-picker-grid__city:focus-visible {
  border-color: #93c5fd !important;
  background: #f8fbff !important;
}

.city-picker-grid__city.is-selected,
.city-picker-grid__city.is-selected:hover,
.city-picker-grid__city.is-selected:focus,
.city-picker-grid__city.is-selected:focus-visible {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

@media (max-width: 720px) {
  .city-confirm-modal.modal {
    align-items: center;
    justify-content: center;
    padding: 12px;
  }

  .city-confirm-modal__box,
  .city-confirm-modal__box--wide,
  .modal__box.city-confirm-modal__box--wide {
    max-width: calc(100vw - 24px);
    max-height: min(78vh, 640px);
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    padding: 14px 12px 16px;
  }

  .city-confirm-modal__head {
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
  }

  /* На iOS системный скроллбар часто скрыт — свой ползунок справа всегда виден */
  .city-confirm-modal__rail {
    display: block;
  }

  .city-confirm-modal__body {
    scrollbar-width: none;
  }

  .city-confirm-modal__body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .city-confirm-modal__scroll-hint {
    display: none !important;
  }

  .city-picker-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .city-picker-grid__city,
  .city-picker-grid__city:hover,
  .city-picker-grid__city:active,
  .city-picker-grid__city:focus,
  .city-picker-grid__city:focus-visible {
    padding: 12px 14px !important;
    font-size: 1rem !important;
  }
}

.city-confirm-modal__select {
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  background: #fff;
}

.city-confirm-modal__actions {
  justify-content: center;
}

.city-confirm-modal__actions .primary-btn {
  min-width: 120px;
}

.modal__text .modal__lead {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.5;
}

.modal__text .modal__trust {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.modal__text a {
  color: #1d4ed8;
  text-decoration: underline;
}

.modal__text a:hover {
  color: #1e40af;
}

.modal--pending .modal__box {
  text-align: center;
  padding: 28px 24px 22px;
}

.modal--pending .modal__title {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.modal--pending .modal__text {
  margin-bottom: 18px;
}

.modal-pending__text {
  margin: 0;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal--pending .modal__actions {
  justify-content: center;
}

.modal--pending .modal__close {
  min-width: 120px;
}

.confirm-pending {
  text-align: center;
  padding: 20px 12px;
}

.confirm-pending__text {
  margin: 0;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.45;
}

.modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.modal__close {
  margin-left: auto;
}

/* Form pages (register, login, profile, confirm) */
.card--form-page {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.card--form-page h1 {
  margin-top: 0;
  margin-bottom: 2px;
}

.card--form-page .subtitle {
  margin-bottom: 4px;
}

/* Профиль: только меньше расстояние между заголовком, подзаголовком и напоминанием (размеры шрифтов — как в общих стилях) */
.card--form-page.profile-page h1 {
  margin-bottom: 0;
}

.card--form-page.profile-page .subtitle {
  margin-top: 0;
  margin-bottom: 0;
}

.card--form-page.profile-page .profile-reminder--compact {
  margin-top: -0.35rem;
  margin-bottom: 0.25rem;
  padding: 0.32rem 0.65rem;
}

.card--form-page.profile-page .profile-reminder--compact p {
  margin: 0.15rem 0;
}

.card--form-page.profile-page .profile-reminder--compact .profile-verse {
  margin: 0.15rem 0 0;
}

/* Меньше пустоты под кнопкой «Далее» и у нижнего края белой карточки */
.card--form-page.profile-page {
  padding-bottom: 10px;
}

/* Общий form { margin-bottom } иначе даёт полоску под сеткой анкеты */
.card--form-page.profile-page form {
  margin-bottom: 0;
}

.auth-form .field,
.card--form-page .field {
  margin-bottom: 8px;
}

/* Компактные формы входа / восстановления — одна колонка, аккуратные поля */
.auth-form--stack {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px;
  max-width: 420px;
  margin-bottom: 0;
}

.auth-form--stack .field {
  margin-bottom: 0;
}

.auth-form input:not([type="checkbox"]):not([type="hidden"]),
.auth-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  font-size: 16px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.auth-form input:not([type="checkbox"]):not([type="hidden"]):focus,
.auth-form select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.auth-form .field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 2px;
}

.auth-form__actions {
  margin-top: 4px;
}

.auth-form--stack .auth-form__actions,
.auth-form--stack .actions {
  grid-column: 1 / -1;
}

.auth-form--stack .auth-form__actions .primary-btn,
.auth-form--stack .actions .primary-btn {
  width: 100%;
  min-height: 46px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.auth-form--stack .form-error {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* Вход: на ПК телефон и пароль в одну строку */
.auth-form--login {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.card--auth-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card--auth-centered h1 {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.card--auth-centered .subtitle {
  width: 100%;
  max-width: 560px;
  text-align: center;
  margin-top: 0;
  margin-bottom: 16px;
  color: #6b7280;
  line-height: 1.45;
}

.card--auth-centered .auth-form--stack:not(.auth-form--modal) {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.card--auth-centered .auth-form-links {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.card--auth-centered--register h1,
.card--auth-centered--register .auth-form--register,
.card--auth-centered--register .auth-form-links {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.card--auth-centered--register h1 {
  text-align: center;
}

.card--auth-centered--register .auth-form--register .auth-form__actions {
  display: flex;
  justify-content: center;
}

@media (min-width: 640px) {
  .auth-form--login {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 18px;
  }
}

.auth-form-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-form-links a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}

.auth-form-links a:hover {
  text-decoration: underline;
}

.auth-form-links__sep {
  color: #d1d5db;
  user-select: none;
}

.auth-form--modal {
  max-width: none;
  gap: 12px;
}

/* Форма регистрации: 2 колонки на планшете+, аккуратные поля */
.card--form-page .auth-form--register {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px;
  max-width: 640px;
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .card--form-page .auth-form--register {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 18px;
  }
}

.auth-form--register .field {
  margin-bottom: 0;
}

.auth-form--register .register-legal-agree,
.auth-form--register .form-error,
.auth-form--register .auth-form__actions {
  grid-column: 1 / -1;
}

.auth-form--register .auth-form__actions .primary-btn {
  width: 100%;
  max-width: 360px;
  min-height: 46px;
}

.auth-form--register .field-hint {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.register-code-modal__box,
.reset-modal__box {
  max-width: 400px;
  padding: 26px 22px 22px;
}

.register-code-modal__box .modal__text,
.reset-modal__box .modal__text {
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.register-code-modal__box .field--code,
.reset-modal__box .field--code {
  align-items: center;
  text-align: center;
  margin-top: -6px;
}

.reset-modal__box #newPasswordConfirmField .field-hint--match {
  margin-bottom: 0;
}

.field-hint--match {
  margin-top: 4px;
  margin-bottom: 0;
  min-height: 1.1em;
}

.field-hint--match-ok {
  color: #166534;
}

.field-hint--match-bad {
  color: #b91c1c;
}

.auth-form .field.field--mismatch input:not([type="checkbox"]) {
  border-color: #f87171;
  background: #fef2f2;
}

.auth-form .field.field--match input:not([type="checkbox"]) {
  border-color: #86efac;
  background: #f0fdf4;
}

.register-code-modal__box .field--code label,
.reset-modal__box .field--code label {
  justify-content: center;
}

.register-code-modal__box .register-code-input,
.reset-modal__box .register-code-input {
  max-width: 148px;
  letter-spacing: 0.28em;
  padding-left: 18px;
  padding-right: 18px;
}

.register-code-modal__box .field--code .field-hint,
.reset-modal__box .field--code .field-hint {
  margin-top: 2px;
  margin-bottom: 0;
}

.register-code-modal__box .register-code-modal__actions,
.reset-modal__box .register-code-modal__actions {
  margin-top: 4px;
}

.register-code-modal__box .register-code-modal__actions .ghost-btn,
.reset-modal__box .register-code-modal__actions .ghost-btn {
  font-size: 0.85rem;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}

.card--form-page .field input,
.card--form-page .field select,
.card--form-page .field .profile-field-input {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 1rem;
}

/* Более «воздушный» вид на ПК, без потери компактности на мобиле */
@media (min-width: 960px) {
  .card--form-page form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin-bottom: 12px;
  }

  .profile-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .card--form-page .field input,
  .card--form-page .field select,
  .card--form-page .field .profile-field-input {
    min-height: 46px;
    border-radius: 12px;
  }
}

.profile-field-input {
  width: 100%;
  box-sizing: border-box;
}
.form-error {
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 12px;
}

.form-success {
  color: #166534;
  font-size: 14px;
  margin-bottom: 12px;
}

#formSuccess:empty,
#formSuccess[hidden] {
  display: none;
}

.register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.register-actions .primary-btn,
.register-actions .ghost-btn {
  flex: 1 1 180px;
}

.register-code-input {
  font-size: 1.35rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 600;
}

.register-code-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}

.register-code-modal__close:hover,
.register-code-modal__close:focus,
.register-code-modal__close:focus-visible {
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
  outline: none;
  transform: none;
  filter: none;
}

.register-code-modal__box .modal__title {
  padding-right: 36px;
}

.register-code-modal__actions {
  flex-direction: column;
  align-items: stretch;
}

.register-code-modal__actions .primary-btn,
.register-code-modal__actions .ghost-btn {
  width: 100%;
  justify-content: center;
}

body.register-code-modal-open {
  overflow: hidden;
}

#registerCodeModalError:empty {
  display: none;
}

#resetModalError:empty {
  display: none;
}

/* Пустой блок ошибки не участвует в grid формы — иначе под контентом остаётся зазор (gap) + margin */
#formError:empty {
  display: none;
}
.form-footer {
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}
.form-footer a {
  color: #1d4ed8;
  text-decoration: none;
}
.profile-section {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}
.profile-section h2 {
  font-size: 1rem;
  margin: 0 0 8px;
  color: #374151;
}
.profile-section .readonly {
  background: #f3f4f6;
  color: #6b7280;
}

.profile-form--view-only .toggle-btn:disabled {
  opacity: 0.75;
  cursor: default;
}

/* Профиль только для просмотра: компактные поля (заполняет админ, iOS-зум не нужен) */
.profile-form--view-only #userPanel .field input,
.profile-form--view-only #userPanel .field select,
.profile-form--view-only #userPanel .field textarea,
.profile-form--view-only #userPanel .field .profile-field-input,
.profile-form--view-only #userPanel .contact-row input,
.profile-form--view-only #userPanel .credit-row input {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1.25;
  pointer-events: none;
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.profile-form--view-only #userPanel .toggle-btn {
  pointer-events: none;
}

.profile-form--view-only .contacts-grid .contact-row {
  padding: 6px 8px;
  gap: 4px 8px;
}

@media (min-width: 960px) {
  .profile-form--view-only #userPanel .field input,
  .profile-form--view-only #userPanel .field select,
  .profile-form--view-only #userPanel .field textarea,
  .profile-form--view-only #userPanel .field .profile-field-input,
  .profile-form--view-only #userPanel .contact-row input,
  .profile-form--view-only #userPanel .credit-row input {
    min-height: 36px;
  }
}

.profile-form--view-only .profile-doc-item[data-doc-key^="g1-"] .profile-doc-item__preview,
.profile-form--view-only .profile-doc-item[data-doc-key^="g2-"] .profile-doc-item__preview {
  cursor: pointer;
}

.profile-form--view-only .profile-doc-item[data-doc-key^="g1-"] .profile-doc-item__preview.has-image,
.profile-form--view-only .profile-doc-item[data-doc-key^="g2-"] .profile-doc-item__preview.has-image {
  cursor: zoom-in;
}

/* Профиль: визуальные цветовые блоки, как на подтверждении заявки */
.profile-section--client,
.profile-section--family,
.profile-section--credits,
.profile-section--contacts {
  border-bottom: none;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.profile-section--client {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-left: 3px solid #2563eb;
}

.profile-section--client-combined h2:not(:first-of-type) {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(37, 99, 235, 0.18);
}

.profile-section--family {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-left: 3px solid #7c3aed;
}

.profile-section--credits {
  background: rgba(249, 115, 22, 0.06);
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-left: 3px solid #f97316;
}

.profile-section--contacts {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-left: 3px solid #10b981;
}

/* Ошибки полей профиля (все input/select внутри .field, не только прямой потомок) */
.card--form-page .field.field--invalid input:not([type="checkbox"]):not([type="hidden"]),
.card--form-page .field.field--invalid select,
.card--form-page .field.field--invalid textarea {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px #dc2626 !important;
}
.card--form-page .field.field--invalid input:focus:not([type="checkbox"]):not([type="hidden"]),
.card--form-page .field.field--invalid select:focus,
.card--form-page .field.field--invalid textarea:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px #dc2626 !important;
  outline: none;
}
.card--form-page .field.field--invalid .toggle-group {
  border-radius: 12px;
  box-shadow: 0 0 0 1px #dc2626;
}
.field--selfie.field--invalid .selfie-upload-wrap {
  border: 1px solid #dc2626;
  border-radius: 12px;
  padding: 8px;
}
.field__error-msg {
  display: block;
  font-size: 11px;
  line-height: 1.25;
  color: #dc2626;
  margin-top: 4px;
  max-width: 100%;
}
.field__error-msg--section {
  margin-top: 2px;
  margin-bottom: 8px;
  min-height: 0;
}
.field__error-msg--section[hidden] {
  display: none !important;
}
.field__error-msg--section.field__error-msg--visible {
  display: block !important;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.contact-row--no-work {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 600px) {
  .contact-row {
    grid-template-columns: 1fr 1fr;
  }
  .contact-row--no-work {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-row input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
}
.credit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.credit-row input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 1rem;
}
@media (max-width: 600px) {
  .credit-row {
    grid-template-columns: 1fr 1fr;
  }
  .credit-row .remove-credit {
    grid-column: span 2;
  }
}
.guarantor-block {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}
.guarantor-block h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.confirm-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 0;
}

.confirm-params-wrap {
  grid-column: 1 / -1;
}

.confirm-params-wrap .confirm-params-block {
  margin-bottom: 10px;
}

.confirm-item-details-field {
  margin-bottom: 0;
}

.confirm-guarantor-choice.confirm-block--compact {
  padding: 8px 10px 10px;
}

.confirm-guarantor-choice h3 {
  margin-bottom: 8px;
}

.confirm-guarantor-choice__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.confirm-guarantor-choice__option {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  margin: 0;
  padding: 0;
  width: 100%;
}

.confirm-guarantor-choice__option input {
  margin: 0;
  flex-shrink: 0;
}

.confirm-guarantor-choice--readonly .confirm-guarantor-choice__option {
  cursor: default;
}

.confirm-back-btn {
  margin-bottom: 6px;
  display: inline-flex;
  width: fit-content;
  align-self: flex-start;
}

/* Страница подтверждения: красный заголовок подсказки */
#confirmBackBtn + h1 + p.subtitle {
  color: #dc2626;
  margin-bottom: 4px;
}

#confirmSummary:empty {
  display: none;
}

#confirmForm {
  margin-top: 0;
}

#confirmForm .confirm-params-wrap {
  margin-top: 0;
}

/* Пометки обязательных полей на странице подтверждения заявки */
#itemMoreDetailsRequired[hidden],
#guarantorVariantRequired[hidden] {
  display: none !important;
}
.confirm-summary-grid .confirm-block {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .confirm-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.confirm-block {
  margin-bottom: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}
.confirm-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.confirm-block p {
  margin: 0 0 6px;
  font-size: 14px;
}

.confirm-block--compact {
  margin-bottom: 12px;
  padding: 10px 12px;
}
.confirm-block--compact h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.confirm-h3-icon {
  margin-right: 8px;
  font-size: 1.05em;
  vertical-align: -0.1em;
}

/* Цветные сущности на странице подтверждения заявки */
.confirm-block--client {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}
.confirm-block--client h3 {
  color: #1d4ed8;
}

.confirm-block--spouse {
  background: #f5f3ff;
  border-left: 3px solid #7c3aed;
}
.confirm-block--spouse h3 {
  color: #6d28d9;
}

.confirm-block--contacts {
  background: #ecfdf5;
  border-left: 3px solid #10b981;
}
.confirm-block--contacts h3 {
  color: #047857;
}

.confirm-block--guarantors {
  background: #fff7ed;
  border-left: 3px solid #f97316;
}
.confirm-block--guarantors h3 {
  color: #9a3412;
}

.confirm-block--params {
  background: #f3f4f6;
  border-left: 3px solid #9ca3af;
}
.confirm-block--params h3 {
  color: #6b7280;
}
.confirm-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 2px;
}
.confirm-row:last-child {
  margin-bottom: 0;
}
.confirm-label {
  color: #6b7280;
}
.confirm-value {
  color: #111827;
  overflow-wrap: break-word;
  word-break: normal;
}

.confirm-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

/* Внутри двухколоночной сетки фиксированные 140px подписи не оставляют места значению */
.confirm-grid-two .confirm-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.profile-name-grid {
  margin-top: 8px;
  margin-bottom: 4px;
}

.profile-section .confirm-grid-two .field {
  margin-bottom: 0;
}

/* На узких экранах одна колонка — иначе пары label/value сжимаются по буквам */
@media (max-width: 700px) {
  .confirm-grid-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.confirm-guarantor {
  border-left: 3px solid #e5e7eb;
}

/* Оставляем базовую ширину, но цвет задаём через confirm-block--guarantors */
.confirm-guarantor.confirm-block--guarantors {
  border-left-color: #f97316;
}

.confirm-guarantor-main {
  margin-bottom: 6px;
}

.confirm-guarantor-details {
  display: none;
  margin-top: 6px;
}

.confirm-guarantor--expanded .confirm-guarantor-details {
  display: block;
}

.confirm-guarantor-toggle {
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 11px;
}

/* Админка: текстовые области редактирования */
#adminUserDetails textarea,
#adminAppDetails textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  outline: none;
  resize: vertical;
}
@media (max-width: 400px) {
  .confirm-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .confirm-label { margin-bottom: 0; }
}
.checkbox-field label {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.checkbox-field label span {
  line-height: 1.45;
}

.checkbox-field a,
.register-legal-note a,
.confirm-legal-agree a {
  color: #2563eb;
  text-decoration: underline;
}

.register-legal-agree,
.confirm-legal-agree {
  margin: 12px 0 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.register-legal-note {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #64748b;
}

/* Профиль: вкладки над содержимым, без узкой колонки слева */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* В форме на десктопе включена grid-сетка в 2 колонки.
   Основной контейнер профиля должен занимать всю ширину, как и блок напоминания. */
#profileForm > .profile-layout {
  grid-column: 1 / -1;
}

/* После основного блока в форме элементы подтверждения и действий
   должны идти в один столбец на всю ширину и на ПК, и на мобиле. */
#profileForm > .form-error,
#profileForm > .profile-global-footer,
#profileForm > .confirmation-block,
#profileForm > .actions {
  grid-column: 1 / -1;
}

.profile-guarantor-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.profile-guarantor-save-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  min-height: 1.25em;
}

.profile-guarantor-save-status.is-ok {
  color: #15803d;
}

.profile-guarantor-save-status.is-err {
  color: #b91c1c;
}

.profile-guarantor-docs-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #b45309;
  text-align: center;
}

.guarantor-docs-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.25);
  background: rgba(254, 242, 242, 0.9);
}

.guarantor-docs-alert__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #b91c1c;
}

.guarantor-docs-alert__detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #b45309;
}

/* Многошаговая анкета «Ваши данные» */
.profile-wizard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Три колонки: стрелка | текст по центру всей шапки | пустая колонка той же ширины — визуально по центру */
.profile-wizard__head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 0 4px;
  padding: 0 0 8px;
  margin-bottom: 0;
  border-bottom: 1px solid #e8ecf1;
}

/* Шаг 1 без стрелки — компактнее по высоте */
.profile-wizard__head--step1 {
  grid-template-columns: 1fr;
  padding: 0 0 6px;
}

.profile-wizard__head--step1 .profile-wizard__back-icon[hidden] {
  display: none !important;
}

.profile-wizard__motivation {
  margin: 0;
  grid-column: 2;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.3;
  padding: 0 4px;
  min-width: 0;
}

.profile-wizard__head--step1 .profile-wizard__motivation {
  grid-column: 1 / -1;
}

.profile-wizard__back-icon {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  left: auto;
  top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.12s ease;
  flex-shrink: 0;
}

.profile-wizard__back-icon:hover,
.profile-wizard__back-icon:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.profile-wizard__back-icon:hover {
  color: #64748b;
}

.profile-wizard__back-icon-svg {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* После сохранения анкеты скрываем только подсказку, кнопку «Назад» оставляем */
.profile-wizard--locked .profile-wizard__motivation {
  display: none;
}

.profile-wizard--locked .profile-wizard__head {
  min-height: 0;
  padding-bottom: 8px;
}

.profile-wizard-step {
  display: none;
}

.profile-wizard-step.is-active {
  display: block;
}

.profile-wizard--flat .profile-wizard-step {
  display: block;
}

.profile-wizard--flat .profile-wizard-step[hidden] {
  display: block !important;
}

.profile-wizard--flat .profile-wizard-step + .profile-wizard-step {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e5e7eb;
}

.profile-wizard--flat .profile-wizard-step h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #1e293b;
}

.profile-wizard--flat .profile-section--client,
.profile-wizard--flat .profile-section--family,
.profile-wizard--flat .profile-section--credits,
.profile-wizard--flat .profile-section--contacts {
  margin-bottom: 6px;
  padding: 8px 10px;
}

.profile-wizard--flat .profile-wizard-final {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.profile-wizard__admin-link {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.profile-wizard__admin-link[hidden] {
  display: none !important;
}

.profile-wizard-step__hint {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.85rem;
}

.profile-wizard-step__sub {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.95rem;
  color: #475569;
}

/* Шаги 2–4: подзаголовки секций (как «Статус проживания») */
#wizardStep2 .profile-wizard-step__sub,
#wizardStep3 .profile-wizard-step__sub,
#wizardStep4 .profile-wizard-step__sub {
  font-weight: 600;
  color: #334155;
}

#wizardStep2 .profile-wizard-step__sub--lead,
#wizardStep3 .profile-wizard-step__sub--lead,
#wizardStep4 .profile-wizard-step__sub--lead {
  margin-top: 0;
}

#wizardStep2 .field--living-status-toggle {
  margin-bottom: 0.25rem;
}

#wizardStep2 .field--living-status-toggle .toggle-group {
  margin-top: 0;
}

.profile-wizard__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 0;
  padding-top: 6px;
  padding-bottom: 0;
  border-top: 1px solid #e5e7eb;
}

.profile-wizard__nav-admin {
  flex: 0 0 auto;
}

.profile-wizard__nav-admin[hidden] {
  display: none !important;
}

.profile-wizard__nav-main {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: min-content;
}

.profile-wizard__nav .primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-global-footer--hidden {
  display: none !important;
}

.profile-wizard-final {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.profile-wizard-final__actions {
  margin-top: 0.75rem;
}

.profile-tabs {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: nowrap;
}

.profile-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .profile-tab-btn {
    font-size: 0.7rem;
    padding: 6px 6px;
  }
}

.profile-tab-btn.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: none;
}

.profile-tab-btn:hover,
.profile-tab-btn:active {
  background: #f3f4ff;
  box-shadow: none;
  filter: none;
  transform: none;
}

.profile-panels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-panel {
  display: none;
}

.profile-panel.is-active {
  display: block;
}

.address-block {
  margin-top: 10px;
}

.address-block h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #4b5563;
}

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

.address-grid--compact {
  gap: 6px 8px;
}

.address-block--hidden {
  display: none;
}

@media (max-width: 600px) {
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-grid .field:nth-child(1),
  .address-grid .field:nth-child(2) {
    grid-column: 1 / -1;
  }
}

.toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.toggle-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  cursor: pointer;
  box-shadow: none;
  letter-spacing: normal;
  text-transform: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle-btn.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.toggle-btn:hover {
  background: #f1f5f9;
  border-color: #9ca3af;
}

.toggle-btn:hover {
  filter: none;
  transform: none;
  box-shadow: none;
}

/* Профиль: семейное положение
   Делаем чуть компактнее, чтобы текст "Не в браке" не отправлял 3-ю кнопку на новую строку. */
.family-block .toggle-group[data-field^="maritalStatus"] {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
}

.family-block .toggle-group[data-field^="maritalStatus"] .toggle-btn {
  padding: 4px 8px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.credits-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 12px;
  margin-top: 6px;
}

@media (max-width: 720px) {
  .credits-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

.credits-inline-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.passport-phone-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-end;
  column-gap: 16px;
  row-gap: 6px;
}

.work-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

@media (max-width: 720px) {
  .work-block {
    grid-template-columns: minmax(0, 1fr);
  }
}

.income-block {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.income-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.income-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.income-row--single {
  grid-template-columns: minmax(0, 1fr);
}

.passport-series-number-row {
  display: grid;
  grid-template-columns: 80px 100px;
  gap: 6px;
}

/* iOS Safari: отключаем авто-зум на полях паспорта/телефона в анкете и у поручителей */
.passport-series-number-row input,
.passport-phone-row input[type="text"],
.passport-phone-row input[type="tel"] {
  font-size: 16px;
}

.passport-phone-row input[type="text"],
.passport-phone-row input[type="tel"] {
  padding: 8px 10px;
}

.family-block {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spouse-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.spouse-block[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .spouse-block {
    grid-template-columns: minmax(0, 1fr);
  }
}

.confirmation-block {
  margin: 8px 0 4px;
  font-size: 0.9rem;
  color: #374151;
}

.confirmation-label {
  align-items: flex-start;
}

.confirmation-text {
  line-height: 1.4;
}

.confirmation-text--disabled {
  opacity: 0.5;
}

.contacts-block {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.contacts-block.contacts-block--invalid {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 10px;
}

@media (max-width: 720px) {
  .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contacts-grid .contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.contacts-grid--guarantor {
  grid-template-columns: minmax(0, 1fr);
}

.contacts-grid--guarantor .contact-row--with-relation {
  grid-template-columns: minmax(7rem, 0.85fr) minmax(0, 1.2fr) minmax(0, 1fr);
}

@media (max-width: 720px) {
  .contacts-grid--guarantor .contact-row--with-relation {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Application status */
.application-card {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 2px solid transparent;
}
.application-card.status-pending {
  background: #fef9c3;
  border-color: #eab308;
  color: #713f12;
}
.application-card.status-held {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #4b5563;
}
.application-card.status-approved {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}
.application-card.status-rejected {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}
.app-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.app-bank-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.app-card-header p {
  margin: 0;
}
.app-loading {
  color: #6b7280;
  margin: 0;
  padding: 12px 0;
}
.app-status {
  font-weight: 600;
  margin: 8px 0 4px;
}
.app-message,
.app-addresses {
  margin-top: 8px;
  font-size: 14px;
}
.app-date {
  font-size: 13px;
  color: #6b7280;
  margin: 4px 0 0;
}

/* Combined conversion-first home page */
.layout--combined {
  gap: 14px;
}

.app--combined {
  gap: 14px;
}

.hero-combined {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  background: linear-gradient(136deg, #0f172a 0%, #1e1b4b 56%, #334ac7 100%);
  color: #ffffff;
  border: 0;
}

.hero-combined__offer h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(1.72rem, 3.4vw, 2.2rem);
  line-height: 1.16;
}

.hero-combined__offer .subtitle {
  color: #dbe5ff;
  margin-bottom: 14px;
}

.hero-combined__eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.hero-combined__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  max-width: 420px;
}

.hero-combined__trust span {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #eff6ff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  width: 100%;
  min-width: 0;
}

.hero-combined__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-combined__actions .ghost-btn {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-combined__actions .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 14px 0 0;
}

.hero-cats a {
  color: #dbe5ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex: 0 1 auto;
  text-align: center;
}

.hero-cats a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero-cats {
    gap: 4px;
  }

  .hero-cats a {
    flex: 1 1 0;
    min-width: 0;
    padding: 4px 5px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hero-cats {
    gap: 3px;
  }

  .hero-cats a {
    padding: 3px 4px;
    font-size: 10px;
  }
}

.quick-calc {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25);
}

/* Демо в герое — стекло на градиенте */
.hero-combined .quick-calc {
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.07) 45%,
    rgba(15, 23, 42, 0.28) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 14px 44px rgba(15, 23, 42, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f1f5f9;
}

.hero-combined .quick-calc h2 {
  color: #ffffff;
}

.hero-combined .quick-calc p {
  color: rgba(226, 232, 240, 0.92);
}

.hero-combined .quick-calc-demo {
  background: rgba(15, 23, 42, 0.22);
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-combined .quick-calc-demo__row span {
  color: #e2e8f0;
}

.hero-combined .quick-calc-demo__bar {
  background: rgba(255, 255, 255, 0.2);
}

.hero-combined .quick-calc-demo__status {
  border-top-color: rgba(255, 255, 255, 0.22);
}

.hero-combined .quick-calc-demo__status b {
  color: #f1f5f9;
}

.hero-combined .quick-calc-demo__status em {
  color: #86efac;
}

.quick-calc h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.quick-calc p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}

.quick-calc__fields {
  display: grid;
  gap: 8px;
}

.quick-calc__fields label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.quick-calc__btn {
  margin-top: 10px;
  width: 100%;
}

.quick-calc-demo {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.quick-calc-demo__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-calc-demo__row span {
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

.quick-calc-demo__bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.quick-calc-demo__bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%);
  animation: quickBarFill 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.quick-calc-demo__row:nth-child(2) .quick-calc-demo__bar i {
  animation-delay: 0.35s;
}

.quick-calc-demo__row:nth-child(3) .quick-calc-demo__bar i {
  animation-delay: 0.7s;
}

.quick-calc-demo__status {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: grid;
  gap: 3px;
}

.quick-calc-demo__status b {
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
  opacity: 0.72;
  animation: quickPrimaryText 4.2s ease-in-out infinite;
}

.quick-calc-demo__status em {
  font-style: normal;
  font-size: 12px;
  color: #16a34a;
  opacity: 0;
  animation: quickStatusFade 4.2s ease-in-out infinite;
}

@keyframes quickBarFill {
  0%, 12% {
    width: 0%;
    opacity: 0.45;
  }
  40%, 78% {
    width: 100%;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0.9;
  }
}

@keyframes quickPrimaryText {
  0%, 35% {
    opacity: 0.72;
  }
  46%, 100% {
    opacity: 0.35;
  }
}

@keyframes quickStatusFade {
  0%, 48% {
    opacity: 0;
  }
  62%, 100% {
    opacity: 1;
  }
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.step-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.step-card span {
  font-size: 18px;
}

.step-card h3 {
  margin: 8px 0 4px;
  font-size: 0.95rem;
}

.step-card p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

/* Блок «Как это работает» — компактнее, стекло */
.card.explainer {
  padding: 14px 14px 14px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(248, 250, 252, 0.52) 45%,
    rgba(226, 232, 240, 0.38) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 600px) {
  .card.explainer {
    padding: 16px 18px 15px;
  }
}

.explainer__head {
  margin-bottom: 8px;
}

.explainer__head h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  margin-bottom: 2px;
}

.explainer__head p {
  font-size: 12px;
}

.explainer__steps {
  gap: 8px;
}

.explainer .step-card {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}

.explainer .step-card__title {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 3px;
  font-size: 0.8rem;
  line-height: 1.25;
}

.step-card__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.step-card__icon img,
.step-card__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.explainer .step-card__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.explainer .step-card p {
  font-size: 11px;
  line-height: 1.35;
}

/* «Почему выбирают FAYD» и «Партнёры» — те же размеры заголовка и текста, что у «Как это работает» */
.benefits-combined .section-head,
.trust-block .section-head {
  margin-bottom: 8px;
}

.benefits-combined .section-head h2,
.trust-block .section-head h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.25;
  margin: 0 0 2px;
}

.trust-block .section-head p {
  font-size: 11px;
  line-height: 1.35;
}

/* Преимущества + партнёры — одна карточка, стекло */
.card.benefits-combined.trust-block {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(248, 250, 252, 0.52) 45%,
    rgba(226, 232, 240, 0.38) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.benefits-combined.trust-block .benefits-trust__segment + .benefits-trust__segment {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.65);
}

.trust-block .partner-logo-card {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(226, 232, 240, 0.88);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.trust-block .partner-logo-card img {
  background: rgba(248, 250, 252, 0.65);
  border-color: rgba(226, 232, 240, 0.8);
}

.benefits-combined .benefits-grid article {
  font-size: 0.8rem;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(226, 232, 240, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.benefits-combined .benefits-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: min(100%, 920px);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .benefits-combined .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: min(100%, 420px);
  }
}

.benefits-grid article {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 11px 12px;
  font-weight: 600;
  color: #1e293b;
}

.partner-logos {
  overflow: hidden;
  padding: 4px 0;
}

/* Одна лента: две копии логотипов подряд; анимация −50% совпадает с длиной одной копии (с учётом gap) — без рывка в начале цикла */
.partner-logos__marquee {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  /* 4 одинаковых набора × 6 логотипов; один цикл = сдвиг на 1/4 ленты (см. keyframes) */
  animation: partnersMarquee 56s linear infinite;
}

.partner-logo-card {
  width: 62px;
  height: 62px;
  border: 1px solid #eef3f9;
  border-radius: 999px;
  background: #ffffff;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.partner-logo-card img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #f3f6fb;
  padding: 3px;
}

@keyframes partnersMarquee {
  from {
    transform: translateX(0);
  }
  to {
    /* 4 копии подряд: −25% ≈ один набор; −3px поправка на flex gap между сегментами */
    transform: translateX(calc(-25% - 3px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-logos__marquee {
    animation: none;
  }
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.preview-card {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 14px;
}

.preview-card h3 {
  margin: 0 0 5px;
  font-size: 0.98rem;
}

.preview-card p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
}

.preview-card strong {
  color: #1d4ed8;
  font-size: 1rem;
}

.card--calculator-main,
.card--results {
  scroll-margin-top: 20px;
}

.card--calculator-main {
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-left: 4px solid #2563eb;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 52%);
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.06),
    0 14px 44px rgba(37, 99, 235, 0.1);
}

.calculator-main__head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: 0.02em;
  color: #0f172a;
}

.calculator-main__lead {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  max-width: 52ch;
}

.section-head--inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sticky-calc-btn {
  position: sticky;
  top: 10px;
}

.final-cta {
  text-align: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #334ac7 100%);
  border: 0;
}

.final-cta h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.final-cta p {
  margin: 0 0 12px;
  color: #dbe5ff;
}

@media (max-width: 1024px) {
  .hero-combined {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefits-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .section-head--inline {
    flex-direction: column;
  }

  .sticky-calc-btn {
    width: 100%;
    position: static;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-logos,
  .preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-combined__actions .primary-btn,
  .hero-combined__actions .ghost-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Admin panel */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.admin-tab-btn:hover,
.admin-tab-btn:active,
.admin-tab-btn:focus,
.admin-tab-btn:focus-visible {
  filter: none;
  transform: none;
  box-shadow: none;
  outline: none;
}

.admin-tab-btn.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.admin-tab-btn.is-active:hover,
.admin-tab-btn.is-active:active,
.admin-tab-btn.is-active:focus,
.admin-tab-btn.is-active:focus-visible {
  background: #111827;
  color: #fff;
  box-shadow: none;
  outline: none;
}

.stats-chart-card {
  padding: 16px 16px 8px;
  margin-bottom: 16px;
}

.stats-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.stats-chart-head h2 {
  margin: 0;
}

.stats-chart-period {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.35;
}

.stats-chart-zoom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.stats-chart-zoom__btn {
  padding: 6px 12px;
  min-width: 36px;
  line-height: 1.2;
}

.stats-chart-zoom__btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.stats-chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  max-width: 1100px;
  cursor: grab;
}

.stats-chart-wrap:active {
  cursor: grabbing;
}

.stats-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.stats-chart-wrap:active canvas {
  cursor: grabbing;
}

@media (max-width: 640px) {
  .stats-chart-wrap {
    height: 240px;
  }
}

.stats-insight-card {
  padding: 16px;
  margin-bottom: 16px;
}

.stats-vs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stats-vs-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 12px 10px;
  background: #f9fafb;
  min-width: 0;
}

.stats-vs-card__label {
  display: block;
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.stats-vs-card__value {
  font-size: 1.35rem;
  font-weight: 650;
  color: #111827;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stats-vs-card__delta {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
}

.stats-vs-card__delta.is-up {
  color: #166534;
  background: #dcfce7;
}

.stats-vs-card__delta.is-down {
  color: #991b1b;
  background: #fee2e2;
}

.stats-vs-card__delta.is-flat {
  color: #4b5563;
  background: #e5e7eb;
}

.stats-vs-card__prev {
  display: block;
  margin-top: 6px;
  color: #9ca3af;
  font-size: 0.78rem;
}

.stats-funnel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stats-funnel__row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.stats-funnel__name {
  color: #374151;
  font-size: 0.92rem;
  font-weight: 500;
}

.stats-funnel__track {
  height: 28px;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
}

.stats-funnel__bar {
  height: 100%;
  min-width: 0;
  border-radius: 8px;
  transition: width 0.2s ease;
}

.stats-funnel__bar.is-visits { background: #2563eb; }
.stats-funnel__bar.is-users { background: #16a34a; }
.stats-funnel__bar.is-applications { background: #d97706; }
.stats-funnel__bar.is-approved { background: #0f766e; }

.stats-funnel__nums {
  text-align: right;
  white-space: nowrap;
}

.stats-funnel__value {
  font-weight: 650;
  color: #111827;
}

.stats-funnel__conv {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .stats-vs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-funnel__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .stats-funnel__name {
    grid-column: 1 / -1;
  }
}

.admin-apps-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-apps-filters input[type="number"] {
  width: 100%;
  min-width: 0;
}

.admin-apps-list {
  display: grid;
  gap: 10px;
}

.admin-callout-list {
  display: grid;
  gap: 10px;
}

.admin-callout-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-callout-queues {
  margin-top: 12px;
}

.admin-callout-folder-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: none;
}

.admin-callout-folder-btn:hover {
  background: #f8fafc;
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-callout-folder-btn.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.admin-callout-folder-btn.is-active:hover {
  background: #111827;
  color: #fff;
  filter: none;
  transform: none;
}

.admin-callout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.admin-callout-card {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: #111827;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
}

.admin-callout-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-callout-archive-btn {
  min-width: 44px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 18px;
  line-height: 1;
  color: #334155;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
}

.admin-callout-archive-btn:hover {
  background: #f1f5f9;
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-callout-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.admin-callout-card__name {
  font-size: 15px;
  font-weight: 700;
}

.admin-callout-card__elapsed {
  font-size: 12px;
  color: #b45309;
  font-weight: 600;
}

.admin-callout-card__phone {
  margin-top: 4px;
  font-size: 14px;
  color: #0f766e;
  font-weight: 600;
}

.admin-callout-card__preview {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.admin-callout-card__preview--empty {
  color: #94a3b8;
}

.admin-callout-comments {
  display: grid;
  gap: 8px;
}

.admin-callout-comment {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.admin-callout-comment__time {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.admin-callout-comment__text {
  font-size: 14px;
  color: #0f172a;
  white-space: pre-wrap;
  line-height: 1.45;
}

.admin-app-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: #111827;
  box-shadow: none;
}

.admin-app-item:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.admin-app-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-app-item__meta {
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.92rem;
}

.admin-app-detail-view {
  margin-top: 0;
}

.admin-app-back-btn {
  margin-bottom: 16px;
}

.admin-apps-empty {
  color: #6b7280;
  margin: 0;
}

.admin-app-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.admin-app-card--pending {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 120px);
}

.admin-app-card--approved {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 120px);
}

.admin-app-card--rejected {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 120px);
}

.admin-app-card__header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-app-card__headline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-app-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.admin-app-card__subtitle {
  margin: 8px 0 0;
  font-weight: 600;
  color: #111827;
}

.admin-app-card__meta {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 0.92rem;
}

.admin-app-card__highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-app-highlight {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fafb;
}

.admin-app-highlight span {
  display: block;
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.admin-app-highlight strong {
  font-size: 0.98rem;
  color: #111827;
}

.admin-app-card__message {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
}

.admin-app-card__admin-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.92rem;
  line-height: 1.4;
}

.admin-app-item__note {
  margin-top: 6px;
  color: #9a3412;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.admin-user-note-field {
  margin: 0 0 14px;
}

.admin-user-note-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.admin-user-note-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  resize: vertical;
}

.admin-user-note-row .primary-btn {
  flex-shrink: 0;
  white-space: nowrap;
  align-self: flex-end;
  height: auto;
  min-height: 0;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 999px;
}

.admin-user-note-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  align-items: stretch;
}

.admin-user-note-actions .ghost-btn,
.admin-user-note-actions .primary-btn {
  align-self: stretch;
  width: 100%;
  white-space: nowrap;
}

.admin-user-note-actions .ghost-btn {
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 999px;
}

.admin-history-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-history-modal[hidden] {
  display: none !important;
}

.admin-history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.admin-history-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.admin-history-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-history-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-history-modal__close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.admin-history-modal__body {
  padding: 14px 16px 18px;
  overflow: auto;
}

.admin-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-history-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f9fafb;
}

.admin-history-item__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.admin-history-item__top strong {
  color: #111827;
}

.admin-history-item__meta {
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.4;
}

.admin-history-item__msg {
  margin-top: 8px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.4;
}

.admin-user-note-field .field-hint-inline {
  color: #9ca3af;
  font-weight: 400;
  font-size: 0.85em;
}

@media (max-width: 640px) {
  .admin-user-note-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-user-note-actions {
    width: 100%;
  }

  .admin-user-note-actions .ghost-btn,
  .admin-user-note-actions .primary-btn {
    width: 100%;
  }
}

.admin-app-card__photos {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.admin-app-card__photos h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.admin-app-docs-row .profile-doc-item__preview img {
  cursor: zoom-in;
}

.admin-app-card__attachments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.admin-app-card__attachments-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-app-card__attachments-head h4 {
  margin: 0;
  font-size: 1rem;
}

.admin-app-card__attachments-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-excel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-excel-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.875rem;
  cursor: pointer;
}

.admin-excel-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-excel-preview {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.admin-excel-preview__status {
  margin: 0;
  padding: 16px;
  color: #6b7280;
}

.admin-excel-preview__status--error {
  color: #b91c1c;
}

.admin-excel-preview__scroll {
  overflow: auto;
  max-height: 70vh;
  padding: 8px;
}

.admin-excel-preview table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}

.admin-excel-preview td,
.admin-excel-preview th {
  border: 1px solid #d1d5db;
  padding: 4px 8px;
  vertical-align: top;
  white-space: pre-wrap;
}

.admin-excel-preview tr:nth-child(even) td {
  background: #f9fafb;
}

.admin-anketa {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fcfcfd;
  margin-bottom: 10px;
  overflow: hidden;
}

.admin-anketa__summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  list-style: none;
}

.admin-anketa__summary::-webkit-details-marker {
  display: none;
}

.admin-anketa__body {
  padding: 0 14px 14px;
}

.admin-anketa__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.admin-anketa__row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #f1f5f9;
}

.admin-anketa__label {
  color: #6b7280;
  font-size: 0.8rem;
}

.admin-anketa__value {
  color: #111827;
  font-size: 0.92rem;
  word-break: break-word;
}

.admin-anketa-below {
  margin-top: 16px;
}

.admin-anketa-below h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.admin-app-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.admin-app-card__feedback {
  margin-top: 10px;
  min-height: 0;
}

.admin-app-card__feedback--success {
  color: #15803d;
}

.admin-app-card__feedback--error {
  color: #b91c1c;
}

.admin-app-status {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.admin-app-status--pending {
  color: #92400e;
  background: #fef3c7;
}

.admin-app-status--held {
  color: #1d4ed8;
  background: #dbeafe;
}

.admin-app-status--approved {
  color: #166534;
  background: #dcfce7;
}

.admin-app-status--rejected {
  color: #991b1b;
  background: #fee2e2;
}

.admin-app-reject-btn {
  color: #b91c1c;
  border-color: #fecaca;
}

.admin-app-delete-btn {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.admin-app-delete-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

@media (max-width: 900px) {
  .admin-app-card__highlights,
  .admin-anketa__grid {
    grid-template-columns: 1fr;
  }
}

.admin-user-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-user-result {
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #111827;
  box-shadow: none;
}

.admin-user-result:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-user-result:active,
.admin-user-result:focus,
.admin-user-result:focus-visible {
  outline: none;
  box-shadow: none;
  filter: none;
  transform: none;
  border-color: #9ca3af;
  background: #f9fafb;
}

.admin-user-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.admin-user-section summary {
  cursor: pointer;
  list-style: none;
}

.admin-user-section summary::-webkit-details-marker {
  display: none;
}

.admin-user-section__body {
  margin-top: 12px;
}

#adminUserEditor input[type="tel"].field--phone-incomplete {
  border-color: #b91c1c;
  outline-color: #b91c1c;
}

input.birth-date-input {
  max-width: 11.5rem;
  letter-spacing: 0.02em;
}

input.birth-date-input.field--date-incomplete {
  border-color: #b91c1c;
  outline-color: #b91c1c;
}

.admin-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-doc-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #f9fafb;
  min-width: 0;
}

.admin-doc-card--empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
}

.admin-doc-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  line-height: 1.3;
}

.admin-doc-card__link {
  display: block;
}

.admin-doc-card__img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.admin-doc-card__meta,
.admin-doc-card__empty {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.admin-docs-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: #92400e;
}

.admin-user-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-tabs {
  margin-bottom: 2px;
}

.admin-user-save-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 5;
}

.admin-user-save-footer .primary-btn,
.admin-user-save-footer .ghost-btn {
  flex: 0 1 auto;
  min-width: 160px;
  max-width: none;
  position: relative;
  z-index: 6;
}

.admin-user-delete-btn {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.admin-user-delete-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

#adminUserEditor .admin-user-panel.profile-panel:not(.is-active) {
  display: none;
}

#adminUserEditor .admin-user-panel.profile-panel.is-active {
  display: block;
}

.admin-user-profile-layout {
  max-width: 720px;
}

.admin-user-profile-layout .admin-user-step + .admin-user-step {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e5e7eb;
}

.admin-user-profile-layout .profile-section {
  margin-bottom: 6px;
}

.admin-user-profile-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #1e293b;
}

.admin-user-meta {
  margin: 10px 0 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(37, 99, 235, 0.18);
}

.admin-user-contact-row {
  margin-bottom: 8px;
  grid-template-columns: minmax(7rem, 0.75fr) minmax(0, 1.35fr) minmax(0, 1fr);
}

@media (max-width: 700px) {
  .admin-user-contact-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-user-docs-row {
  max-width: none;
  margin-bottom: 10px;
}

#adminUserEditor .profile-wizard-step__sub {
  margin: 0.65rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

#adminUserEditor .profile-wizard-step__sub--lead {
  margin-top: 0;
}

@media (max-width: 900px) {
  .admin-docs-grid {
    grid-template-columns: 1fr;
  }
}

/* Identity verification wizard */
body.identity-modal-open {
  overflow: hidden;
}

.identity-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.identity-modal[hidden] {
  display: none !important;
}

.identity-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.identity-modal__box {
  position: relative;
  width: min(100%, 340px);
  max-height: min(88vh, 620px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  padding: 14px 16px 12px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.identity-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}

.identity-modal__close:hover,
.identity-modal__close:focus,
.identity-modal__close:focus-visible {
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
  outline: none;
  transform: none;
  filter: none;
}

.identity-modal__brand-title {
  margin: 0 32px 6px 0;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.identity-modal__body {
  min-height: 0;
}

.identity-step__illustration {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}

.identity-step__illustration .identity-illus {
  width: min(100%, 150px);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.identity-step__example {
  text-align: center;
  width: min(100%, 220px);
  margin: 0 auto;
}

.identity-step__example-img {
  width: min(100%, 220px);
  height: auto;
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.identity-step__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.25;
  color: #111827;
}

.identity-step__text {
  margin: 0 0 8px;
  color: #374151;
  line-height: 1.45;
  font-size: 0.84rem;
}

.identity-step__trust {
  margin: 0 0 10px;
  color: #9ca3af;
  font-size: 0.72rem;
  text-align: center;
}

.identity-step__preview {
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.identity-step__preview img {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: cover;
}

.identity-modal .primary-btn,
.identity-modal .ghost-btn {
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  box-shadow: none;
}

.identity-modal .primary-btn:hover,
.identity-modal .primary-btn:active,
.identity-modal .ghost-btn:hover,
.identity-modal .ghost-btn:active {
  box-shadow: none;
  transform: translateY(-1px);
}

.identity-modal .ghost-btn {
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}

.identity-modal__action {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.identity-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.identity-modal__footer .ghost-btn,
.identity-modal__footer .primary-btn {
  width: auto;
  margin-top: 0;
  min-height: 34px;
}

.identity-modal__next {
  min-width: 88px;
  margin-left: auto;
}

.identity-phone-display {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin: 10px 0 12px;
  color: #111827;
  letter-spacing: 0.02em;
}

.identity-step__consent {
  margin-top: 12px;
}

.identity-step__consent label {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #374151;
  cursor: pointer;
}

.identity-step__consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.identity-step__consent a {
  color: #2563eb;
  text-decoration: underline;
}

/* iOS Safari: font-size < 16px на input вызывает авто-зум */
.identity-step--phone .field input[type="tel"] {
  font-size: 16px;
  line-height: 1.25;
  padding: 9px 12px;
  min-height: 44px;
  border-radius: 10px;
}

.identity-phone-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.identity-phone-actions .identity-modal__action {
  margin-top: 0;
}

.identity-step__wait-icon {
  width: 52px;
  height: 52px;
  margin: 8px auto 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.identity-docs-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.identity-doc-card img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

/* Privacy policy page */
.privacy-doc h2 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.privacy-doc p,
.privacy-doc li {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
}
.privacy-doc ul {
  margin: 0.35rem 0 0.85rem;
  padding-left: 1.25rem;
}
.privacy-doc li {
  margin-bottom: 0.35rem;
}
.privacy-doc .subtitle {
  max-width: none;
  margin-bottom: 1.25rem;
}

.admin-banks-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .admin-banks-layout {
    grid-template-columns: 1fr;
  }
}

.admin-banks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-bank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.admin-bank-row:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.admin-bank-row.is-selected {
  border-color: #60a5fa;
  background: #eff6ff;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 8px 22px rgba(37, 99, 235, 0.18) !important;
}

.admin-bank-row.is-disabled {
  opacity: 0.72;
}

.admin-bank-row__open {
  flex: 1;
  text-align: left;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  filter: none !important;
  transform: none !important;
}

.admin-bank-row__open:hover,
.admin-bank-row__open:active,
.admin-bank-row__open:focus,
.admin-bank-row__open:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  outline: none;
}

.admin-bank-row__name {
  display: block;
  font-weight: 600;
  color: #0f172a;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
}

.admin-bank-row__meta {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: #64748b;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.admin-bank-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  cursor: pointer;
}

.admin-bank-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.admin-bank-toggle__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.admin-bank-toggle__slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.admin-bank-toggle input:checked + .admin-bank-toggle__slider {
  background: #2563eb;
}

.admin-bank-toggle input:checked + .admin-bank-toggle__slider::before {
  transform: translateX(20px);
}

.admin-bank-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.admin-bank-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: #334155;
}

.admin-bank-params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.site-footer__nav--cats a {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: #0f172a;
  border-bottom-color: rgba(15, 23, 42, 0.2);
}

.seo-landing h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.25;
  color: #0f172a;
}

.seo-landing__lead {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.65;
  font-size: 15.5px;
  max-width: 68ch;
}

.seo-landing p {
  margin: 0 0 12px;
  color: #475569;
  line-height: 1.65;
  font-size: 15px;
  max-width: 70ch;
}

.seo-landing h2 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
  color: #0f172a;
}

.seo-landing ul {
  margin: 0 0 14px;
  padding-left: 1.15em;
  color: #475569;
  line-height: 1.6;
  font-size: 15px;
  max-width: 70ch;
}

.seo-landing li + li {
  margin-top: 4px;
}

.seo-geo {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.seo-geo p {
  margin: 0 0 8px;
  color: #0f172a;
  font-weight: 600;
}

.seo-geo ul {
  margin: 0;
}

.seo-landing__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
}

.seo-landing__cta .ghost-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  background: #fff;
  text-decoration: none;
  font-size: 14px;
}

.seo-landing__cta .ghost-link:hover {
  background: #f8fafc;
}

.faq-geo-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.faq-geo-list li {
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.faq-geo-list strong {
  color: #0f172a;
}

.faq-cat a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.faq-cat a:hover strong {
  color: #0f766e;
}

