/* Учёт заказов · Ремонт дисков. Mobile-first, без сборки. */

:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #1b2129;
  --ink-2: #4a5462;
  --ink-3: #7b8594;
  --line: #e1e4e9;
  --line-2: #cfd4db;
  --head: #1d232b;
  --primary: #2357d1;
  --primary-ink: #ffffff;
  --primary-soft: #e8eefc;
  --green: #1d7a3d;
  --green-soft: #e2f5e8;
  --amber: #8a5800;
  --amber-soft: #fff3d1;
  --red: #b42323;
  --red-soft: #fde8e8;
  --orange: #c2410c;
  --orange-soft: #ffedd5;
  --violet: #6b3fc4;
  --violet-soft: #efe8fd;
  --grey-soft: #eceff3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --tap: 46px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: .25rem 0 .75rem; }
small, .muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hidden { display: none !important; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; flex: none; vertical-align: -4px; }

/* ---------- шапка и навигация ---------- */
.top {
  background: var(--head); color: #fff; position: sticky; top: 0; z-index: 20;
  padding: 0 12px; padding-top: env(safe-area-inset-top);
}
.top-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 54px; }
.brand { color: #fff; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand b { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span { font-size: .72rem; color: #a9b3c1; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { height: 32px; width: auto; border-radius: 6px; background: #fff; }
.topnav { display: none; gap: 2px; margin-left: 12px; }
.topnav a { color: #d5dbe3; padding: 8px 10px; border-radius: 8px; font-size: .93rem; }
.topnav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.topnav a.on { background: rgba(255,255,255,.14); color: #fff; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { font-size: .8rem; color: #c3cad4; text-align: right; line-height: 1.15; display: none; }
.who b { color: #fff; font-weight: 600; display: block; font-size: .88rem; white-space: nowrap; }
.top .btn-new { display: none; }
.logout-form { margin: 0; }
.pw { position: relative; display: block; }
.pw input { display: block; padding-right: 50px; }
.pw input::-ms-reveal { display: none; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 48px; display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 0 10px 10px 0; }
.pw-eye:hover, .pw-eye[aria-pressed=true] { color: var(--ink); }
.top .install-btn { background: rgba(255,255,255,.12); color: #fff; border: 0; min-height: 34px; }
.top .install-btn[hidden] { display: none; }
.icon-btn { background: transparent; border: 0; color: #d5dbe3; height: 40px; min-width: 40px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 8px; gap: 6px;
  font: inherit; font-size: .85rem; }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(16,24,40,.06);
}
.bottomnav a, .bottomnav summary {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  color: var(--ink-3); font-size: .7rem; border-radius: 10px; cursor: pointer; list-style: none; min-height: 52px;
  justify-content: center;
}
.bottomnav summary::-webkit-details-marker { display: none; }
.bottomnav a.on { color: var(--primary); }
.bottomnav a:hover { text-decoration: none; }
.bottomnav svg.i { width: 23px; height: 23px; }
.bottomnav .plus { color: #fff; }
.bottomnav .plus span.circle {
  background: var(--primary); width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; margin-top: -18px; box-shadow: 0 4px 12px rgba(35,87,209,.35);
}
.bottomnav .plus small { color: var(--primary); font-size: .7rem; }
.bottomnav details { flex: 1; display: flex; position: relative; }
.bottomnav details summary { width: 100%; }
.more-menu {
  position: absolute; right: 4px; bottom: 64px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(16,24,40,.18); min-width: 220px; padding: 6px; z-index: 40;
}
.more-menu a, .more-menu button {
  display: flex; align-items: center; gap: 10px; padding: 12px; color: var(--ink); border-radius: 10px;
  font-size: .98rem; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.more-menu a:hover, .more-menu button:hover { background: var(--bg); text-decoration: none; }
.more-menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }

@media (min-width: 900px) {
  body { padding-bottom: 32px; }
  .topnav { display: flex; }
  .who { display: block; }
  .bottomnav { display: none; }
  .top .btn-new { display: inline-flex; }
}

/* ---------- раскладка ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 14px 12px; }
.wrap.narrow { max-width: 980px; }
.wrap.thin { max-width: 640px; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: .92rem; margin-bottom: 8px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
  margin-bottom: 12px;
}
.card > h2:first-child, .card > .card-head:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid2 { display: grid; gap: 12px; }
.cols { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 20px; }
}
@media (min-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .9rem; }
.kv dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.stat b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-3); font-size: .85rem; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: #f8f9fb; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: #1c49b5; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #17642f; }
.btn.danger { color: var(--red); border-color: #f0b8b8; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 8px; }
.btn.big { min-height: 54px; font-size: 1.05rem; width: 100%; }
.btn.block { width: 100%; }
/* форма ждёт ответа сервера (data-lock-on-submit в app.js) */
form.is-busy input:not([type=hidden]) { opacity: .55; }
form.is-busy .btn[type=submit] { opacity: .85; cursor: progress; }
form.is-busy .btn[type=submit]::before {
  content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: btn-spin .8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { form.is-busy .btn[type=submit]::before { animation-duration: 2.4s; } }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }
.top .btn-new { background: var(--primary); color: #fff; border: 0; min-height: 38px; }

label { font-size: .9rem; color: var(--ink-2); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field .help, .helptext { font-size: .8rem; color: var(--ink-3); }
.logo-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.logo-now img { max-height: 72px; max-width: 200px; object-fit: contain; }
.field .err, .errorlist { color: var(--red); font-size: .85rem; margin: 2px 0 0; padding: 0; list-style: none; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=date],
input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: var(--tap); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(35,87,209,.35); border-color: var(--primary); }
input[type=color] { width: 64px; height: var(--tap); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
input[type=file] { font-size: .95rem; max-width: 100%; }
.row { display: grid; gap: 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { display: grid; gap: 0 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .row4 { display: grid; gap: 0 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; color: var(--ink);
  font-size: .98rem; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.checks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.checks li label, .checks > label { display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  color: var(--ink); font-size: .98rem; cursor: pointer; }
.form-errors { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.form-errors ul { margin: 0; padding-left: 18px; }

/* ---------- сообщения ---------- */
.messages { list-style: none; margin: 0 0 12px; padding: 0; }
.messages li { padding: 12px 14px; border-radius: 10px; margin-bottom: 6px; background: var(--green-soft); color: var(--green);
  font-weight: 500; }
.messages li.error { background: var(--red-soft); color: var(--red); }
.messages li.warning { background: var(--amber-soft); color: var(--amber); }

/* ---------- метки ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.s-new { background: var(--primary-soft); color: var(--primary); }
.s-work { background: var(--amber-soft); color: var(--amber); }
.s-ready { background: var(--green-soft); color: var(--green); }
.s-issued { background: var(--grey-soft); color: var(--ink-2); }
.s-cancel { background: var(--red-soft); color: var(--red); }
.p-unpaid { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px #f2b8b8; }
.p-partial { background: #fff; color: var(--amber); box-shadow: inset 0 0 0 1px #f0d48a; }
.p-paid { background: #fff; color: var(--green); box-shadow: inset 0 0 0 1px #a8dcb8; }
.b-urgent { background: var(--orange-soft); color: var(--orange); }
.b-overdue { background: var(--red); color: #fff; }
.b-stuck { background: var(--violet-soft); color: var(--violet); }
.b-rework { background: var(--red-soft); color: var(--red); }
.b-muted { background: var(--grey-soft); color: var(--ink-2); }
.badge svg.i { width: 13px; height: 13px; vertical-align: 0; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15);
  vertical-align: -3px; flex: none; }
.swatch.lg { width: 30px; height: 30px; }

/* ---------- список заказов ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 10px; }
.searchbar .s-input { position: relative; flex: 1; }
.searchbar .s-input svg { position: absolute; left: 12px; top: 13px; color: var(--ink-3); }
.searchbar input { padding-left: 40px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); font-weight: 600;
  font-size: .9rem; }
.tab:hover { text-decoration: none; border-color: var(--line-2); }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .cnt { font-size: .78rem; background: rgba(0,0,0,.07); border-radius: 999px; padding: 0 7px; }
.tab.on .cnt { background: rgba(255,255,255,.18); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 8px; background: transparent; color: var(--ink-2); border: 1px dashed var(--line-2);
  font-size: .86rem; font-weight: 600; }
.chip:hover { text-decoration: none; background: #fff; }
.chip.on { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary); }
.chip.warn .cnt { color: var(--red); }
.chip .cnt { font-weight: 700; }

.olist { display: flex; flex-direction: column; gap: 8px; }
.orow { display: grid; grid-template-columns: minmax(0, 1fr) auto 56px; gap: 4px 12px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; color: var(--ink);
  border-left: 4px solid transparent; }
.orow:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(16,24,40,.12); }
.orow.overdue { border-left-color: var(--red); }
.orow.urgent { border-left-color: var(--orange); }
.orow .o-main { min-width: 0; }
.orow .o-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.orow .o-num { font-weight: 700; font-size: 1.05rem; }
.orow .o-client { font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow .o-sub { color: var(--ink-2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
.orow .o-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.orow .o-sum { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orow .o-dl { font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.orow .o-dl.late { color: var(--red); font-weight: 700; }
.orow .o-pic { width: 56px; height: 56px; align-self: center; border-radius: 8px; overflow: hidden; background: var(--bg);
  display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.orow .o-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orow .o-pic svg.i { opacity: .55; }
.plate { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85em; background: #f4f5f7;
  border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; white-space: nowrap; color: var(--ink); }
@media (min-width: 900px) {
  .orow { grid-template-columns: 70px minmax(0, 1.4fr) minmax(0, 1fr) 150px 120px 48px; align-items: center; }
  .orow .o-pic { grid-column: 6; width: 48px; height: 48px; }
  .orow .o-sub { white-space: nowrap; }
  .orow .o-main { display: contents; }
  .orow .o-title { grid-column: 1; flex-direction: column; align-items: flex-start; gap: 4px; }
  .orow .o-who { grid-column: 2; min-width: 0; }
  .orow .o-what { grid-column: 3; min-width: 0; }
  .orow .o-side { grid-column: 4 / span 2; flex-direction: row; justify-content: flex-end; align-items: center; gap: 12px; }
  .orow .o-side .o-dl { width: 110px; text-align: left; }
}
.empty { text-align: center; color: var(--ink-3); padding: 36px 12px; background: var(--card); border-radius: var(--radius); }
.more-btn { margin: 12px auto 0; display: flex; }

/* ---------- форма заказа ---------- */
.osec { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.osec > h2 { display: flex; align-items: center; gap: 8px; }
.osec > h2 .step { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.suggest { position: relative; }
/* список найденных клиентов — в потоке, а не поверх: иначе он закрывает поле «Имя клиента» */
.suggest-list { background: #fff; border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: 0 4px 12px rgba(16,24,40,.10); margin-top: 4px; overflow: hidden; }
.suggest-list:empty { display: none; }
.suggest-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px;
  border-bottom: 1px solid var(--line); font: inherit; cursor: pointer; }
.suggest-list button:hover { background: var(--primary-soft); }
.suggest-list .s-name { font-weight: 600; }
.suggest-list .s-meta { font-size: .85rem; color: var(--ink-3); }
.client-note { font-size: .85rem; color: var(--primary); }
.client-note:empty { display: none; }
.client-found { background: var(--green-soft); color: var(--green); border-radius: 8px; padding: 8px 12px; font-size: .9rem;
  margin-bottom: 10px; font-weight: 500; }
/* черновик нового заказа и срок по нормативу (app.js) */
.draft-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--primary-soft);
  color: var(--primary); border-radius: 10px; padding: 8px 8px 8px 14px; margin-bottom: 12px; font-size: .9rem; }
.draft-bar span { flex: 1 1 200px; }
.deadline-hint:empty { display: none; }
.deadline-hint .btn { min-height: 30px; padding: 0 10px; margin-left: 4px; }
.carpick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.carpick label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; min-height: var(--tap); cursor: pointer; color: var(--ink); font-size: .98rem; }
.carpick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.newcar { display: none; }
.carblock:has(input[name=car_choice][value=new]:checked) .newcar { display: block; }

.svc-cat { margin-bottom: 6px; border-top: 1px solid var(--line); }
.svc-cat > summary { cursor: pointer; padding: 12px 2px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  list-style: none; min-height: var(--tap); }
.svc-cat > summary::-webkit-details-marker { display: none; }
.svc-cat > summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); transition: transform .15s; }
.svc-cat:not([open]) > summary::after { transform: rotate(-90deg); }
.svc-cat .sel-count { background: var(--primary); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 8px; }
.svc-cat .sel-count:empty { display: none; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.svc { border: 1px solid var(--line-2); border-radius: 10px; background: #fff; min-width: 0; }
.svc > label.tile { display: flex; gap: 8px; align-items: flex-start; padding: 10px; cursor: pointer; min-height: 62px;
  color: var(--ink); }
.svc > label.tile input { margin-top: 1px; }
.svc .t-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.svc .t-price { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 500; margin-top: 2px; }
.svc .t-stage { display: block; font-size: .74rem; color: var(--ink-3); }
.svc-detail { display: none; padding: 0 10px 10px; gap: 8px; align-items: end; flex-wrap: wrap; }
.svc:has(> label input:checked) { border-color: var(--primary); background: var(--primary-soft); grid-column: 1 / -1; }
.svc:has(> label input:checked) .svc-detail { display: flex; }
.svc-detail .field { margin: 0; flex: 1 1 110px; }
.svc-detail .lp { flex: 1 1 100%; font-size: .82rem; color: var(--ink-2); }
.svc-detail .lp b { color: var(--ink); font-size: .95rem; }
.stepper { display: flex; align-items: stretch; }
.stepper button { width: var(--tap); border: 1px solid var(--line-2); background: #fff; font-size: 1.3rem; cursor: pointer;
  color: var(--ink); }
.stepper button:first-child { border-radius: 10px 0 0 10px; border-right: 0; }
.stepper button:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.stepper input { border-radius: 0; text-align: center; min-width: 52px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 720px) { .colors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.colors label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 10px; min-height: var(--tap); cursor: pointer; color: var(--ink); font-size: .9rem; background: #fff; }
.colors label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.colors label input { position: absolute; opacity: 0; pointer-events: none; }
.colors .c-tech { display: block; font-size: .72rem; color: var(--ink-3); }
.paint-extra { display: none; }
.osec:has(.colors input:checked:not([value=""])) .paint-extra { display: grid; }
.tires-extra { display: none; }
.osec:has(input[name=has_tires]:checked) .tires-extra { display: block; }
.dmg { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 10px; }
@media (min-width: 720px) { .dmg { grid-template-columns: 1fr 1fr; } }
.dmg-item { border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; }
.dmg-item:has(input:checked) { border-color: var(--orange); background: #fffaf5; }
.dmg-item input[type=text] { display: none; margin-bottom: 10px; min-height: 40px; }
.dmg-item:has(input:checked) input[type=text] { display: block; }

.summary { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 10; }
@media (min-width: 900px) { .summary { bottom: 12px; } }
.sumbox { background: var(--head); color: #fff; border-radius: var(--radius); padding: 12px 14px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 6px 20px rgba(16,24,40,.25); }
.sumbox .lines { flex: 1; min-width: 160px; font-size: .85rem; color: #c3cad4; }
.sumbox .lines div { display: flex; justify-content: space-between; gap: 10px; max-width: 320px; }
.sumbox .total { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sumbox .total small { display: block; font-size: .75rem; color: #c3cad4; font-weight: 500; }
.sumbox .manual-note { color: #ffd08a; }
.sumbox .btn { min-width: 160px; }

/* ---------- карточка заказа ---------- */
.ohead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ohead h1 { margin: 0 6px 0 0; font-size: 1.5rem; }
.money { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.money .t { font-weight: 700; font-size: 1.1rem; }
.money .rem { color: var(--red); font-weight: 700; }
.items { width: 100%; border-collapse: collapse; }
.items td, .items th { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.items th { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.items td.sum, .items th.sum { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items .bd { display: block; font-size: .78rem; color: var(--ink-3); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line);
  align-items: center; }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: flex;
  align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--ink-3); background: #fff; }
.timeline .done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.timeline .work .dot { background: var(--amber-soft); border-color: #e3a008; color: var(--amber); }
.timeline .st-name { font-weight: 600; }
.timeline .st-meta { font-size: .82rem; color: var(--ink-3); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
@media (min-width: 720px) { .photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.photo { position: relative; aspect-ratio: 4 / 3; background: var(--grey-soft); border-radius: 8px; overflow: hidden; display: block; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: .7rem; padding: 10px 6px 4px; pointer-events: none; }
.photo-del { position: absolute; top: 4px; right: 4px; margin: 0; }
.photo-del button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff;
  cursor: pointer; font-size: 1rem; line-height: 1; }
/* Просмотр фото на весь экран: всегда тёмный, поверх всего */
.viewer-open, .viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,var(--v-fade, 1)); color: #fff;
  overscroll-behavior: contain; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.viewer[hidden] { display: none; }
.v-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: zoom-in; }
.viewer.zoomed .v-stage { cursor: grab; }
.v-img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 50% 50%;
  will-change: transform; pointer-events: none; }
.v-img.anim { transition: transform .2s ease-out; }
.v-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 8px) 8px
  calc(env(safe-area-inset-left) + 16px); background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.v-count { font-size: .95rem; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.v-btn { pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.v-btn:hover { background: rgba(0,0,0,.75); }
.v-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.v-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round;
  stroke-linejoin: round; }
.v-prev, .v-next { position: absolute; top: 50%; margin-top: -24px; }
.v-prev { left: calc(env(safe-area-inset-left) + 8px); }
.v-next { right: calc(env(safe-area-inset-right) + 8px); }
.viewer.single .v-prev, .viewer.single .v-next, .viewer.zoomed .v-prev, .viewer.zoomed .v-next { display: none; }
.v-cap { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; text-align: center; font-size: .85rem;
  padding: 24px 16px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(transparent, rgba(0,0,0,.6));
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.v-cap:empty { display: none; }
.photo-pick { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.photo-pick label { width: 100%; }
.hist { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.hist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist .h-meta { color: var(--ink-3); font-size: .78rem; }
.hist .h-field { font-weight: 600; }
.hist .h-old { color: var(--ink-3); text-decoration: line-through; word-break: break-word; }
.hist .h-new { word-break: break-word; }
.paylist { list-style: none; padding: 0; margin: 0 0 10px; }
.paylist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.paylist .pm { font-size: .8rem; color: var(--ink-3); }
.paylist .neg { color: var(--red); }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; }
.actionbar form { margin: 0; }
details.inline > summary { list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 10px; }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-bottom: 10px; }
.notice.red { background: var(--red-soft); color: var(--red); }
.notice.blue { background: var(--primary-soft); color: var(--primary); }

/* ---------- цех ---------- */
.wsum { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.stage-sec { margin-bottom: 18px; }
.stage-sec > h2 { position: sticky; top: 54px; z-index: 5; background: var(--bg); padding: 8px 0; margin: 0; display: flex;
  align-items: center; gap: 8px; }
.stage-sec > h2 .cnt { background: var(--ink); color: #fff; border-radius: 999px; font-size: .8rem; padding: 1px 9px; }
.stage-sec > h2 .perf { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.wgrid { display: grid; gap: 10px; }
@media (min-width: 720px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .wgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border-top: 4px solid var(--line-2); }
.wcard.work { border-top-color: #e3a008; }
.wcard.urgent { border-top-color: var(--orange); }
.wcard .w-head { display: flex; align-items: flex-start; gap: 10px; }
.wcard .w-info { flex: 1; min-width: 0; }
.wcard .w-pic { flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.wcard .w-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcard .w-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.wcard .w-num { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.wcard .w-car { font-weight: 600; }
.wcard .w-disks { font-size: 1.05rem; font-weight: 700; }
.wcard .w-meta { font-size: .88rem; color: var(--ink-2); margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.wcard .w-state { font-size: .88rem; margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.wcard .w-state.mine { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.wcard .w-comment { font-size: .85rem; background: #fffbea; border-radius: 8px; padding: 6px 8px; margin: 6px 0; color: #6b5200; }
.progress { display: flex; gap: 3px; margin: 8px 0; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress span.done { background: var(--green); }
.progress span.cur { background: #e3a008; }
.finish-form { background: var(--bg); border-radius: 10px; padding: 10px; margin-top: 8px; }
.filebtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border: 2px dashed var(--line-2);
  border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; position: relative; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filebtn.has { border-color: var(--green); color: var(--green); border-style: solid; }
/* Фото: «Сфотографировать» и «Из галереи», выбранные снимки миниатюрами */
.photo-picker { display: grid; gap: 8px; margin-bottom: 8px; }
.pp-caption { font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.pp-caption:empty { display: none; }
.pp-buttons { display: flex; flex-wrap: wrap; gap: 8px; }  /* на узком экране кнопки встают друг под другом */
.pp-btn { position: relative; overflow: hidden; min-height: 54px; gap: 8px; cursor: pointer; flex: 1 0 auto; padding: 0 12px; }
.pp-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pp-desk { display: none; }
@media (hover: hover) and (pointer: fine) {  /* на компьютере камеры нет: одна кнопка «Выбрать фото» */
  .pp-camera, .pp-touch { display: none; }
  .pp-desk { display: inline; }
}
.pp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-thumbs:empty { display: none; }
.pp-thumb { position: relative; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--grey-soft); }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb.busy img { opacity: .5; }
.pp-note { font-size: .85rem; color: var(--primary); }
.plate-found { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2);
  background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; }
.pp-del { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 18px; line-height: 28px; cursor: pointer; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: .8rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; background: #fafbfc; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.off td { color: var(--ink-3); }
table.t.prices td.num { min-width: 64px; }
.bar { height: 10px; background: var(--primary); border-radius: 3px; min-width: 2px; }
.bar-cell { width: 40%; }
.yes { color: var(--green); font-weight: 600; }
.no { color: var(--ink-3); }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 400px; }
.login-box .card { padding: 22px; }
.login-title { text-align: center; margin-bottom: 18px; }
.login-title .mark { width: 56px; height: 56px; border-radius: 16px; background: var(--head); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; margin-bottom: 10px; }
.login-title .mark svg { width: 30px; height: 30px; }
.login-title h1 { margin: 0; font-size: 1.3rem; }
.login-title p { color: var(--ink-3); margin: 4px 0 0; }

/* ---------- настройки ---------- */
.tiles-nav { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tiles-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tiles-nav a { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; }
.tiles-nav a:hover { text-decoration: none; box-shadow: 0 2px 12px rgba(16,24,40,.14); }
.tiles-nav b { font-size: 1.02rem; }
.tiles-nav span { color: var(--ink-3); font-size: .88rem; }
.dprices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .dprices { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.dprices .field { margin: 0; }
.htmx-request.htmx-indicator, .htmx-request .htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }

@media print {
  .top, .bottomnav, .actionbar, .summary { display: none !important; }
  body { background: #fff; }
}

/* ---------- узкие экраны ---------- */
body:has(.login) { padding-bottom: 0; }
@media (max-width: 559px) {
  .stack-sm { grid-template-columns: 1fr; }
  .sumbox { flex-wrap: nowrap; padding: 10px 12px; gap: 10px; }
  .sumbox .lines { display: none; }
  .sumbox .total { font-size: 1.3rem; }
  .sumbox .btn { min-width: 0; padding: 0 14px; }
  .wrap { padding: 12px 10px; }
  .osec, .card { padding: 12px; }
}
@media (max-width: 999px) { .cols > .side { order: -1; } }
.card, .osec { scroll-margin-top: 66px; }
@media (min-width: 900px) {
  .orow { grid-template-columns: 190px minmax(0, 1.3fr) minmax(0, 1fr) 300px; }
  .orow .o-title { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .orow .o-num { width: 100%; }
  .orow .o-side { grid-column: 4; }
  .hide-desktop { display: none !important; }
}

/* работа без связи (offline.js, docs/offline.md) */
.offline-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--amber-soft);
  color: var(--amber); border-radius: 10px; padding: 8px 8px 8px 14px; margin-bottom: 12px; font-size: .9rem; font-weight: 500; }
.offline-bar span { flex: 1 1 220px; }
.offline-bar.ok { background: var(--green-soft); color: var(--green); }
.queue-btn { font: inherit; font-size: .82rem; font-weight: 600; border: 0; border-radius: 999px; padding: 6px 12px;
  background: var(--amber-soft); color: var(--amber); cursor: pointer; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 4px; }
.queue-btn .i { width: 16px; height: 16px; }
@media (max-width: 599px) { .queue-btn .q-text { display: none; } .queue-btn { padding: 6px 10px; } }
.queue-btn.failed { background: var(--red-soft); color: var(--red); }
.queue-panel { position: fixed; z-index: 60; right: 12px; top: 64px; width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 140px); overflow: auto; background: #fff; border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .25); padding: 14px; }
.queue-panel .qp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.q-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.q-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.q-item.failed { border-color: #f0b8b8; background: var(--red-soft); }
.q-item .q-label { font-weight: 600; }
.q-item .q-meta { color: var(--ink-3); font-size: .85rem; margin-top: 2px; }
.q-item.failed .q-meta { color: var(--red); }
.q-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-actions:empty { display: none; }
.pending-card { border: 1px dashed var(--amber); }
.pending-card h2 { color: var(--amber); }
.wcard.pending { outline: 2px dashed var(--amber); outline-offset: -2px; }
.wcard.pending-done { opacity: .7; }
.toasts { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: 84px;
  width: min(460px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: #1d232b; color: #fff; border-radius: 10px; padding: 10px 14px;
  font-size: .9rem; box-shadow: 0 6px 20px rgba(16, 24, 40, .3); }
.toast.err { background: var(--red); }
.toast.warn { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber); cursor: pointer; }
.toast-close { display: block; margin-top: 6px; font-size: .8rem; text-decoration: underline; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }

/* ---------------------------------------------------------------- обратная связь */
.fb-btn { position: relative; }
.top .push-btn[hidden] { display: none; }
.push-btn.on { color: #fff; }
.push-offer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.push-offer[hidden] { display: none; }
.push-offer p { margin: 0; flex: 1 1 220px; }
/* сводка */
a.stat-link { color: var(--ink); text-decoration: none; }
a.stat-link:hover { box-shadow: 0 2px 12px rgba(16,24,40,.14); }
.stat-bad b { color: var(--red); }
.sum-list { list-style: none; margin: 0; padding: 0; }
.sum-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.sum-list li:first-child { border-top: 0; padding-top: 0; }
.sum-list .muted { font-size: .88rem; margin-top: 2px; }
.card h2 svg.i { vertical-align: -3px; }
.load .bar-cell { width: 38%; }
.lbar { display: flex; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.lbar i { display: block; height: 100%; }
.lbar .w { background: var(--amber); }
.lbar .k { background: var(--green); }
/* переделка и исполнитель в цеху */
.w-rework { background: var(--red-soft); color: var(--red); }
.w-worker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.w-worker select { flex: 1; min-height: 40px; }
.rework form { margin-top: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; }
.rework h3 { font-size: 1rem; margin: 0 0 4px; }
.rework .checks { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.rework .checks legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.fb-btn.on { background: rgba(255,255,255,.14); color: #fff; }
.fb-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.fb-form > summary { list-style: none; cursor: pointer; }
.fb-form > summary::-webkit-details-marker { display: none; }
.fb-form[open] > summary { margin-bottom: 8px; }
.kind-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.kind-pick label { position: relative; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line-2);
  border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; }
.kind-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick b { font-size: 1rem; }
.kind-pick span { font-size: .82rem; color: var(--ink-3); }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-head .small { font-size: .82rem; }
.fb-text { white-space: pre-line; margin: 10px 0; word-break: break-word; }
.fb-photos { margin-bottom: 8px; }
.fb-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.fb-meta { font-size: .78rem; word-break: break-word; margin: 0 0 10px; }
.fb-reply { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.fb-reply p { margin: 4px 0 0; white-space: pre-line; }
.badge.fb-kind-bug { background: var(--red-soft); color: var(--red); }
.badge.fb-kind-idea { background: #f1ebfd; color: #6b3fc4; }
.badge.fb-new { background: var(--primary-soft); color: var(--primary); }
.badge.fb-accepted { background: var(--amber-soft); color: var(--amber); }
.badge.fb-done { background: var(--green-soft); color: var(--green); }
.badge.fb-declined { background: var(--grey-soft); color: var(--ink-2); }
.fb-answer .field { margin-bottom: 8px; }

/* ---------------------------------------------------------------- ссылка для клиента */
#track h2 { display: flex; align-items: center; gap: 6px; }
#track h2 .i { width: 18px; height: 18px; }
.track-hint { font-size: .85rem; margin: 0 0 8px; }
.track-url { width: 100%; font-size: .9rem; margin-bottom: 8px; color: var(--ink-2); }
.track-actions .btn { flex: 1 1 auto; justify-content: center; }
.track-renew { margin-top: 10px; font-size: .88rem; }
.track-renew summary { cursor: pointer; }

/* ---------------------------------------------------------------- обновление программы */
.update-bar { position: fixed; z-index: 65; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px;
  background: #1d232b; color: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.25); font-size: .9rem; }
.update-bar span { flex: 1; }
.update-bar .btn { flex: none; }
.update-close { flex: none; background: none; border: 0; color: #aab4c0; font-size: 1.4rem; line-height: 1; padding: 4px 6px;
  cursor: pointer; }
@media (min-width: 900px) { .update-bar { bottom: 20px; } }
body:not(:has(.bottomnav)) .update-bar { bottom: calc(16px + env(safe-area-inset-bottom)); }
