/* ==========================================================================
   Страницы участника: вход по email, оформление доставки, статус заказа.
   Крупный текст и элементы, всё по центру страницы.
   ========================================================================== */

body { font-size: 17px; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
.small { font-size: 15px; }

/* ---------- Шапка: логотип по центру ---------- */
.topbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  max-width: 1280px;
  min-height: 72px;
  padding: 10px 32px;
}
.topbar__brand { grid-column: 2; }
.topbar__brand img { height: 32px; }
.topbar__label { font-size: 14px; }
.topbar__user { grid-column: 3; justify-self: end; font-size: 15px; }

/* ---------- Раскладка ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.page--narrow { max-width: 640px; }
/* Короткие страницы (вход, код, ошибка) — по центру экрана и по вертикали */
.page--center { display: flex; flex-direction: column; justify-content: center; padding-top: 32px; }

.card { padding: 40px; }

h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }

.page-head { margin-bottom: 32px; text-align: center; }
.page-head h1 { margin-bottom: 12px; }
.lead { color: var(--ink-2); font-size: 19px; line-height: 1.55; }
.page-head .lead { max-width: 680px; margin: 0 auto; }

.card-head { text-align: center; margin-bottom: 28px; }
.card-head h1 { margin-bottom: 12px; }
.card-head p { color: var(--muted); font-size: 18px; }

/* ---------- Шаги (без номеров) ---------- */
.steps {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 36px;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1 1 0;
  min-width: 0;
  padding-top: 12px;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}
.steps li.is-done { border-top-color: var(--ink-2); color: var(--ink-2); }
.steps li.is-current { border-top-color: var(--accent); color: var(--ink); font-weight: 600; }

/* ---------- Кнопки и поля крупнее ---------- */
.btn { min-height: 56px; padding: 0 28px; font-size: 18px; border-radius: 8px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn .spinner { width: 18px; height: 18px; }

.field { gap: 8px; }
.field__label { font-size: 16px; }
.field__hint, .field__error { font-size: 15px; }
.input {
  min-height: 56px;
  padding: 14px 16px;
  font-size: 18px;
  border-radius: 8px;
}
.alert { font-size: 16px; padding: 16px 18px; }
.link-button { font-size: 16px; }

/* ---------- Секции формы заказа ---------- */
.section { padding: 36px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; padding-top: 0; }
.section__head { margin-bottom: 22px; }
.section__head p { color: var(--muted); font-size: 16px; margin-top: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 .span-2 { grid-column: 1 / -1; }

/* ---------- Мерч ---------- */
.merch {
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 22px 24px;
  text-align: center;
  background: var(--accent-soft);
  border: 1px solid #f6d9b0;
  border-radius: var(--radius-lg);
}
.merch__label { font-size: 15px; color: var(--accent-text); font-weight: 500; }
.merch__name { font-size: 24px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
.merch__count { font-size: 17px; color: var(--ink-2); margin-top: 4px; }

/* ---------- Карта и выбранный пункт ---------- */
#cdek-map {
  height: 560px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
#cdek-map .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  padding: 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
}

/* Выбранный пункт — как поле «Куда» в накладной: подпись, адрес, код пункта.
   Полоса сверху как у шагов: серая, пока пункт не выбран, оранжевая после выбора
   (тем же цветом отмечен выбранный пункт на карте). */
.pvz {
  margin-top: 16px;
  padding: 20px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.pvz.is-selected { background: var(--surface); }
.pvz__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.pvz__label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pvz.is-selected .pvz__label { color: var(--accent-text); }
.pvz__code { font: 500 15px/1 var(--font-mono); padding: 6px 9px; border-radius: 4px; background: #f1efec; color: var(--ink-2); white-space: nowrap; }
.pvz__address { margin-top: 6px; font-size: 21px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.pvz:not(.is-selected) .pvz__address { font-weight: 500; color: var(--muted); }
.pvz__meta { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* ---------- Отправка ---------- */
.submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.submit .alert { width: 100%; text-align: left; }
.submit__row { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.submit__row .btn { width: 100%; max-width: 420px; }
.submit__hint { color: var(--muted); font-size: 16px; max-width: 520px; }

/* ---------- Информационный блок ---------- */
.note {
  margin-top: 32px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-2);
  text-align: center;
}
.note h3 { margin-bottom: 8px; }
.note p + p { margin-top: 8px; }
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 14px; }

.footer-contact { margin-top: 24px; text-align: center; color: var(--muted); font-size: 16px; }

/* ---------- Вход и код подтверждения ---------- */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.otp { display: flex; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.otp input {
  width: 64px;
  height: 76px;
  padding: 0;
  text-align: center;
  font: 500 32px/1 var(--font-mono);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.otp.is-invalid input { border-color: var(--err); }

.message { text-align: center; font-size: 16px; }
.message:empty { display: none; }
.message.is-error { color: var(--err); }
.auth-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 16px; color: var(--muted); text-align: center; }

.reasons { margin: 0; padding: 0; list-style: none; text-align: center; color: var(--ink-2); font-size: 18px; }
.reasons li + li { margin-top: 8px; }

/* ---------- Статус заказа ---------- */
.done-head { text-align: center; margin-bottom: 32px; }
.done-head__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 30px;
  font-weight: 600;
}
.done-head h1 { margin-bottom: 12px; }
.done-head .lead { max-width: 640px; margin: 0 auto; }

.track {
  padding: 28px 24px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
}
.track__label { font-size: 16px; color: var(--muted); margin-bottom: 6px; }
.track__number { font: 500 36px/1.2 var(--font-mono); letter-spacing: 0.02em; }
.track__pending { font-size: 18px; color: var(--ink-2); }
.track__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.status-line { text-align: center; padding: 8px 0 4px; }
.status-line .badge { font-size: 16px; padding: 6px 14px; }

.details { margin: 0; }
.details__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}
.details__row:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-size: 17px; }
.details dd { margin: 0; }

.block-title { margin: 36px 0 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .topbar__inner { min-height: 60px; gap: 12px; padding: 10px 16px; }
  .topbar__brand img { height: 26px; }
  .page { padding: 24px 16px 56px; }
  .page--center { justify-content: flex-start; padding-top: 24px; }
  .card { padding: 28px 20px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .lead, .card-head p { font-size: 17px; }
  .steps { gap: 8px; margin-bottom: 28px; }
  .steps li { font-size: 13px; }
  .grid-2 { grid-template-columns: 1fr; }
  #cdek-map { height: 460px; }
  .pvz { padding: 18px 18px 20px; }
  .pvz__address { font-size: 19px; }
  .otp { gap: 8px; }
  .otp input { width: 46px; height: 60px; font-size: 26px; }
  .details__row { grid-template-columns: 1fr; gap: 2px; }
  .track__number { font-size: 28px; }
  .track__actions .btn { flex: 1; }
}
