/* ==== Европа · Система проведения проверок — дизайн по мотивам MD Audit ==== */
:root{
  --blue:#325EFB; --blue-d:#264BD6; --blue-bg:#EAF0FE;
  --ink:#001424; --muted:#6B7787; --line:#E6E9EE; --line-2:#EEF1F5;
  --bg:#F5F6F8; --card:#FFFFFF; --side:#FFFFFF; --side-active:#F2F2F2;
  --green:#1E8A4C; --green-bg:#E4F3EA; --red:#E23B3B; --red-bg:#FCEAEA;
  --amber:#E8A400; --amber-bg:#FFF3D6; --grey:#8B94A3; --grey-bg:#EEF1F5;
  --radius:12px; --radius-s:8px; --pill:30px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
/* Браузерное [hidden]{display:none} слабее любого авторского display —
   поэтому .searchbar/.editor-ov с display:flex не скрывались. Закрываем это тут. */
[hidden]{display:none !important;}
html,body{margin:0; padding:0; background:var(--bg); color:var(--ink);
  font:14px/1.45 "Roboto","MD-Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;}
a{color:var(--blue); text-decoration:none;}
a:hover{text-decoration:underline;}
h1{font-size:20px; font-weight:700; margin:0 0 14px;}
h2{font-size:15px; font-weight:700; margin:20px 0 10px;}
.muted{color:var(--muted);} .small{font-size:12.5px;}
.ok-c{color:var(--green);} .bad-c{color:var(--red);} .mid-c{color:var(--amber);}
.err{color:var(--red); font-weight:600;}

/* ---------- каркас: сайдбар + основная область ---------- */
.app{display:flex; min-height:100vh;}
.side{width:236px; flex:none; background:var(--side); border-right:1px solid var(--line);
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto;}
.logo{display:flex; align-items:center; gap:10px; padding:16px 18px; text-decoration:none;}
.logo:hover{text-decoration:none;}
.logo .mark{width:30px; height:30px; flex:none; border-radius:8px;
  background:linear-gradient(135deg,var(--red) 0%,var(--amber) 100%);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:17px;}
.logo b{font-size:17px; color:var(--ink); font-weight:800; letter-spacing:.01em;}
.logo b span{font-weight:400; color:var(--muted);}
.side-nav{padding:6px 10px; display:flex; flex-direction:column; gap:2px;}
.nav-item{display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:8px;
  color:var(--ink); font-size:14px; font-weight:500; cursor:pointer;}
.nav-item:hover{background:var(--side-active); text-decoration:none;}
.nav-item.active{background:var(--blue-bg); color:var(--blue);}
.nav-item .ico{width:18px; height:18px; flex:none; opacity:.85;}
.nav-item.active .ico{opacity:1;}
.nav-sub{display:flex; flex-direction:column; gap:1px; margin:0 0 2px 30px;}
.nav-sub a{padding:7px 12px; border-radius:8px; color:var(--muted); font-size:13.5px; font-weight:500;}
.nav-sub a:hover{background:var(--side-active); text-decoration:none;}
.nav-sub a.active{background:var(--blue-bg); color:var(--blue);}
.side-sep{height:1px; background:var(--line); margin:8px 14px;}
.side-foot{margin-top:auto; padding:12px 14px; border-top:1px solid var(--line);}
.side-foot .who{font-size:13px; font-weight:700; color:var(--ink);}
.side-foot .role{font-size:11.5px; color:var(--muted); margin-bottom:8px;}

/* ---------- основная область ---------- */
.main{flex:1; min-width:0; display:flex; flex-direction:column;}
.topbar{height:56px; flex:none; background:var(--card); border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:14px; padding:0 22px; position:sticky; top:0; z-index:20;}
.topbar .page-title{font-size:16px; font-weight:700; flex:1;}
.topbar .icon-btn{width:32px; height:32px; border-radius:50%; border:0; background:transparent;
  color:var(--muted); cursor:pointer; font-size:15px;}
.topbar .icon-btn:hover{background:var(--grey-bg);}
.topbar .badge{position:relative; top:-8px; left:-6px; background:var(--red); color:#fff;
  border-radius:999px; font-size:10px; padding:1px 5px; font-weight:700;}
.content{padding:20px 22px 60px; max-width:1200px; width:100%;}

/* ---------- кнопки ---------- */
.btn{display:inline-flex; align-items:center; gap:7px; background:var(--blue); color:#fff; border:0;
  border-radius:var(--pill); padding:9px 18px; font-size:13.5px; font-weight:600; cursor:pointer;
  text-decoration:none; font-family:inherit;}
.btn:hover{background:var(--blue-d); text-decoration:none;}
.btn:active{transform:scale(.98);}
.btn-sm{padding:7px 14px; font-size:13px;}
.btn-ghost{background:#fff; color:var(--blue); border:1px solid var(--blue); border-radius:var(--pill);
  padding:8px 15px; font-weight:600; cursor:pointer; font-size:13px; font-family:inherit;}
.btn-ghost:hover{background:var(--blue-bg);}
.btn-grey{background:var(--grey-bg); color:var(--ink); border:0; border-radius:var(--pill);
  padding:8px 15px; font-weight:600; cursor:pointer; font-size:13px; font-family:inherit;}
.btn-danger{background:#fff; color:var(--red); border:1px solid var(--red); border-radius:var(--pill);
  padding:8px 15px; font-weight:600; cursor:pointer; font-size:13px; font-family:inherit;}
.btn-danger:hover{background:var(--red); color:#fff;}
.del-form{display:inline;}
.btn[disabled]{opacity:.5; cursor:default;}
.btn-row{display:flex; gap:8px; align-items:center; margin-top:12px; flex-wrap:wrap;}

/* ---------- карточки/списки ---------- */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; margin-top:12px;}
.card.inactive{opacity:.55;}
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-top:4px;}
.card.stat{text-align:left; margin-top:0; padding:16px 18px;}
.card.stat b{font-size:26px; font-weight:700; display:block; line-height:1.1;}
.card.stat span{font-size:12.5px; color:var(--muted);}
.row-card{display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink);}
a.row-card:hover{border-color:#CFD8E6; text-decoration:none;}
.grow{flex:1; min-width:0;}
.list .card{margin-top:10px;}
.pill{border-radius:999px; padding:4px 12px; font-size:12.5px; font-weight:700; white-space:nowrap; display:inline-block;}
.pill-green{background:var(--green-bg); color:var(--green);}
.pill-red{background:var(--red-bg); color:var(--red);}
.pill-yellow{background:var(--amber-bg); color:var(--amber);}
.pill-grey{background:var(--grey-bg); color:var(--muted);}
.pill-blue{background:var(--blue-bg); color:var(--blue);}

/* ---------- формы ---------- */
.form label{display:block; font-size:12px; font-weight:600; color:var(--muted); margin:10px 0 4px;}
.form input,.form select,.form textarea{width:100%; border:1px solid var(--line); border-radius:var(--radius-s);
  padding:10px 12px; font-size:14px; background:#fff; color:var(--ink); font-family:inherit;}
.form input:focus,.form select:focus,.form textarea:focus{outline:none; border-color:var(--blue);}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}

/* ---------- таблицы ---------- */
.tbl{width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden; margin-top:10px;}
.tbl th,.tbl td{padding:10px 12px; text-align:left; border-bottom:1px solid var(--line-2); font-size:13.5px;}
.tbl th{background:#FAFBFC; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:600;}
.tbl tr:last-child td{border-bottom:0;}
.tbl tbody tr:hover{background:#FAFBFC;}

/* ---------- вход ---------- */
.login-body{display:flex; align-items:center; justify-content:center; min-height:100vh; background:var(--bg);}
.login-card{background:var(--card); border-radius:20px; padding:34px 38px; width:100%; max-width:760px;
  box-shadow:0 10px 40px rgba(0,20,36,.08); display:grid; grid-template-columns:1fr 1fr; gap:30px; align-items:center; margin:16px;}
.login-head{grid-column:1 / -1; text-align:center; font-size:18px; font-weight:600; letter-spacing:.06em; color:var(--ink); text-transform:uppercase;}
.login-brand{display:flex; flex-direction:column; align-items:center; gap:12px;}
.login-brand .mark{width:88px; height:88px; border-radius:20px;
  background:linear-gradient(135deg,var(--red) 0%,var(--amber) 100%);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:46px;}
.login-brand b{font-size:22px; font-weight:800;}
.login-brand b span{font-weight:400; color:var(--muted);}
.login-form h2{font-size:20px; font-weight:600; margin:0 0 14px;}
.login-form input{width:100%; border:1px solid var(--line); border-radius:var(--radius-s); padding:12px 14px; font-size:15px; margin-bottom:12px;}
.login-form input:focus{outline:none; border-color:var(--blue);}
.login-form .btn{width:100%; justify-content:center; margin-top:6px;}
@media (max-width:640px){ .login-card{grid-template-columns:1fr;} .login-brand{order:-1;} }

/* ---------- прохождение проверки ---------- */
.runbar{display:flex; align-items:center; gap:12px; position:sticky; top:56px; z-index:15; background:var(--bg); padding:8px 0;}
.chip{background:var(--grey-bg); border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:700; white-space:nowrap;}
.chip-score{background:var(--blue); color:#fff;}
.shelf{height:5px; border-radius:3px; background:var(--grey-bg); margin:2px 0 4px; overflow:hidden;}
.shelf i{display:block; height:100%; width:0%; background:var(--blue); transition:width .25s;}
.sec-h{display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line);
  color:var(--ink); border-radius:10px; padding:11px 14px; cursor:pointer; margin-top:14px;}
.sec-h.static{cursor:default;}
.sec-h .name{flex:1; font-size:13px; font-weight:700;}
.sec-h .cnt{font-size:12px; font-weight:600; background:var(--grey-bg); color:var(--muted); border-radius:999px; padding:2px 9px;}
.sec-h .bad-n{font-size:12px; font-weight:700; background:var(--red-bg); color:var(--red); border-radius:999px; padding:2px 8px; display:none;}
.sec-h .arr{font-size:11px; color:var(--muted); transition:transform .18s;}
/* Рубильник блока: включён по умолчанию; выключен = отдела нет в этом магазине */
.sec-tg{width:38px; height:22px; flex:none; padding:0; position:relative; cursor:pointer;
  border:1.5px solid var(--blue); background:var(--blue); border-radius:999px; transition:background .18s, border-color .18s;}
/* Палец толще курсора: расширяем зону нажатия, не трогая внешний вид.
   Промах по рубильнику = сброс целого блока, поэтому запас здесь важен. */
.sec-tg::before{content:''; position:absolute; inset:-11px -8px;}
.sec-tg i{position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,20,36,.3); transform:translateX(15px); transition:transform .18s;}
.sec-tg.off{background:var(--grey-bg); border-color:var(--line);}
.sec-tg.off i{transform:none;}
.sec-off-l{display:none; font-size:11px; font-weight:700; color:var(--muted);
  background:var(--grey-bg); border-radius:999px; padding:2px 8px; white-space:nowrap;}
.sec.sec-disabled .sec-off-l{display:inline;}
.sec.sec-disabled .name{color:var(--muted); text-decoration:line-through;}
.sec.sec-disabled .sec-body{display:none !important;}
.sec.sec-disabled .arr, .sec.sec-disabled .cnt, .sec.sec-disabled .bad-n{display:none;}
.sec.closed .arr{transform:rotate(-90deg);}
.sec.closed .sec-body{display:none;}
.q{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); margin-top:10px; padding:14px; position:relative;}
.q.ok{border-color:#BFE3CC;} .q.bad{border-color:#F3C2C6;} .q.na{opacity:.72;}
.q.viol{outline:2px solid var(--red); outline-offset:0;}
.q-top{display:flex; gap:10px;}
.num{flex:none; min-width:28px; height:24px; border-radius:7px; background:var(--grey-bg); padding:0 6px;
  color:var(--blue); font-size:12.5px; font-weight:700; display:flex; align-items:center; justify-content:center;}
.q.ok .num{background:var(--green-bg); color:var(--green);}
.q.bad .num{background:var(--red-bg); color:var(--red);}
.q-text{font-size:14px; line-height:1.45; white-space:pre-line;}
.w{position:absolute; top:12px; right:14px; font-size:10.5px; font-weight:600; color:var(--muted);}
.hint{margin:8px 0 0 38px; font-size:12.5px; color:var(--muted); font-style:italic; white-space:pre-line;}
.ans-line{margin:8px 0 0 38px;}
.props{margin:6px 0 0 38px;}
.tri{display:flex; gap:8px; margin:12px 0 0 38px; flex-wrap:wrap;}
.tri button{flex:1; min-width:66px; border:1.5px solid var(--line); background:#fff; color:var(--ink);
  border-radius:10px; padding:11px 6px; font-size:14.5px; font-weight:700; transition:transform .06s; cursor:pointer; font-family:inherit;}
.tri button:active{transform:scale(.96);}
.tri .b-na{flex:.55; color:var(--muted); font-weight:600;}
.tri button.sel-yes{background:var(--green); border-color:var(--green); color:#fff;}
.tri button.sel-mid{background:var(--amber); border-color:var(--amber); color:#fff;}
.tri button.sel-no{background:var(--red); border-color:var(--red); color:#fff;}
.tri button.sel-na{background:var(--grey); border-color:var(--grey); color:#fff;}
.tri button.sel-custom{background:var(--blue); border-color:var(--blue); color:#fff;}
.free-input{margin:10px 0 0 38px;}
.free-input input,.free-input textarea{width:100%; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:14px/1.4 inherit; background:#fff;}
.extras{display:flex; gap:8px; margin:10px 0 0 38px; flex-wrap:wrap; align-items:center;}
.b-ph{border:1.5px dashed #C3CCDA; background:#fff; color:var(--muted); border-radius:999px;
  padding:8px 14px; font-size:13px; font-weight:600; cursor:pointer;}
.b-ph.has{background:var(--blue); border:1.5px solid var(--blue); color:#fff;}
.b-ph.need{border-color:var(--red); color:var(--red);}
.c-toggle{background:none; border:0; padding:8px 0; color:var(--blue); font-size:12.5px; font-weight:600; cursor:pointer;}
.c-req{color:var(--red);}
.c-box{display:none; margin:8px 0 0 38px;}
.q.c-open .c-box{display:block;}
.c-box textarea{width:100%; min-height:64px; border:1px solid var(--line); border-radius:8px;
  padding:10px 12px; font:14px/1.4 inherit; background:#fff; resize:vertical;}
.q.c-need .c-box textarea{border-color:var(--red);}
.voice-notes{margin:8px 0 0 38px; display:flex; flex-direction:column; gap:6px;}
.voice-note{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted);}
.voice-note audio{height:34px; max-width:260px;}
.thumbs{display:flex; gap:8px; margin:10px 0 0 38px; flex-wrap:wrap;}
.thumbs .th{position:relative;}
.thumbs img{width:78px; height:78px; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block;}
.thumbs .del{position:absolute; top:-7px; right:-7px; width:22px; height:22px; border-radius:50%;
  background:var(--red); color:#fff; border:2px solid #fff; font-size:11px; line-height:1; cursor:pointer; font-weight:700;}
.up-status{font-size:12px; color:var(--muted); margin-left:4px;}
.b-voice{border:1.5px solid var(--line); background:#fff; color:var(--ink); border-radius:999px;
  padding:7px 12px; font-size:14px; cursor:pointer; line-height:1;}
.b-voice.rec{background:var(--red); border-color:var(--red); color:#fff; animation:vpulse 1s infinite;}
@keyframes vpulse{0%,100%{opacity:1}50%{opacity:.55}}
.thumbs .th.pend img{opacity:.6;}
.thumbs .pend-b{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font-size:16px;}

/* ---------- прохождение: тулбар навигации ---------- */
.run-tools{display:flex; gap:6px;}
.rt-btn{width:38px; height:38px; border:1px solid var(--line); background:#fff; border-radius:10px;
  font-size:17px; cursor:pointer; line-height:1; color:var(--ink);}
.rt-btn:active{transform:scale(.95);} .rt-btn.on{background:var(--blue-bg); border-color:var(--blue);}
.searchbar{position:sticky; top:106px; z-index:14; display:flex; align-items:center; gap:6px;
  background:#fff; border:1px solid var(--line); border-radius:10px; padding:6px 8px; margin-top:6px;}
.searchbar input{flex:1; border:0; outline:none; font:14px inherit; background:none; color:var(--ink);}
.searchbar button{border:0; background:var(--grey-bg); color:var(--muted); border-radius:8px;
  width:30px; height:30px; font-size:13px; cursor:pointer; font-weight:700;}
.searchbar .s-count{font-size:12px; color:var(--muted); font-weight:600; min-width:34px; text-align:center;}
/* Поиск = строгая фильтрация: не совпало — убираем из потока полностью,
   иначе остаются пустые дыры и приходится долго скроллить.
   ВНИМАНИЕ: контейнер — <div id="list"> БЕЗ класса, поэтому селектор именно #list.
   Старое правило было написано как «.list.searching» и не срабатывало никогда. */
#list.searching .q-off{display:none;}
#list.searching .sec-off{display:none;}
#list.searching .sec-found .sec-h{position:static;}   /* не липнет при фильтрации */
.q-hit{outline:2px solid var(--amber); outline-offset:1px;}
.q.flash{animation:qflash 1.4s ease;}
@keyframes qflash{0%,100%{box-shadow:none} 15%,70%{box-shadow:0 0 0 3px var(--blue);}}

/* информация к вопросу (ℹ) */
.q-top .q-text{flex:1;}
.q-info{flex:none; width:24px; height:24px; border-radius:50%; border:1px solid var(--line);
  background:#fff; color:var(--blue); font-size:13px; font-weight:700; cursor:pointer; line-height:1;}
.info-box{display:none; margin:8px 0 0 38px; font-size:12.5px; color:var(--muted); font-style:italic;
  white-space:pre-line; background:var(--blue-bg); border-radius:8px; padding:8px 10px;}
.q.info-open .info-box{display:block;}
.info-box .info-files{display:flex; flex-direction:column; gap:5px; margin-top:8px;}
.info-box .info-files a{font-size:13px; font-weight:600; font-style:normal;}

/* серийная съёмка: камера прямо в приложении */
.cam-ov{position:fixed; inset:0; z-index:82; background:#000; display:flex;}
.cam{flex:1; display:flex; flex-direction:column; min-height:0;}
.cam-top{display:flex; align-items:center; gap:10px; padding:10px 12px; color:#fff;
  padding-top:calc(10px + env(safe-area-inset-top));}
.cam-t{font-size:14px; font-weight:700;}
.cam-top .grow{flex:1;}
.cam-x{width:38px; height:38px; border-radius:50%; border:0; background:rgba(255,255,255,.15); color:#fff; font-size:15px; cursor:pointer;}
.cam-view{flex:1; min-height:0; display:flex; align-items:center; justify-content:center; overflow:hidden;}
.cam-view video{width:100%; height:100%; object-fit:contain;}
.cam-strip{display:flex; gap:6px; padding:8px 12px; overflow-x:auto; min-height:0;}
.cam-strip:empty{display:none;}
.cam-th{position:relative; flex:none;}
.cam-th img{width:54px; height:54px; object-fit:cover; border-radius:8px; display:block; border:2px solid rgba(255,255,255,.5);}
.cam-th button{position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%;
  border:0; background:#fff; color:var(--red); font-size:10px; font-weight:800; cursor:pointer; line-height:1;}
.cam-bot{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom));}
.cam-flip{width:48px; height:48px; border-radius:50%; border:0; background:rgba(255,255,255,.15); color:#fff; font-size:20px; cursor:pointer;}
.cam-shot{width:70px; height:70px; border-radius:50%; border:4px solid rgba(255,255,255,.85); background:transparent; cursor:pointer; padding:0;}
.cam-shot i{display:block; width:100%; height:100%; border-radius:50%; background:#fff; transform:scale(.86); transition:transform .1s;}
.cam-shot.flash i{transform:scale(.6);}
.cam-done{min-width:96px; border:0; border-radius:999px; background:rgba(255,255,255,.15); color:#fff;
  padding:12px 16px; font:700 13.5px/1 inherit; cursor:pointer;}
.cam-done.has{background:var(--blue);}

/* админ: справки к вопросу на странице чек-листа */
.qadmin{margin:12px 0 0 38px; padding:12px; background:#FAFBFC; border:1px solid var(--line); border-radius:10px;}
.qa-h{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin:2px 0 6px;}
.qa-h:not(:first-child){margin-top:14px;}
.qa-hint{display:flex; gap:8px; align-items:flex-start;}
.qa-hint textarea{flex:1; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:13px/1.4 inherit; background:#fff; resize:vertical;}
.qa-files{display:flex; flex-direction:column; gap:6px; margin-bottom:8px;}
.qa-file{display:flex; align-items:center; gap:8px; font-size:13px;}
.qa-file form{margin:0;}
.qa-del{width:22px; height:22px; border-radius:50%; background:#fff; border:1px solid var(--line); color:var(--red); font-size:11px; font-weight:700; cursor:pointer;}
.qa-up{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
.qa-up input[type=file]{font-size:12.5px;}

/* блок вложений */
.attach{display:flex; gap:8px; margin:12px 0 0 38px; flex-wrap:wrap; align-items:center;}
.a-btn{border:1.5px solid var(--line); background:#fff; color:var(--ink); border-radius:999px;
  min-width:40px; height:38px; padding:0 12px; font-size:16px; cursor:pointer; line-height:1;
  display:inline-flex; align-items:center; gap:5px; font-family:inherit;}
.a-btn:active{transform:scale(.95);}
.a-btn.need{border-color:var(--red); color:var(--red);}
.ev-hint{display:none; margin:6px 0 0 38px; font-size:12px; font-weight:600; color:var(--red);}
.q.ev-need .ev-hint{display:block;}
.a-btn.rec{background:var(--red); border-color:var(--red); color:#fff; animation:vpulse 1s infinite;}
.a-btn .rec-t{font-size:13px; font-weight:700;}
.a-comm .c-req{font-size:12px; font-weight:800; color:var(--red);}

/* голосовые заметки — отдельный блок (как в MD Audit) */
.voices{display:flex; flex-direction:column; gap:8px; margin:10px 0 0 38px;}
.vc{display:flex; align-items:center; gap:8px; background:var(--grey-bg); border-radius:10px; padding:6px 8px;}
.vc-ic{font-size:15px;}
.vc audio{height:34px; flex:1; min-width:0; max-width:280px;}
/* Запас на палец. .thumbs .del/.edit уже absolute — им position не трогаем,
   иначе уедут с углов миниатюры; .vc-del делаем relative явно. */
.thumbs .del::before, .thumbs .edit::before, .vc-del::before{content:''; position:absolute; inset:-8px;}
.vc-del{position:relative;}
.vc-del{flex:none; width:24px; height:24px; border-radius:50%; background:#fff; border:1px solid var(--line);
  color:var(--red); font-size:12px; font-weight:700; cursor:pointer;}

/* файлы к вопросу */
.files{display:flex; flex-direction:column; gap:6px; margin:8px 0 0 38px;}
.fl{display:flex; align-items:center; gap:8px; font-size:13px;}
.fl-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.fl-del{flex:none; width:22px; height:22px; border-radius:50%; background:#fff; border:1px solid var(--line);
  color:var(--red); font-size:11px; font-weight:700; cursor:pointer;}

/* разметка фото */
.thumbs .edit{position:absolute; bottom:-7px; right:-7px; width:22px; height:22px; border-radius:50%;
  background:var(--blue); color:#fff; border:2px solid #fff; font-size:10px; line-height:1; cursor:pointer;}

/* переход к незаполненным */
.issues-btn{border:1.5px solid var(--red); background:var(--red-bg); color:var(--red); border-radius:999px;
  padding:9px 14px; font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; font-family:inherit;}
.issues-btn:active{transform:scale(.97);}

/* подсветка активного блока */
.sec.active > .sec-h{border-color:var(--blue); background:var(--blue-bg); box-shadow:inset 3px 0 0 var(--blue);}

/* выезжающая панель навигации/аннотаций */
.drawer-ov{position:fixed; inset:0; background:rgba(0,20,36,.35); z-index:59;}
.drawer{position:fixed; top:0; right:0; bottom:0; width:min(400px,90vw); background:#fff; z-index:60;
  display:flex; flex-direction:column; box-shadow:-8px 0 26px rgba(0,20,36,.14);}
.drawer-h{display:flex; align-items:center; justify-content:space-between; padding:14px 16px;
  border-bottom:1px solid var(--line); font-weight:700; font-size:15px;}
.drawer-x{border:0; background:none; font-size:18px; color:var(--muted); cursor:pointer; line-height:1;}
.drawer-body{overflow:auto; padding:8px 10px 24px;}
.ol-block{border-bottom:1px solid var(--line-2);}
.ol-bh{display:flex; align-items:center; gap:8px; padding:11px 6px; cursor:pointer;}
.ol-arr{font-size:11px; color:var(--muted); transition:transform .15s;}
.ol-block.open .ol-arr{transform:rotate(90deg);}
.ol-bn{flex:1; font-size:13.5px; font-weight:700;}
.ol-cnt{font-size:11.5px; color:var(--muted); background:var(--grey-bg); border-radius:999px; padding:1px 8px;}
.ol-items{display:none; padding:0 4px 8px;}
.ol-block.open .ol-items{display:block;}
.ol-q{padding:8px 8px 8px 10px; border-radius:8px; cursor:pointer; display:flex; gap:8px; flex-wrap:wrap;}
.ol-q:hover{background:var(--blue-bg);}
.ol-num{flex:none; font-size:11.5px; font-weight:700; color:var(--blue);}
.ol-t{flex:1; font-size:12.5px; line-height:1.35;}
.ol-hint{flex-basis:100%; margin-left:20px; font-size:11.5px; color:var(--muted); font-style:italic;}

/* редактор фото (выделить/нарисовать) */
.editor-ov{position:fixed; inset:0; background:rgba(0,10,20,.82); z-index:80; display:flex; align-items:center; justify-content:center; padding:10px;}
.editor{background:#111; border-radius:12px; max-width:96vw; max-height:94vh; display:flex; flex-direction:column; overflow:hidden;}
.editor-tools{display:flex; align-items:center; gap:8px; padding:8px 10px; background:#1c1c1c; flex-wrap:wrap;}
.editor-tools .grow{flex:1;}
.et-colors{display:flex; gap:6px;}
.et-c{width:24px; height:24px; border-radius:50%; border:2px solid #444; cursor:pointer; padding:0;}
.et-c.on{border-color:#fff; transform:scale(1.12);}
.et-btn{border:0; background:#333; color:#fff; border-radius:8px; padding:8px 12px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit;}
.et-btn.primary{background:var(--blue);}
.editor-canvas-wrap{overflow:auto; display:flex; align-items:center; justify-content:center; background:#000; padding:6px;}
#editorCanvas{max-width:100%; max-height:76vh; touch-action:none; background:#000; display:block;}

/* финальный вывод ИИ по итогам проверки */
.ai-summary{background:linear-gradient(180deg,#F3F6FF,#fff); border:1px solid #D5DEFF; border-radius:var(--radius); padding:14px 16px; margin-top:12px;}
.ai-summary .ai-h{font-size:13px; font-weight:700; color:var(--blue); margin-bottom:6px;
  display:flex; align-items:center; gap:8px;}
.ai-summary .ai-h span{flex:1;}
.ai-edit{border:0; background:none; cursor:pointer; font-size:15px; line-height:1; padding:4px; border-radius:6px;}
.ai-edit:active{transform:scale(.94);}
.ai-summary .ai-body{font-size:14px; line-height:1.5; color:var(--ink); white-space:pre-line;}
.ai-form{display:flex; flex-direction:column; gap:8px;}
.ai-form textarea{width:100%; border:1px solid #D5DEFF; border-radius:8px; padding:10px 12px;
  font:14px/1.5 inherit; background:#fff; color:var(--ink); resize:vertical;}
.ai-foot{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.ai-foot .grow{flex:1;}
.ai-cnt{font-size:12px; font-weight:600; color:var(--muted);}
.ai-share{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap;}
.btn-share{flex:1; min-width:150px; border:0; border-radius:var(--radius-s); background:var(--red); color:#fff;
  padding:11px 14px; font:600 13.5px/1 inherit; cursor:pointer; white-space:nowrap;}
.btn-share:active{transform:scale(.98);}

/* статус-бар синхронизации (офлайн-очередь) */
.sync-bar{border-radius:10px; padding:9px 12px; font-size:12.5px; font-weight:600; margin:2px 0 0;
  display:flex; align-items:center; gap:10px; justify-content:space-between;}
/* «Сохранено» — не плашка, а компактная строка: место на экране дорогое */
.sync-bar.ok{background:none; color:var(--green); padding:2px 2px 4px; font-size:12px;}
.sync-bar.warn{background:var(--amber-bg); color:#8a6400;}
/* Нет сети — заметная красная плашка над анкетой (ничего не перекрывает) */
.sync-bar.off{background:var(--red-bg); color:var(--red); border:1px solid rgba(226,59,59,.35);}
.sync-bar.off b{font-weight:800;}
.chip-net{background:var(--red); color:#fff;}
.sync-bar button{border:0; background:#8a6400; color:#fff; border-radius:999px; padding:6px 14px;
  font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; font-family:inherit;}
.sync-bar button:active{transform:scale(.97);}

/* нижняя панель прохождения */
.bar{position:fixed; left:236px; right:0; bottom:0; z-index:30; background:#fff;
  border-top:1px solid var(--line); padding:12px 22px; display:flex; align-items:center; gap:14px;
  box-shadow:0 -4px 14px rgba(0,20,36,.05);}
.bar .stat{font-size:12.5px; color:var(--muted); font-weight:600; line-height:1.3;}
.bar .stat b{color:var(--ink); font-size:14px;}
.go{flex:1; max-width:420px; margin-left:auto; background:var(--blue); color:#fff; border:0; border-radius:var(--pill);
  padding:13px 0; font-size:15px; font-weight:700; letter-spacing:.02em; cursor:pointer; font-family:inherit;}
.go:active{transform:scale(.98);}
.go[disabled]{opacity:.6;}

/* задачи */
.task.overdue{border-color:var(--red);}
.done-form{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; align-items:center;}
.done-form input[name=comment]{flex:2; min-width:180px; border:1px solid var(--line); border-radius:8px; padding:9px 11px;}
.done-form input[type=file]{flex:1; min-width:160px; font-size:12.5px;}

.toast{position:fixed; left:50%; bottom:96px; transform:translateX(-50%);
  background:var(--ink); color:#fff; font-size:13.5px; font-weight:600; padding:10px 18px; border-radius:999px;
  opacity:0; pointer-events:none; transition:opacity .2s; z-index:70; max-width:88vw; text-align:center;}
.toast.show{opacity:1;}

/* ---------- список проверок: фильтры справа ---------- */
.list-layout{display:flex; gap:16px; align-items:flex-start;}
.list-main{flex:1; min-width:0;}
.list-head{display:flex; align-items:center; gap:12px; margin-bottom:4px;}
.tabs{display:flex; gap:6px; flex:1; flex-wrap:wrap;}
.tab{padding:7px 14px; border-radius:var(--pill); background:#fff; border:1px solid var(--line); color:var(--muted); font-size:13px; font-weight:600;}
.tab:hover{text-decoration:none; border-color:#CFD8E6;}
.tab.active{background:var(--blue); border-color:var(--blue); color:#fff;}
.link-cal{font-size:13px; font-weight:600; white-space:nowrap;}
.empty{text-align:center; color:var(--muted); padding:60px 20px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); margin-top:10px;}
.tbl tr.clickable{cursor:pointer;}
.filter-drawer{width:290px; flex:none; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px;}
.filter-drawer .fd-title{font-size:14px; font-weight:700; margin-bottom:6px;}
.filter-drawer label{display:block; font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; margin:12px 0 4px;}
.filter-drawer input,.filter-drawer select{width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:13.5px; background:#fff; color:var(--ink); font-family:inherit;}
.filter-drawer input:focus,.filter-drawer select:focus{outline:none; border-color:var(--blue);}
.filter-drawer .row2{gap:8px;}
.presets{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px;}
.presets a{font-size:12px; color:var(--blue); cursor:pointer;}
.fd-btns{display:flex; gap:8px; margin-top:16px;}
.fd-btns .btn,.fd-btns .btn-grey{flex:1; justify-content:center; text-align:center;}

/* ---------- шапка карточки проверки ---------- */
.view-head{display:flex; align-items:flex-start; gap:14px; margin-bottom:10px;}
.view-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.view-actions form{margin:0;}

/* ---------- календарь ---------- */
.cal-head{display:flex; align-items:center; gap:12px; margin-bottom:12px;}
.cal-title{font-size:16px; font-weight:700; flex:1; text-align:center;}
.cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:6px;}
.cal-wd{font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; text-align:center; padding:4px 0;}
.cal-cell{min-height:96px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:6px; display:flex; flex-direction:column; gap:4px;}
.cal-cell.empty-cell{background:transparent; border:0;}
.cal-cell.today{border-color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue);}
.cal-day{font-size:12px; font-weight:700; color:var(--muted); display:flex; align-items:center; justify-content:space-between;}
.cal-plus{width:18px; height:18px; border-radius:5px; background:var(--grey-bg); color:var(--blue); font-size:14px; line-height:16px; text-align:center; font-weight:700; opacity:0; transition:opacity .12s;}
.cal-cell:hover .cal-plus{opacity:1;}
.cal-plus:hover{background:var(--blue); color:#fff; text-decoration:none;}

/* планирование */
.plan-shops{margin-top:12px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; max-height:340px; overflow-y:auto;}
.plan-shops-h{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px;}
.plan-shops-h a{cursor:pointer;}
.plan-grp{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin:10px 0 4px;}
.chk{display:flex; align-items:center; gap:8px; padding:5px 0; font-size:13.5px; font-weight:400; text-transform:none; color:var(--ink); cursor:pointer;}
.chk input{width:auto;}
.cal-item{font-size:11.5px; font-weight:600; padding:3px 7px; border-radius:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.cal-item:hover{text-decoration:none; opacity:.85;}
@media (max-width:820px){
  .list-layout{flex-direction:column;}
  .filter-drawer{width:100%; order:-1;}
  .cal-cell{min-height:70px;}
}

/* ---------- аналитика ---------- */
.stats-head{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:14px;}
.period{display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex:1;}
.period input[type=date]{border:1px solid var(--line); border-radius:8px; padding:7px 10px; font-size:13px; font-family:inherit;}
.period .presets{display:flex; gap:8px; margin-left:4px;}
.period .presets a{font-size:12.5px; color:var(--blue); cursor:pointer;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px;}
.grid2 .card{margin-top:0;}
@media (max-width:820px){ .grid2{grid-template-columns:1fr;} }

.chart{display:flex; align-items:flex-end; gap:10px; height:200px; padding-top:16px; overflow-x:auto;}
.chart-col{flex:1; min-width:34px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%;}
.chart-val{font-size:11px; font-weight:700; color:var(--muted); margin-bottom:4px;}
.chart-bar{width:60%; max-width:40px; min-height:4px; background:linear-gradient(180deg,#5B7CFB,#325EFB); border-radius:6px 6px 0 0;}
.chart-bar.count{background:linear-gradient(180deg,#7FB8A0,#1E8A4C);}

/* KPI-карточки в стиле MD Audit */
.kpi-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; margin-bottom:4px;}
.kpi3{margin-top:0;}
.kpi3-t{font-size:13.5px; font-weight:700; color:var(--ink); margin-bottom:12px;}
.kpi3-m{display:flex; gap:18px;}
.kpi3-m > div{display:flex; flex-direction:column;}
.kpi3-m b{font-size:26px; font-weight:700; line-height:1.1;}
.kpi3-m span{font-size:12px; color:var(--muted); margin-top:2px;}
.chart-x{font-size:10.5px; color:var(--muted); margin-top:6px; white-space:nowrap;}

.tstat{display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line-2);}
.tstat:last-child{border-bottom:0;}
.tstat b{margin-left:auto; font-size:18px;}

.blockrow{display:flex; align-items:center; gap:12px; margin:8px 0;}
.bl-num{flex:none; width:22px; height:22px; border-radius:6px; background:var(--grey-bg); color:var(--muted); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center;}
.bl-name{width:34%; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bl-track{flex:1; height:12px; background:var(--grey-bg); border-radius:6px; overflow:hidden;}
.bl-fill{height:100%; border-radius:6px;}
.bl-fill.ok{background:var(--green);} .bl-fill.mid{background:var(--amber);} .bl-fill.bad{background:var(--red);}
.bl-val{width:52px; text-align:right; font-size:13px; font-weight:700;}

/* сводная «Состояние компании» */
.pivot-head{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:10px;}
.pivot-dim{display:flex; align-items:center; gap:8px; margin-left:auto;}
.pivot-dim .pd{font-size:12.5px; font-weight:600; color:var(--muted); padding:5px 12px; border:1px solid var(--line); border-radius:var(--pill);}
.pivot-dim .pd:hover{text-decoration:none; border-color:#CFD8E6;}
.pivot-dim .pd.active{background:var(--blue); border-color:var(--blue); color:#fff;}
.pivot-wrap{overflow-x:auto;}
.tbl.pivot td.num, .tbl.pivot th.num{text-align:center; white-space:nowrap;}
.tbl.pivot th:first-child, .tbl.pivot td:first-child{position:sticky; left:0; background:#fff; z-index:1;}
.tbl.pivot th:first-child{background:#FAFBFC;}
.tbl.pivot tr.pivot-total td{background:#FAFBFC; border-top:2px solid var(--line);}
td.pc-ok{background:rgba(30,138,76,.10); color:var(--green);}
td.pc-mid{background:rgba(232,164,0,.12); color:#B07A00;}
td.pc-bad{background:rgba(226,59,59,.10); color:var(--red);}

@media (prefers-reduced-motion: reduce){ *{transition:none !important;} }

/* ---------- карточки проверок (мобайл, по мотивам приложения MD Audit) ---------- */
.only-mobile{display:none;}
.aud-cards{display:flex; flex-direction:column; gap:10px;}
.aud-card{background:#fff; border:1px solid var(--line); border-left:4px solid var(--grey);
  border-radius:12px; padding:12px 14px; cursor:pointer; position:relative;}
.aud-card:active{transform:scale(.995);}
.aud-card.st-planned{border-left-color:#5B7CFB;}
.aud-card.st-in_progress{border-left-color:var(--amber);}
.aud-card.st-done{border-left-color:#9CC3F0;}
.aud-card.st-confirmed{border-left-color:var(--green);}
.ac-top{display:flex; align-items:center; gap:8px; margin-bottom:6px;}
.ac-date{background:var(--grey-bg); color:var(--muted); border-radius:6px; padding:2px 8px; font-size:11.5px; font-weight:700;}
.ac-id{font-size:12.5px; color:var(--muted); font-weight:600;}
.ac-score{margin-left:auto;}
.ac-del{margin:0 0 0 auto;}
.ac-score + .ac-del{margin-left:8px;}
/* Палец — не курсор: цель меньше ~36px рядом со ссылкой на всю карточку = промахи */
.ac-del button{border:0; background:transparent; font-size:17px; cursor:pointer; line-height:1;
  width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center;}
.ac-del button:active{background:var(--red-bg);}
.ac-shop{font-size:15.5px; font-weight:700; line-height:1.25;}
.ac-cl{font-size:13px; color:var(--muted); margin-top:2px;}
.ac-status{margin-top:8px;}

/* ---------- профиль ---------- */
.profile{max-width:520px; margin:0 auto; text-align:center;}
.pf-avatar{width:96px; height:96px; border-radius:50%; margin:8px auto 14px; display:flex;
  align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:34px;}
.pf-role{font-size:13px; color:var(--muted);}
.pf-name{font-size:20px; font-weight:800; margin-top:2px;}
.pf-email{font-size:13.5px; color:var(--muted); margin-top:4px;}
.pf-login{font-size:12.5px; color:var(--muted); margin-top:2px;}
.pf-menu{text-align:left; padding:0; overflow:hidden; margin-top:18px;}
.pf-row{display:flex; align-items:center; justify-content:space-between; width:100%; padding:15px 16px;
  border:0; border-bottom:1px solid var(--line-2); background:#fff; color:var(--ink); font-size:15px;
  cursor:pointer; text-decoration:none; font-family:inherit; text-align:left;}
.pf-row:last-child{border-bottom:0;}
.pf-row:hover{background:#FAFBFC; text-decoration:none;}
.pf-row .chev{color:var(--muted); font-size:20px;}
.pw-box{display:none; padding:0 16px 12px; border-bottom:1px solid var(--line-2);}
.pw-box.open{display:block;}
.switch{position:relative; display:inline-block; width:44px; height:26px; flex:none;}
.switch input{opacity:0; width:0; height:0;}
.sw-track{position:absolute; inset:0; background:#CFD6E0; border-radius:999px; transition:.2s; cursor:pointer;}
.sw-track:before{content:''; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s;}
.switch input:checked + .sw-track{background:var(--blue);}
.switch input:checked + .sw-track:before{transform:translateX(18px);}
.switch input:disabled + .sw-track{opacity:.5;}
.pf-ver{font-size:12px; color:var(--muted); margin:18px 0;}
.pf-logout{margin-top:6px;}
.btn-logout{width:100%; max-width:520px; border:1px solid var(--red); background:#fff; color:var(--red);
  border-radius:var(--pill); padding:13px 0; font-size:15px; font-weight:700; cursor:pointer; font-family:inherit;}
.btn-logout:hover{background:var(--red); color:#fff;}

/* ---------- мобильные элементы (базово скрыты на десктопе) ---------- */
.hamburger{display:none;}
.side-overlay{display:none;}
.tabbar{display:none;}
.hide-xs{display:inline;}

@media (max-width:900px){
  /* Сайдбар превращается в выезжающую шторку */
  .side{position:fixed; top:0; left:0; height:100vh; height:100dvh; width:274px; max-width:84vw; z-index:60;
    transform:translateX(-100%); transition:transform .25s ease; box-shadow:6px 0 34px rgba(0,20,36,.20);
    flex-direction:column; overflow-y:auto; border-right:1px solid var(--line);}
  .side.open{transform:none;}
  .side-overlay{position:fixed; inset:0; background:rgba(0,20,36,.45); z-index:55;}
  .side-overlay.show{display:block;}
  .nav-sub{display:flex;}
  .nav-item{padding:12px; font-size:15px;}
  .nav-sub a{padding:10px 12px; font-size:14px;}
  .side-sep,.side-foot{display:block;}

  /* Верхняя панель: гамбургер + заголовок */
  .hamburger{display:flex; align-items:center; justify-content:center; width:40px; height:40px;
    margin-left:-8px; border:0; background:transparent; color:var(--ink); cursor:pointer;}
  .hamburger svg{width:24px; height:24px; stroke:currentColor; fill:none; stroke-width:2;}
  .topbar{padding:0 12px; gap:8px;}
  .topbar .page-title{font-size:15px;}
  .content{padding:14px 12px calc(78px + env(safe-area-inset-bottom)); max-width:100%;}
  h1{font-size:18px;}

  /* Мобильные карточки вместо таблиц там, где есть оба вида */
  .only-mobile{display:flex;}
  .only-desktop{display:none !important;}
  /* Таблицы (где нет карточного вида) — горизонтальный скролл */
  .tbl{display:block; overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch;}
  .list-layout{flex-direction:column;}
  .filter-drawer{width:auto; order:2; position:static;}
  .grid2{grid-template-columns:1fr;}

  /* Нижняя таб-панель навигации */
  .tabbar{display:flex; position:fixed; left:0; right:0; bottom:0; z-index:45; background:#fff;
    border-top:1px solid var(--line); height:calc(58px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom); box-shadow:0 -2px 14px rgba(0,20,36,.07);}
  .tabbar a, .tabbar button{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:3px; color:var(--muted); font-size:10px; font-weight:600; text-decoration:none; padding:8px 0 0;
    border:0; background:transparent; cursor:pointer; font-family:inherit; min-width:0;}
  .tabbar a span{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tabbar a.active{color:var(--blue);}
  .tabbar svg{width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:2;}

  /* Шапка карточки: на узком экране кнопки не сжимались, заголовку оставалось 0px
     и его текст вытекал поверх них. Даём заголовку свою строку, кнопки — под ним. */
  .view-head{flex-wrap:wrap;}
  .view-head > .grow{flex:1 1 100%; min-width:0;}
  .view-head .view-actions{width:100%;}
  .view-head h1{overflow-wrap:anywhere;}

  /* Экран прохождения: нижняя панель на всю ширину, таб-панель прячем */
  .bar{left:0; padding-bottom:calc(10px + env(safe-area-inset-bottom));}
  .runbar{top:56px;}
  body:has(.bar) .tabbar{display:none;}
  body:has(.bar) .content{padding-bottom:calc(96px + env(safe-area-inset-bottom));}
}

@media (max-width:480px){
  .hide-xs{display:none;}
  .kpi3-m b{font-size:22px;}
  .card.stat b{font-size:22px;}
  .cards{grid-template-columns:1fr 1fr;}
  .tri button{min-width:0;}
  .thumbs img{width:64px; height:64px;}
}
