:root {
  --mon-bg: #edf0f2;
  --mon-surface: #fdfefe;
  --mon-surface-2: #f4f6f7;
  --mon-sidebar: #1b2025;
  --mon-sidebar-2: #242b31;
  --mon-text: #1a2026;
  --mon-text-2: #5b6570;
  --mon-text-3: #87919a;
  --mon-line: #d8dde2;
  --mon-line-strong: #b9c2ca;
  --mon-accent: #1d5b87;
  --mon-accent-hover: #174a6f;
  --mon-accent-soft: #e4eef5;
  --mon-ok: #2e9c4a;
  --mon-ok-text: #1f7a38;
  --mon-ok-soft: #e7f4eb;
  --mon-warning: #e39a0b;
  --mon-warning-text: #805800;
  --mon-warning-soft: #fcf3de;
  --mon-alarm: #d6362b;
  --mon-alarm-text: #a8271e;
  --mon-alarm-soft: #fbe7e5;
  --mon-nocomm: #67788a;
  --mon-nocomm-text: #4e5d6e;
  --mon-nocomm-soft: #e7edf1;
  --mon-sensor: #a23b8f;
  --mon-sensor-soft: #f6e9f3;
  --mon-radius: 6px;
  --mon-shadow: 0 1px 2px rgb(23 27 31 / 0.06), 0 8px 22px rgb(23 27 31 / 0.04);
}

[data-theme="dark"] {
  --mon-bg: #171b1f;
  --mon-surface: #1f252b;
  --mon-surface-2: #252c33;
  --mon-sidebar: #12161a;
  --mon-sidebar-2: #1c2228;
  --mon-text: #e2e7eb;
  --mon-text-2: #a5afb8;
  --mon-text-3: #7f8a94;
  --mon-line: #303943;
  --mon-line-strong: #46515b;
  --mon-accent: #5ca0cc;
  --mon-accent-hover: #74b1d5;
  --mon-accent-soft: rgb(92 160 204 / 0.14);
  --mon-ok-text: #63c37b;
  --mon-ok-soft: rgb(70 181 100 / 0.13);
  --mon-warning-text: #e8b34f;
  --mon-warning-soft: rgb(227 154 11 / 0.14);
  --mon-alarm-text: #ff8177;
  --mon-alarm-soft: rgb(229 86 74 / 0.14);
  --mon-nocomm-text: #9aabba;
  --mon-nocomm-soft: rgb(132 150 169 / 0.13);
  --mon-sensor-soft: rgb(188 91 169 / 0.13);
  --mon-shadow: none;
}

.monitoring-body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--mon-bg);
  color: var(--mon-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

.monitoring-body *,
.monitoring-body *::before,
.monitoring-body *::after { box-sizing: border-box; }
.monitoring-body button,
.monitoring-body input,
.monitoring-body select { font: inherit; letter-spacing: 0; }
.monitoring-body button,
.monitoring-body a { -webkit-tap-highlight-color: transparent; }
.monitoring-body a { color: inherit; }
.monitoring-body .hidden { display: none !important; }
.monitoring-body svg { width: 18px; height: 18px; flex: 0 0 auto; }

.tm-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.tm-brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
  border-radius: 2px;
}

.tm-brand > span:last-child { display: grid; line-height: 1; }
.tm-brand strong { font-size: 16px; letter-spacing: 0.04em; }
.tm-brand small { margin-top: 5px; color: var(--mon-text-2); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; }
.tm-sidebar .tm-brand small { color: #97a2ab; }

.tm-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.tm-login-panel {
  width: min(1120px, 100%);
  min-height: 530px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--mon-line);
  border-radius: 8px;
  background: var(--mon-surface);
  box-shadow: var(--mon-shadow);
}

.tm-login-brand {
  display: grid;
  align-content: space-between;
  gap: 48px;
  padding: 48px;
  border-right: 1px solid var(--mon-line);
  background: var(--mon-surface-2);
}

.tm-login-brand > div:nth-child(2) { max-width: 590px; }
.tm-eyebrow,
.tm-section-head p,
.tm-process-panel header p,
.tm-key-values header p,
.tm-portfolio-state header p,
.tm-page-heading p,
.tm-diagnostic-copy > p {
  margin: 0 0 6px;
  color: var(--mon-text-2);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tm-login h1 {
  max-width: 620px;
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 760;
}

.tm-login-brand > div:nth-child(2) > p:last-child {
  max-width: 610px;
  margin: 18px 0 0;
  color: var(--mon-text-2);
  font-size: 18px;
  line-height: 1.55;
}

.tm-readonly-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  color: var(--mon-text-2);
  font-size: 14px;
  line-height: 1.45;
}
.tm-readonly-note svg { color: var(--mon-accent); }

.tm-login-form {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 48px;
}
.tm-form-head h2 { margin: 0; font-size: 24px; }
.tm-form-head p { margin: 7px 0 0; color: var(--mon-text-2); }
.tm-login-form label,
.tm-filter-bar label,
.tm-ack-form label {
  display: grid;
  gap: 7px;
  color: var(--mon-text-2);
  font-size: 12px;
  font-weight: 720;
}

.tm-login-form input,
.tm-filter-bar input,
.tm-filter-bar select,
.tm-ack-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--mon-line-strong);
  border-radius: 5px;
  outline: 0;
  background: var(--mon-surface);
  color: var(--mon-text);
  padding: 0 12px;
}
.tm-login-form input:focus,
.tm-filter-bar input:focus,
.tm-filter-bar select:focus,
.tm-ack-form input:focus { border-color: var(--mon-accent); box-shadow: 0 0 0 3px var(--mon-accent-soft); }
.tm-form-error { min-height: 18px; margin: 0; color: var(--mon-alarm-text); font-size: 13px; }

.tm-button,
.tm-icon-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, transform 100ms ease-out;
}
.tm-button:active,
.tm-icon-button:active { transform: scale(0.97); }
.tm-button:focus-visible,
.tm-icon-button:focus-visible,
.tm-primary-nav a:focus-visible,
.tm-mobile-nav a:focus-visible,
.tm-object-tabs a:focus-visible { outline: 2px solid var(--mon-accent); outline-offset: 2px; }
.tm-button:disabled { cursor: wait; opacity: 0.6; }
.tm-button-primary { background: var(--mon-accent); color: #f7fbfd; }
.tm-button-primary:hover { background: var(--mon-accent-hover); }
.tm-button-secondary { border-color: var(--mon-line-strong); background: var(--mon-surface); color: var(--mon-text); }
.tm-button-secondary:hover { border-color: var(--mon-accent); color: var(--mon-accent); }
.tm-icon-button { width: 44px; padding: 0; border-color: var(--mon-line); background: var(--mon-surface); color: var(--mon-text-2); }
.tm-icon-button:hover { border-color: var(--mon-accent); color: var(--mon-accent); }

.tm-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.tm-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px 14px 18px;
  background: var(--mon-sidebar);
  color: #e7ecef;
}
.tm-brand-compact { padding: 0 8px 22px; }
.tm-brand-compact .tm-brand-mark { width: 36px; height: 36px; }
.tm-brand-compact strong { font-size: 14px; }

.tm-primary-nav { display: grid; align-content: start; gap: 4px; padding-top: 12px; border-top: 1px solid #30373e; }
.tm-primary-nav a {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 5px;
  color: #aeb8c0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.tm-primary-nav a:hover { background: var(--mon-sidebar-2); color: #f0f3f5; }
.tm-primary-nav a.active { background: #2b3740; color: #f6f8f9; }
.tm-primary-nav a.active svg { color: #70abd0; }
.tm-primary-nav b { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: var(--mon-alarm); color: #fffafa; font-size: 11px; text-align: center; }
.tm-sidebar-foot { padding: 18px 8px 0; border-top: 1px solid #30373e; }
.tm-sidebar-foot p { margin: 9px 0 0; color: #8e99a2; font-size: 11px; line-height: 1.45; }
.tm-demo-label { width: fit-content; display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid var(--mon-line-strong); border-radius: 4px; color: var(--mon-text-2); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.tm-sidebar .tm-demo-label { border-color: #4a555e; color: #b5bec5; }

.tm-main { min-width: 0; }
.tm-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--mon-line);
  background: color-mix(in srgb, var(--mon-bg) 96%, transparent);
}
.tm-page-heading h1 { margin: 0; font-size: 22px; line-height: 1.15; }
.tm-page-heading p { margin-bottom: 4px; font-size: 10px; }
.tm-top-actions { display: flex; align-items: center; gap: 10px; }
.tm-view { display: grid; gap: 18px; padding: 22px 28px 42px; }

.tm-status {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid var(--mon-line);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--mon-text-2);
  background: var(--mon-surface);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.tm-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mon-text-3); }
.tm-status-normal { border-color: color-mix(in srgb, var(--mon-ok) 45%, var(--mon-line)); background: var(--mon-ok-soft); color: var(--mon-ok-text); }
.tm-status-normal i { background: var(--mon-ok); }
.tm-status-warning { border-color: color-mix(in srgb, var(--mon-warning) 55%, var(--mon-line)); background: var(--mon-warning-soft); color: var(--mon-warning-text); }
.tm-status-warning i { background: var(--mon-warning); }
.tm-status-alarm { border-color: color-mix(in srgb, var(--mon-alarm) 55%, var(--mon-line)); background: var(--mon-alarm-soft); color: var(--mon-alarm-text); }
.tm-status-alarm i { background: var(--mon-alarm); }
.tm-status-nocomm { border-color: color-mix(in srgb, var(--mon-nocomm) 55%, var(--mon-line)); background: var(--mon-nocomm-soft); color: var(--mon-nocomm-text); }
.tm-status-nocomm i { background: var(--mon-nocomm); }
.tm-status-sensor { background: var(--mon-sensor-soft); color: var(--mon-sensor); }
.tm-status-sensor i { background: var(--mon-sensor); }

.tm-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--mon-line);
  border-radius: var(--mon-radius);
  background: var(--mon-surface);
  box-shadow: var(--mon-shadow);
}
.tm-summary-strip > div { min-height: 78px; display: grid; align-content: center; gap: 5px; padding: 14px 16px; border-right: 1px solid var(--mon-line); }
.tm-summary-strip > div:last-child { border-right: 0; }
.tm-summary-strip span { color: var(--mon-text-2); font-size: 11px; font-weight: 720; text-transform: uppercase; }
.tm-summary-strip strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.tm-summary-strip [data-state="alarm"] strong { color: var(--mon-alarm-text); }
.tm-summary-strip [data-state="warning"] strong { color: var(--mon-warning-text); }
.tm-summary-strip [data-state="nocomm"] strong { color: var(--mon-nocomm-text); }

.tm-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr); gap: 18px; }
.tm-section,
.tm-portfolio-state,
.tm-process-panel,
.tm-object-facts,
.tm-key-values,
.tm-object-header,
.tm-object-tabs,
.tm-object-content {
  border: 1px solid var(--mon-line);
  border-radius: var(--mon-radius);
  background: var(--mon-surface);
  box-shadow: var(--mon-shadow);
}
.tm-section { min-width: 0; overflow: hidden; }
.tm-section-page { min-height: calc(100vh - 140px); }
.tm-section-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mon-line);
}
.tm-section-head h2,
.tm-portfolio-state h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.tm-section-head a,
.tm-text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--mon-accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.tm-section-head a:hover,
.tm-text-link:hover { color: var(--mon-accent-hover); }

.tm-attention-list { display: grid; }
.tm-attention-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--mon-line);
  color: inherit;
  text-decoration: none;
}
.tm-attention-row:first-child { border-top: 0; }
.tm-attention-row:hover { background: var(--mon-surface-2); }
.tm-attention-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--mon-nocomm-soft); color: var(--mon-nocomm-text); }
.tm-attention-row[data-state="alarm"] .tm-attention-icon { background: var(--mon-alarm-soft); color: var(--mon-alarm-text); }
.tm-attention-row[data-state="warning"] .tm-attention-icon { background: var(--mon-warning-soft); color: var(--mon-warning-text); }
.tm-attention-copy { min-width: 0; }
.tm-attention-copy small { display: block; margin-bottom: 3px; color: var(--mon-text-2); font-size: 11px; }
.tm-attention-copy strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tm-attention-copy p { margin: 3px 0 0; overflow: hidden; color: var(--mon-text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tm-attention-time { color: var(--mon-text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.tm-chevron { color: var(--mon-text-3); }

.tm-portfolio-state { padding: 18px; }
.tm-portfolio-state header { padding-bottom: 16px; border-bottom: 1px solid var(--mon-line); }
.tm-state-bars { display: grid; gap: 15px; padding: 20px 0; }
.tm-state-bar { display: grid; gap: 7px; }
.tm-state-bar > span { display: flex; justify-content: space-between; color: var(--mon-text-2); font-size: 12px; }
.tm-state-bar b { color: var(--mon-text); font-variant-numeric: tabular-nums; }
.tm-state-bar > i { height: 6px; overflow: hidden; border-radius: 3px; background: var(--mon-line); }
.tm-state-bar em { height: 100%; display: block; border-radius: 3px; background: var(--mon-text-3); }
.tm-state-bar em[data-state="normal"] { background: var(--mon-ok); }
.tm-state-bar em[data-state="warning"] { background: var(--mon-warning); }
.tm-state-bar em[data-state="alarm"] { background: var(--mon-alarm); }
.tm-state-bar em[data-state="nocomm"] { background: var(--mon-nocomm); }

.tm-table-wrap { width: 100%; overflow-x: auto; }
.tm-object-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.tm-object-table th { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--mon-line); background: var(--mon-surface-2); color: var(--mon-text-2); font-size: 10px; text-align: left; text-transform: uppercase; }
.tm-object-table td { height: 74px; padding: 10px 12px; border-bottom: 1px solid var(--mon-line); vertical-align: middle; font-size: 13px; }
.tm-object-table tbody tr { cursor: pointer; }
.tm-object-table tbody tr:last-child td { border-bottom: 0; }
.tm-object-table tbody tr:hover,
.tm-object-table tbody tr:focus-visible { background: var(--mon-surface-2); outline: 0; }
.tm-object-table th:nth-child(1) { width: 110px; }
.tm-object-table th:nth-child(2) { width: 235px; }
.tm-object-table th:nth-child(3) { width: 310px; }
.tm-object-table th:nth-child(4) { width: 90px; }
.tm-object-table th:nth-child(5) { width: 72px; }
.tm-object-table th:nth-child(6) { width: 160px; }
.tm-object-table th:nth-child(7) { width: 110px; }
.tm-object-table td > a:not(.tm-number-link) { display: grid; gap: 3px; color: inherit; text-decoration: none; }
.tm-object-table td > a strong { font-size: 14px; }
.tm-object-table td > a span,
.tm-object-table time { color: var(--mon-text-2); font-size: 11px; }
.tm-number-link { color: var(--mon-accent); font-weight: 750; }
.tm-connection { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tm-connection > i { width: 8px; height: 8px; border-radius: 50%; background: var(--mon-text-3); }
.tm-connection > i[data-state="normal"] { background: var(--mon-ok); }
.tm-connection > i[data-state="warning"] { background: var(--mon-warning); }
.tm-connection > i[data-state="alarm"] { background: var(--mon-alarm); }
.tm-connection > i[data-state="nocomm"] { background: var(--mon-nocomm); }
.tm-inline-params { display: flex; gap: 5px; min-width: 0; }
.tm-inline-params > span { min-width: 0; display: grid; gap: 2px; padding: 5px 7px; border: 1px solid var(--mon-line); border-radius: 4px; background: var(--mon-surface); }
.tm-inline-params small { max-width: 84px; overflow: hidden; color: var(--mon-text-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tm-inline-params b { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-inline-params [data-state="alarm"] { border-color: var(--mon-alarm); color: var(--mon-alarm-text); }
.tm-inline-params [data-state="warning"] { border-color: var(--mon-warning); color: var(--mon-warning-text); }
.tm-inline-params [data-state="nocomm"] { color: var(--mon-nocomm-text); }
.tm-muted { color: var(--mon-text-2); }

.tm-filter-bar {
  display: grid;
  grid-template-columns: 180px 210px minmax(240px, 1fr) 44px;
  align-items: end;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mon-line);
  background: var(--mon-surface-2);
}
.tm-search-field > span { position: relative; display: block; }
.tm-search-field svg { position: absolute; top: 13px; left: 12px; width: 17px; color: var(--mon-text-3); }
.tm-search-field input { padding-left: 38px; }

.tm-event-list { display: grid; }
.tm-event-row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border-top: 1px solid var(--mon-line); }
.tm-event-row:first-child { border-top: 0; }
.tm-event-row[data-state="alarm"] { background: color-mix(in srgb, var(--mon-alarm-soft) 60%, var(--mon-surface)); }
.tm-event-copy small { color: var(--mon-text-2); font-size: 11px; }
.tm-event-copy h3 { margin: 5px 0; font-size: 15px; }
.tm-event-copy p { margin: 0 0 6px; color: var(--mon-text-2); font-size: 13px; }
.tm-event-copy > span { display: block; color: var(--mon-text-3); font-size: 11px; line-height: 1.6; }
.tm-event-actions { display: flex; gap: 8px; }
.tm-ack-form { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 4px; padding: 12px; border: 1px solid var(--mon-line); border-radius: 5px; background: var(--mon-surface); }
.tm-ack-form[hidden] { display: none; }

.tm-diagnostic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.tm-diagnostic { min-width: 0; display: grid; align-content: start; border: 1px solid var(--mon-line); border-radius: var(--mon-radius); background: var(--mon-surface); }
.tm-diagnostic[data-state="alarm"] { border-color: var(--mon-alarm); }
.tm-diagnostic[data-state="warning"] { border-color: var(--mon-warning); }
.tm-diagnostic > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--mon-line); }
.tm-diagnostic > header a { display: inline-flex; align-items: center; gap: 6px; color: var(--mon-accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.tm-diagnostic-copy { padding: 15px 16px; }
.tm-diagnostic-copy h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.tm-diagnostic-copy > span { display: block; margin-top: 8px; color: var(--mon-text-2); font-size: 13px; line-height: 1.5; }
.tm-evidence { display: grid; margin: 0; border-top: 1px solid var(--mon-line); }
.tm-evidence > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, auto); gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--mon-line); }
.tm-evidence dt { color: var(--mon-text-2); font-size: 12px; }
.tm-evidence dd { margin: 0; text-align: right; }
.tm-evidence dd strong { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.tm-evidence dd span { display: block; margin-top: 2px; color: var(--mon-text-3); font-size: 10px; }
.tm-diagnostic-result { display: grid; gap: 10px; padding: 14px 16px; background: var(--mon-surface-2); }
.tm-diagnostic-result p { margin: 0; color: var(--mon-text-2); font-size: 12px; line-height: 1.5; }
.tm-diagnostic-result b { display: block; margin-bottom: 2px; color: var(--mon-text); }
.tm-diagnostic footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--mon-line); color: var(--mon-text-3); font-size: 10px; }

.tm-object-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 18px; }
.tm-object-header a { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--mon-accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.tm-object-header p { margin: 0 0 4px; color: var(--mon-text-2); font-size: 12px; }
.tm-object-header h2 { margin: 0; font-size: 22px; }
.tm-object-header-state { display: grid; justify-items: end; gap: 7px; }
.tm-object-header-state > span:last-child { color: var(--mon-text-2); font-size: 11px; }
.tm-object-tabs { display: flex; overflow-x: auto; padding: 0 10px; border-radius: 0; box-shadow: none; }
.tm-object-tabs a { min-height: 46px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--mon-text-2); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tm-object-tabs a:hover,
.tm-object-tabs a.active { border-bottom-color: var(--mon-accent); color: var(--mon-text); }
.tm-object-tabs b { min-width: 19px; padding: 2px 5px; border-radius: 9px; background: var(--mon-alarm); color: #fffafa; font-size: 10px; text-align: center; }
.tm-object-content { padding: 18px; }
.tm-object-overview { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
.tm-process-panel { overflow: hidden; box-shadow: none; }
.tm-process-panel > header { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--mon-line); }
.tm-process-panel h3,
.tm-key-values h3 { margin: 0; font-size: 16px; }
.tm-process-panel > header > span { color: var(--mon-text-3); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.tm-object-facts { display: grid; align-content: start; overflow: hidden; box-shadow: none; }
.tm-object-facts > div { display: grid; gap: 5px; padding: 16px; border-top: 1px solid var(--mon-line); }
.tm-object-facts > div:first-child { border-top: 0; }
.tm-object-facts span { color: var(--mon-text-2); font-size: 10px; font-weight: 720; text-transform: uppercase; }
.tm-object-facts strong { font-size: 18px; }
.tm-object-facts small { color: var(--mon-text-3); }

.tm-mimic { position: relative; min-height: 390px; overflow: hidden; background: var(--mon-surface-2); }
.tm-mimic::before { content: ""; position: absolute; inset: 0; opacity: 0.45; background-image: linear-gradient(var(--mon-line) 1px, transparent 1px), linear-gradient(90deg, var(--mon-line) 1px, transparent 1px); background-size: 40px 40px; }
.tm-process-line,
.tm-pipe { position: absolute; z-index: 1; height: 5px; border-radius: 3px; background: var(--mon-line-strong); color: var(--mon-text-2); }
.tm-process-line span,
.tm-pipe span { position: absolute; top: -25px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tm-process-air { top: 28%; left: 8%; width: 36%; }
.tm-process-gas { top: 56%; left: 8%; width: 36%; }
.tm-process-flue { top: 38%; left: 59%; width: 32%; }
.tm-boiler-shape,
.tm-exchanger { position: absolute; z-index: 2; top: 25%; left: 44%; width: 142px; height: 178px; display: grid; place-items: center; align-content: center; gap: 7px; border: 2px solid var(--mon-line-strong); border-radius: 6px; background: var(--mon-surface); }
.tm-boiler-shape svg { width: 34px; height: 34px; color: var(--mon-text-2); }
.tm-boiler-shape span { color: var(--mon-text-2); font-size: 11px; }
.tm-fan-shape,
.tm-draft-shape,
.tm-valve,
.tm-pump { position: absolute; z-index: 2; min-width: 86px; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--mon-line-strong); border-radius: 5px; background: var(--mon-surface); font-size: 11px; font-weight: 700; }
.tm-fan-shape { top: 22%; left: 15%; }
.tm-draft-shape { top: 30%; right: 10%; }
.tm-pipe-supply { top: 36%; left: 7%; right: 7%; }
.tm-pipe-return { top: 66%; left: 7%; right: 7%; }
.tm-exchanger { top: 31%; left: 46%; width: 112px; height: 142px; font-size: 12px; text-align: center; }
.tm-exchanger svg { width: 30px; height: 30px; color: var(--mon-text-2); }
.tm-valve { top: calc(66% - 18px); left: 24%; }
.tm-pump { top: calc(66% - 18px); right: 20%; }
.tm-mimic-value { position: absolute; z-index: 3; min-width: 110px; display: grid; gap: 2px; color: var(--mon-text); }
.tm-mimic-value small { color: var(--mon-text-2); font-size: 10px; }
.tm-mimic-value strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.tm-mimic-value[data-state="alarm"] strong { color: var(--mon-alarm-text); }
.tm-mimic-value[data-state="warning"] strong { color: var(--mon-warning-text); }
.tm-mimic-value[data-state="nocomm"] strong { color: var(--mon-nocomm-text); }
.tm-mimic-boiler .tm-mimic-value:nth-of-type(1) { top: 12%; left: 8%; }
.tm-mimic-boiler .tm-mimic-value:nth-of-type(2) { top: 65%; left: 8%; }
.tm-mimic-boiler .tm-mimic-value:nth-of-type(3) { top: 18%; left: 62%; }
.tm-mimic-boiler .tm-mimic-value:nth-of-type(4) { top: 55%; right: 5%; }
.tm-mimic-boiler .tm-mimic-value:nth-of-type(5) { bottom: 10%; left: 38%; }
.tm-mimic-itp .tm-mimic-value:nth-of-type(1) { top: 12%; left: 8%; }
.tm-mimic-itp .tm-mimic-value:nth-of-type(2) { top: 23%; right: 8%; }
.tm-mimic-itp .tm-mimic-value:nth-of-type(3) { bottom: 15%; left: 8%; }
.tm-mimic-itp .tm-mimic-value:nth-of-type(4) { top: 23%; left: 24%; }
.tm-mimic-itp .tm-mimic-value:nth-of-type(5) { bottom: 10%; right: 8%; }

.tm-key-values { margin-top: 16px; overflow: hidden; box-shadow: none; }
.tm-key-values > header { padding: 13px 16px; border-bottom: 1px solid var(--mon-line); }
.tm-key-values > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tm-key-values article { min-height: 92px; display: grid; align-content: center; gap: 5px; padding: 12px 15px; border-right: 1px solid var(--mon-line); }
.tm-key-values article:last-child { border-right: 0; }
.tm-key-values article span { color: var(--mon-text-2); font-size: 11px; }
.tm-key-values article strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.tm-key-values article small { color: var(--mon-text-3); }
.tm-key-values article[data-state="alarm"] strong { color: var(--mon-alarm-text); }
.tm-key-values article[data-state="warning"] strong { color: var(--mon-warning-text); }
.tm-key-values article[data-state="nocomm"] strong { color: var(--mon-nocomm-text); }
.tm-object-issues { margin-top: 16px; box-shadow: none; }

.tm-parameter-groups { display: grid; gap: 14px; }
.tm-parameter-group { overflow: hidden; border: 1px solid var(--mon-line); border-radius: var(--mon-radius); }
.tm-parameter-group > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--mon-surface-2); }
.tm-parameter-group h3 { margin: 0; font-size: 14px; }
.tm-parameter-group header span { color: var(--mon-text-3); font-size: 11px; }
.tm-parameter-group article { min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) 150px 130px; gap: 14px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--mon-line); }
.tm-parameter-group article > div { display: grid; gap: 2px; }
.tm-parameter-group article > div strong { font-size: 13px; }
.tm-parameter-group article > div span { color: var(--mon-text-3); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.tm-parameter-group article > b { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }

.tm-trend-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.tm-trend-picker,
.tm-chart-panel { min-width: 0; overflow: hidden; border: 1px solid var(--mon-line); border-radius: var(--mon-radius); }
.tm-segmented { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--mon-line); }
.tm-segmented button { min-height: 44px; border: 0; border-right: 1px solid var(--mon-line); background: var(--mon-surface-2); color: var(--mon-text-2); cursor: pointer; font-size: 12px; font-weight: 700; }
.tm-segmented button:last-child { border-right: 0; }
.tm-segmented button.active { background: var(--mon-accent); color: #f7fbfd; }
.tm-trend-parameters { max-height: 410px; overflow-y: auto; }
.tm-trend-parameters label { min-height: 48px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--mon-line); cursor: pointer; }
.tm-trend-parameters label:first-child { border-top: 0; }
.tm-trend-parameters input { width: 17px; height: 17px; accent-color: var(--mon-accent); }
.tm-trend-parameters span { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tm-trend-parameters small { display: block; margin-top: 2px; color: var(--mon-text-3); font-size: 9px; }
.tm-chart-panel > header { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--mon-line); }
.tm-chart-panel h3 { margin: 0; font-size: 15px; }
.tm-chart-panel header p { margin: 0 0 3px; color: var(--mon-text-2); font-size: 10px; text-transform: uppercase; }
.tm-chart { min-height: 390px; padding: 14px; }
.tm-chart .uplot { color: var(--mon-text); font-family: inherit; }
.tm-chart .u-legend { font-size: 11px; }

.tm-device-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tm-device-list article { border: 1px solid var(--mon-line); border-radius: var(--mon-radius); overflow: hidden; }
.tm-device-list article > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--mon-line); background: var(--mon-surface-2); }
.tm-device-list dl { display: grid; margin: 0; }
.tm-device-list dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-top: 1px solid var(--mon-line); }
.tm-device-list dl > div:first-child { border-top: 0; }
.tm-device-list dt { color: var(--mon-text-2); font-size: 11px; }
.tm-device-list dd { margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; }

.tm-journal { display: grid; border: 1px solid var(--mon-line); border-radius: var(--mon-radius); overflow: hidden; }
.tm-journal article { min-height: 56px; display: grid; grid-template-columns: 150px 10px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--mon-line); }
.tm-journal article:first-child { border-top: 0; }
.tm-journal time { color: var(--mon-text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.tm-journal article > i { width: 8px; height: 8px; border-radius: 50%; background: var(--mon-text-3); }
.tm-journal article > i[data-state="normal"] { background: var(--mon-ok); }
.tm-journal article > i[data-state="alarm"] { background: var(--mon-alarm); }
.tm-journal article > i[data-state="nocomm"] { background: var(--mon-nocomm); }
.tm-journal article > div { display: grid; gap: 2px; }
.tm-journal strong { font-size: 12px; }
.tm-journal span { color: var(--mon-text-3); font-size: 10px; }

.tm-empty { min-height: 150px; display: grid; place-content: center; gap: 7px; padding: 24px; color: var(--mon-text-2); text-align: center; }
.tm-empty strong { color: var(--mon-text); font-size: 15px; }
.tm-empty p { max-width: 500px; margin: 0; font-size: 12px; line-height: 1.5; }
.tm-empty .tm-button { margin: 8px auto 0; }
.tm-empty-success { background: var(--mon-ok-soft); }
.tm-empty-error { background: var(--mon-alarm-soft); }

.tm-skeleton { min-height: 120px; border-radius: var(--mon-radius); background: linear-gradient(90deg, var(--mon-surface-2) 20%, var(--mon-line) 50%, var(--mon-surface-2) 80%); background-size: 240% 100%; animation: tm-skeleton 1.4s ease-in-out infinite; }
.tm-skeleton-page { min-height: calc(100vh - 145px); }
@keyframes tm-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .tm-skeleton { animation: none; } }

.tm-toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 380px; padding: 12px 15px; border: 1px solid var(--mon-line-strong); border-radius: 5px; background: var(--mon-sidebar); color: #f4f6f7; box-shadow: 0 14px 34px rgb(0 0 0 / 0.22); font-size: 13px; }
.tm-toast[data-tone="alarm"] { background: var(--mon-alarm-text); }
.tm-toast[data-tone="warning"] { background: #765100; }
.tm-mobile-nav { display: none; }

@media (max-width: 1180px) {
  .tm-summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-summary-strip > div:nth-child(3) { border-right: 0; }
  .tm-summary-strip > div:nth-child(-n + 3) { border-bottom: 1px solid var(--mon-line); }
  .tm-dashboard-grid { grid-template-columns: 1fr; }
  .tm-portfolio-state { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 20px; align-items: center; }
  .tm-portfolio-state header { padding: 0; border: 0; }
  .tm-state-bars { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
  .tm-object-overview { grid-template-columns: 1fr; }
  .tm-object-facts { grid-template-columns: repeat(3, 1fr); }
  .tm-object-facts > div { border-top: 0; border-left: 1px solid var(--mon-line); }
  .tm-object-facts > div:first-child { border-left: 0; }
}

@media (max-width: 900px) {
  .tm-app { grid-template-columns: 72px minmax(0, 1fr); }
  .tm-sidebar { padding-inline: 10px; }
  .tm-brand-compact { justify-content: center; padding-inline: 0; }
  .tm-brand-compact > span:last-child,
  .tm-primary-nav span,
  .tm-sidebar-foot p { display: none; }
  .tm-primary-nav a { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .tm-primary-nav b { position: absolute; margin: -20px 0 0 24px; }
  .tm-sidebar-foot { display: grid; justify-content: center; padding-inline: 0; }
  .tm-portfolio-state { grid-template-columns: 180px minmax(0, 1fr); }
  .tm-state-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-portfolio-state > .tm-text-link { grid-column: 1 / -1; justify-self: end; }
  .tm-filter-bar { grid-template-columns: 1fr 1fr; }
  .tm-search-field { grid-column: 1 / -1; }
  .tm-diagnostic-list { grid-template-columns: 1fr; }
  .tm-trend-layout { grid-template-columns: 1fr; }
  .tm-trend-picker { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .tm-segmented { border-right: 1px solid var(--mon-line); border-bottom: 0; }
  .tm-trend-parameters { max-height: 190px; }
  .tm-key-values > div { grid-template-columns: repeat(3, 1fr); }
  .tm-key-values article { border-bottom: 1px solid var(--mon-line); }
}

@media (max-width: 680px) {
  .tm-login { padding: 14px; }
  .tm-login-panel { min-height: 0; grid-template-columns: 1fr; }
  .tm-login-brand { gap: 30px; padding: 26px 22px; border-right: 0; border-bottom: 1px solid var(--mon-line); }
  .tm-login h1 { font-size: 30px; }
  .tm-login-brand > div:nth-child(2) > p:last-child { font-size: 15px; }
  .tm-login-form { padding: 26px 22px; }
  .tm-app { display: block; padding-bottom: 68px; }
  .tm-sidebar { display: none; }
  .tm-topbar { min-height: 68px; align-items: center; padding: 10px 14px; }
  .tm-page-heading { min-width: 0; }
  .tm-page-heading h1 { max-width: 185px; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .tm-top-actions { gap: 7px; }
  .tm-top-actions > .tm-status { display: none; }
  .tm-top-actions .tm-button { width: 44px; padding: 0; }
  .tm-top-actions .tm-button span { display: none; }
  .tm-view { gap: 12px; padding: 12px; }
  .tm-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-summary-strip > div { min-height: 68px; padding: 10px 12px; border-bottom: 1px solid var(--mon-line); }
  .tm-summary-strip > div:nth-child(2n) { border-right: 0; }
  .tm-summary-strip > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .tm-summary-strip strong { font-size: 19px; }
  .tm-portfolio-state { display: block; }
  .tm-portfolio-state header { padding-bottom: 14px; border-bottom: 1px solid var(--mon-line); }
  .tm-state-bars { grid-template-columns: 1fr 1fr; padding: 16px 0; }
  .tm-portfolio-state > .tm-text-link { display: inline-flex; }
  .tm-section-head { align-items: flex-start; padding: 12px; }
  .tm-section-head > a { max-width: 120px; text-align: right; }
  .tm-filter-bar { grid-template-columns: 1fr; padding: 12px; }
  .tm-search-field { grid-column: auto; }
  .tm-filter-bar > .tm-icon-button { width: 100%; }
  .tm-table-wrap { overflow: visible; }
  .tm-object-table,
  .tm-object-table tbody { min-width: 0; display: grid; }
  .tm-object-table thead { display: none; }
  .tm-object-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 13px; border-bottom: 1px solid var(--mon-line); }
  .tm-object-table td { min-width: 0; height: auto; display: grid; align-content: start; padding: 7px 0; border: 0; }
  .tm-object-table td:nth-child(2),
  .tm-object-table td:nth-child(3) { grid-column: 1 / -1; }
  .tm-object-table td::before { content: attr(data-label); margin-bottom: 5px; color: var(--mon-text-3); font-size: 9px; font-weight: 700; text-transform: uppercase; }
  .tm-inline-params { flex-wrap: wrap; }
  .tm-inline-params > span { flex: 1 1 90px; }
  .tm-event-row { grid-template-columns: 1fr; padding: 14px 12px; }
  .tm-event-actions { justify-content: flex-start; }
  .tm-ack-form { grid-column: auto; grid-template-columns: 1fr; }
  .tm-diagnostic-list { padding: 10px; }
  .tm-diagnostic > header { align-items: flex-start; }
  .tm-evidence > div { grid-template-columns: 1fr; }
  .tm-evidence dd { text-align: left; }
  .tm-object-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
  }
  .tm-object-header > div:first-child { min-width: 0; }
  .tm-object-header p,
  .tm-object-header h2 { overflow-wrap: anywhere; }
  .tm-object-header h2 { font-size: 19px; }
  .tm-object-header-state { min-width: 0; width: 96px; }
  .tm-object-header-state > .tm-status { width: 100%; justify-content: center; }
  .tm-object-header-state > span:last-child { display: none; }
  .tm-object-tabs { margin: 0; border-left: 0; border-right: 0; border-radius: 0; }
  .tm-object-content { padding: 10px; }
  .tm-mimic { min-height: 330px; }
  .tm-mimic::before { background-size: 32px 32px; }
  .tm-boiler-shape { left: 40%; width: 110px; height: 145px; }
  .tm-exchanger { left: 42%; width: 86px; height: 120px; }
  .tm-fan-shape { left: 6%; }
  .tm-draft-shape { right: 5%; }
  .tm-mimic-value { min-width: 90px; }
  .tm-mimic-value small { font-size: 9px; }
  .tm-mimic-value strong { font-size: 12px; }
  .tm-object-facts { grid-template-columns: 1fr; }
  .tm-object-facts > div { border-top: 1px solid var(--mon-line); border-left: 0; }
  .tm-object-facts > div:first-child { border-top: 0; }
  .tm-key-values > div { grid-template-columns: 1fr 1fr; }
  .tm-key-values article { min-height: 80px; border-bottom: 1px solid var(--mon-line); }
  .tm-key-values article:nth-child(2n) { border-right: 0; }
  .tm-key-values article strong { font-size: 17px; }
  .tm-parameter-group article { grid-template-columns: 1fr auto; }
  .tm-parameter-group article > .tm-status { grid-column: 1 / -1; }
  .tm-trend-picker { display: block; }
  .tm-segmented { border-right: 0; border-bottom: 1px solid var(--mon-line); }
  .tm-chart-panel > header { align-items: flex-start; }
  .tm-chart { min-height: 330px; padding: 7px; }
  .tm-device-list { grid-template-columns: 1fr; }
  .tm-device-list dl > div { grid-template-columns: 110px minmax(0, 1fr); }
  .tm-journal article { grid-template-columns: 1fr; gap: 4px; }
  .tm-journal article > i { display: none; }
  .tm-mobile-nav { position: fixed; z-index: 40; right: auto; bottom: 0; left: 0; width: 100vw; max-width: 100vw; min-height: 62px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border-top: 1px solid var(--mon-line); background: var(--mon-surface); }
  .tm-mobile-nav a { min-width: 0; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--mon-text-2); font-size: 9px; font-weight: 700; text-decoration: none; }
  .tm-mobile-nav a.active { color: var(--mon-accent); }
  .tm-mobile-nav svg { width: 19px; height: 19px; }
  .tm-toast { right: 12px; bottom: 76px; left: 12px; max-width: none; }
}

.tm-boiler-selector {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--mon-line);
  border-radius: var(--mon-radius);
  background: var(--mon-surface);
}

.tm-boiler-selector > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.tm-boiler-selector p {
  margin: 0;
  color: var(--mon-text-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.tm-boiler-selector > div > strong {
  font-size: 14px;
}

.tm-boiler-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, auto);
  overflow: hidden;
  border: 1px solid var(--mon-line-strong);
  border-radius: 5px;
}

.tm-boiler-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--mon-line-strong);
  background: var(--mon-surface-2);
  color: var(--mon-text-2);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.tm-boiler-tabs button:first-child {
  border-left: 0;
}

.tm-boiler-tabs button:hover {
  color: var(--mon-text);
}

.tm-boiler-tabs button.active,
.tm-boiler-tabs button[aria-selected="true"] {
  background: var(--mon-accent);
  color: #f4f8fa;
}

.tm-boiler-tabs button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--mon-accent);
  outline-offset: -2px;
}

.tm-readonly-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mon-text-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tm-readonly-mark svg {
  width: 17px;
  height: 17px;
  color: var(--mon-accent);
}

.tm-boiler-current-values {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.tm-boiler-value-group {
  overflow: hidden;
  border: 1px solid var(--mon-line);
  border-radius: var(--mon-radius);
  background: var(--mon-surface);
}

.tm-boiler-value-group > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--mon-line);
  background: var(--mon-surface-2);
}

.tm-boiler-value-group > header p {
  margin: 0 0 3px;
  color: var(--mon-text-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.tm-boiler-value-group > header h3 {
  margin: 0;
  font-size: 15px;
}

.tm-boiler-value-group > header > span:not(.tm-readonly-mark) {
  color: var(--mon-text-3);
  font-size: 10px;
}

.tm-boiler-sensor-grid,
.tm-boiler-control-grid {
  display: grid;
}

.tm-boiler-sensor-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tm-boiler-control-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tm-boiler-sensor-grid article,
.tm-boiler-control-grid article {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 14px 15px;
  border-right: 1px solid var(--mon-line);
  border-bottom: 1px solid var(--mon-line);
}

.tm-boiler-sensor-grid article:nth-child(4n),
.tm-boiler-control-grid article:nth-child(3n) {
  border-right: 0;
}

.tm-boiler-sensor-grid article:nth-last-child(-n + 4),
.tm-boiler-control-grid article:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.tm-boiler-sensor-grid article > div,
.tm-boiler-control-grid article > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-boiler-sensor-grid article svg,
.tm-boiler-control-grid article svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--mon-accent);
}

.tm-boiler-sensor-grid article span,
.tm-boiler-control-grid article span {
  min-width: 0;
  color: var(--mon-text-2);
  font-size: 11px;
  line-height: 1.35;
}

.tm-boiler-sensor-grid article strong,
.tm-boiler-control-grid article strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.tm-boiler-sensor-grid article small,
.tm-boiler-control-grid article small {
  color: var(--mon-text-3);
  font-size: 10px;
}

.tm-boiler-sensor-grid article[data-state="alarm"] strong,
.tm-boiler-control-grid article[data-state="alarm"] strong {
  color: var(--mon-alarm-text);
}

.tm-boiler-sensor-grid article[data-state="warning"] strong,
.tm-boiler-control-grid article[data-state="warning"] strong {
  color: var(--mon-warning-text);
}

.tm-boiler-sensor-grid article[data-state="nocomm"] strong,
.tm-boiler-control-grid article[data-state="nocomm"] strong {
  color: var(--mon-nocomm-text);
}

.tm-boiler-parameter-groups .tm-parameter-group:nth-child(2) > header {
  background: color-mix(in srgb, var(--mon-accent) 8%, var(--mon-surface-2));
}

@media (max-width: 900px) {
  .tm-boiler-sensor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tm-boiler-sensor-grid article:nth-child(4n) {
    border-right: 1px solid var(--mon-line);
  }

  .tm-boiler-sensor-grid article:nth-child(2n) {
    border-right: 0;
  }

  .tm-boiler-sensor-grid article:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--mon-line);
  }

  .tm-boiler-sensor-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .tm-boiler-selector {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .tm-boiler-selector > div {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .tm-boiler-tabs {
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
  }

  .tm-boiler-selector > .tm-readonly-mark {
    min-height: 26px;
  }

  .tm-boiler-value-group > header {
    align-items: flex-start;
  }

  .tm-boiler-control-grid {
    grid-template-columns: 1fr;
  }

  .tm-boiler-control-grid article {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--mon-line);
  }

  .tm-boiler-control-grid article:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--mon-line);
  }

  .tm-boiler-control-grid article:last-child {
    border-bottom: 0;
  }

  .tm-boiler-sensor-grid article,
  .tm-boiler-control-grid article {
    padding: 12px;
  }

  .tm-boiler-sensor-grid article strong,
  .tm-boiler-control-grid article strong {
    font-size: 18px;
  }
}
