/* МерчАП PWA — светлая высококонтрастная тема (field-инструмент). */
:root {
  --tt: #0E7C5F;        /* спокойный тил — primary */
  --ttd: #0B5E48;
  --tl: #E3F4EE;        /* светлый тил-фон */
  --ink: #13211C;       /* текст */
  --mut: #5C6B66;       /* вторичный текст */
  --line: #E4EAE7;      /* границы */
  --bg: #F4F7F6;        /* фон страницы */
  --surface: #ffffff;
  --ok: #15803D;  --okb: #E7F5EC;
  --wn: #B45309;  --wnb: #FBEFE0;
  --er: #B91C1C;  --erb: #FBEAEA;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 76px;
}
.ti { font-style: normal; }

.app { max-width: 520px; margin: 0 auto; padding: 14px 16px; }
h1 { font-size: 21px; font-weight: 600; margin: 6px 0 2px; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
.sub { font-size: 14px; color: var(--mut); margin: 4px 0 14px; }
.muted { color: var(--mut); }

/* Бренд */
.brandrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.logo {
  width: 42px; height: 42px; border-radius: 11px; background: var(--tt);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 23px;
}
.brandrow .name { font-size: 19px; font-weight: 600; }

/* Поля */
.field {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 0 13px; margin-bottom: 9px;
}
.field i { color: var(--mut); font-size: 18px; }
.field input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 16px; padding: 13px 0; width: 100%;
}

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 15px; border: 0; border-radius: 12px;
  background: var(--tt); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:active { background: var(--ttd); }
.btn.block { margin-top: 14px; }
.btn.warn { background: var(--wn); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; }
.btn.sm { padding: 11px; font-size: 15px; }

/* Чекбокс оферты */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; margin: 4px 0 8px; cursor: pointer; }
.check input { width: 21px; height: 21px; accent-color: var(--tt); margin: 1px 0 0; }
.check a { color: var(--tt); }

/* Карточки */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px; margin-bottom: 11px;
}
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ttl { font-size: 15px; font-weight: 600; margin: 0; }
.meta { font-size: 12px; color: var(--mut); margin: 6px 0 0; display: flex; align-items: center; gap: 6px; }
.meta i { font-size: 15px; }
.pay { color: var(--tt); font-weight: 600; white-space: nowrap; }

/* Пилюли статусов */
.pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.tl { background: var(--tl); color: var(--ttd); }
.pill.ok { background: var(--okb); color: var(--ok); }
.pill.wn { background: var(--wnb); color: var(--wn); }
.pill.er { background: var(--erb); color: var(--er); }

/* Нижняя навигация */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 0 10px;
}
.nav button {
  background: none; border: 0; color: #9aa6a2; font-size: 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav button i { font-size: 22px; }
.nav button.active { color: var(--tt); }

/* Мастер выполнения */
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mut); margin-bottom: 12px; }
.bar { flex: 1; height: 5px; border-radius: 3px; background: #E1E8E5; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--tt); transition: width .3s; }
.back { display: flex; align-items: center; gap: 4px; color: var(--mut); font-size: 13px; margin-bottom: 8px; cursor: pointer; }

/* Камера / фото */
.cam {
  border: 2px dashed #BCD3CB; border-radius: var(--radius); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 26px 14px; text-align: center; color: var(--mut); font-size: 14px; cursor: pointer;
}
.cam i { font-size: 34px; color: var(--tt); }
.thumb { width: 100%; border-radius: 11px; display: block; margin-top: 4px; }
.donecam {
  border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: var(--okb);
  display: flex; align-items: center; gap: 9px; color: var(--ok); font-size: 14px; font-weight: 500;
}
.donecam i { font-size: 19px; }

/* Сегмент Готово/Проблема */
.seg { display: flex; gap: 8px; margin-top: 8px; }
.seg button {
  flex: 1; border-radius: 10px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--mut);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button.on-ok { background: var(--tt); border-color: var(--tt); color: #fff; }
.seg button.on-wn { background: var(--wnb); border-color: #f0d4b0; color: var(--wn); }
.note { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; font-size: 14px; }

/* Экраны результата */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 60vh; }
.disc { width: 78px; height: 78px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.disc.ok { background: var(--okb); color: var(--ok); }
.disc.wn { background: var(--wnb); color: var(--wn); }
.disc.tl { background: var(--tl); color: var(--tt); }
.big { font-size: 30px; font-weight: 600; color: var(--tt); }

.spinner { width: 46px; height: 46px; border: 4px solid #DCE6E2; border-top-color: var(--tt); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Баланс */
.balcard { background: var(--tl); border: 1px solid #C6E6DA; border-radius: var(--radius); padding: 15px; margin-bottom: 12px; }
.balcard .lbl { font-size: 12px; color: var(--ttd); }
.histitem { display: flex; justify-content: space-between; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.histitem .when { font-size: 12px; color: var(--mut); }

/* Тост */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: #13211C; color: #fff; padding: 11px 16px; border-radius: 11px;
  font-size: 14px; z-index: 50; max-width: 90%;
}
.hidden { display: none !important; }
.cityrow { display: flex; justify-content: space-between; align-items: center; }
