/* PWA (#13): полоска навигации, меню «☰», панель «Установить», графики в карточках — фронтенд и облачная
   страница прошивки. Цвета — переменные style.css прошивки (--card, --line, --accent…): стиль один. */
.hc-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  max-width: 520px; margin: -10px auto 0; padding: 8px 10px; background: var(--bg, #eef1f5);
  font: 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.hc-bar a { color: var(--accent, #17808f); text-decoration: none; font-weight: 500; }
.hc-bar .hc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted, #6a7486); text-align: center; font-size: 14px; }
.hc-bar .hc-back { white-space: nowrap; min-height: 40px; display: flex; align-items: center; }
.hc-bar .hc-name { color: var(--text, #1d2433); font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0; display: block; line-height: 40px; }
/* связь с устройством (#46): зелёная точка; нет связи — красная и «нет связи · 5 мин» */
.hc-bar .hc-link { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px;
  color: var(--err, #d14343); }
.hc-bar .hc-link[hidden] { display: none; }
.hc-bar .hc-link::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok, #2f9a68); }
.hc-bar .hc-link.off::before { background: var(--err, #d14343); }
details.hc-menu { position: relative; }
details.hc-menu > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: flex;
  align-items: center; justify-content: center; border-radius: 9px; color: var(--text, #1d2433);
  border: 1px solid var(--line, #dde2ea); background: var(--card, #fff); }
details.hc-menu > summary::-webkit-details-marker { display: none; }
details.hc-menu > div { position: absolute; right: 0; top: 46px; min-width: 230px; padding: 6px;
  background: var(--card, #fff); border: 1px solid var(--line, #dde2ea); border-radius: 14px;
  box-shadow: var(--shadow, 0 4px 14px rgba(20, 30, 50, .12)); display: flex; flex-direction: column; }
details.hc-menu > div a, details.hc-menu > div button { display: block; width: 100%; text-align: left;
  padding: 11px 12px; border: 0; background: none; border-radius: 9px; font: inherit; font-weight: 500;
  color: var(--text, #1d2433); cursor: pointer; text-decoration: none; min-height: 0; margin: 0; }
details.hc-menu > div a:hover, details.hc-menu > div button:hover { background: var(--accent-soft, #e2f2f4); }
details.hc-menu > div [hidden] { display: none; }
details.hc-menu form { margin: 0; }
details.hc-menu .hc-sep { height: 1px; background: var(--line, #dde2ea); margin: 4px 6px; }

.hc-sheet { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 30;
  width: min(500px, calc(100% - 20px)); display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--card, #fff); color: var(--text, #1d2433);
  border: 1px solid var(--line, #dde2ea); border-radius: 14px; box-shadow: 0 8px 30px rgba(20, 30, 50, .22);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.hc-sheet img { border-radius: 10px; flex: none; }
.hc-sheet-text { flex: 1; min-width: 200px; }
.hc-sheet-btns { display: flex; gap: 8px; margin-left: auto; }
.hc-sheet .ui-button { margin: 0; }
/* панель видна — полоса «Сохранить» страницы прошивки и низ страницы над ней (pwa.js, lift) */
.hc-sheet-open .savebar { bottom: var(--hc-sheet-h, 0px); }
.hc-sheet-open body { padding-bottom: calc(24px + var(--hc-sheet-h, 0px)); }
.hc-primary { background: var(--accent, #17808f) !important; border-color: var(--accent, #17808f) !important;
  color: var(--accent-ink, #fff) !important; }

/* графики в карточках зон и у подающей (app/static/cloud-charts.js, фронтенд) */
.hc-chart-btn.ui-button { align-self: flex-start; width: auto; margin: 8px 0 0; padding: 6px 14px;
  min-height: 34px; font-size: 14px; }
.hc-chart { margin-top: 10px; font-weight: 400; }
.hc-chart[hidden] { display: none; }
.hc-ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.hc-ranges .ui-button { margin: 0; padding: 6px 12px; min-height: 34px; border-radius: 999px; font-size: 14px; }
.hc-ranges .ui-button.hc-on { background: var(--accent-soft, #e2f2f4); border-color: var(--accent, #17808f);
  color: var(--accent, #17808f); font-weight: 600; }
.hc-chart .heater-chart { margin: 0; }
.hc-chart .hc-plot { margin: 0 -6px; }  /* до краёв карточки — на телефоне каждый пиксель */
.hc-chart .u-legend { font-size: 12px; text-align: left; margin-top: 2px; }
.hc-chart .u-legend .u-series { padding: 1px 8px 1px 0; }
.hc-chart .u-legend .u-series th { font-weight: 500; }
.hc-chart .u-legend .u-marker { width: 10px; height: 10px; margin-right: 4px; }
.hc-chart .u-legend .u-value { font-variant-numeric: tabular-nums; }
.hc-chart .hc-note { font-size: 12px; color: var(--muted, #6a7486); margin: 4px 0 0; }
