:root {
  /**
   * Схема только светлая, и это заявлено явно.
   *
   * Без этой строки Chrome на Android при включённом тёмном режиме телефона применяет
   * к сайту принудительное затемнение: сам инвертирует цвета и фоны. Вёрстка, рассчитанная
   * на светлую тему, при этом ломается — кнопки выглядят обрезанными, тени и рамки исчезают.
   * Заявленная схема отключает автозатемнение и оставляет интерфейс таким, как задуман.
   */
  color-scheme: light;

  --primary: #16a34a;
  --primary-hover: #15803d;

  --accent-blue: #1677ff;
  --accent-blue-hover: #165dff;

  --success: #52c41a;
  --success-bg: #f6ffed;
  --warning: #faad14;
  --warning-bg: #fffbe6;
  --danger: #ff4d4f;
  --danger-bg: #fff1f0;
  --info-bg: #e6f4ff;

  --text-main: #1f2933;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  /* svh = «маленький» viewport: кнопка не уезжает под панель браузера / home indicator */
  min-height: 100dvh;
  min-height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
}

body {
  margin: 0;
  background: var(--bg-body);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  /* На телефонах этот отступ обнуляется, а вырез отдаётся доку с вкладками
     (см. мобильную секцию). Здесь он нужен для широких экранов вроде планшета. */
  padding-bottom: env(safe-area-inset-bottom, 0);
  overscroll-behavior-y: contain;
  overflow-x: hidden;
  overflow-y: hidden;
}

.fixed-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  padding: 10px 16px 8px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
  flex: 0 0 auto;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.logo-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 16px;
  /* Размер кадра спрайта берётся отсюда: он же размер логотипа. */
  --logo-size: 56px;
}

/**
 * Бегущий пакет вместо статичного логотипа, пока идёт запрос к серверу.
 *
 * Спрайт из десяти кадров одного цикла бега (icons/logo-run-v3.png). Имя файла — его
 * версия: картинки кэшируются «сначала кэш», и перезапись под тем же именем оставила бы
 * у людей старую картинку с другим числом кадров. Сдвиг задан в
 * пикселях, а не в процентах: при `background-size: 1200%` проценты и шаги анимации не
 * совпадают, и на экране оказывается половина одного кадра и половина соседнего.
 */
.logo-run {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  border-radius: 16px;
  /* Подложка та же, что у статичного логотипа: иначе на время запроса плитка исчезает
     и пакет повисает прямо на шапке. */
  background-color: #e5e7eb;
  box-shadow: var(--shadow-sm);
  background-image: url('../icons/logo-run-v3.png');
  background-repeat: no-repeat;
  background-size: calc(var(--logo-size) * 10) var(--logo-size);
  background-position: 0 0;
  /* 10 кадров, цикл 0,67 с — как в исходной записи: 20 кадров при 30 к/с. */
  animation: otnesu-logo-run 0.67s steps(10) infinite;
}

.logo-wrap.is-busy .logo-run {
  display: block;
}

/* Пока бежит пакет, статичный логотип прячем, но место за ним остаётся. */
.logo-wrap.is-busy .logo {
  visibility: hidden;
}

@keyframes otnesu-logo-run {
  from { background-position: 0 0; }
  to { background-position: calc(var(--logo-size) * -10) 0; }
}

.logo-ring {
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Точка нужна только там, где бегущий пакет не показывается (см. «меньше движения»). */
.logo-wrap.is-busy .logo-ring {
  opacity: 0;
}

/* Точка едет по окружности вокруг логотипа — заметно спокойнее, чем полное кольцо */
.logo-orbit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: otnesu-logo-orbit 2s linear infinite;
}

.logo-busy-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 4px rgba(22, 163, 74, 0.75);
}

@keyframes otnesu-logo-orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Бег — это движение: при выключенном движении возвращаем спокойную точку. */
  .logo-wrap.is-busy .logo-run {
    display: none;
  }

  .logo-wrap.is-busy .logo {
    visibility: visible;
  }

  .logo-wrap.is-busy .logo-ring {
    opacity: 1;
  }

  .logo-orbit {
    animation: none;
  }

  .logo-busy-dot {
    animation: otnesu-logo-dot-pulse 1.2s ease-in-out infinite;
  }

  @keyframes otnesu-logo-dot-pulse {
    0%,
    100% {
      opacity: 0.4;
    }
    50% {
      opacity: 1;
    }
  }
}

.logo {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  background: #e5e7eb;
  cursor: pointer;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-app-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.header-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-page {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

@media (max-width: 480px) {
  .header-content { gap: 12px; }
  .logo-wrap { border-radius: 12px; }
  .logo-ring { inset: -2px; border-radius: 14px; }
  .logo-busy-dot {
    width: 3px;
    height: 3px;
    margin-left: -1.5px;
    margin-top: -1.5px;
  }
  .logo { width: 48px; height: 48px; border-radius: 12px; }
  .logo-wrap { --logo-size: 48px; }
  .logo-run { border-radius: 12px; }
  .header-app-name { font-size: 1.2rem; }
  .header-tagline { font-size: 0.78rem; }
  .header-page { font-size: 0.88rem; }
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 8px 0 16px;
  color: var(--text-main);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 18px 0 10px;
  color: var(--text-main);
}

.content {
  flex: 1 1 0;
  padding: 16px;
  width: 100%;
  max-width: 520px;
  margin: 12px auto 32px;
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/*
  Карточка на всю высоту экрана: скролл сверху, кнопка «Назад/На главную» всегда внизу.
  Важно: flex-basis: 0 (+ height:0 у экрана) — иначе на Android/WebView свободная
  высота не передаётся внутрь и кнопка «липнет» к контенту с пустотой снизу.
  padding-right: 0 — чтобы тонкий скроллбар шёл по правой кромке карточки.
*/
.screen.active > .content--dock {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 16px 0 12px 16px;
  overflow: hidden;
}

.content-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 10px;
}

.content-dock {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 12px;
  padding-right: 16px;
}

/* Тонкий современный скроллбар (карточки экранов + модалки) */
.content,
.content-scroll,
.modal-content,
.modal-content--profile-edit-scroll,
.modal-content--notifications,
.modal-content--piggy,
.notification-list-modal,
.legal-inapp-panel,
#executorTrainingModal.executor-training-modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.content::-webkit-scrollbar,
.content-scroll::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.modal-content--profile-edit-scroll::-webkit-scrollbar,
.modal-content--notifications::-webkit-scrollbar,
.modal-content--piggy::-webkit-scrollbar,
.notification-list-modal::-webkit-scrollbar,
.legal-inapp-panel::-webkit-scrollbar,
#executorTrainingModal.executor-training-modal::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.content::-webkit-scrollbar-track,
.content-scroll::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.modal-content--profile-edit-scroll::-webkit-scrollbar-track,
.modal-content--notifications::-webkit-scrollbar-track,
.modal-content--piggy::-webkit-scrollbar-track,
.notification-list-modal::-webkit-scrollbar-track,
.legal-inapp-panel::-webkit-scrollbar-track,
#executorTrainingModal.executor-training-modal::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb,
.content-scroll::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.modal-content--profile-edit-scroll::-webkit-scrollbar-thumb,
.modal-content--notifications::-webkit-scrollbar-thumb,
.modal-content--piggy::-webkit-scrollbar-thumb,
.notification-list-modal::-webkit-scrollbar-thumb,
.legal-inapp-panel::-webkit-scrollbar-thumb,
#executorTrainingModal.executor-training-modal::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.content::-webkit-scrollbar-thumb:hover,
.content-scroll::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.modal-content--profile-edit-scroll::-webkit-scrollbar-thumb:hover,
.modal-content--notifications::-webkit-scrollbar-thumb:hover,
.modal-content--piggy::-webkit-scrollbar-thumb:hover,
.notification-list-modal::-webkit-scrollbar-thumb:hover,
.legal-inapp-panel::-webkit-scrollbar-thumb:hover,
#executorTrainingModal.executor-training-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.75);
}

.modal-content--profile-edit-scroll::-webkit-scrollbar {
  width: 5px;
}

.modal-content--profile-edit-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
}

.content-dock > .btn-big,
.content-dock > .btn-back {
  margin-top: 0;
  margin-bottom: 0;
}

.content-dock > .btn-big + .btn-back,
.content-dock > .btn-back + .btn-big,
.content-dock > .btn-back + .btn-back {
  margin-top: 10px;
}

.content--main {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  padding: 20px 16px 0;
  overflow: hidden;
}

.main-cta-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0 20px;
  min-height: 200px;
}

.main-cta-hint {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 28px;
  max-width: 320px;
  line-height: 1.45;
}

.btn-big--hero {
  min-height: 104px;
  padding: 28px 28px;
  font-size: 1.08rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  max-width: 320px;
  width: 100%;
}

.btn-big--hero:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.3);
}

.main-footer-row {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.main-footer-sep {
  color: var(--border);
  font-weight: 300;
  user-select: none;
}

.main-footer-row .footer-link {
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Экран «Войти»: блок прижат к низу, крупные элементы для старшего поколения */
#loginScreen .content--login {
  margin-top: auto;
  margin-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-top: 24px;
  padding-bottom: 0;
}

.content--login input {
  font-size: 1.125rem;
  min-height: 52px;
  padding: 14px 16px;
  margin: 10px 0;
}

.content--login .btn-big--large {
  min-height: 56px;
  font-size: 1.15rem;
  padding: 16px 20px;
  margin: 16px 0 8px;
}

.content--login .auth-note--large {
  font-size: 1.05rem;
  margin-top: 14px;
}

.content--login .auth-link {
  font-size: 1.05rem;
}

.content--login .btn-back--large {
  min-height: 52px;
  font-size: 1.05rem;
  padding: 14px 20px;
}

/* Экран «Восстановление пароля»: прижат к низу, крупные элементы */
#resetPasswordScreen .content--reset {
  margin-top: auto;
  margin-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-top: 24px;
  padding-bottom: 0;
}

.content--reset input {
  font-size: 1.1rem;
  min-height: 50px;
  padding: 12px 16px;
  margin: 10px 0;
}

.content--reset .btn-big--large {
  min-height: 54px;
  font-size: 1.1rem;
  padding: 14px 20px;
  margin-top: 16px;
}

.content--reset .btn-back--large {
  min-height: 50px;
  font-size: 1.05rem;
  padding: 12px 20px;
}

.reset-hint {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.order-price-hint {
  font-size: 0.9rem;
  color: var(--text-muted, #6b7280);
  margin: 8px 0 16px;
}

.offer-notice {
  font-size: 0.9rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 16px;
}
.offer-notice a {
  color: var(--primary, #22c55e);
  text-decoration: underline;
}

/* ---------- Страница «О нас» ---------- */

/*
 * Карточки того же вида, что и остальной интерфейс: белое поле, скругление 14, тонкая
 * рамка, шапка с иконкой и коротким пояснением. Раньше это была страница сплошного текста
 * с мелкими ссылками в подвале — на телефоне в неё никто не всматривался.
 */
.about-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 13px;
  margin-top: 11px;
}

.about-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #ecfdf5;
  color: #15803d;
}

.about-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* У кнопки «смотреть» заливка сплошная: это единственная иконка-действие на странице. */
.about-card:first-child .about-icon svg {
  fill: currentColor;
  stroke: none;
}

.about-video {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #0f172a;
}

/* Две стороны сервиса рядом: заказчику и исполнителю нужны разные ответы. */
.about-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.about-link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.about-link-card b {
  font-size: 0.94rem;
  color: #111827;
}

.about-link-card span:not(.about-link-icon) {
  font-size: 0.78rem;
  line-height: 1.3;
  color: #6b7280;
}

.about-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
}

.about-link-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/*
 * Связаться можно, но это не то, ради чего открывают страницу. Поэтому спокойные серые
 * ссылки в строку, а не кнопки во всю ширину: широкая зелёная кнопка притягивает взгляд
 * сильнее видео и материалов, ради которых сюда и заходят.
 *
 * Высота строки оставлена «пальцевой» — мелкий текст всё равно нужно попадать пальцем.
 */
.about-quiet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 2px;
}

.about-quiet-link {
  padding: 7px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.84rem;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.about-quiet-link:active {
  color: #374151;
}

.about-quiet-link--phone {
  color: #15803d;
}

.about-quiet-sep {
  color: #d1d5db;
  font-size: 0.84rem;
}

.about-note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #6b7280;
}

.about-note--error {
  color: #b91c1c;
}

/* Строка-ссылка: то же поведение, что у строк в профиле. */
.about-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.about-row-chevron {
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
}

.about-legal {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #9ca3af;
}

.about-executor-promo-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.about-executor-promo-list li {
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #eef0f3;
  border-radius: 11px;
}

.about-executor-promo-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #15803d;
  text-decoration: none;
}

.about-executor-promo-desc {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b7280;
}

.screen { display: none; }
.screen.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  /* height:0 + flex:1 — классический трюк: экран занимает оставшуюся высоту под шапкой */
  height: 0;
  min-height: 0;
  overflow: hidden;
}

.btn-big,
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  margin: 8px 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-big:active,
.btn-back:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.btn-big { background: var(--primary); }
.btn-big:hover { background: var(--primary-hover); }

.btn-big.red { background: var(--danger); }
.btn-big.red:hover { background: #d9363e; }

.btn-back { background: #111827; }
.btn-back:hover { background: #020617; }


/*
 * Выключенная кнопка остаётся кнопкой.
 *
 * Здесь к правилу ссылок были приклеены `:disabled` кнопки — и «Продолжить», пока не введена
 * сумма, выглядела синей подчёркнутой ссылкой, а после ввода превращалась в зелёную кнопку.
 * Похоже на склейку при давней правке: у ссылок и у выключенных кнопок нет ничего общего.
 */
.btn-big:disabled,
.btn-back:disabled {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.link-button,
.footer-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.95rem;
  color: var(--accent-blue);
  text-decoration: underline;
  cursor: pointer;
  display: inline-block;
}

.link-button:hover,
.footer-link:hover {
  color: var(--accent-blue-hover);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-blue);
  flex: 0 0 auto;
}

.consent-check-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Вход: «Запомнить меня» — компактная строка (Android/Desktop иначе раздувают tap-target) */
.login-remember-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: middle;
}
.login-remember-row:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 6px;
}
.login-remember-row input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--accent-blue);
  vertical-align: middle;
  align-self: center;
}
.login-remember-text {
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
}

.executor-selfie-picker {
  width: 100%;
  min-height: 156px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.executor-selfie-picker:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.executor-selfie-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.executor-selfie-placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
}

.executor-selfie-placeholder-text {
  font-size: 0.95rem;
  font-weight: 600;
}

.executor-selfie-image {
  width: 100%;
  max-height: 220px;
  border-radius: calc(var(--radius-lg) - 2px);
  object-fit: cover;
  display: block;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}


.auth-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.auth-link {
  color: var(--accent-blue);
  text-decoration: underline;
  cursor: pointer;
}

.auth-link:hover { color: var(--accent-blue-hover); }

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  /**
   * Шрифт наследуется от страницы. Без этого браузер ставит свой: у textarea это
   * моноширинный, и поле выбранного дома выбивалось из остального интерфейса.
   */
  font-family: inherit;
  font-size: 0.96rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 8px 0;
  background: #ffffff;
  text-align: left;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

input::placeholder,
textarea::placeholder { color: var(--text-muted); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

textarea { resize: vertical; }

.total {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 12px 0 4px;
}

.total span {
  color: var(--primary);
  font-weight: 600;
}

.order-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 10px 8px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-size: 0.93rem;
  position: relative;
}

.order-item.taken { border-color: #bae6fd; background: #eff6ff; }
.order-item.completed { border-color: #bbf7d0; background: var(--success-bg); }

.applicant-card {
  padding: 14px;
}

.applicant-card-layout {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.applicant-card-main {
  flex: 0 0 66.666%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.applicant-card-side {
  flex: 0 0 33.333%;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.applicant-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 10px;
  word-break: break-word;
}

.applicant-card-phone {
  font-weight: 500;
  color: #4b5563;
}

.applicant-card-address {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 12px;
  word-break: break-word;
}

.applicant-card-actions {
  margin-top: auto;
}

.applicant-card-photo {
  width: 100%;
  min-height: 150px;
  max-height: 190px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}

.applicant-card-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.order-item-meta {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 6px;
}

/* Отсчёт «успеть за 30 минут» в карточке заказа (исполнитель). Без сумм. */
.order-speed-line {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.order-speed-timer {
  font-variant-numeric: tabular-nums;
}

/* Заказ завершён локально, но не отправлен: сколько осталось дойти до интернета. */
.order-offline-line {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 6px;
}

.order-offline-timer {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-offline-line--urgent {
  color: #991b1b;
  background: #fee2e2;
}

.order-offline-line--lost {
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 500;
}

/* Заявки на зачёт заказов, завершённых без связи (админка). */
.offline-claim-card--pending {
  border-left: 3px solid #f59e0b;
}

.offline-claim-who {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.offline-claim-phone {
  color: #6b7280;
}

.offline-claim-block {
  font-size: 0.85rem;
  line-height: 1.45;
  background: #f9fafb;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

/* Данные с телефона исполнителя отделяем визуально: их подтверждает только он. */
.offline-claim-block--claimed {
  background: #fffbeb;
}

.offline-claim-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 3px;
}

.offline-claim-suggest {
  font-size: 0.88rem;
  font-weight: 600;
  color: #15803d;
  margin: 8px 0 4px;
}

/* Возврат с оплаты в браузер, а не в установленное приложение. */
.payment-done-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.payment-done-box {
  max-width: 24rem;
  text-align: center;
}

.payment-done-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 2rem;
  line-height: 64px;
  font-weight: 700;
}

.payment-done-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #111827;
}

.payment-done-sum {
  font-size: 1.05rem;
  font-weight: 600;
  color: #15803d;
  margin: 0 0 14px;
}

.payment-done-text {
  font-size: 0.95rem;
  color: #374151;
  margin: 0 0 12px;
  line-height: 1.5;
}

.payment-done-hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 22px;
  line-height: 1.45;
}

.payment-done-btn {
  display: inline-block;
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
}

.payment-done-btn:active {
  background: #15803d;
}

/* ============================================================
   Заказ в один клик в кабинете
   ============================================================ */
.quick-order {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  /* Компактнее прежнего: одну строку удалось убрать, объединив шаг и кнопку заказа. */
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quick-order-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.quick-order-head b {
  font-size: 1.1rem;
  font-weight: 700;
  color: #14532d;
}

.quick-order-sum {
  font-size: 1rem;
  font-weight: 600;
  color: #14532d;
  font-variant-numeric: tabular-nums;
}

/**
 * «−», «Заказать», «+» в одну строку.
 *
 * Раньше шаг и кнопка были двумя строками, и карточка выходила выше блока смены.
 * Кнопки шага 48 px в высоту — это выше минимума для пальца, так что компактность
 * не мешает попадать.
 */
.quick-order-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.quick-order-step {
  width: 48px;
  min-height: 48px;
  flex: none;
  border-radius: 12px;
  border: 1px solid #86efac;
  background: #fff;
  color: #15803d;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.quick-order-step:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Счёт мешков теперь в шапке, рядом с суммой. */
.quick-order-count {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 600;
  color: #15803d;
  white-space: nowrap;
}

.quick-order-btn {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
}

.quick-order-addr {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #4b5563;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
}

.quick-order-addr > span {
  min-width: 0;
}

.quick-order-addr svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: #15803d;
}

.quick-order-note {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1.4;
}

/* Версия сборки в профиле: чтобы «обновилось или нет» не выяснять на глаз. */
.app-version-line {
  margin: 14px 0 0;
  font-size: 0.76rem;
  color: #9ca3af;
}

/* Кнопки блока смены пароля: раньше наследовались от модального окна. */
.profile-password-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.profile-password-actions .btn-big,
.profile-password-actions .btn-back {
  margin: 0;
}

/* Список адресов внутри настроек профиля. */
.profile-addr-block {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.profile-addr-block .addr-item {
  margin-bottom: 6px;
}

/* Настройки профиля прямо во вкладке, без модального окна. */
.profile-settings {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 13px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-settings-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: #111827;
}

/* Кнопки внутри блока не должны наследовать отступы модалки. */
.profile-settings > .btn-big,
.profile-settings > .btn-back {
  margin: 0;
}

/* ============================================================
   Заказчику на экране заказа: есть ли кому прийти, и баланс
   ============================================================ */
.area-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 13px;
  margin-top: 11px;
}

.area-card-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 7px;
}

.area-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.area-row b {
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.area-row--warn {
  color: #92400e;
}

.area-row--warn b {
  color: #92400e;
}

.area-note {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
}

.balance-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 11px 13px;
  margin-top: 11px;
}

/**
 * Плашка баланса стоит первой и на «Заказе», и в «Профиле», поэтому свой отступ сверху
 * ей не нужен: расстояние до шапки задаёт отступ контейнера. Раньше складывались оба,
 * и сверху оставалась пустая полоса ни к чему.
 */
#cabinetContent .balance-strip {
  margin-top: 0;
}

/* ---------- Пополнение баланса прямо в приложении ---------- */

/*
 * Панель висит на полосе баланса и ложится поверх блоков ниже.
 *
 * Она абсолютная намеренно: раздвигать полосу баланса нельзя — вниз поедут заказ выноса
 * и смена, а человек в этот момент смотрит на кнопку, а не на них. Абсолютный элемент
 * места в потоке не занимает, поэтому под панелью всё остаётся на своих местах.
 */
.balance-strip {
  position: relative;
  z-index: 20;
}

/*
 * Точка отсчёта для панели оплаты на запасном якоре.
 *
 * Обычный якорь — полоса баланса. Если её на экране нет (роль без баланса), панель цепляется
 * к содержимому кабинета: главное, чтобы она не оказалась внутри пейджера, который режет
 * всё, что выходит за слайд.
 */
#cabinetContent {
  position: relative;
}

.topup-scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(15, 23, 42, 0.08);
  border: 0;
}

/*
 * Нижние вкладки остаются выше подложки и нажимаются как обычно.
 *
 * Иначе первый тап по «Истории» просто закрывал бы панель, и человек нажимал бы дважды на
 * то, что выглядит одной кнопкой. Сама панель при уходе на другую вкладку закрывается —
 * это делает setCabinetTab.
 */
.content-dock {
  position: relative;
  z-index: 40;
}

.topup-sheet {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
  padding: 14px 13px 12px;
  /* Виджет оплаты высокий: на маленьком экране прокручиваем внутри панели, а не страницу. */
  max-height: min(72vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: topup-sheet-in .18s ease;
}

@keyframes topup-sheet-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.topup-sheet[hidden],
.topup-scrim[hidden] { display: none; }

.topup-sheet-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: #9ca3af;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.topup-step { display: block; }
.topup-step[hidden] { display: none; }

.topup-step--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 0 6px;
  text-align: center;
}

.topup-sheet-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: #111827;
  padding-right: 26px;
}

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

.topup-chip {
  padding: 9px 4px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  color: #111827;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.topup-chip--on {
  border-color: #16a34a;
  background: #ecfdf5;
  color: #15803d;
}

.topup-sheet-input {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  /* Стрелки счётчика в поле суммы не нужны: сумму набирают с цифровой клавиатуры,
     а на узкой строке они только мешают и выглядят чужеродно. */
  -moz-appearance: textfield;
  appearance: textfield;
}

.topup-sheet-input::-webkit-outer-spin-button,
.topup-sheet-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Подсветка при наборе — зелёная, как у остальных полей приложения, а не синяя браузерная. */
.topup-sheet-input:focus {
  outline: none;
  border-color: var(--accent, #16a34a);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.topup-sheet-go {
  width: 100%;
  margin: 10px 0 0;
}

.topup-sheet-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b7280;
}

/*
 * На шаге оплаты панель выше.
 *
 * В форме Робокассы помещаются сумма, валюта, обязательная почта для чека, способы оплаты
 * и кнопка — в 560px это не влезало, и нижняя половина оставалась за краем. Панель занимает
 * почти весь экран, а прокрутка идёт внутри неё: страница под панелью не едет.
 */
.topup-sheet--pay {
  max-height: min(86vh, 760px);
}

/*
 * Коробка виджета: высота задана, а не минимальна — и это принципиально.
 *
 * Свой iframe Робокасса объявляет как height: 100%. Процент считается только от родителя
 * с заданной высотой; при одной min-height он не считается вовсе, и iframe падает в
 * браузерное значение по умолчанию — 150 пикселей. На экране это выглядело так: виджет
 * полоской сверху, под ним пустое белое место, а форму приходилось прокручивать внутри
 * полоски. Ширины виджету нужно не меньше 320px, иначе он не подстраивается.
 */
.topup-widget {
  /*
   * Высота считается от экрана: над панелью шапка и полоса баланса, под ней нижние
   * вкладки, а внутри самой панели заголовок, подпись и запасная ссылка. Вычитаем всё
   * это — тогда панель встаёт ровно между балансом и вкладками и никуда не заезжает.
   * Растянуть коробку флексом нельзя: у флекс-элемента высота не считается «заданной»,
   * и процент внутри iframe снова схлопнется в те же 150 пикселей.
   */
  height: min(520px, calc(100vh - 365px));
  min-height: 280px;
  margin-top: 10px;
}

.topup-widget iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/*
 * Оплата поддержки внутри окна копилки.
 *
 * Окно уже модальное, и панель внутри него была бы окном в окне. Поэтому содержимое окна
 * подменяется формой оплаты. Высота виджета считается от экрана, но с меньшим запасом:
 * у окна есть свои поля и крестик.
 */
.piggy-pay {
  padding: 2px 0 0;
}

.piggy-pay .topup-widget {
  height: min(500px, calc(100vh - 300px));
}

.piggy-pay--done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 0 10px;
  text-align: center;
}

.topup-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e5e7eb;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: topup-spin .9s linear infinite;
}

@keyframes topup-spin {
  to { transform: rotate(360deg); }
}

.topup-done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 22px;
  font-weight: 800;
}

.topup-fallback {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border: 0;
  border-top: 1px solid #eef0f3;
  background: none;
  color: #4b5563;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .topup-sheet { animation: none; }
  .topup-spinner { animation-duration: 2.4s; }
}

.balance-strip-sum {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

/* Справа в плашке профиля: копилка и «Пополнить». Копилка переехала сюда из строки
   «Мой баланс» — её иконка «+» вела туда же, куда эта кнопка. */
.balance-strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.balance-strip-actions .piggy-icon-btn {
  flex: none;
}

.balance-strip-sum span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

.balance-strip-sum b {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.balance-strip-btn {
  margin: 0;
  flex: none;
  width: auto;
  padding: 9px 16px;
  font-size: 0.92rem;
}

/* ============================================================
   Смена исполнителя
   ============================================================ */

/**
 * Смена и итоги дня в одной рамке.
 *
 * Раньше слайд состоял из трёх отдельных коробочек на сером фоне и выглядел пустым:
 * переключатель, а под ним две плитки, ничем не связанные. Одна карточка держит их вместе.
 */
.shift-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}

.shift-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Внутри общей рамки своя не нужна. */
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
}

.shift-toggle {
  width: 50px;
  height: 29px;
  flex: none;
  border: none;
  border-radius: 15px;
  background: #e5e7eb;
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease;
}

.shift-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: left 0.18s ease;
}

.shift-toggle--on {
  background: #16a34a;
}

.shift-toggle--on .shift-toggle-knob {
  left: 24px;
}

.shift-toggle:disabled {
  opacity: 0.6;
  cursor: default;
}

.shift-toggle:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

.shift-text {
  min-width: 0;
}

.shift-text b {
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  color: #111827;
}

.shift-text span {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .shift-toggle,
  .shift-toggle-knob {
    transition: none;
  }
}

/* Итог дня у исполнителя. Сумма одна, за отдельный заказ денег не показываем. */
.day-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.day-stat {
  background: #f9fafb;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Итоги дня внутри общей рамки отделены линией, а не воздухом. */
.shift-panel .day-stats {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.day-stat b {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.day-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-stat--streak {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.day-stat--streak b {
  color: #15803d;
}


/* ============================================================
   Оценка заказа: три варианта вместо пяти звёзд
   ============================================================ */
.review-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  margin: 8px 0 6px;
}

.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 9px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
}

.review-chip--on {
  border-color: #16a34a;
  background: #dcfce7;
  color: #15803d;
}

.review-chip--bad {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

/* Сводка жалоб по исполнителю в карточке админа. */
.issue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.issue-tag {
  font-size: 0.76rem;
  font-weight: 600;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 7px;
  padding: 3px 8px;
}

/* ============================================================
   Сохранённые адреса
   ============================================================ */
.addr-hint {
  font-size: 0.86rem;
  color: #6b7280;
  line-height: 1.45;
  margin: 0 0 12px;
}

.addr-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 14px 0 6px;
}

.addr-item {
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  padding: 4px 10px 8px;
  margin-bottom: 8px;
  background: #fff;
}

.addr-item--on {
  border-color: #16a34a;
  background: #f0fdf4;
}

.addr-item-main {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  padding: 8px 0 4px;
  cursor: pointer;
}

.addr-radio {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  position: relative;
}

.addr-item--on .addr-radio {
  border-color: #16a34a;
}

.addr-item--on .addr-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #16a34a;
}

.addr-item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.addr-item-text b {
  font-size: 0.95rem;
  font-weight: 650;
  color: #111827;
}

.addr-item-text span {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.35;
}

.addr-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #15803d;
  background: #dcfce7;
  border-radius: 6px;
  padding: 2px 6px;
  vertical-align: middle;
}

.addr-item-actions {
  display: flex;
  gap: 14px;
  padding-left: 28px;
}

.addr-item-actions .btn-link-inline {
  font-size: 0.82rem;
}

.addr-del {
  color: #b91c1c;
}

.addr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.addr-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 9px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
}

.addr-chip--on {
  border-color: #16a34a;
  background: #dcfce7;
  color: #15803d;
}

/* Короткий вход панели, чтобы переключение читалось как смена экрана. */
.cab-pane-enter > [data-exec-pane]:not([data-cab-hidden]) {
  animation: cab-pane-in 0.18s ease-out;
}

@keyframes cab-pane-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cab-pane-enter > [data-exec-pane]:not([data-cab-hidden]) {
    animation: none;
  }
}

/* ============================================================
   Вкладки кабинета
   ============================================================ */

/* Слой вкладок поверх обычной логики видимости: renderCabinet управляет style.display
   у части блоков, поэтому скрытие вкладкой должно перебивать инлайновый стиль. */
#cabinetContent [data-cab-hidden="1"] {
  display: none !important;
}

/* Вкладки живут в .content-dock, который прижат к низу через margin-top:auto.
   Линия сверху нужна, чтобы прокручиваемый контент не упирался в них без границы. */
.cab-tabs {
  display: grid;
  /* число колонок ставит JS: у ролей разное количество вкладок */
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  border-top: 1px solid #e5e7eb;
  padding-top: 6px;
}

.cab-tab {
  position: relative;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  padding: 6px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 10px;
  min-width: 0;
}

/* У админа пять вкладок: подпись не должна переноситься на вторую строку. */
.cab-tab > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cab-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cab-tab.is-active {
  color: #16a34a;
  background: #f0fdf4;
}

.cab-tab:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

.cab-tab-icon {
  position: relative;
  display: block;
  line-height: 0;
}

.cab-tab-badge {
  position: absolute;
  top: -4px;
  left: 100%;
  margin-left: -8px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  line-height: 17px;
  font-weight: 700;
  text-align: center;
  padding: 0 4px;
}

/* ============================================================
   Таймлайн заказа у заказчика
   ============================================================ */
.order-track {
  display: flex;
  flex-direction: column;
  margin: 8px 0 4px;
}

.order-track-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}

.order-track-dot {
  position: relative;
  display: flex;
  justify-content: center;
}

.order-track-dot i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
  margin-top: 5px;
  z-index: 1;
}

.order-track-dot::after {
  content: "";
  position: absolute;
  top: 13px;
  bottom: -4px;
  width: 2px;
  background: #e5e7eb;
}

.order-track-step:last-child .order-track-dot::after {
  display: none;
}

.order-track-step--done .order-track-dot i,
.order-track-step--now .order-track-dot i {
  background: #16a34a;
}

.order-track-step--done .order-track-dot::after {
  background: #16a34a;
}

.order-track-step--now .order-track-dot i {
  box-shadow: 0 0 0 4px #dcfce7;
}

.order-track-txt {
  padding-bottom: 12px;
}

.order-track-txt b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.order-track-txt span {
  font-size: 0.78rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.order-track-step--wait .order-track-txt b {
  color: #9ca3af;
  font-weight: 500;
}

/* ============================================================
   Осмысленный пустой экран вместо заголовка над пустотой
   ============================================================ */
.cab-empty {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cab-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Логотип уже загружен шапкой на каждой странице, поэтому в пустом экране
   он не стоит ни одного лишнего байта — в отличие от кадра спрайта. */
.cab-empty-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.cab-empty b {
  font-size: 1rem;
  font-weight: 650;
  color: #111827;
}

.cab-empty p {
  margin: 0;
  font-size: 0.87rem;
  color: #6b7280;
  line-height: 1.45;
}

.btn-link-inline {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #16a34a;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 640px) {
  .applicant-card-layout {
    flex-direction: row;
    gap: 12px;
  }

  .applicant-card-main {
    flex-basis: 62%;
  }

  .applicant-card-side {
    flex-basis: 38%;
  }

  .applicant-card-photo {
    min-height: 122px;
    max-height: 150px;
  }
}

.withdraw-section-badge {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
  white-space: normal;
}

.withdraw-request-card {
  padding: 12px 14px;
}

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

.withdraw-request-head--clickable {
  cursor: pointer;
}

.withdraw-request-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
}

.withdraw-request-phone {
  font-weight: 500;
  color: #4b5563;
}

.withdraw-request-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.withdraw-request-arrow {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.95rem;
}

.withdraw-request-body {
  margin-top: 12px;
}

.withdraw-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  font-size: 0.92rem;
  color: var(--text-main);
}

.withdraw-request-grid > div {
  min-width: 0;
  word-break: break-word;
}

.withdraw-request-grid-span {
  grid-column: 1 / -1;
}

.withdraw-request-admin-comment {
  background: rgba(239, 68, 68, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}

.withdraw-request-stats {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  font-size: 0.9rem;
}

.withdraw-request-actions {
  margin-top: 12px;
}

.withdraw-request-card--pending {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(34, 197, 94, 0.05);
}

.withdraw-request-card--processed {
  background: #fff;
}

@media (max-width: 640px) {
  .withdraw-request-head {
    flex-direction: column;
    align-items: stretch;
  }

  .withdraw-request-summary {
    white-space: normal;
  }

  .withdraw-request-grid,
  .withdraw-request-stats {
    grid-template-columns: 1fr;
  }
}

.order-item-compact {
  padding: 6px 10px 6px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}
.order-item-compact .order-item-head {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}
.order-time-hint {
  font-weight: 400;
  font-size: 0.8em;
  color: var(--text-muted);
}
.order-item-compact .order-item-body {
  line-height: 1.25;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-item-compact .btn-group {
  margin-top: 6px;
}
.order-item-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 2px;
}

.review-block.archive-review {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.archive-mod-parties {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
}
.archive-mod-dot {
  opacity: 0.6;
}
.archive-phone-muted {
  font-weight: 400;
  opacity: 0.9;
}
.archive-mod-ratings {
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
}
.archive-mod-ratings-inline {
  display: block;
  white-space: normal;
  word-break: break-word;
}
.archive-mod-ratings-inline .archive-rating-bar {
  opacity: 0.55;
  font-weight: 400;
}
.archive-mod-ratings-inline .archive-rating-label {
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}
.archive-rating-compact-line {
  margin: 0;
  padding: 0;
}
.archive-rating-compact-line + .archive-rating-compact-line {
  margin-top: 1px;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-group button {
  flex: 1;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}

.star-row {
  display: inline-flex;
  gap: 2px;
  margin-top: 4px;
}

.star {
  cursor: pointer;
  font-size: 1.1rem;
  color: #d1d5db;
  user-select: none;
}

.star.active { color: #fbbf24; }

.review-block { margin-top: 6px; font-size: 0.9rem; }

.review-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin-top: 4px;
}

.review-row textarea { margin: 0; flex: 1; }

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: #16a34a;
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.4);
  cursor: pointer;
}

.send-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.5);
}

/* Блок уведомлений в модалке — в стиле системы */
/**
 * Список уведомлений теперь во вкладке «История», а не в модальном окне: своя прокрутка
 * и ограничение высоты ему больше не нужны — прокручивается вся вкладка.
 */
.notification-list-modal {
  margin: 12px 0 0;
}

.notification-list-empty {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  padding: 24px 16px;
}

.notification {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px 36px 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  position: relative;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.notification:last-child { margin-bottom: 0; }

.notification.success { border-left-color: var(--success); background: var(--success-bg); }
.notification.warning { border-left-color: var(--warning); background: var(--warning-bg); }
.notification.danger  { border-left-color: var(--danger);  background: var(--danger-bg); }
.notification.info    { border-left-color: var(--primary);  background: rgba(22, 163, 74, 0.06); }

.notification.notification--users {
  border-left-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.notification.notification--applicants {
  border-left-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
}

.notification.notification--order-new {
  border-left-color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

.notification.notification--order-moderation {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
}

.notification.notification--billing {
  border-left-color: #14b8a6;
  background: rgba(20, 184, 166, 0.08);
}

.notification.notification--action {
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.12), var(--shadow-sm);
}

.cabinet-target-highlight {
  animation: cabinet-target-pulse 2.2s ease;
  outline: 2px solid rgba(22, 163, 74, 0.55);
  outline-offset: 2px;
}

@keyframes cabinet-target-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  40% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.notification.unread {
  border-left-width: 4px;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2), var(--shadow-sm);
  font-weight: 500;
}
.notification.unread.info { border-left-color: var(--primary); }

.notification-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background 0.15s ease;
}

.notification-close:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.admin-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 10px;
}

.admin-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.admin-map-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.admin-map-dot--executor {
  background: #16a34a;
}

.admin-map-dot--customer {
  background: #ef4444;
}

.admin-map-dot--uncovered {
  background: #7c3aed;
}

.admin-map-dot--coverage {
  background: rgba(22, 163, 74, 0.22);
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.banned-message {
  background: var(--danger-bg);
  color: #b91c1c;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin: 4px 0 16px;
  font-size: 0.94rem;
  border: 1px solid rgba(248, 113, 113, 0.6);
}

.first-login-hint {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.first-login-hint-text {
  margin: 0 0 12px;
  color: #166534;
  line-height: 1.45;
}
.first-login-hint .btn-big {
  background: #16a34a;
}
.first-login-hint .btn-big:hover {
  background: #15803d;
}

.photo-preview {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.cabinet-profile {
  margin-top: 4px;
  margin-bottom: 4px;
  /* 3 иконки 36px + 2 промежутка 6px = ширина аватарки */
  --cabinet-action-size: 36px;
  --cabinet-action-gap: 6px;
  --cabinet-avatar-size: calc(
    (3 * var(--cabinet-action-size)) + (2 * var(--cabinet-action-gap))
  );
}

.profile-info {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-info-main {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.profile-name {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.profile-line {
  margin-bottom: 4px;
  line-height: 1.35;
}

.profile-line--meta {
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.profile-bind-phone-btn {
  margin-left: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #16a34a);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.profile-line:last-child {
  margin-bottom: 0;
}

.profile-email-hint {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 6px 0 0;
  line-height: 1.35;
  white-space: normal;
}

/* Незаполненная почта: видно, что значения нет, но строка не кричит. */
.profile-value--empty {
  color: #9ca3af;
}

/* Правка имени и почты на месте: поля встают ровно туда, где были строки. */
.profile-inline-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  margin: 0 0 6px;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: #fff;
  color: inherit;
}
.profile-inline-input--name {
  font-size: 1.15rem;
  font-weight: 700;
}
.profile-inline-input:focus {
  outline: none;
  border-color: var(--accent, #16a34a);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}
.profile-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.profile-inline-actions .profile-inline-save {
  margin: 0;
  width: auto;
  flex: 1 1 auto;
  min-width: 96px;
  padding: 9px 14px;
  font-size: 0.92rem;
}
/* «Отмена» — текстовая ссылка, а не вторая кнопка: рядом с аватаром колонка узкая,
   и две полноценные кнопки в неё не встают. */
.profile-inline-cancel {
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: #6b7280;
  text-decoration: underline;
  cursor: pointer;
}
.profile-inline-cancel:hover {
  color: #374151;
}

/* Обёртка аватара — контейнер для двух кнопок: фото и карандаш.
   Раньше это была одна кнопка, но действий стало два, и они разные. */
.profile-avatar-wrap {
  position: relative;
  display: block;
  width: var(--cabinet-avatar-size, 120px);
  height: var(--cabinet-avatar-size, 120px);
  flex-shrink: 0;
}
.profile-avatar-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.profile-avatar-btn:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.28);
  outline-offset: 2px;
  border-radius: calc(var(--radius-md) + 2px);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-gear {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  /* Карандаш — самостоятельная кнопка: правит имя и почту, а фото меняется по самому фото. */
  padding: 0;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.profile-avatar-gear:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.35);
  outline-offset: 2px;
}
.profile-avatar-gear-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
/* Подсветку по наведению на фото убрали: фото и карандаш — разные действия,
   и анимация карандаша при наведении на фото сбивала с толку. */
.profile-avatar-gear:hover {
  transform: scale(1.08);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.12),
    0 0 0 4px rgba(34, 197, 94, 0.15);
}
.profile-avatar-gear:active {
  transform: scale(0.96);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}

/* Модалка профиля пользователя (админ): без горизонтальной прокрутки */
.modal-content--profile {
  padding: 20px 20px 20px;
}
.modal-content--profile h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-right: 28px;
}
.modal-content--profile .profile-info {
  display: block;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.45;
}
.admin-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 12px 0 8px;
}
.admin-profile-avatar {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  font-size: 1.6rem;
}
.profile-info--primary {
  flex: 1 1 auto;
  min-width: 0;
}
.profile-info--secondary {
  margin: 0 0 4px;
  width: 100%;
}
.modal-content--profile .profile-info strong {
  display: inline;
}
.profile-balance-add-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 6px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: #16a34a;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.profile-balance-add-btn:hover {
  background: #15803d;
}
.profile-balance-add-btn:active {
  transform: scale(0.96);
}
.modal-content--profile .btn-group {
  flex-wrap: wrap;
}
.modal-content--profile .btn-group button {
  min-width: 0;
}
.modal-content--profile #profileOrdersHeading {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.modal-content--profile .profile-orders {
  min-width: 0;
  overflow-wrap: break-word;
}
@media (max-width: 520px) {
  .admin-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }
  .admin-profile-avatar {
    width: 96px;
    height: 96px;
  }
  .admin-profile-header .profile-info {
    width: 100%;
  }
  .profile-info--secondary {
    margin-top: 4px;
  }
}

.profile-orders .order-item {
  margin-bottom: 8px;
  padding: 10px 10px 8px;
}

.edit-avatar-picker {
  width: 172px;
  height: 172px;
  margin: 0 auto 12px;
  border-radius: 16px;
  border: 3px solid rgba(22, 163, 74, 0.16);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  position: relative;
}

.edit-avatar-picker:hover {
  border-color: rgba(22, 163, 74, 0.34);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.edit-avatar-picker:active {
  transform: scale(0.985);
}

.edit-avatar-picker:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.22);
  outline-offset: 3px;
}

.edit-avatar-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-avatar-picker-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4b5563;
  text-align: center;
  padding: 16px;
}

.edit-avatar-picker-placeholder-icon {
  font-size: 3rem;
  line-height: 1;
}

.edit-avatar-picker-placeholder-text {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.profile-password-box {
  margin: 2px 0 8px;
}

.profile-password-section {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.btn-back--small {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.modal-actions--compact {
  margin-top: 4px;
}

.modal-actions--compact .btn-big,
.modal-actions--compact .btn-back {
  margin-top: 8px;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 12px 0 20px;
  background: #f9fafb;
  text-align: center;
  padding: 8px;
}

.about-video {
  width: 100%;
  border-radius: 12px;
  margin: 12px 0 20px;
  border: 1px solid var(--border);
  background: #000;
}

.contact-link {
  font-size: 0.9rem;
  color: var(--accent-blue);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
}

.contact-link:hover { color: var(--accent-blue-hover); }

/**
 * Оповещения — пузырь от логотипа в шапке.
 *
 * Раньше они висели по центру снизу и перекрывали кнопки: при выборе дома на карте прямо
 * кнопку «Готово». Теперь занимают пустое место шапки от логотипа до правого края и
 * выглядят как реплика бегущего мешка: два кружка-хвостика указывают на него.
 * Все сообщения сервиса оказались в одном месте, и это место ничего не закрывает.
 *
 * left, right и top подставляет showToast по самому логотипу: ширина шапки и вырезы
 * экрана у разных телефонов разные, числом их не угадать. Значения ниже — запас.
 */
.toast {
  position: fixed;
  top: 12px;
  left: 84px;
  right: 12px;
  background: #1e293b;
  color: #f9fafb;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: scale(0.96);
  transform-origin: left center;
  z-index: 4000;
  text-align: left;
}

/* Хвостик реплики: два кружка в сторону логотипа, меньший — ближе к нему. */
.toast::before,
.toast::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: #1e293b;
}
.toast::before {
  width: 11px;
  height: 11px;
  left: -9px;
  bottom: 9px;
}
.toast::after {
  width: 6px;
  height: 6px;
  left: -19px;
  bottom: 3px;
}

.toast.show {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.show {
    transition: opacity 0.18s ease;
    transform: none;
  }
}

.pull-to-refresh {
  position: fixed;
  left: 50%;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  z-index: 180;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.pull-to-refresh.is-visible {
  opacity: 1;
}

.pull-to-refresh-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(22, 163, 74, 0.24);
  border-top-color: var(--primary);
  transition: transform 0.18s ease;
}

.pull-to-refresh.is-armed .pull-to-refresh-spinner,
.pull-to-refresh.is-refreshing .pull-to-refresh-spinner {
  transform: rotate(180deg);
}

.pull-to-refresh.is-refreshing .pull-to-refresh-spinner {
  animation: pull-refresh-spin 0.75s linear infinite;
}

.pull-to-refresh-label {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

@keyframes pull-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#appAlertModal,
#appConfirmModal,
#appPromptModal,
#loginRequiredModal {
  z-index: 320;
}

#rulesModal {
  z-index: 330;
}

#executorFormModal {
  z-index: 220;
}

/* Выбор «галерея / камера» должен быть поверх анкеты (#executorFormModal = 220) */
#executorSelfieChoiceModal {
  z-index: 360;
}

/* Карта выбора адреса должна быть поверх анкеты исполнителя и прочих модалок */
#executorAddressMapModal,
#customerAddressMapModal {
  z-index: 410;
}

#executorTrainingModal.executor-training-modal {
  z-index: 340;
  align-items: flex-start;
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-content--executor-training {
  max-width: 520px;
  max-height: none;
  margin-top: auto;
  margin-bottom: auto;
  text-align: center;
}

.executor-training-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
  text-align: center;
}

.executor-training-lead-quote {
  display: inline-block;
}

.executor-training-video-wrap {
  width: min(100%, 360px);
  max-width: 92vw;
  margin: 0 auto 12px;
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 640px);
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.executor-training-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.executor-training-hint,
.executor-training-contact {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 10px;
  text-align: center;
}

.executor-training-contact a,
.executor-training-hint a {
  color: var(--accent-blue);
}

.executor-training-email {
  white-space: nowrap;
}

#executorTrainingUnderstandBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  max-width: 420px;
  width: calc(100% - 32px);
  max-height: 80vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

/* Форма запроса выплаты разворачивается в блоке «Мои выплаты», окна больше нет. */
.withdraw-form-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.withdraw-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.withdraw-form-actions .btn-big {
  margin: 0;
  flex: 1 1 150px;
}

.withdraw-form-inline .withdraw-field-label {
  display: block;
  font-size: 0.88rem;
  color: #4b5563;
  margin: 8px 0 4px;
}

.withdraw-card-input-wrap {
  position: relative;
  display: block;
  margin-bottom: 2px;
}

.withdraw-card-input-with-brand {
  width: 100%;
  box-sizing: border-box;
  padding-right: 56px;
}

.withdraw-card-brand-slot {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  min-width: 36px;
  max-width: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.withdraw-card-brand-slot:empty {
  display: none;
}

.withdraw-card-brand-slot .withdraw-brand-svg {
  display: block;
  max-height: 24px;
  width: auto;
  max-width: 50px;
}

.withdraw-card-hint {
  font-size: 0.82rem;
  color: #6b7280;
  min-height: 1.2em;
  margin: 4px 0 8px;
}

.withdraw-card-hint.withdraw-card-hint--warn {
  color: #b45309;
}

.withdraw-card-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.84rem;
  line-height: 1.3;
  color: #374151;
  margin: 4px 0 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.withdraw-card-confirm-input {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #2563eb;
}

.withdraw-card-confirm-text {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

/* Редактирование профиля: прокрутка контента, «Сохранить / Отмена» закреплены внизу */
.modal-content--profile-edit {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 720px);
  overflow: hidden;
  padding: 18px 0 0 18px;
}

.modal-content--profile-edit > h2 {
  flex-shrink: 0;
  margin-top: 0;
  padding-right: 36px;
}

.modal-content--profile-edit-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 12px;
  padding-bottom: 4px;
}

.profile-edit-email-input {
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 4px;
}

.profile-edit-email-hint {
  font-size: 0.7rem;
  color: #9ca3af;
  margin: 0 0 8px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.executor-form-privacy {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0 0 12px;
  line-height: 1.4;
}

.executor-form-map-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 8px;
  line-height: 1.35;
}
/* Действие в подсказке выделено: «нажмите» — то, что человеку надо сделать. */
.executor-form-map-hint b {
  color: #374151;
  font-weight: 700;
}

.profile-edit-field {
  margin: 4px 0;
}

.profile-edit-address-builder {
  margin: 4px 0;
  resize: none;
  min-height: 0;
  line-height: 1.4;
}

.profile-edit-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-edit-row > .profile-edit-field {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.profile-edit-phone-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 4px 0 8px;
  line-height: 1.35;
}

/* Новый заказ: те же плотные отступы и ряд подъезд/квартира, что в профиле */
#createOrderScreen .content-scroll {
  font-family: inherit;
}
#createOrderScreen .create-order-field,
#createOrderScreen .create-order-address-builder {
  font-family: inherit;
  margin: 4px 0;
}
#createOrderScreen .create-order-address-builder {
  resize: none;
  min-height: 0;
  line-height: 1.4;
}
#createOrderScreen .create-order-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
#createOrderScreen .create-order-row > .create-order-field {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}
#createOrderScreen .btn-map-address {
  margin-bottom: 8px;
}
#createOrderScreen .order-bags-block {
  margin: 8px 0 6px;
}
#createOrderScreen .order-price-hint,
#createOrderScreen .offer-notice {
  margin-top: 6px;
  margin-bottom: 6px;
  line-height: 1.35;
}
#createOrderScreen .btn-big {
  margin-top: 8px;
}

.btn-map-address {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 8px;
  padding-left: 14px;
  padding-right: 14px;
}

.btn-map-address-text {
  flex: 1 1 auto;
  text-align: center;
}

.btn-map-address-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #ffffff;
  display: block;
}

.profile-edit-logout-btn {
  width: 100%;
  margin: 8px 0 6px;
}

.modal-content--profile-edit-scroll .edit-avatar-picker {
  margin-bottom: 8px;
}

.modal-content--profile-edit-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
  margin: 0;
  padding: 12px 18px 14px 0;
  background: #fff;
  border-top: none;
  box-shadow: none;
}

.modal-content--profile-edit-footer .profile-edit-footer-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0;
  min-height: 40px;
  font-size: 0.9rem;
  padding: 8px 10px;
  box-sizing: border-box;
}

.close-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #9ca3af;
}

.close-modal:hover { color: var(--danger); }

.modal-content--notifications {
  padding: 20px 20px 20px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-content--notifications .modal-actions { margin-top: 16px; }

.notifications-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Правого отступа под крестик модалки больше не нужно — окна нет. */
  margin: 12px 0;
  min-height: 32px;
}
.push-header-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #374151;
}
.notifications-title {
  margin: 0;
  flex: 0 1 auto;
  font-size: 1.25rem;
  line-height: 1.2;
}
.push-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}
.push-header-status {
  font-size: 0.78rem;
  color: #9ca3af;
  white-space: nowrap;
  line-height: 1.2;
}
.push-header-status.is-on {
  color: #6b7280;
}

.ios-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ios-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.ios-switch-track {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background-color 0.2s ease;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.ios-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
  display: block;
  pointer-events: none;
}
.ios-switch input:checked + .ios-switch-track {
  background: #34c759;
}
.ios-switch input:checked + .ios-switch-track .ios-switch-thumb {
  transform: translateX(18px);
}
.ios-switch input:disabled + .ios-switch-track {
  opacity: 0.45;
}
.ios-switch input:focus-visible + .ios-switch-track {
  outline: 2px solid rgba(22, 163, 74, 0.45);
  outline-offset: 2px;
}

.push-prompt-block {
  margin: 0 0 16px;
  padding: 12px;
  background: #f0fdf4;
  border-radius: 10px;
  font-size: 0.9rem;
}
.push-prompt-block.is-hidden {
  display: none;
}
.push-prompt-text { margin: 0 0 10px; }
.push-prompt-block .btn-big {
  display: inline-block;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}
.push-status {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.modal-content--message { padding: 24px 20px 20px; }
.modal-message-text {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-main);
  text-align: center;
}
.modal-actions--single { justify-content: center; margin-top: 8px; }
.modal-actions--single .btn-big { max-width: 240px; }
.modal-actions--confirm { justify-content: center; gap: 12px; margin-top: 16px; flex-direction: column; }
.modal-actions--confirm .btn-big,
.modal-actions--confirm .btn-back { min-width: 120px; width: 100%; }

.modal-content--prompt { padding: 24px 20px 20px; }
.modal-content--prompt .modal-message-text { margin-bottom: 12px; text-align: left; white-space: pre-line; }

.modal-content--no-coverage { max-width: 420px; }
.modal-content--no-coverage .modal-message-text {
  margin-bottom: 14px;
  text-align: left;
  font-size: 1rem;
}
.no-coverage-flyer {
  margin: 0 0 8px;
  text-align: center;
}
.no-coverage-flyer-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}
.no-coverage-flyer-desc {
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6b7280;
}
.no-coverage-flyer-preview {
  display: block;
  margin: 0 auto 10px;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.no-coverage-flyer-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  background: #fff;
}
.no-coverage-flyer-download {
  display: inline-flex;
  width: auto;
  min-width: 160px;
  margin: 0 auto;
  text-decoration: none;
  justify-content: center;
}
.modal-prompt-input {
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  outline: none;
}
.modal-prompt-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
.modal-prompt-input::placeholder { color: var(--text-muted); }

.topup-card {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.topup-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.topup-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  outline: none;
}

.topup-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.topup-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.topup-preset {
  border: 1px solid rgba(22, 119, 255, 0.18);
  background: #fff;
  color: var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topup-preset:hover {
  background: rgba(22, 119, 255, 0.08);
  border-color: rgba(22, 119, 255, 0.32);
}

.topup-hint {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.chevron-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  color: #4b5563;
}

.chevron-btn:hover {
  background: #e5e7eb;
}

/**
 * Контейнер карты — явная высота, иначе карта не отрисовывается и тап не работает.
 * Значения согласованы с тем, что подставляет openCustomerAddressMap: было 70vh, стало
 * ниже, потому что окно опустилось под шапку и высокая карта вылезала за экран.
 */
.modal-content--map .map-container-fixed {
  width: 100%;
  height: 46vh;
  min-height: 240px;
  max-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .modal-content--map .map-container-fixed {
    min-height: 220px;
    height: 44vh;
  }
}

/* Лендинги z.html / i.html (буклеты) */
.landing-page-body {
  display: block;
  min-height: 100dvh;
  background: var(--bg-body);
}

.landing-header .header-tagline {
  display: none;
}

.landing-logo-link {
  text-decoration: none;
  color: inherit;
}

.landing-main {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
}

.landing-video-section {
  margin-bottom: 20px;
}

.landing-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 12px;
}

.landing-carousel-dot {
  width: 28px;
  height: 4px;
  border: none;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
}

.landing-carousel-dot.is-active {
  background: var(--primary);
}

.landing-carousel-frame {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-video-player-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.landing-video,
.landing-video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #000;
}

.landing-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: #111827;
}

.landing-carousel-nav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.landing-carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.landing-blog-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.landing-blog-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  text-align: center;
}

.landing-blog-viewport {
  flex: 1;
  min-width: 0;
  height: clamp(160px, 42vw, 220px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-blog-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.landing-blog-load-fail {
  margin: 0;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.landing-blog-load-fail[hidden],
.landing-blog-image[hidden] {
  display: none;
}

.landing-blog-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.landing-downloads-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.landing-downloads-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  text-align: center;
}

.landing-downloads-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.landing-downloads-empty[hidden] {
  display: none;
}

.landing-downloads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-downloads-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing-downloads-link::before {
  content: '↓';
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.landing-downloads-link:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.25);
}

.landing-actions {
  display: flex;
  justify-content: center;
}

.order-bags-block {
  margin: 12px 0 8px;
  padding: 14px 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #f9fafb;
}
.order-bags-block--confirm {
  margin: 0 0 4px;
  text-align: center;
}
.order-bags-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 14px;
}
.order-bags-block--confirm .order-bags-label {
  margin-bottom: 12px;
}

/* Слайдер выбора мешков 1–5 */
.bags-stepper {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 4px 6px 8px;
  touch-action: none;
  user-select: none;
  outline: none;
}
.bags-stepper-rail {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(4px + 1.15rem + 8px + 7px);
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  pointer-events: none;
  z-index: 0;
}
.bags-stepper-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.16s ease;
}
.bags-stepper-steps {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.bags-stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
}
.bags-stepper-num {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15rem;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}
.bags-stepper-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2.5px solid #9ca3af;
  background: #fff;
  box-shadow: 0 0 0 3px #f9fafb;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.bags-stepper-step.is-reached {
  color: var(--primary);
}
.bags-stepper-step.is-reached .bags-stepper-dot {
  border-color: var(--primary);
  background: var(--primary);
}
.bags-stepper-step.is-active {
  color: var(--primary);
}
.bags-stepper-step.is-active .bags-stepper-dot {
  transform: scale(1.28);
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px #f9fafb, 0 0 0 6px rgba(22, 163, 74, 0.18);
}
.bags-stepper-step:focus-visible .bags-stepper-dot {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}
.bags-stepper.is-dragging .bags-stepper-fill {
  transition: none;
}

.order-bags-summary {
  text-align: center;
  margin: 12px 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
}
.order-bags-pay-hint {
  text-align: center;
  margin: 2px 0 0;
  padding: 0 2px;
  font-size: 0.85rem;
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.oauth-buttons {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.oauth-buttons--modal {
  margin-top: 12px;
  width: 100%;
}
.oauth-divider {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
}
.oauth-btn--yandex {
  background: #fc3f1d;
  color: #fff;
  border-color: #fc3f1d;
}
.oauth-btn--vk {
  background: #0077ff;
  color: #fff;
  border-color: #0077ff;
}

.piggy-gallery-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.piggy-gallery-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.piggy-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.piggy-gallery-tile {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 10px 10px 12px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-sm);
  font: inherit;
  color: inherit;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.piggy-gallery-tile.is-closed {
  opacity: 0.9;
  background: #f9fafb;
}
.piggy-gallery-tile-title {
  margin-top: 8px;
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.piggy-gallery-tile-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.piggy-visual--tile {
  height: 64px;
  margin: 0 auto;
  max-width: 120px;
}
.piggy-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.piggy-card.is-closed {
  opacity: 0.92;
  background: #f9fafb;
}
.piggy-card-title,
.piggy-detail-title {
  font-weight: 700;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.piggy-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.piggy-visual {
  height: 72px;
  margin: 8px 0;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(180deg, #fda4af 0%, #fb7185 55%, #e11d48 100%);
  position: relative;
  overflow: hidden;
}
.piggy-visual::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--piggy-fill, 0%);
  background: rgba(255,255,255,0.35);
}
.piggy-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  margin-bottom: 6px;
}
.piggy-badge--closed {
  background: #e5e7eb;
  color: #374151;
}
.piggy-mine-progress {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 6px 0 10px;
}
.piggy-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #fce7f3;
  border: 1px solid rgba(244, 63, 94, 0.2);
  overflow: hidden;
  margin: 0 0 12px;
}
.piggy-progress-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb7185, #e11d48);
  transition: width 0.25s ease;
}

.piggy-mine-view {
  margin: 0 0 4px;
}
/**
 * Обложка копилки в правой колонке блока. Раньше шла во всю ширину сверху и занимала
 * пол-экрана — из-за неё блок разрастался, а текст уезжал вниз.
 */
.piggy-mine-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  margin: 0;
}
.piggy-mine-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.piggy-mine-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #fda4af 0%, #fb7185 50%, #e11d48 100%);
}
/* Шестерёнка — в правом верхнем углу фото: снизу она наезжала на самое интересное
   в кадре, а сверху угол обычно пустой. */
.piggy-mine-gear {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #111827;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.28);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.piggy-mine-gear:hover {
  transform: scale(1.06);
}
.piggy-mine-gear:active {
  transform: scale(0.96);
}
.piggy-mine-gear-icon {
  width: 18px;
  height: 18px;
  display: block;
}
.piggy-mine-view-title {
  margin: 6px 0 4px;
}
.piggy-mine-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  min-height: 36px;
}
.piggy-progress-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 12px;
  border-radius: 999px;
  background: #fce7f3;
  border: 1px solid rgba(244, 63, 94, 0.2);
  overflow: visible;
}
.piggy-progress-track .piggy-progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  transition: width 1.1s cubic-bezier(0.22, 0.8, 0.28, 1);
}
.piggy-progress-runner {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 32px;
  height: 32px;
  margin: 0;
  transform: translate(-50%, -58%);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18));
  transition: left 1.1s cubic-bezier(0.22, 0.8, 0.28, 1);
  z-index: 2;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: piggy-runner-sway 2.4s ease-in-out infinite;
}
@keyframes piggy-runner-sway {
  0%, 100% { transform: translate(-50%, -58%) rotate(-4deg); }
  25% { transform: translate(calc(-50% + 2px), -64%) rotate(2deg); }
  50% { transform: translate(-50%, -56%) rotate(4deg); }
  75% { transform: translate(calc(-50% - 2px), -62%) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .piggy-progress-track .piggy-progress-bar-fill,
  .piggy-progress-runner {
    transition: none;
  }
  .piggy-progress-runner {
    animation: none;
  }
}
.piggy-progress-pct {
  flex: 0 0 auto;
  min-width: 2.6em;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 700;
  color: #be123c;
  line-height: 1;
}
.piggy-mine-ready-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.35;
}

/* Подписи над полями остались только у благодарности при выводе — в основной части
   формы названия ушли внутрь строк подсказками. */
.piggy-mine-form label {
  display: block;
  font-size: 0.85rem;
  margin: 8px 0 4px;
}
/* Кнопка выбора фото — как остальные светлые действия в интерфейсе, а не системный
   «Choose file», который выглядел чужим. */
.piggy-photo-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.piggy-mine-form input,
.piggy-mine-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.piggy-mine-form textarea {
  min-height: 72px;
  resize: vertical;
}
.piggy-mine-photo-preview {
  max-width: 100%;
  max-height: 160px;
  border-radius: 12px;
  margin-top: 8px;
  display: none;
}
.piggy-detail-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}
.piggy-detail-desc {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 8px 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.piggy-detail-thanks {
  background: #f0fdf4;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.modal-content--piggy {
  max-width: 420px;
  width: calc(100% - 24px);
  max-height: min(90vh, 720px);
  overflow-y: auto;
}
.piggy-tip-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}
.piggy-tip-amount {
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  background: #fff;
  outline: none;
  /* убрать стрелки number */
  -moz-appearance: textfield;
  appearance: textfield;
}
.piggy-tip-amount:focus {
  border-color: var(--accent-blue, #0ea5e9);
}
.piggy-tip-amount::-webkit-outer-spin-button,
.piggy-tip-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.piggy-tip-submit {
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  margin: 0 !important;
  white-space: nowrap;
}
.piggy-tip-pay-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
  min-height: 1.2em;
}

.piggy-icon-btn {
  position: relative;
  width: var(--cabinet-action-size, 36px);
  height: var(--cabinet-action-size, 36px);
  border-radius: var(--radius-md);
  border: none;
  background: #fff;
  color: #e11d48;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.18);
}
.piggy-icon-btn:hover {
  background: #fff7f8;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.35);
}
.piggy-icon-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.piggy-icon-ring-bg {
  stroke: rgba(244, 63, 94, 0.18);
}
.piggy-icon-ring-fg {
  stroke: #e11d48;
  transition: stroke-dasharray 0.25s ease;
}
.piggy-icon-img {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.piggy-icon-plus {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}
.piggy-icon-btn.needs-create .piggy-icon-plus {
  display: flex;
}
.piggy-icon-btn.is-gallery .piggy-icon-ring-fg {
  stroke: transparent;
}
.piggy-icon-btn.has-piggy .piggy-icon-ring-fg {
  stroke: #e11d48;
}

/* Правовая информация — экран внутри PWA */
.legal-inapp-lead {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.legal-inapp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.legal-inapp-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-main);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
}
.legal-inapp-tab:hover {
  border-color: rgba(22, 163, 74, 0.45);
  color: var(--primary);
}
.legal-inapp-tab.is-active {
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.1);
  color: var(--primary);
  font-weight: 600;
}
.legal-inapp-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 18px;
  max-height: min(58vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-inapp-loading,
.legal-inapp-error {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.legal-inapp-error a { color: var(--accent-blue); }
.legal-inapp-doc h1 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.legal-inapp-doc .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.legal-inapp-doc h2 {
  font-size: 1rem;
  margin: 16px 0 6px;
}
.legal-inapp-doc p,
.legal-inapp-doc li {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.legal-inapp-doc ul { padding-left: 20px; margin: 0 0 8px; }
.legal-inapp-doc a { color: var(--accent-blue); }

/* ==========================================================================
   Вкладка «История»
   ==========================================================================
   Список сгруппирован по дням: в старом варианте даты не было вообще, только время,
   и заказы разных дней выглядели одинаково.
*/
.history-summary {
  margin-top: 10px;
}
.history-summary-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.history-summary-cell {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.history-summary-cell b {
  display: block;
  font-size: 1.25rem;
  line-height: 1.15;
  color: #111827;
}
.history-summary-cell span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.2;
}

.history-day {
  margin: 14px 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}
.history-day:first-child {
  margin-top: 4px;
}

.history-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 11px 13px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-time {
  font-weight: 700;
  font-size: 0.98rem;
  color: #111827;
}
.history-item-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.86rem;
  color: #6b7280;
}
.history-id {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #c3c8d1;
}
.history-note {
  margin-top: 6px;
  font-size: 0.84rem;
  color: #b45309;
  line-height: 1.35;
}

/* Статус читается плашкой, а не словом в общей строке. */
.history-chip {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.history-chip--ok {
  background: #dcfce7;
  color: #15803d;
}
.history-chip--wait {
  background: #fef3c7;
  color: #a16207;
}
.history-chip--penalty {
  background: #fee2e2;
  color: #b91c1c;
}
.history-chip--canceled {
  background: #f3f4f6;
  color: #6b7280;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.history-actions .btn-back--small {
  margin: 0;
  width: auto;
}

.history-empty {
  margin-top: 20px;
  padding: 22px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md, 12px);
  text-align: center;
  background: #fbfbfc;
}
.history-empty b {
  display: block;
  font-size: 1rem;
  color: #374151;
}
.history-empty span {
  display: block;
  margin-top: 6px;
  font-size: 0.86rem;
  color: #9ca3af;
  line-height: 1.4;
}

.history-item .archive-review,
.history-item .archive-mod-parties,
.history-item .archive-mod-ratings {
  margin-top: 9px;
}

/* Действия в карточке истории — лёгкие, а не тёмные кнопки: тёмная кнопка в каждой
   карточке превращала список в стену призывов. */
.history-action {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.history-action:hover {
  border-color: #cbd5e1;
  background: #f9fafb;
}
.history-action:active {
  transform: scale(0.98);
}

/* Название адреса в карточке заказа: по нему адрес узнают с одного взгляда.
   Свои размер и регистр заданы явно — рядом живёт стиль заголовка кнопки. */
.quick-order-addr-name {
  display: inline;
  color: #15803d;
  font-weight: 700;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
}

/* Выплаты используют оформление истории: один визуальный язык вместо двух.
   Здесь только отличия. */
.payout-item {
  cursor: pointer;
}
.payout-item--pending {
  cursor: default;
  border-color: #fcd34d;
  background: #fffbeb;
}
.payout-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

/* ==========================================================================
   Вкладка «Люди»
   ========================================================================== */
.people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}
.people-chip {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.people-chip span {
  color: #9ca3af;
  font-weight: 700;
}
.people-chip--on {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.people-chip--on span {
  color: #9ca3af;
}

.person-item--banned {
  border-color: #fecaca;
  background: #fff7f7;
}
/* Роль читается цветом: исполнители — те, с кем идёт работа. */
.person-chip--executor {
  background: #dbeafe;
  color: #1d4ed8;
}
.person-chip--customer {
  background: #f3f4f6;
  color: #4b5563;
}
.person-chip--moderator {
  background: #ede9fe;
  color: #6d28d9;
}
.person-chip--admin {
  background: #dcfce7;
  color: #15803d;
}


.people-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm);
}
.people-map-row b {
  display: block;
  font-size: 0.95rem;
  color: #111827;
}
.people-map-row span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.3;
}

/* Пояснение к замаскированной карте: без него маска выглядит как потеря данных. */
.withdraw-card-note {
  color: #9ca3af;
  font-size: 0.78rem;
}

/* ==========================================================================
   Главная карточка истории: последний вынос за сегодня
   ==========================================================================
   Фото вписано в карточку с отступами, а не во всю ширину: снимок — часть карточки,
   а не её фон. Время стоит подписью на самом фото.
*/
.history-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 14px 0;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.hero-head {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.hero-frame {
  position: relative;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #e8eaee 0%, #dcdfe4 100%);
  /* Пропорция как на макете: снимок заметный, но не на пол-экрана. */
  aspect-ratio: 2 / 1;
}
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo--stub {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.hero-photo-note {
  padding: 0 18px;
  text-align: center;
  font-size: 0.88rem;
  color: #8b9099;
  line-height: 1.4;
}

/* Подпись на фото: белая «таблетка» в левом нижнем углу. */
.hero-photo-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #374151;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* «Вынесено за» слева, значение справа — как на макете. */
.hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.hero-row-label {
  font-size: 1.05rem;
  color: #111827;
}
.hero-row-value {
  flex: none;
  font-size: 1.25rem;
  font-weight: 400;
  color: #111827;
}
.hero-row-unit {
  font-size: 0.8rem;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.history-hero .hero-review {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
/**
 * Первый заголовок внутри блока оценки без верхнего отступа: над ним уже есть и отступ
 * блока, и линия-разделитель. Складывались все три, и плашки уезжали вниз.
 */
.history-hero .hero-review .review-title:first-child {
  margin-top: 0;
}
/**
 * Низ карточки: у неё padding-bottom нулевой, потому что полоса копилки идёт до самого края.
 * Когда копилки нет, последним элементом остаётся блок оценки — ему отступ снизу нужен,
 * иначе плашки прилипают к краю карточки.
 */
.history-hero .hero-review:last-child {
  padding-bottom: 14px;
}

/* Копилка: крупный призыв без имени исполнителя — он копит на свою цель,
   а не собирает адресную помощь. */
.hero-piggy {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Карточка имеет внутренние отступы 14px — выводим полосу за них, до самых краёв. */
  width: calc(100% + 28px);
  margin: 14px -14px 0;
  padding: 14px 15px;
  border: none;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #fdf2f8 0%, #fff1f2 100%);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.hero-piggy img {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
}
.hero-piggy-text {
  min-width: 0;
}
.hero-piggy-text b {
  display: block;
  font-size: 1rem;
  color: #9d174d;
}
.hero-piggy-text span {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  color: #a1808f;
  line-height: 1.35;
}
.hero-piggy:active {
  filter: brightness(0.98);
}

/* ==========================================================================
   Карточки заказов на вкладке «Заказ» / «Заказы»
   ==========================================================================
   Тот же язык, что в истории: адрес заголовком, факты через точку, статус плашкой.
*/
.job-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
/* Новый свободный заказ: зелёная кромка — на него надо отреагировать. */
.job-card--new {
  border-color: #86efac;
  background: linear-gradient(180deg, #f6fef9 0%, #fff 60%);
}
/* Заказ в работе — синяя, как и раньше у взятых заказов. */
.job-card--work,
.job-card--active {
  border-color: #bfdbfe;
}
.job-card--lost {
  border-color: #fecaca;
  background: #fff7f7;
}

.job-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ca3af;
}
/* Плашка внутри шапки не наследует капитель: в истории статусы обычным регистром,
   и «В РАБОТЕ» капслоком выбивалось бы из общего вида. */
.job-card-head .history-chip {
  text-transform: none;
  letter-spacing: normal;
}

/* Отсчёт «Успеть за» в теле карточки — по центру: слева он смотрелся приклеенным к краю. */
.job-card .order-speed-line {
  display: flex;
  width: fit-content;
  margin: 8px auto 0;
}

.job-card-title {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  word-break: break-word;
}
/**
 * Дом, подъезд и квартира плашками — исполнителю это главные цифры, по ним он находит
 * подъезд и дверь. В общей строке фактов через точку они читались наравне с мешками.
 */
.job-card-place {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.job-place-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.1);
  color: #14532d;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
/* Подпись тише самой цифры: цифру и надо читать. */
.job-place-chip > span {
  font-size: 0.76rem;
  font-weight: 600;
  color: #4b7a5c;
}

.job-card-meta {
  margin-top: 3px;
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.35;
}
.job-card-note {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #f9fafb;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.35;
  word-break: break-word;
}
.job-card-muted {
  font-size: 0.85rem;
  color: #9ca3af;
}
.job-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}
.job-card-actions .btn-big {
  margin: 0;
  flex: 1 1 140px;
  padding: 11px 14px;
  font-size: 0.95rem;
}

.job-card .order-track {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}
.job-card .order-speed-line,
.job-card .order-offline-line {
  margin-top: 8px;
}

.job-notice {
  margin-bottom: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.86rem;
  line-height: 1.35;
}

/* ==========================================================================
   Пейджер на вкладке заказов
   ==========================================================================
   Прокрутка нативная: scroll-snap вместо своего обработчика жестов.
*/
.pager {
  margin-bottom: 4px;
}
.pager-track {
  display: flex;
  /**
   * Все слайды одной высоты — по самому высокому, а содержимое внутри по центру.
   * Раньше высота полосы подгонялась под активный слайд, и блок прыгал вверх-вниз
   * при каждом переключении. Ровная высота спокойнее, чем экономия десятков пикселей.
   */
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Полосу прокрутки не показываем: роль подсказки играют точки под пейджером. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.pager-track::-webkit-scrollbar {
  display: none;
}
/* Один слайд — листать нечего, прокрутку отключаем совсем. */
.pager-track--single {
  overflow-x: visible;
  overflow-y: visible;
  scroll-snap-type: none;
}
.pager-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  /* Небольшой зазор, чтобы тень соседнего слайда не срезалась. */
  padding: 2px;
  box-sizing: border-box;
  /* Короткий слайд стоит по центру своей высоты, а не липнет к верху. */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pager-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
}
.pager-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease;
}
.pager-dot--on {
  width: 20px;
  border-radius: 999px;
  background: #16a34a;
}

/* ==========================================================================
   Шапка над доступными заказами
   ==========================================================================
   Задача блока — звать на смену, поэтому он на экране всегда, даже без заказов.
   Раскладка по макету: логотип в мятной плитке, под ним заголовок и текст, всё по центру.
*/
.callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.callout-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-bottom: 0;
  flex: none;
}
/* В сжатом виде и плитка меньше, а не только картинка внутри: иначе карточка занимает
   почти столько же места, сколько полная, и «сжатой» остаётся только на словах. */
.callout--compact .callout-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.callout--compact .callout-logo img {
  width: 32px;
  height: 32px;
}
.callout--compact b {
  font-size: 0.92rem;
}
.callout--compact span {
  margin-top: 0;
  font-size: 0.8rem;
  max-width: none;
}

.callout-logo {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  /* Мятная плитка: логотип на прозрачном фоне сам по себе на белом «висит». */
  background: #d9f7e4;
  margin-bottom: 12px;
}
.callout-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.callout b {
  font-size: 1.12rem;
  color: #111827;
  line-height: 1.25;
}
.callout span {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.4;
  max-width: 30ch;
}
.callout-streak {
  margin-top: 10px !important;
  font-weight: 600;
  color: #b45309 !important;
}

/**
 * Сжатый вид: строка вместо карточки.
 *
 * Когда заказы есть, крупное приглашение сдвигало их вниз и серую карточку заказа
 * не было видно. Логотип уменьшается, текст выравнивается по левому краю и встаёт рядом.
 */
/**
 * Сжатый вид: логотип со стрелкой сверху, строка про заказы ниже и мельче.
 *
 * Раньше всё стояло одной строкой, и после появления подсказки-стрелки четыре блока
 * в ряд сжались до нечитаемого столбика по два слова. Сетка разводит их по двум рядам:
 * сверху то, на что нужно нажать, снизу — что происходит с заказами.
 */
.callout--compact {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo logo"
    "title sub";
  align-items: center;
  justify-items: start;
  text-align: left;
  gap: 2px 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.callout--compact .callout-logo-row {
  grid-area: logo;
  justify-content: flex-start;
  gap: 2px;
}

.callout--compact > b {
  grid-area: title;
  white-space: nowrap;
}

.callout--compact > span:not(.callout-streak) {
  grid-area: sub;
}

/* Подсказка в сжатом виде мельче: строка про заказы важнее её.
   Три класса в селекторе намеренно: общие правила подсказки стоят ниже по файлу и при
   равном весе побеждали бы они. */
.callout.callout--compact .callout-play-hint {
  width: 78px;
  margin-top: 0;
  gap: 0;
}

.callout.callout--compact .callout-play-hint span {
  font-size: 10px;
}

/* ==========================================================================
   На телефоне приложение занимает экран целиком
   ==========================================================================
   Карточка с отступами и закруглениями задумана для широкого экрана, где она стоит
   по центру серого фона. На телефоне те же отступы давали полосу серого под шапкой
   и такую же снизу, под кнопками вкладок, — приложение выглядело недотянутым до края.
*/
@media (max-width: 560px) {
  .content {
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
  }
  .screen.active > .content--dock {
    margin-top: 0;
    margin-bottom: 0;
    /* Сверху ровно на просвет, а не на пустую полосу: 16px тут читались как забытое место. */
    padding-top: 12px;
  }
  /* Нижний вырез телефона отдаём доку с вкладками, а не телу страницы:
     иначе под приложением остаётся полоса цвета фона. */
  body {
    padding-bottom: 0;
  }
  /**
   * Отступ под нижний край телефона.
   *
   * Двух крайностей не годится ни одна. Взять чистый вырез (`env`) — на iPhone получается
   * 34px и кнопки заметно выше края. Убрать совсем — на Android вырез равен нулю, хотя
   * полоса системного жеста там есть, и кнопки уезжают под неё.
   *
   * Поэтому минимум 10px всегда, а на телефонах с вырезом от него отнимаем 12px:
   * iPhone получает 22px — ниже, чем было, но выше самой полосы индикатора.
   */
  .content-dock {
    padding-bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 12px));
  }
  /* Экраны без дока: под последним элементом нужен отступ и запас под нижний вырез. */
  .content:not(.content--dock) {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  }
  /**
   * У экрана с доком своего нижнего отступа быть не должно: запас под вырез телефона
   * добавлен доку выше, а лишние 12px просто отодвигали вкладки от края экрана.
   */
  .screen.active > .content--dock {
    padding-bottom: 0;
  }
}

/* Переключатель смены на время минимальной смены: видно, что нажимать нечего. */
.shift-toggle--locked {
  opacity: 0.45;
  cursor: default;
}

/* Заказ, который виден, но не на смене: работа есть, взять её пока нельзя. */
.job-card--locked {
  border-color: var(--border);
  background: #f7f8f9;
}
.job-card--locked .job-card-title {
  color: #6b7280;
}
.job-card--locked .job-card-meta,
.job-card--locked .job-card-note {
  color: #9ca3af;
}
.job-card--locked .job-card-note {
  background: #f1f2f4;
}
/* Кнопка ведёт к смене, а не к приёму заказа, поэтому спокойнее основной. */
.job-card-unlock {
  background: #374151 !important;
}

/* ==========================================================================
   Блоки «Стать исполнителем» и «Мои выплаты»
   ==========================================================================
   Значок слева — тот самый, что раньше висел иконкой у баланса: рядом с ним написано
   словами, а сам значок помогает узнать блок тем, кто привык к прежним кнопкам.
*/
.side-block-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
/* Статус копилки в шапке: прижат к правому краю, по одной линии с названием блока. */
.piggy-head-status {
  margin-left: auto;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
  padding-top: 1px;
}

.side-block-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 1.15rem;
  font-weight: 700;
}
.side-block-icon--up {
  background: rgba(14, 165, 233, 0.14);
  color: #0284c7;
}
.side-block-icon--ruble {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.side-block-text {
  min-width: 0;
}
.side-block-text b {
  display: block;
  font-size: 1.02rem;
  color: #111827;
  line-height: 1.25;
}
.side-block-text span {
  display: block;
  margin-top: 3px;
  font-size: 0.86rem;
  color: #6b7280;
  line-height: 1.35;
}

/* Анкета разворачивается внутри блока, а не в окне поверх экрана. */
.executor-form-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Окно карты
   ==========================================================================
   Окно опущено ниже шапки и сделано короче. Причина не только в виде: оповещения теперь
   живут в шапке пузырём от логотипа, а крестик закрытия у окна — в правом верхнем углу.
   Пока окно начиналось у самого верха, пузырь накрывал крестик.
*/
.modal-content--map {
  width: 96%;
  max-width: 96%;
  /**
   * Отступ сверху с запасом на пузырь оповещений в три строки. Самые длинные сообщения
   * («Не удалось определить адрес. Введите адрес и нажмите…») появляются как раз при работе
   * с картой, и крестик закрытия окна не должен оказаться под ними.
   */
  margin: 112px auto 2vh;
  max-height: calc(100dvh - 128px);
}

/* ==========================================================================
   Переключатель внутри вкладки «История»
   ==========================================================================
   Заказы и оповещения — двумя кнопками, а не общей лентой: уведомления в основном
   и есть про заказы, и в одной ленте каждый заказ показывался бы дважды.
*/
.hist-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 10px 0 12px;
  background: #f1f2f4;
  border-radius: 12px;
}
.hist-switch-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.hist-switch-btn--on {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.hist-switch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger, #dc2626);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ==========================================================================
   Вкладка «Дела»: карточки разбора
   ==========================================================================
   Пять блоков сверху вниз в порядке важности. Пустая карточка не исчезает, а показывает
   заглушку: видно, что раздел есть и в нём всё разобрано.
*/
.duty-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.duty-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.duty-card-head b {
  font-size: 1rem;
  color: #111827;
  line-height: 1.25;
}
.duty-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger, #dc2626);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}
.duty-card-more {
  margin-top: 10px;
}
.duty-empty {
  margin: 0;
  font-size: 0.88rem;
  color: #9ca3af;
  line-height: 1.4;
}

/* Статистика: группы по вопросу, на который отвечают цифры. */
.stats-group + .stats-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.stats-group-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}
.stats-grid {
  display: grid;
  /**
   * 88px, а не 96: при ширине карточки 301px три плитки по 96 с двумя зазорами требуют
   * 304px — не хватало трёх пикселей, и сетка сваливалась в две колонки.
   */
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}
.stat-tile {
  background: #f9fafb;
  border: 1px solid #eef0f3;
  border-radius: 11px;
  padding: 9px 10px;
}
.stat-tile b {
  display: block;
  font-size: 1.12rem;
  line-height: 1.15;
  color: #111827;
  white-space: nowrap;
}
.stat-tile span {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: #6b7280;
  line-height: 1.25;
}

/* ==========================================================================
   Блок копилки в профиле
   ==========================================================================
   Копилка переехала из модального окна в профиль: фото, текст и полоса заполнения
   видны сразу, создание разворачивается на месте, внизу — переход на витрину.
*/
.side-block-icon--piggy {
  background: #fdf2f8;
  padding: 0;
}
.side-block-icon--piggy img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.piggy-block-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Копилка в профиле: текст слева, фото справа, полоса под ними
   ========================================================================== */
.piggy-mine-grid {
  display: grid;
  /* Фото фиксированной колонкой: текст занимает всё остальное. */
  grid-template-columns: 1fr 104px;
  gap: 12px;
  align-items: start;
}
.piggy-mine-info {
  min-width: 0;
}
.piggy-mine-info .piggy-mine-view-title {
  margin: 6px 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
}
.piggy-mine-info .piggy-detail-desc {
  margin-top: 4px;
  margin-bottom: 0;
  font-size: 0.86rem;
  color: #6b7280;
  line-height: 1.35;
}

/* Полоса на всю ширину блока, цифры внутри неё. */
.piggy-progress-track--wide {
  flex: none;
  width: 100%;
  height: 20px;
  /**
   * Место сверху занимает сама свинка, а не пустота: она бежит по линии, а не внутри неё.
   * Поэтому текст копилки к полосе ближе, чем кажется по числу.
   */
  margin-top: 22px;
  /* Свинке нужно выходить за верхний край — обрезать нельзя. */
  overflow: visible;
}
/**
 * Свинка бежит поверх линии.
 *
 * Внутри полосы её обрезало по краям, и при высоком заполнении она наезжала на цифры.
 * Сверху обе беды уходят сразу: и режется нечему, и цифрам внутри полосы она не мешает.
 */
.piggy-progress-track--wide .piggy-progress-runner {
  width: 22px;
  height: 22px;
  /**
   * Свинка стоит на линии, а не парит над ней: нижняя часть заходит на полосу.
   * Картинка 144×133 с object-fit: contain в квадрате 22px рисуется высотой ~20px,
   * поэтому при -14px её лапы оказываются примерно на 6px внутри полосы.
   */
  top: -14px;
  transform: none;
  z-index: 3;
}
.piggy-progress-pct-in,
.piggy-progress-goal-in {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: #9f1239;
  white-space: nowrap;
  /* Поверх свинки: при малом заполнении она стоит над «1%», и цифра важнее картинки. */
  z-index: 4;
  pointer-events: none;
  /* Читается и на пустой полосе, и на залитой, и когда рядом проходит свинка. */
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.9), 0 0 6px rgba(255, 255, 255, 0.7);
}
.piggy-progress-pct-in {
  left: 10px;
}
.piggy-progress-goal-in {
  right: 10px;
  font-weight: 600;
}

/* ==========================================================================
   Витрина копилок на вкладке заказа: четыре мечты два на два
   ========================================================================== */
.piggy-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.piggy-teaser-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 9px 9px;
  border: 1px solid #fbcfe8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff5f8 0%, #fff 70%);
  font: inherit;
  cursor: pointer;
  text-align: center;
  min-width: 0;
}
.piggy-teaser-tile:active {
  transform: scale(0.99);
}
.piggy-teaser-tile.is-closed {
  border-color: var(--border);
  background: #f9fafb;
}
.piggy-teaser-tile-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}
.piggy-teaser-tile-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
  /* Название в две строки: длинные мечты не должны растягивать плитку. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
/* Полоса и процент рядом: процент под полосой делал плитку выше без пользы. */
.piggy-teaser-tile-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.piggy-teaser-tile-bar {
  display: block;
  /* Полоса короче на ширину процента — он стоит в её конце. */
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: #fce7f3;
  overflow: hidden;
}
.piggy-teaser-tile-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fb7185 0%, #e11d48 100%);
}
.piggy-teaser-tile-pct {
  flex: none;
  font-size: 0.74rem;
  font-weight: 700;
  color: #9f1239;
  /* Ширина под «100%», чтобы полосы в соседних плитках были одной длины. */
  min-width: 30px;
  text-align: right;
}
.piggy-teaser-tile.is-closed .piggy-teaser-tile-bar > span {
  background: #9ca3af;
}
.piggy-teaser-tile.is-closed .piggy-teaser-tile-pct {
  color: #6b7280;
}

/* ==========================================================================
   Мои награды
   ==========================================================================
   Медали лежат одним спрайтом 10x6 (icons/achievements-v1.png, ячейка 120x132). Кадр
   выбирается background-position в процентах, поэтому ячейка обязана держать пропорции
   кадра — отсюда aspect-ratio 120/132 на самой медали.

   Формат png, а не webp: хостинг отдаёт статикой только часть расширений, и .webp среди
   них нет — файл лежал в /icons/ с правами 644 и возвращал 404. Отдавать его php-обёрткой
   тоже нельзя: в /icons/ запрещено выполнение php (403). png-8 на 256 цветов с дизерингом
   весит 365 КБ против 288 КБ в webp и на размере показа от него не отличается.

   Правила стоят в конце файла сознательно: при равной силе селекторов побеждает
   тот, что ниже, и уже дважды получалось, что новая секция молча не работала.
*/

.side-block-icon--ach {
  background-image: url('../icons/achievements-v1.png');
  background-size: 1000% 600%;
  background-position: 100% 100%;
  background-repeat: no-repeat;
  border-radius: 8px;
}

.ach-count {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

/*
 * Колонка задана как minmax(0, 1fr), а не 1fr.
 *
 * У 1fr нижняя граница — min-content самой карточки. Стоит движку посчитать её иначе
 * (на iPhone так и вышло: колонки стали по 144px вместо 106), и сетка становится шире
 * блока, а третий столбец уезжает за край экрана. С нулевым минимумом ширина колонки —
 * всегда ровно доля контейнера, что бы движок ни думал о содержимом.
 *
 * Число колонок — в переменной: его же читает приложение, чтобы показать в свёрнутом
 * блоке ровно два ряда (см. achPreviewCount в js/app.js).
 */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(var(--ach-cols, 3), minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

/* Раскрытый список: высота под четыре ряда, дальше прокрутка внутри блока —
   так серые неполученные видно, но страница не растягивается на весь справочник. */
.ach-grid--all {
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.ach-empty {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* Пропорция подобрана под содержимое: медаль сама почти квадратная (140/154), и если
   отдать ей всю ширину, на название с датой остаётся полтора десятка пикселей — подписи
   обрезались. Медаль ужата до 84% ширины, а карточка вытянута. */
.ach-card {
  position: relative;
  aspect-ratio: 1 / 1.47;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 700px;
  -webkit-tap-highlight-color: transparent;
}

.ach-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}

.ach-card.is-flipped .ach-card-inner {
  transform: rotateY(180deg);
}

.ach-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 6px 4px 5px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
}

.ach-card-back {
  transform: rotateY(180deg);
  justify-content: center;
  gap: 4px;
  background: #0f172a;
  border-color: #0f172a;
  padding: 8px 7px;
}

.ach-badge {
  display: block;
  width: 84%;
  aspect-ratio: 120 / 132;
  background-image: url('../icons/achievements-v1.png');
  background-size: 1000% 600%;
  background-repeat: no-repeat;
  border-radius: 9px;
}

.ach-card-name {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: #111827;
  letter-spacing: -.1px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ach-card-sub {
  font-size: 9.5px;
  line-height: 1.1;
  color: #9ca3af;
  text-align: center;
}

.ach-card-bar {
  display: block;
  width: 82%;
  height: 3px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.ach-card-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #22c55e;
}

/* Подсказка под полем в форме копилки: объясняет правило, а не просто запрещает. */
.piggy-form-hint {
  display: block;
  margin: -4px 0 8px;
  font-size: 12px;
  line-height: 1.3;
  color: #6b7280;
}

/* Второй лист медалей: свой файл и своя сетка (10x2), поэтому и размер фона свой. */
.ach-badge--s2 {
  background-image: url('../icons/achievements-v2.png');
  background-size: 1000% 200%;
}

/* Неполученные — серым силуэтом: видно, что награда есть, но она ещё не твоя. */
.ach-card--locked .ach-badge {
  filter: grayscale(1) contrast(.75) opacity(.5);
}

.ach-card--locked .ach-card-face {
  background: #f9fafb;
}

/*
 * Оборот у неполученной награды остаётся тёмным.
 *
 * Правило выше красит обе стороны, и оборот получался почти белым — а текст на нём
 * светлый: условие, ради которого карточку и переворачивают, читалось еле-еле.
 * Именно у серых карточек оно важнее всего: это единственное место, где написано,
 * что нужно сделать.
 */
.ach-card--locked .ach-card-back {
  background: #0f172a;
  border-color: #0f172a;
}

.ach-card--locked .ach-card-name {
  color: #6b7280;
}

.ach-card-back-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #86efac;
}

.ach-card-back-text {
  font-size: 11.5px;
  line-height: 1.3;
  text-align: center;
  color: #f8fafc;
}

/*
 * На телефоне три медали в ряд — это около 100px на карточку вместе с названием и датой:
 * тесно. Ниже 430px показываем две в ряд, то есть 2×2 в свёрнутом блоке.
 *
 * Пропорция карточки при этом другая. Она подобрана под содержимое: в узкой колонке
 * карточка вытянута, чтобы под медалью помещалось название в две строки, — а в широкой
 * той же пропорцией получается длинная плитка с пустой нижней третью. Здесь карточка
 * площе, медаль чуть меньше доли ширины, содержимое по центру. Проверено на самом
 * длинном названии с полосой прогресса: в две строки помещается, ничего не обрезается.
 */
@media (max-width: 430px) {
  .ach-grid { --ach-cols: 2; }
  .ach-card { aspect-ratio: 1 / 1.16; }
  .ach-card-front { justify-content: center; }
  .ach-badge { width: 76%; flex: 0 0 auto; }
  .ach-card-name { flex: 0 0 auto; }
}

.ach-block-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

/* ---------- Поздравление на весь экран ---------- */

/* Единственный тёмный экран в светлом приложении: медали нарисованы на тёмно-синем,
   на белом фоне они выглядят вырезанными ножницами. */
.ach-party {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 80% at 50% 30%, #1d2b4d 0%, #0b1220 60%, #070c16 100%);
  color: #fff;
}

.ach-party[hidden] {
  display: none;
}

.ach-party-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ach-party-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.ach-party-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 14px;
}

.ach-party-items {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.ach-party-item {
  flex: 0 1 150px;
}

.ach-badge--big {
  width: 100%;
  aspect-ratio: 120 / 132;
  max-width: 150px;
  margin: 0 auto;
  border-radius: 14px;
  animation: achPop .5s cubic-bezier(.2, 1.5, .4, 1) both;
}

@keyframes achPop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ach-party-name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.ach-party-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #9fb0cc;
}

.ach-party-more {
  margin-top: 12px;
  font-size: 13px;
  color: #9fb0cc;
}

.ach-party-btn {
  margin-top: 22px;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .ach-badge--big { animation: none; }
  .ach-card-inner { transition: none; }
}

/* ==========================================================================
   Подтверждение заказа прямо в блоке
   ==========================================================================
   Модального окна здесь нет намеренно: подтверждение разворачивается на месте кнопок,
   чтобы на экране остался один вопрос и два ответа. «Отмена» слева и шире не делается —
   привычнее, когда согласие справа и заметнее.
*/

.quick-confirm {
  margin-top: 10px;
}

.quick-confirm-text {
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.3;
  color: #111827;
}

.quick-confirm-text b {
  font-size: 15px;
  font-weight: 700;
}

.quick-confirm-money {
  font-weight: 600;
  color: #15803d;
}

.quick-confirm-addr {
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.25;
}

.quick-confirm-actions {
  display: flex;
  gap: 8px;
}

/* Отмена светлая: тёмная кнопка спорила с «Подтверждаю» и тянула нажатие на себя. */
.quick-confirm-cancel {
  flex: 0 0 38%;
  margin: 0;
  background: #ffffff;
  color: #4b5563;
  border: 1px solid #d1d5db;
  box-shadow: none;
}

.quick-confirm-cancel:hover {
  background: #f9fafb;
  color: #111827;
}

.quick-confirm-ok {
  flex: 1 1 auto;
  margin: 0;
}

/* ==========================================================================
   Люди: карточка раскрывается на месте
   ==========================================================================
   Модального окна здесь больше нет. В списке из полусотни человек оно теряло место,
   где ты был, и занимало весь экран телефона ради пяти строк.
*/

.person-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.person-head-main {
  flex: 1 1 auto;
  min-width: 0;
}

.person-head-chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #9ca3af;
  transition: transform .2s ease;
}

.person-head-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.person-item--open .person-head-chevron {
  transform: rotate(180deg);
  color: #16a34a;
}

.person-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

/* Подпись слева, значение справа: строка занимает одну строку, а не две. */
.person-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.3;
}

.person-row > span {
  flex: 0 0 auto;
  color: #6b7280;
}

.person-row > b {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: #111827;
  text-align: right;
  word-break: break-word;
}

.person-row-muted {
  font-weight: 400;
  color: #9ca3af;
}

/* Длинное значение (адрес, причина блокировки) — под подписью и по левому краю. */
.person-row--wide {
  display: block;
  padding: 5px 0;
}

.person-row--wide > span {
  display: block;
  margin-bottom: 1px;
}

.person-row--wide > b {
  display: block;
  text-align: left;
}

.person-row--issues > b {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.person-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #16a34a;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Действия — ряд компактных кнопок вместо трёх широких зелёно-красных полос. */
.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.person-action {
  flex: 0 1 auto;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.person-action:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Опасные действия отличаются цветом текста, а не заливкой: две красные плашки рядом
   выглядели как основное действие карточки, хотя это крайние меры. */
.person-action--danger {
  color: #dc2626;
  border-color: #fecaca;
}

.person-action--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ==========================================================================
   Игра «пакет бежит»
   ==========================================================================
   Отдельный экран, а не окно внутри карточки: в блоке высотой в сто пикселей играть нельзя.
   Светлый — в отличие от поздравления с наградой: там тёмный фон нужен медалям, а здесь
   бежит наш пакет по обычному дневному фону.
*/

.callout-logo--play {
  padding: 0;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.callout-logo--play:active {
  transform: scale(0.94);
}

.runner {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px
           max(12px, env(safe-area-inset-bottom, 0px));
}

.runner[hidden] {
  display: none;
}

.runner-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 10px;
}

.runner-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex: 0 0 auto;
}

.runner-score b {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.runner-score span {
  font-size: 12px;
  color: #6b7280;
}

.runner-progress {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.runner-progress-track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
}

.runner-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #16a34a);
  transition: width .2s ease;
}

.runner-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Поле во всю высоту: пустое небо не пустует — в нём появляется похвала за пробежанное. */
.runner-canvas {
  flex: 1 1 auto;
  width: 100%;
  min-height: 200px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  touch-action: none;
}

.runner-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 0;
  font-size: 12px;
  color: #6b7280;
}

.runner-hint {
  color: #9ca3af;
}

.runner-panel,
.runner-notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(2px);
}

.runner-panel-box,
.runner-notice-box {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  text-align: center;
}

.runner-panel-box b,
.runner-notice-box b {
  font-size: 18px;
  font-weight: 800;
}

.runner-panel-box span {
  font-size: 13px;
  line-height: 1.35;
  color: #4b5563;
}

.runner-panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.runner-panel-actions .btn-back,
.runner-panel-actions .btn-big {
  flex: 1 1 auto;
  margin: 0;
}

/* Плашка про новый заказ зелёная: это не «ошибка игры», а хорошая новость. */
.runner-notice-box {
  border-color: #86efac;
}

.runner-notice-box b {
  color: #15803d;
}

/* ---------- Таблица рекордов ---------- */

.runner-top-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.runner-top-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.runner-top-box {
  width: 100%;
  max-width: 360px;
  max-height: 82%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.runner-top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.runner-top-head b {
  font-size: 17px;
  font-weight: 800;
}

.runner-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.runner-tab {
  flex: 1 1 auto;
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.runner-tab--on {
  background: #eafaf0;
  border-color: #86efac;
  color: #15803d;
}

.runner-top-list {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.runner-top-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 13.5px;
}

/* Своя строка подсвечена: в таблице первым делом ищут себя. */
.runner-top-row--me {
  background: #eafaf0;
  font-weight: 700;
}

.runner-top-place {
  flex: 0 0 22px;
  color: #9ca3af;
  font-weight: 700;
}

.runner-top-row--me .runner-top-place {
  color: #16a34a;
}

.runner-top-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-top-score {
  flex: 0 0 auto;
  font-weight: 700;
}

.runner-top-best {
  font-weight: 400;
  font-size: 11.5px;
  color: #9ca3af;
}

.runner-top-empty {
  margin: 12px 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.runner-top-stats {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
  font-size: 11.5px;
  line-height: 1.35;
  color: #6b7280;
  text-align: center;
}

/* ---------- Игра прямо в блоке заказов ---------- */

/* Поле встаёт на место призыва: те же поля и скругления, чтобы блок не «прыгал». */
.inline-game {
  position: relative;
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
}

.inline-game-canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
}

.inline-game-btn {
  position: absolute;
  top: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.92);
  color: #6b7280;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Кнопки в правом верхнем углу поля: счёт слева, они справа — не мешают друг другу. */
.inline-game-close {
  right: 8px;
  font-size: 19px;
}

.inline-game-top {
  right: 44px;
}

/* Подсказка-стрелка справа от логотипа: показывает, что нажимать нужно именно на пакет.
   Стоит поверх свободного места, а не в потоке, — иначе она раздвигала бы блок по высоте. */
.callout {
  position: relative;
}

/* Логотип и подсказка — одной строкой по центру: без подсказки логотип стоит ровно
   посередине, с подсказкой пара смещается вместе и никуда не наезжает. */
.callout-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.callout .callout-play-hint {
  flex: 0 0 auto;
  width: 112px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #16a34a;
  pointer-events: none;
  animation: calloutHintNudge 1.8s ease-in-out infinite;
}

.callout .callout-play-hint span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  color: #16a34a;
  white-space: nowrap;
}

.callout-play-arrow {
  width: 100%;
  height: auto;
  display: block;
}

/* Покачивание в сторону логотипа: движение читается как «сюда». */
@keyframes calloutHintNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .callout .callout-play-hint { animation: none; }
}

/* Узкий экран: подсказка уже, чтобы пара с логотипом влезала целиком. */
@media (max-width: 380px) {
  .callout .callout-play-hint { width: 96px; }
  .callout .callout-play-hint span { font-size: 11px; }
}

/* Когда игра идёт в блоке, полноэкранный слой нужен только ради панелей поверх неё. */
.runner--panel-only {
  background: transparent;
  padding: 0;
  pointer-events: none;
}

.runner--panel-only .runner-top,
.runner--panel-only .runner-canvas,
.runner--panel-only .runner-foot {
  display: none;
}

.runner--panel-only .runner-panel,
.runner--panel-only .runner-top-panel,
.runner--panel-only .runner-notice {
  pointer-events: auto;
}

/* ---------- Управление игрой у админа ---------- */

.game-admin-period {
  margin: 8px 0 10px;
  font-size: 12px;
  color: #6b7280;
}

.game-admin-top {
  border-top: 1px solid #eef0f3;
  padding-top: 8px;
}

/* Строка верха таблицы: место, кто, счёт и кнопка обнуления именно этого игрока. */
.game-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}

.game-admin-place {
  flex: 0 0 18px;
  color: #9ca3af;
  font-weight: 700;
}

.game-admin-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.game-admin-name .person-row-muted {
  font-size: 11.5px;
}

.game-admin-score {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.game-admin-score .person-row-muted {
  font-size: 11px;
}

/* Шапка карточки: кнопка «Обновить» справа и мелкая — это не главное действие. */
#dutyGameBlock .duty-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-admin-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

.game-admin-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
}

.game-admin-input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #111827;
}

/* ---------- Раскрытая карточка истории: фото у контейнера ---------- */

.history-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Раскрытая карточка чуть заметнее: видно, какую именно открыли. */
.history-item--open {
  border-color: #86efac;
}

.history-photo-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

.history-photo {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f4f6;
}

.history-photo-note {
  display: block;
  font-size: 12.5px;
  color: #6b7280;
}

/* Плашка автозачёта: спокойнее зелёной — это «прошло само», а не «проверено человеком». */
.history-chip--auto {
  background: #eef2ff;
  color: #4f46e5;
}
