/* «Мониторинг кабинетов» внутри «Аналитики» (public/js/monitor.js). Цвета — только через переменные темы. */
/* Кнопка в панели фильтров: включённый режим — залитая акцентом */
#section-analytics #mon-btn.mon-btn-on{background:var(--red) !important;border-color:var(--red) !important;color:#fff !important;}
#section-analytics #mon-btn.mon-btn-on .pf-ico{color:#fff;stroke:#fff;}
/* В режиме мониторинга прячем то, что относится к одному кабинету */
#section-analytics.mon-mode .pf-check,
#section-analytics.mon-mode #cmpdp-wrap,
#section-analytics.mon-mode [onclick="openProfitHourlyPanel()"]{display:none !important;}

.mon-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:4px 2px 14px;}
.mon-title{font-size:16px;font-weight:800;color:var(--text);}
.mon-period{margin-left:6px;font-size:13px;font-weight:600;color:var(--muted);}
.mon-note{margin-top:4px;font-size:12px;line-height:1.5;color:var(--muted);max-width:900px;}
.mon-head .pf-btn{flex:none;}
.mon-head-actions{display:flex;align-items:flex-start;gap:8px;flex:none;}
/* «Кабинеты: N из M» — список прижат к правому краю кнопки, иначе уезжал бы за край экрана */
.mon-pick{position:relative;}
.mon-pick .mon-pick-panel{left:auto;right:0;min-width:260px;}

.mon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px;}
.mon-card{padding:16px 16px 14px;min-width:0;display:flex;flex-direction:column;}
/* Итог по всем кабинетам — строка из трёх блоков над карточками (прибыль, заказы, выручка) */
.mon-tots{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:16px;}
.mon-tot{padding:14px 16px;min-width:0;}
.mon-tot-v{margin-top:4px;font-size:18px;font-weight:800;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.mon-tot .mon-m-s{margin-top:3px;}
.mon-st--head{margin-left:10px;font-size:12px;font-weight:600;color:var(--muted);}
.mon-card--bad{opacity:.8;}
.mon-c-head{display:flex;align-items:center;gap:8px;min-width:0;}
.mon-name{font-size:15px;font-weight:800;color:var(--text);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
a.mon-open:hover{color:var(--red);text-decoration:underline;}
.mon-badge{flex:none;padding:1px 8px;border-radius:10px;font-size:11px;font-weight:700;background:var(--red);color:#fff;}
.mon-c-status{min-height:16px;margin-top:2px;font-size:11px;color:var(--muted);}
.mon-st{display:inline-flex;align-items:center;gap:4px;margin-right:8px;}
.mon-st.err{color:#E5484D;font-weight:700;}
.mon-c-lbl{margin-top:10px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;}
.mon-c-big{margin-top:2px;font-size:26px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;}
.mon-c-big.pos{color:var(--green,#22c55e);}
.mon-c-big.neg{color:#E5484D;}
.mon-c-sub{margin-top:2px;font-size:12px;color:var(--muted);}
.mon-spark{display:block;width:100%;height:44px;margin:10px 0 4px;}
.mon-spark rect.p{fill:var(--green,#22c55e);}
.mon-spark rect.n{fill:#E5484D;}
.mon-spark rect.t{opacity:.45;}   /* сегодняшний день ещё не закончился */
.mon-spark-empty{margin:10px 0 4px;height:44px;display:flex;align-items:center;font-size:11px;color:var(--muted);}
/* Две плашки в ряд: в три ряда суммы вида «170 349 283 ₽» не помещались и обрезались многоточием */
.mon-c-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px;}
.mon-m{padding:8px 10px;border-radius:10px;background:var(--s1);min-width:0;}
.mon-m-l{font-size:10.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mon-m-v{margin-top:2px;font-size:14px;font-weight:800;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}   /* сумма не обрезается: в крайнем случае переносится */
.mon-m-s{margin-top:1px;font-size:11px;line-height:1.35;color:var(--muted);}   /* переносится: в узкой плашке стрелка изменения не должна обрезаться */
.mon-d{font-weight:700;color:var(--muted);}
.mon-d.up{color:var(--green,#22c55e);}
.mon-d.down{color:#E5484D;}
@media (max-width:767px){
  .mon-head{flex-direction:column;}
  .mon-grid{grid-template-columns:1fr;}
  .mon-tots{grid-template-columns:repeat(2,minmax(0,1fr));}
}
