/* Рабочее место «Распознавание дефектов дорожного покрытия» (внешняя версия для заказчика).
   Строгий стиль: светло-серый фон, белые карточки с тонкой рамкой, таблицы как основной элемент, один шрифт.
   Акцент ГБУ «Автомобильные дороги» - оранжевый #EC5800, только на главном действии и активном пункте меню. Красного нет. */
:root {
  --bg: #f3f4f6; --surface: #ffffff; --side: #ffffff; --border: #e2e5e9; --border-strong: #cdd2d8; --hover: #f6f7f9; --head-bg: #f8f9fa;
  --text: #1f2328; --text-2: #5b636d; --muted: #8a929b;
  --accent: #ec5800; --accent-deep: #b84400; --accent-soft: #fff2ea; --accent-line: #f5c7a6;
  --ok: #2c7a4b; --ok-bg: #e5f2ea; --wait: #946512; --wait-bg: #f8efdc;
  --radius: 6px; --radius-lg: 8px;
  --sh-pop: 0 14px 40px rgba(20, 24, 30, .18);
  --ease: cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { display: flex; background: var(--bg); color: var(--text); font: 400 14px/1.5 Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.icon { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── меню ── */
.side { width: 256px; flex: none; background: var(--side); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 34px; height: 42px; display: grid; place-items: center; flex: none; }
.brand-mark img { max-width: 100%; max-height: 100%; display: block; }
.brand-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.brand-sub { font-size: 12px; color: var(--text-2); line-height: 1.3; }
#nav { display: flex; flex-direction: column; gap: 1px; padding: 12px 10px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px; border-radius: var(--radius); color: var(--text-2); font-size: 14px; }
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: #f1f2f4; color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-cap { margin: 16px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 14px 18px; border-top: 1px solid var(--border); line-height: 1.45; }
#who { display: flex; gap: 12px; align-items: center; margin-top: 8px; color: var(--text-2); font-size: 13px; }
#who span { font-weight: 600; color: var(--text); margin-right: auto; }
#who a { color: var(--text-2); }

/* ── страница ── */
main { flex: 1; min-width: 0; padding: 24px 32px 64px; }
.wrap { max-width: 1280px; margin: 0 auto; }
.wrap > * + * { margin-top: 16px; }
.wrap > .crumbs + * { margin-top: 6px; }
h1 { font-weight: 600; font-size: 22px; letter-spacing: -.01em; line-height: 1.3; }
h2 { font-weight: 600; font-size: 15px; }
h3 { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.head-r { display: flex; gap: 10px; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); }
.crumbs .sep { color: var(--border-strong); }
.small { font-size: 12.5px; } .muted { color: var(--muted); } .sec { color: var(--text-2); } .strong { font-weight: 600; } .nowrap { white-space: nowrap; }
.warn { color: var(--wait); font-weight: 600; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 40px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: rot .9s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { color: var(--muted); padding: 28px; text-align: center; }

/* карточки */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { padding: 13px 18px; border-bottom: 1px solid var(--border); }
.card-h.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card:not(.flush) > .card-h { margin: -18px -18px 16px; }
.card > h2 { margin-bottom: 12px; }
.pad { padding: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 16px; align-items: start; }

/* кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: #fff; font-weight: 500; font-size: 13.5px; color: var(--text); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #d95100; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary:disabled { opacity: 1; background: #e9ecef; border-color: var(--border-strong); color: var(--muted); }
.field, .search { height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 12px; font: inherit; background: #fff; min-width: 0; }
.field:focus, .search:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }

/* показатели */
.kpis, .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi, .tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
.kpi.accent { box-shadow: inset 3px 0 0 var(--accent); }
.kpi .l, .tile .l { font-size: 12.5px; color: var(--text-2); }
.kpi .v, .tile .v { font-size: 24px; font-weight: 600; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .h, .tile .h { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* таблицы */
.tbl { overflow-x: auto; }
table.data, .sheet { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--head-bg); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #fafbfc; }
table.data td.th { width: 64px; padding-right: 0; }
table.data td.th img { width: 52px; height: auto; aspect-ratio: 4096 / 4000; object-fit: contain; border-radius: 4px; background: #1f1f1c; display: block; }
table.data .progress { max-width: 180px; }
.kind { display: inline-flex; gap: 8px; align-items: center; }

/* метки */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 4px; padding: 1px 8px; background: #eef0f2; color: var(--text-2); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.ref { background: var(--accent-soft); color: var(--accent-deep); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; font-size: 13px; color: var(--text-2); transition: background .12s, border-color .12s; }
.chip:hover { background: var(--hover); }
.chip.on { border-color: var(--border-strong); color: var(--text); background: #f1f2f4; font-weight: 500; }
.chip.static { cursor: default; }
.chip .c { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg button { height: 32px; padding: 0 12px; border: none; background: none; font-size: 13px; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { background: var(--hover); }
.seg button.on { background: #f1f2f4; color: var(--text); font-weight: 600; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ход обработки */
.progress { height: 6px; border-radius: 3px; background: #e9ecef; overflow: hidden; margin: 6px 0 4px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .4s var(--ease); }
.progress.big { height: 8px; margin-top: 10px; }
.state-l { color: var(--text-2); }
.state-l b { color: var(--text); }

/* загрузка кадров */
.upform { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr); gap: 22px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 210px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: #fafbfc; padding: 20px; cursor: pointer; color: var(--text-2); transition: background .12s, border-color .12s; }
.drop .icon { width: 26px; height: 26px; color: var(--accent); }
.drop b { color: var(--text); font-weight: 600; }
.drop:hover, .drop.on { background: var(--accent-soft); border-color: var(--accent); }
.drop input { display: none; }
.upside { display: flex; flex-direction: column; gap: 10px; }
.upside .btn.primary { height: 38px; }
.msg { background: var(--wait-bg); color: var(--wait); border-radius: var(--radius); padding: 9px 12px; font-size: 13px; }
.msg.info { background: #eef1f4; color: var(--text-2); }
.spec { display: grid; grid-template-columns: 96px 1fr; gap: 5px 12px; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 2px; }
.spec dt { color: var(--muted); }
.spec dd { color: var(--text-2); }
.spec.wide { grid-template-columns: 150px 1fr; border-top: none; padding-top: 0; }
.spec.wide dd { color: var(--text); font-variant-numeric: tabular-nums; }
.rej { margin-top: 12px; font-size: 13px; }
.rej summary { cursor: pointer; color: var(--text-2); }
.rej ul { margin: 8px 0 0 18px; color: var(--text-2); }

/* сверка: разложение ручной разметки - тот же вид / вид другой / общей рамкой / не найдено (без красного) */
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px 16px; flex-wrap: wrap; }
.split-head .l { font-size: 13px; color: var(--text-2); }
.split-head .v { font-size: 34px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: #e9ecef; margin: 12px 0 10px; }
.stack i { display: block; height: 100%; }
.stack.mini { display: inline-flex; width: 80px; height: 6px; margin: 0 10px 0 0; vertical-align: middle; }
.s-exact { background: var(--ok); }
.s-other { background: #d9a441; }
.s-common { background: #93c4a4; }
.s-miss { background: #cfd4da; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--text-2); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* кадры и находки */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.gcard:hover { border-color: var(--border-strong); }
.gcard .crop { width: 100%; aspect-ratio: 1; border-radius: 0; }
.gcard .body { padding: 9px 12px 11px; }
.gcard .t { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.gcard .d { font-size: 12px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.gcard.wait { display: grid; place-items: center; min-height: 160px; cursor: default; background: #fafbfc; }
/* миниатюры кадра: пропорция кадра ПДЛ 4096 x 4000 зафиксирована, снимок вписывается целиком и не растягивается */
.fshot { position: relative; aspect-ratio: 4096 / 4000; background: #1f1f1c; overflow: hidden; }
.fshot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fshot svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.more { text-align: center; margin-top: 16px; }

/* сверка: карточка кадра - ручная разметка и распознавание рядом, по три карточки в ряд */
.cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cmp { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.cmp:hover { border-color: var(--border-strong); }
.cmp-h { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.cmp-h .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-h .d { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.cmp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.cmp-pair figure { background: var(--surface); }
.cmp-pair figcaption { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: var(--text-2); }
.cmp-pair figcaption b { color: var(--text); font-weight: 600; }
.crop { position: relative; border-radius: 4px; overflow: hidden; background-color: #1f1f1c; background-repeat: no-repeat; }
.crop i { position: absolute; border: 2px solid var(--c, var(--accent)); border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }

/* разбор проезда */
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.thumb { flex: none; width: 78px; border-radius: 4px; overflow: hidden; border: 2px solid transparent; cursor: pointer; position: relative; background: #1f1f1c; scroll-snap-align: start; }
.thumb img { width: 100%; display: block; aspect-ratio: 4096 / 4000; object-fit: contain; }
.thumb.on { border-color: var(--accent); }
.thumb .k { position: absolute; left: 5px; bottom: 3px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.thumb .b { position: absolute; right: 4px; top: 4px; min-width: 18px; height: 18px; border-radius: 3px; background: rgba(20, 24, 30, .78); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; }
.shot-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 12px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.nav-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.frame-view { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.shot { position: relative; border-radius: var(--radius); background: #1f1f1c; }  /* без overflow: плашка у рамки может выходить за кадр */
.shot img { width: 100%; display: block; border-radius: var(--radius); }
.shot svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.layers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.legend { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.finds { display: flex; flex-direction: column; gap: 6px; max-height: 760px; overflow-y: auto; padding-right: 2px; }
.find { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.find:hover, .find.on { border-color: var(--accent-line); background: #fffaf6; }
.find .crop { flex: none; }
.find-b { min-width: 0; }
.find .t { font-weight: 600; font-size: 13px; display: flex; gap: 7px; align-items: center; }
.find .d { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pair-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.pair-h b { font-size: 16px; color: var(--text); }

.viewer { position: fixed; inset: 0; background: rgba(15, 18, 22, .88); display: grid; place-items: center; z-index: 50; cursor: zoom-out; padding: 62px 20px 26px; }
.viewer .box { position: relative; max-width: 96vw; max-height: calc(100vh - 90px); }
.viewer img { max-width: 96vw; max-height: calc(100vh - 90px); display: block; border-radius: 4px; }
.viewer .box svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }  /* слои над кадром; иконки кнопок панели - обычные */

@media (max-width: 1100px) { .cols, .frame-view, .pair, .upform { grid-template-columns: 1fr; } .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .cmp-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  body { flex-direction: column; }
  .side { width: auto; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .brand { padding: 12px 16px; } .brand-sub { display: none; }
  #nav { flex-direction: row; overflow-x: auto; padding: 8px 10px; gap: 4px; }
  .nav-item { white-space: nowrap; } .nav-cap, .side-foot { display: none; }
  main { padding: 16px 16px 48px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpi .v { font-size: 20px; }
  h1 { font-size: 20px; }
  table.data th, table.data td { padding: 8px 10px; }
}

/* разметка: отметки проверяющих */
.kpi .v .of { font-size: 14px; font-weight: 500; color: var(--muted); }
.thumb .rv { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 3px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.find.off { opacity: .6; }
.mk { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mk-b, .mk-s { height: 26px; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; font-size: 12px; color: var(--text-2); padding: 0 8px; font-family: inherit; }
.mk-b:hover, .mk-s:hover { background: var(--hover); }
.mk-b.on.ok { background: var(--ok-bg); border-color: #b6d6c1; color: var(--ok); font-weight: 600; }
.mk-b.on.bad { background: #eceef1; border-color: var(--border-strong); color: var(--text); font-weight: 600; }
.mk-s { max-width: 150px; cursor: pointer; }
.mk-b.on.size { background: #e8f0fb; border-color: #b9cdea; color: #2f5f9e; font-weight: 600; }
.mk-s.on { background: var(--wait-bg); border-color: #e6cf9f; color: var(--wait); font-weight: 600; }
.mk-who { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.mk-c { flex: 1 0 100%; width: 100%; min-height: 28px; max-height: 220px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 4px;
  font: inherit; font-size: 12.5px; line-height: 1.4; color: var(--text); background: #fff; resize: none; overflow-y: auto; }
.mk-c:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 2px #4f46e522; }
textarea.grow { field-sizing: content; }
.markp-note textarea.grow { min-height: 52px; max-height: 300px; resize: none; }
.mk-cm { font-size: 12px; color: var(--text-2); margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; border-left: 2px solid var(--border-strong); padding-left: 6px; }
.ml-c { color: var(--text-2); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pick .mk-c { margin-top: 2px; }
.markp { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fafbfc; }
.markp-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.markp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.markp-note textarea { width: 100%; height: auto; padding: 8px 10px; resize: vertical; margin-bottom: 6px; }
.ml { display: flex; flex-direction: column; gap: 4px; }
.ml-i { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.ml-i:hover, .ml-i.on { background: #e8f6fa; }
.ml-x { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.ml-x:hover { color: var(--text); }
.shot.drawing { cursor: crosshair; touch-action: none; }
.shot.drawing img { cursor: crosshair; }
.draw-rect { position: absolute; border: 2px dashed #0a9fc4; background: rgba(10, 159, 196, .12); pointer-events: none; }

/* полоса загрузки вверху страницы */
#topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; }
#topbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
#topbar.busy i { width: 35% !important; animation: barslide 1.1s ease-in-out infinite; }
@keyframes barslide { from { margin-left: -35%; } to { margin-left: 100%; } }

/* выбор находки кликом по кадру, увеличение кнопкой */
.shot.pickable img { cursor: pointer; }
.zoom-btn { position: absolute; right: 8px; top: 8px; z-index: 2; width: 34px; height: 34px; border: none; border-radius: 6px; background: rgba(20, 24, 30, .62); color: #fff; display: grid; place-items: center; }
.zoom-btn:hover { background: rgba(20, 24, 30, .85); }
.zoom-btn .icon { width: 19px; height: 19px; }
.pick { position: absolute; z-index: 3; width: 270px; margin-top: 6px; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--sh-pop); padding: 8px 10px 9px; cursor: default; text-align: left; }
.pick.up { margin: 0 0 6px; }
.pick-h { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.pick-x { margin-left: auto; border: none; background: none; font-size: 17px; line-height: 1; color: var(--muted); padding: 0 2px; }
.pick-x:hover { color: var(--text); }
.pick-d { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.viewer .box { cursor: default; }
.viewer .box img { cursor: pointer; }
.zclose { position: fixed; top: 12px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 24px; line-height: 1; z-index: 51; }
.zclose:hover { background: rgba(255, 255, 255, .26); }

/* сравнение во весь экран: два кадра рядом */
.zpair { display: flex; gap: 14px; align-items: flex-start; justify-content: center; max-width: 98vw; }
.zcol { min-width: 0; }
.zcap { color: rgba(255, 255, 255, .85); font-size: 13px; margin-bottom: 6px; }
.zpair .box img { max-width: 48vw; max-height: calc(100vh - 114px); }
@media (max-width: 760px) { .zpair { flex-direction: column; overflow-y: auto; max-height: 96vh; } .zpair .box img { max-width: 94vw; max-height: none; } }

/* режим разметки - своим цветом (индиго): переключатель, обводка кадра и карточки */
.card.marking { box-shadow: inset 0 0 0 2px #4f46e5; }
.shot.marking, .viewer .box.marking { box-shadow: 0 0 0 3px #4f46e5; }
/* увеличенный вид: стрелки между кадрами, подпись */
.znav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 70px; border: none; border-radius: 8px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 34px; line-height: 1; z-index: 51; }
.znav:hover:not(:disabled) { background: rgba(255, 255, 255, .26); }
.znav:disabled { opacity: .2; cursor: default; }
.zprev { left: 10px; } .znext { right: 10px; }
.ztitle { position: fixed; top: 18px; left: 20px; color: rgba(255, 255, 255, .85); font-size: 13px; z-index: 51; }
.ztitle b { color: #a5a1ff; }
@media (max-width: 760px) { .znav { width: 36px; height: 54px; font-size: 26px; } }

/* кадр: лента всех кадров по проездам, режимы своими цветами, «на весь экран» */
.strip-row { display: flex; gap: 14px; align-items: flex-start; }
.strip-row .strip { flex: 1; min-width: 0; gap: 0; }
.strip-g { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 0 8px; border-left: 1px solid var(--border); max-width: 100%; }
.strip-g:first-child { border-left: none; padding-left: 0; }
.strip-l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; width: 0; min-width: 100%; }
.strip-g.on .strip-l { color: var(--text); font-weight: 600; }
.strip-f { display: flex; gap: 6px; }
.modes { flex: none; display: flex; flex-direction: column; gap: 6px; }
.mbtn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600;
  border: 1.5px solid var(--c); color: var(--c); background: var(--c-soft); cursor: pointer; transition: background .12s, color .12s; font-family: inherit; }
.mbtn .icon { width: 16px; height: 16px; }
.mbtn:hover { background: var(--c-hover); }
.mbtn.on { background: var(--c); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.mbtn.view { --c: #0e7490; --c-soft: #e6f4f7; --c-hover: #d3ecf1; }
.mbtn.mark { --c: #4f46e5; --c-soft: #eeedfd; --c-hover: #e0defb; }
.btn.full { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn.full:hover { background: #d95100; }
.btn.full .icon { width: 15px; height: 15px; }
.finds.one { max-height: 520px; }
@media (max-width: 760px) { .strip-row { flex-direction: column; } .modes { flex-direction: row; } }

/* статистика: нижний ряд пополам, подробности сверки на месте */
.cols.half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.cols.half > .card { margin: 0; }
.cmp-more { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.cmp-more h3 { margin: 4px 0 -4px; }
.cmp-more .tbl { border: 1px solid var(--border); border-radius: var(--radius); }
.row-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

/* каталог: проезд справа в шапке, виды кадра */
.lane-sel { max-width: 360px; min-width: 220px; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
@media (max-width: 900px) { .cols.half { grid-template-columns: 1fr; } }
img.noimg { visibility: hidden; }

/* обводка пропущенного (08.11): рамкой или линией по точкам; инструменты - под кадром и в увеличенном виде, форма - плашкой у фигуры */
.drawc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drawc .seg button.on { background: #0a9fc4; color: #fff; }
.draw-hint { color: var(--text-2); }
.viewer .box.drawing, .viewer .box.drawing img { cursor: crosshair; touch-action: none; }
.dpop .field { width: 100%; height: 32px; margin-top: 6px; }
.dpop .mk-c { margin-top: 6px; }
.dpop .markp-row { margin-top: 6px; }
/* увеличенный вид: «Просмотр | Разметка» и обводка - панелью вверху по центру */
.ztools { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 51; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
  max-width: calc(100vw - 160px); background: rgba(255, 255, 255, .97); border-radius: 10px; padding: 6px 8px; box-shadow: var(--sh-pop); cursor: default; }
.ztools .modes { flex-direction: row; }
.ztools .mbtn { height: 32px; }
@media (max-width: 1000px) { .ztools { top: 46px; max-width: calc(100vw - 24px); } .viewer { padding-top: 100px; } }
.ztools .drawc { flex-wrap: nowrap; }
.zhint { position: fixed; bottom: 4px; left: 50%; transform: translateX(-50%); z-index: 51; color: rgba(255, 255, 255, .9); font-size: 12px; white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; cursor: default; }
.cmp-sum { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.cmp-sum b { color: var(--text); font-size: 16px; }
/* «Проверено пользователями» в половину ширины: 8 колонок - заголовки переносятся, поля уже, без прокрутки вбок */
table.data.tight { font-size: 13px; }
table.data.tight th { white-space: normal; padding: 8px 5px; font-size: 11.5px; vertical-align: bottom; }
table.data.tight td { padding: 9px 5px; }
table.data.tight th:first-child, table.data.tight td:first-child { padding-left: 14px; }
table.data.tight th:last-child, table.data.tight td:last-child { padding-right: 14px; }
