[hidden] { display: none !important; }
:root {
  --bg: #f4f6f9; --card: #ffffff; --ink: #1d2733; --muted: #5d6b7a; --line: #dde3ea;
  --brand: #1f4e78; --brand2: #2e75b6; --accent: #e8f1fa;
  --red: #c62828; --red-bg: #fde4e4; --amber: #8a6100; --amber-bg: #fff1c7;
  --green: #2e6b30; --green-bg: #dcefd9; --grey: #5f6670; --grey-bg: #e9ecef;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 21px; margin: 4px 0 12px; line-height: 1.25; }
h2 { font-size: 17px; margin: 18px 0 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
small, .muted { color: var(--muted); }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 20; background: var(--brand); color: #fff; display: flex; align-items: center; gap: 10px;
       padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.top a { color: #fff; }
.top .brand { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 8px; }
.top nav a { padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.top .right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.net-off { background: #ffcdd2; color: #8e0000; }
.chip.queue { background: #fff3c4; color: #6b4e00; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 14px 14px 90px; }

/* ---- bottom nav (phones) ---- */
.bottom { display: none; }
@media (max-width: 760px) {
  .top nav { display: none; }
  .top .who { display: none; }
  .bottom { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
            padding-bottom: env(safe-area-inset-bottom); }
  .bottom a { flex: 1; text-align: center; padding: 8px 2px 7px; font-size: 11px; color: var(--muted); }
  .bottom a .i { display: block; font-size: 20px; line-height: 1.1; }
  .bottom a.on { color: var(--brand); font-weight: 700; }
  main { padding: 12px 12px 92px; }
}

/* ---- cards, grid ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card.tight { padding: 10px 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; }
.kpi .v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi.red .v { color: var(--red); } .kpi.amber .v { color: var(--amber); }
.list { display: grid; gap: 8px; }
.item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 11px 12px; display: block; color: inherit; }
a.item:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.item .t { font-weight: 650; }
.item .s { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---- status ---- */
.st { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.st.red { background: var(--red-bg); color: var(--red); }
.st.amber { background: var(--amber-bg); color: var(--amber); }
.st.green { background: var(--green-bg); color: var(--green); }
.st.grey { background: var(--grey-bg); color: var(--grey); }
.flag { color: var(--red); font-weight: 600; font-size: 12px; }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f0f3f7; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: center; }

/* ---- forms ---- */
label.f { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 10px 11px; border: 1px solid #c8d1db; border-radius: 8px; font: inherit; background: #fff; color: inherit; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand2); outline-offset: 0; border-color: var(--brand2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
       background: var(--brand2); color: #fff; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:hover { text-decoration: none; filter: brightness(.95); }
.btn.big { width: 100%; padding: 14px; font-size: 17px; }
.btn.sec { background: #fff; color: var(--brand); border-color: #b9c6d4; }
.btn.ok { background: #2e7d32; } .btn.warn { background: #c62828; }
.btn.small { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.busy { cursor: wait; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-weight: 600; }
.alert.ok { background: var(--green-bg); color: var(--green); }
.alert.error { background: var(--red-bg); color: var(--red); }
.alert.info { background: var(--accent); color: var(--brand); }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.req::after { content: " *"; color: var(--red); }

/* ---- checklist ---- */
.chk { border-bottom: 1px solid var(--line); padding: 10px 0; }
.chk:last-child { border-bottom: 0; }
.chk .q { font-weight: 600; }
.chk .n { font-size: 13px; color: var(--muted); }
.yn { display: flex; gap: 8px; margin-top: 7px; }
.yn label { flex: 1; text-align: center; padding: 10px 6px; border: 1.5px solid #c8d1db; border-radius: 8px; cursor: pointer; font-weight: 700; user-select: none; }
.yn input { position: absolute; opacity: 0; pointer-events: none; }
.yn input:checked + span { display: inline; }
.yn label.y.sel { background: var(--green-bg); border-color: #66a86a; color: var(--green); }
.yn label.n.sel { background: var(--red-bg); border-color: #e57373; color: var(--red); }
.chk .note { display: none; margin-top: 7px; }
.chk.bad .note { display: block; }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); font-weight: 800; margin: 14px 0 0; }

/* ---- photos ---- */
.photo-field { border: 1.5px dashed #b9c6d4; border-radius: 10px; padding: 10px; margin: 8px 0; background: #fbfcfe; }
.photo-field.done { border-style: solid; border-color: #8bc48e; background: #f5fbf5; }
.photo-field .lab { font-weight: 650; font-size: 14px; }
.photo-field input[type=file] { display: none; }
.previews { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pv { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #ddd; }
.pv img { width: 100%; height: 100%; object-fit: cover; }
.pv button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; cursor: pointer; }
.pv .old { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(198,40,40,.85); color: #fff; font-size: 10px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery figure { margin: 0; background: var(--card); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery figcaption { padding: 5px 7px; font-size: 12px; }
.gps { font-size: 13px; padding: 5px 10px; border-radius: 10px; background: var(--grey-bg); color: var(--grey); display: inline-block; }
.gps.ok { background: var(--green-bg); color: var(--green); } .gps.bad { background: var(--red-bg); color: var(--red); }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 6px 0 12px; scrollbar-width: none; }
.tabs a { padding: 9px 12px; white-space: nowrap; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; font-size: 14px; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--brand); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 10px 10px 10px 46px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 8px; top: 9px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand2); color: #fff;
                    font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.steps .norm { font-size: 13px; color: var(--green); margin-top: 3px; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.info dt { color: var(--muted); } dl.info dd { margin: 0; }
@media (max-width: 560px) { dl.info { grid-template-columns: 1fr; gap: 0 0; } dl.info dd { margin-bottom: 8px; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters select, .filters input { width: auto; min-width: 150px; padding: 8px 10px; }
.danger-box { border-left: 4px solid var(--red); }
.right-text { text-align: right; }

@media print {
  .top, .bottom, .no-print, .actions, .filters { display: none !important; }
  body { background: #fff; font-size: 12px; }
  main { padding: 0; max-width: none; }
  .card, .item, .tbl-wrap, .kpi { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: inherit; }
}
.filters input[type=checkbox], .filters input[type=radio] { min-width: 0; width: auto; }
/* v3: techcard media */
.tc-media { margin-top: 8px; }
.tc-img { display: block; max-width: 100%; max-height: 360px; border-radius: 8px; border: 1px solid var(--line); }
.tc-video { display: block; width: 100%; max-height: 420px; background: #000; border-radius: 8px; }
.tc-step textarea { min-height: 60px; }
/* v3.1: dispatcher */
.badge-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700;
           line-height: 18px; text-align: center; vertical-align: 1px; }
.bottom .badge-n { position: relative; top: -2px; }
.ev { border-left: 5px solid var(--grey); }
.ev.new { border-left-color: var(--red); background: #fff8f8; }
.ev.work { border-left-color: #e0a000; }
.ev.link { border-left-color: #8e99a6; }
.ev .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ev .txt { margin: 6px 0; padding: 7px 10px; background: #f4f6f9; border-radius: 6px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.ev .who { font-size: 13px; margin-top: 4px; }
.tel { white-space: nowrap; font-weight: 650; }
.dsub { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.dsub a { padding: 8px 11px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
.dsub a.on { color: var(--brand); border-color: var(--brand); }
.dsub a:hover { text-decoration: none; color: var(--brand); }
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; font-size: 14px; }
.log li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand2); }
.log li.sms::before { background: var(--red); } .log li.restore::before { background: var(--green); } .log li.close::before { background: var(--grey); }
.log .t { font-size: 12px; color: var(--muted); }
.soundbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.newbar { position: sticky; top: 56px; z-index: 5; }
td .row { gap: 6px; }
td input[type=text].sm, td select.sm { padding: 6px 8px; font-size: 13px; }
.kpi.green .v { color: var(--green); }
a.kpi { color: inherit; } a.kpi:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
td .btn { white-space: nowrap; }
/* v3.2: rights as ticks */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.perm-group { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; margin: 0; min-width: 0; }
.perm-group legend { font-weight: 700; font-size: 13px; color: var(--brand); padding: 0 4px; }
.perm-group.learn { border-color: #e0a000; background: #fffaf0; }
label.perm { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
label.perm input { margin-top: 3px; flex: none; width: 18px; height: 18px; min-width: 0; }
label.perm small { display: block; font-size: 12px; line-height: 1.3; }
/* v3.2: functions of the program */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--muted); background: #fff; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { color: #fff; background: var(--grey); }
.seg input:checked + span.on { background: var(--brand2); }
.seg input:checked + span.strict { background: #b45309; }
.seg input:focus-visible + span { outline: 2px solid var(--brand2); outline-offset: -2px; }
.feat { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: start; }
.feat .mode-hint { grid-column: 1 / -1; font-size: 13px; padding: 6px 10px; border-radius: 6px; background: var(--accent); }
.feat .mode-hint.strict { background: #fff1e0; }
.feat .mode-hint.off { background: var(--grey-bg); color: var(--muted); }
.feat .opts { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.feat .opts label { font-size: 13px; }
.feat .opts input { max-width: 120px; }
@media (max-width: 640px) { .feat { grid-template-columns: 1fr; } }
/* v3.2: presence */
.onsite [data-qr-status] { font-size: 14px; }
.onsite-h { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.seg.wide { display: flex; flex-wrap: nowrap; }
.seg.wide label { flex: 1 1 0; text-align: center; }
.seg.wide span { padding: 11px 2px; font-size: 15px; white-space: nowrap; }
.onsite .actions.two { grid-template-columns: 1fr 1fr; }
.onsite .actions.two form { margin: 0; }
.onsite .actions.two .btn { width: 100%; min-height: 48px; }
.onsite.inline { margin: 8px 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
.visitbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 8px;
            background: var(--accent); border: 1px solid #c9dcef; font-size: 14px; }
.visitbar.late { background: #fff1e0; border-color: #f0c48a; }
.visitbar form { margin: 0; }
.scan-dlg { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.scan-box { background: #fff; border-radius: 12px; padding: 12px; width: min(440px, 100%); }
.scan-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.scan-h .x { font-size: 22px; }
.scan-box video { width: 100%; max-height: 50vh; background: #000; border-radius: 8px; object-fit: cover; }
.scan-msg { margin: 8px 0; font-size: 14px; }
.scan-msg.bad { color: var(--red); font-weight: 600; }
/* v3.2: home cards, quick links */
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0 0 14px; }
.hcard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
         color: inherit; border-left: 5px solid var(--brand2); }
.hcard:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.hcard .ic { font-size: 24px; line-height: 1; }
.hcard small { display: block; margin-top: 2px; }
.hcard.amber { border-left-color: #e0a000; } .hcard.red { border-left-color: var(--red); background: #fff8f8; } .hcard.green { border-left-color: var(--green); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.quick a { padding: 6px 10px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
/* v3.2: daily test */
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt { display: block; width: 100%; text-align: left; padding: 14px 14px; border-radius: 10px; border: 2px solid var(--line); background: #fff;
            font: inherit; font-size: 16px; cursor: pointer; color: inherit; }
button.quiz-opt:hover { border-color: var(--brand2); background: var(--accent); }
.quiz-opt.right { border-color: var(--green); background: var(--green-bg); font-weight: 600; }
.quiz-opt.wrong { border-color: var(--red); background: var(--red-bg); }
.quiz-done { text-align: center; } .quiz-done .big { font-size: 56px; line-height: 1; color: var(--green); }
/* v3.2: «what to do if» */
.help-list .item.danger { border-left: 5px solid var(--red); }
.ts-step { border-left: 6px solid var(--brand2); }
.ts-step.do { border-left-color: #e0a000; } .ts-step.stop { border-left-color: var(--red); background: #fff6f6; } .ts-step.end { border-left-color: var(--green); }
.ts-n { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.ts-step.stop .ts-n { color: var(--red); }
.ts-text { font-size: 19px; font-weight: 650; margin: 6px 0; line-height: 1.35; }
.ts-note { padding: 8px 10px; background: rgba(0,0,0,.04); border-radius: 6px; margin: 6px 0; }
.ts-ans { display: grid; gap: 8px; margin-top: 12px; }
.ts-ans .btn { width: 100%; justify-content: center; }
.ts-edit.stop { border-left: 5px solid var(--red); } .ts-edit.end { border-left: 5px solid var(--green); } .ts-edit.do { border-left: 5px solid #e0a000; }
.learn-steps { padding-left: 20px; } .learn-steps li { margin-bottom: 10px; } .learn-steps li.done > b::after { content: " ✔"; color: var(--green); }
/* v3.2: score, audit, answers, charts */
.score-v { font-size: 26px; font-weight: 800; padding: 2px 12px; border-radius: 8px; }
.score-v.green { background: var(--green-bg); color: var(--green); } .score-v.amber { background: var(--amber-bg); color: var(--amber); } .score-v.red { background: var(--red-bg); color: var(--red); }
.score-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.sp-h { display: flex; justify-content: space-between; font-size: 14px; }
.sp .bar { height: 8px; border-radius: 4px; background: var(--grey-bg); overflow: hidden; margin: 4px 0 2px; }
.sp .bar span { display: block; height: 100%; background: var(--brand2); border-radius: 4px; }
.sp.pen .sp-h b { color: var(--red); }
.audit-item img { width: 100%; max-height: 70vh; object-fit: contain; background: #111; border-radius: 8px; }
.answer { margin-top: 6px; padding: 8px 10px; background: var(--green-bg); border-radius: 6px; font-size: 14px; }
.pchart { width: 100%; height: auto; display: block; margin: 6px 0; }
.pchart .band { fill: #2e6b30; fill-opacity: .10; }
.pchart .lim { stroke: #2e6b30; stroke-opacity: .45; stroke-dasharray: 4 3; stroke-width: 1; }
.pchart .base { stroke: var(--line); stroke-width: 1; }
.pchart .ax { font-size: 13px; fill: var(--muted); }
.pchart .ln { fill: none; stroke: var(--brand2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pchart .pt { fill: var(--brand2); stroke: #fff; stroke-width: 2; }
.pchart .pt.bad { fill: var(--red); }
.pchart .pt:hover { stroke: var(--ink); }
.pchart .lv { font-size: 14px; font-weight: 700; fill: var(--ink); }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 0 12px; }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px -14px 0; padding: 10px 14px;
           background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -2px 6px rgba(16,24,40,.06); }
@media (max-width: 760px) { .savebar { bottom: calc(56px + env(safe-area-inset-bottom)); } .savebar span { display: none; } }
.feat .opts label.optbool { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.feat .opts label.optbool input { width: 18px; height: 18px; min-width: 0; }
/* v3.2.1: instruments on objects */
.instr-obj { margin: 16px 0 6px; } .instr-obj small { font-weight: 400; }
.item.instr.off { opacity: .5; }
details.vform > summary { list-style: none; display: inline-flex; cursor: pointer; }
details.vform > summary::-webkit-details-marker { display: none; }
details.vform[open] { flex-basis: 100%; }
label.choice { display: flex; gap: 8px; align-items: center; min-width: 0; }
label.choice input { width: 18px; height: 18px; min-width: 0; flex: none; }
.vform form > div { flex: 1 1 170px; min-width: 0; } .vform form input { width: 100%; }
/* v3.2.2: dispatcher sound on every page */
.chip.snd { border: 0; cursor: pointer; background: rgba(255,255,255,.16); color: #fff; font: inherit; font-size: 13px; }
.chip.snd.warn { background: #fff1c7; color: #6b4e00; }
a.alert.newbar { display: block; font-weight: 700; text-decoration: none; }
/* v3.2.2: management menu — everything visible, grouped */
.adm-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 14px; margin: 6px 0 14px; padding: 10px 12px;
           background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.adm-nav .grp { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.adm-nav .cap { flex-basis: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 2px; }
.adm-nav a { padding: 5px 10px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--brand); background: var(--accent); white-space: nowrap; }
.adm-nav a:hover { text-decoration: none; box-shadow: 0 0 0 2px #c9dcef inset; }
.adm-nav a.on { background: var(--brand); color: #fff; }
.adm-pick { display: none; }
@media (max-width: 760px) {
  .adm-nav { display: none; }
  .adm-pick { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-weight: 600; }
  .adm-pick select { flex: 1; }
}
.rayon-row { display: grid; grid-template-columns: minmax(200px, 340px) 1fr minmax(0, 440px); gap: 6px 12px; align-items: center; }
.rayon-row form { gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.rayon-row form select { max-width: 230px; }
@media (max-width: 760px) { .rayon-row { grid-template-columns: 1fr; } .rayon-row form { flex-wrap: wrap; justify-content: flex-start; } .rayon-row form select { max-width: none; flex: 1; } }
/* v3.3 */
.vchip { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--amber-bg); color: var(--amber); white-space: nowrap; }
.vchip.bad { background: var(--grey-bg); color: var(--ink); }
.vchip:hover { text-decoration: none; }
/* v3.3: plain big steps for field workers */
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px 12px; min-height: 64px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow);
        color: inherit; border-left: 8px solid var(--grey); }
a.step:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.step .ic { font-size: 28px; line-height: 1; flex: none; width: 34px; text-align: center; }
.step .tx { flex: 1; min-width: 0; }
.step .tx b { display: block; font-size: 17px; line-height: 1.25; }
.step .tx small { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.step .go { font-size: 30px; color: var(--muted); line-height: 1; flex: none; }
.step.red { border-left-color: var(--red); } .step.amber { border-left-color: #e0a000; } .step.grey { border-left-color: var(--grey); }
.step.done { border-left-color: var(--green); background: var(--green-bg); } .step.done .ic { color: var(--green); }
.sos { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: #fff; border: 2px solid var(--red); color: inherit; }
.sos:hover { text-decoration: none; background: #fff6f6; }
.sos .ic { font-size: 30px; } .sos b { display: block; font-size: 17px; color: var(--red); } .sos small { display: block; font-size: 13px; color: var(--muted); }
.todo-h { margin-top: 14px; }
.actions.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.actions.two .btn { justify-content: center; min-height: 48px; font-size: 15px; }
details.fold { margin-top: 16px; } details.fold > summary { font-weight: 650; padding: 10px 0; cursor: pointer; font-size: 16px; }
details.gap { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); border-left: 8px solid #e0a000; }
details.gap > summary { display: flex; gap: 12px; align-items: center; padding: 12px; cursor: pointer; list-style: none; }
details.gap > summary::-webkit-details-marker { display: none; }
details.gap .n { flex: none; min-width: 44px; text-align: center; font-size: 22px; font-weight: 800; color: var(--amber); }
details.gap .tx b { display: block; font-size: 16px; } details.gap .tx small { color: var(--muted); font-size: 13px; }
.gap-body { padding: 0 12px 12px 68px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a, .chips span { padding: 4px 9px; border-radius: 99px; background: var(--accent); font-size: 13px; }
.chips.years a { padding: 8px 14px; font-size: 15px; text-decoration: none; }
.chips.years a.on { background: var(--brand); color: #fff; }
.plan-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin: 8px 0 14px; }
.plan-months a { text-align: center; padding: 6px 2px; border-radius: 8px; background: var(--card); box-shadow: var(--shadow); font-size: 12px; color: var(--muted); }
.plan-months a b { display: block; font-size: 17px; color: var(--ink); }
.plan-months a.zero b { color: var(--muted); font-weight: 400; } .plan-months a.cur { outline: 2px solid var(--brand2); }
@media (max-width: 640px) { .plan-months { grid-template-columns: repeat(6, 1fr); } .gap-body { padding-left: 12px; } }
.step > .btn { flex: none; }
form.step { margin: 0; }
@media print { .no-print, nav, header, .top, .bottom { display: none !important; } details.fold > ul, details.fold > p { display: block; } }
.only-phone { display: none; }
@media (max-width: 760px) { .only-phone { display: block; } .steps.only-phone { display: grid; } .only-wide { display: none; } }
@media print { .only-phone, .steps.only-phone { display: none !important; } .only-wide { display: block !important; } }
.vchip.gas { background: var(--red-bg); color: var(--red); }

.exam-row { border-top: 1px solid var(--line, #e3e7ee); padding: 10px 0; }
.exam-row:first-of-type { border-top: 0; }

label.pick { display: flex; gap: 10px; align-items: center; padding: 9px 4px; font-size: 16px; cursor: pointer; }
label.pick input { width: 20px; height: 20px; flex: 0 0 auto; }
tr.grp-row td { background: var(--accent); padding: 6px 10px; font-size: 13px; }

/* one question to the master when a task took long: big buttons, one tap */
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.why-opt { display: block; margin: 0; cursor: pointer; }
.why-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.why-opt span { display: flex; align-items: center; min-height: 52px; padding: 8px 14px; border: 2px solid #cfd8e3; border-radius: 12px; background: #fff; font-weight: 600; line-height: 1.25; }
.why-opt input:checked + span { border-color: #2e75b6; background: #e8f1fb; color: #1f4e79; }
.why-opt input:focus-visible + span { outline: 3px solid #9cc3ec; }

.qfix { margin-top: 8px; }
.qfix > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.qfix textarea { min-height: 70px; }
tr.far td { background: var(--red-bg); }

/* object picker (3.12.5): search + districts + the whole list */
.op { position: relative; }
.op-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.op-field { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 10px; border: 1.5px solid #c8d1db; border-radius: 8px;
            background: #fff; cursor: pointer; user-select: none; }
.op-field:focus { outline: 2px solid var(--brand2); outline-offset: 1px; }
.op.open .op-field { border-color: var(--brand2); }
.op.bad .op-field { border-color: var(--red); }
.op.dis .op-field { opacity: .55; cursor: not-allowed; }
.op-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-val.ph { color: var(--muted); }
.op-x { border: 0; background: none; font-size: 16px; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.op-arrow { color: var(--muted); }
.op-panel { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); min-width: min(100%, 320px); background: #fff; border: 1px solid var(--line);
            border-radius: 10px; box-shadow: 0 8px 28px rgba(20, 30, 45, .18); padding: 8px; }
.op-q { width: 100%; margin: 0 0 6px; min-height: 42px; padding: 8px 10px; font-size: 16px; border: 1.5px solid #c8d1db; border-radius: 8px; }
.op-dist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.op-d { border: 1px solid var(--line); background: #f4f6f9; border-radius: 16px; padding: 6px 11px; font: inherit; font-size: 14px; cursor: pointer; color: inherit; }
.op-d.on { background: var(--brand2); border-color: var(--brand2); color: #fff; }
.op-list { max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.op-h { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 10px 8px 4px; }
.op-row { padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.op-row:hover, .op-row.act { background: #eef3fa; }
.op-row.sel { background: #e3edf9; }
.op-n { font-weight: 600; }
.op-m { font-size: 13px; color: var(--muted); }
.op-m:empty { display: none; }
.op-hit { display: block; color: var(--green); font-weight: 600; }
.op-ck { margin-right: 6px; }
.op-empty .op-n { font-weight: 400; color: var(--muted); }
.op-none { padding: 12px 8px; color: var(--muted); }
.op-done { text-align: right; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.op-chip { display: inline-flex; align-items: center; gap: 4px; background: #e3edf9; border-radius: 16px; padding: 4px 4px 4px 11px; font-size: 14px; }
.op-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; }
.op-err { color: var(--red); font-size: 14px; margin-top: 4px; }
.filters .op { min-width: 220px; }

/* work without a link (3.12.7) */
.copy-note { background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.copy-note a { color: inherit; }
.copy-note.fresh { background: var(--green-bg); color: var(--green); }
.qmark { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--amber); }
.qmark[hidden] { display: none; }
.qmark.bad { color: var(--red); }
.qmark a { color: inherit; }

/* obligatory «Я на объекте» without the phone's place: show the sticker button (3.12.8) */
.btn.pulse { outline: 3px solid #d97706; outline-offset: 2px; animation: kpulse 1.2s ease-in-out 4; }
@keyframes kpulse { 50% { outline-color: transparent; } }
