/* «Салон → Камеры» (07.10.2026, erp/ui/cameras.js, erp/cams.py): сетка кадров филиала и окно живого видео */
.cn.cams{max-width:1400px}
.cams .anh .muted{max-width:720px;line-height:1.45}
.cams-hint{margin:-4px 0 10px;max-width:720px;line-height:1.45}
.cams-bar{margin:0 0 14px;gap:12px;align-items:center}
.cams-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.cams-card{all:unset;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:10px;cursor:pointer;
  background:var(--card);border:1px solid var(--line);border-radius:14px;transition:border-color .15s,box-shadow .15s}
.cams-card:hover{border-color:var(--accent);box-shadow:0 6px 18px -10px rgba(0,0,0,.35)}
.cams-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cams-img{position:relative;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:var(--soft);display:flex;align-items:center;justify-content:center}
.cams-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cams-img img:not([src]){display:none}
.cams-st{position:relative;padding:0 16px;text-align:center;line-height:1.4}
.cams-card.off .cams-img img{opacity:.35;filter:grayscale(1)}
.cams-card.off .cams-st{color:var(--text)}
.cams-name{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-weight:600;padding:0 2px}

/* окно живого видео: поверх раздела, закрывается крестиком, Esc или кликом мимо */
.cams-view{position:fixed;inset:0;z-index:60;background:rgba(10,12,16,.72);display:flex;align-items:center;justify-content:center;padding:24px}
.cams-vcard{background:var(--card);border-radius:16px;padding:12px;width:min(1180px,100%);max-height:calc(100vh / var(--z,1) - 48px);display:flex;flex-direction:column;gap:10px;box-shadow:0 24px 60px -20px rgba(0,0,0,.6)}
.cams-vbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cams-vbar b{font-size:16px}
.cams-x{min-width:40px;justify-content:center}
.cams-vbox{position:relative;background:#000;border-radius:10px;overflow:hidden;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;min-height:0}
.cams-vimg{width:100%;height:100%;object-fit:contain}
.cams-vmsg{display:flex;flex-direction:column;align-items:center;gap:12px;color:#fff;text-align:center;padding:24px;line-height:1.45}
.cams-vmsg[hidden]{display:none}

@media (max-width:700px){
  .cams-grid{grid-template-columns:1fr}
  .cams-view{padding:0;align-items:stretch}
  .cams-vcard{border-radius:0;width:100%;max-height:none;height:100%;padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
  .cams-vbox{flex:1;aspect-ratio:auto}
  .cams-vbar [data-hd]{order:5;width:100%;justify-content:center}
}

/* сводка дня: открылись, закрылись, ресепшен (наверху), форма и уходы без гостей (внизу) */
.cams-sum:empty{display:none}
.cams-dbar{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.cams-dbar b{font-size:15px;min-width:150px;text-align:center}
.cams-arr{min-width:36px;justify-content:center;padding-left:0;padding-right:0}
.cams-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:0 0 16px}
.cams-tile{padding:12px 14px;display:flex;flex-direction:column;gap:4px;margin:0}
.cams-v{font-size:24px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums}
.cams-tile .bad{color:var(--bad,#c0392b)}
#cams_low:empty{display:none}
#cams_low{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;margin:16px 0 0}
#cams_low > p{grid-column:1/-1;margin:0}
.cams-low{padding:12px 14px;margin:0}
.cams-low h3{margin:0 0 8px;font-size:15px}
.cams-row{display:flex;gap:12px;padding:5px 0;border-top:1px solid var(--line);line-height:1.4}
.cams-row:first-of-type{border-top:0}
.cams-row b{flex:none;min-width:96px;font-variant-numeric:tabular-nums}
.cams-note{margin-top:8px;line-height:1.45}
.cams-row .bad{color:var(--bad,#c0392b)}
@media (max-width:700px){
  .cams-tiles{grid-template-columns:1fr 1fr}
  .cams-v{font-size:20px}
  #cams_low{grid-template-columns:1fr}
}

/* «Форма → Кадры»: на чём решили, поправка владельца (07.10.2026) */
.cams-fbtn{margin-top:8px;align-self:flex-start}
.cams-fview .cams-vcard{overflow:auto}
.cams-fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.cams-fc{margin:0;padding:10px;display:flex;flex-direction:column;gap:6px}
.cams-fc .cams-main{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;cursor:zoom-in;background:var(--soft)}
.cams-fc.big{grid-column:1/-1}
.cams-fc.big .cams-main{aspect-ratio:auto;object-fit:contain;cursor:zoom-out}
.cams-fcap{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cams-tag{font-size:12px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--soft)}
.cams-tag.form{color:var(--ok)}
.cams-tag.noform{color:var(--bad)}
.cams-seg{display:flex}
.cams-seg button{flex:1}
.cams-fgone{aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;background:var(--soft);border-radius:8px;text-align:center;padding:12px}
@media (max-width:700px){ .cams-fgrid{grid-template-columns:minmax(0,1fr)} .cams-fc{min-width:0} }   /* 1fr растягивал колонку до ширины кадра 960 px: на айфоне виден был кусок стены (07.10.2026) */
.cams-tag.unclear{color:var(--muted)}
.cams-wrong,.cams-link{align-self:flex-start}
.cams-link{background:none;border:0;box-shadow:none;padding:4px 0;color:var(--accent)}
.cams-why{display:flex;flex-direction:column;gap:6px}
.cams-why textarea{width:100%;resize:vertical}
.cams-why .bar{margin:0;gap:8px}
.cams-strip{display:flex;gap:6px}
.cams-strip img{flex:1;min-width:0;aspect-ratio:16/10;object-fit:cover;border-radius:6px;cursor:pointer;opacity:.75;border:2px solid transparent}
.cams-strip img.pick{border-color:var(--accent);opacity:1}
.cams-strip img.on{opacity:1;outline:2px solid var(--text);outline-offset:1px}
.cams-nowst{margin-left:8px}
.cams-irow{display:flex;align-items:center;gap:8px}
.cams-irow>span{width:58px;flex:none}
.cams-irow .seg{flex:1}
.cams-irow .seg button{padding-left:4px;padding-right:4px}

/* гости у пустой стойки — живое слежение (13.10.2026): кадр ожидания, «сейчас ждёт», «Неправильно» владельца */
.cams-now{font-weight:600;margin:0 0 8px}
.cams-wait{display:flex;gap:10px;padding:8px 0;line-height:1.4;align-items:flex-start}
.cams-wait + .cams-wait,.cams-row + .cams-wait,.cams-wait + .cams-row{border-top:1px solid var(--line)}
.cams-wthumb{width:96px;min-width:96px;height:54px;object-fit:cover;border-radius:6px;cursor:zoom-in;background:var(--soft);flex:none}
.cams-wait.big{flex-direction:column}
.cams-wait.big .cams-wthumb{width:100%;height:auto;cursor:zoom-out}
.cams-wtext{flex:1;min-width:0}
.cams-wtext .bad{color:var(--bad,#c0392b)}
.cams-wbtn{margin-top:4px}
.cams-wgone{width:96px;flex:none}
