:root { color-scheme: dark; font-family: Inter, "Segoe UI", Arial, sans-serif; --bg:#292929; --panel:#414141; --line:#626262; --sidebar:#070707; --topbar:#1d1d1d; --text:#f2f2f2; --muted:#bcbcbc; --green:#8caf3f; --focus:#c8e872; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
[hidden] { display: none !important; }
.device-defaults { background: var(--panel); color: var(--text); border: 1px solid var(--line); margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(640px, 100vw); max-width: 100vw; padding: 24px; overflow-y: auto; }
.device-defaults[open] { animation: defaults-slide-in .2s ease-out; }
.device-defaults::backdrop { background: #0009; }
.device-defaults fieldset { margin: 20px 0; border: 1px solid var(--line); min-width: 0; }
.defaults-rule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; border-top: 1px solid var(--line); padding: 14px 0; align-items: center; }
.defaults-rule label { min-width: 0; }
@keyframes defaults-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .device-defaults[open] { animation: none; } }
.hub-connection-alert { box-shadow: 0 4px 18px #000a; font-size: 15px; font-weight: 700; left: 0; padding: 13px 20px; position: fixed; right: 0; text-align: center; top: 0; z-index: 1001; }
.hub-connection-warning { background: #a66d00; color: white; }
.smtp-service-banner { background: #c77700; color: #fff; font-weight: 700; left: 0; padding: 11px 20px; position: fixed; right: 0; text-align: center; top: 0; z-index: 1000; }
.smtp-service-banner ~ .workspace .topbar, .smtp-service-banner ~ .sidebar { margin-top: 42px; }
.hub-offline-overlay { align-items: flex-start; background: #120000b8; display: flex; inset: 0; justify-content: center; padding-top: 90px; position: fixed; z-index: 1000; }
.hub-offline-message { background: #8f0000; border: 4px solid #ff4b4b; box-shadow: 0 10px 55px #000; display: grid; gap: 8px; max-width: 720px; padding: 28px 50px; text-align: center; width: calc(100% - 40px); }
.hub-offline-message strong { font-size: 30px; letter-spacing: .08em; }
.hub-offline-message span { font-size: 20px; }
.hub-offline-message small { color: #ffdada; font-size: 13px; }
.hub-online-toast { background: #267d34; box-shadow: 0 4px 18px #000a; color: white; font-size: 15px; font-weight: 700; left: 50%; padding: 12px 24px; position: fixed; top: 14px; transform: translateX(-50%); z-index: 1002; }
.hub-offline .workspace, .hub-offline .sidebar { filter: grayscale(.65) brightness(.45); }
.hub-offline main button, .hub-offline main input, .hub-offline main select, .hub-offline main textarea, .hub-offline main a { pointer-events: none; }
a { color: inherit; }
.app-shell { display: grid; grid-template-columns: 190px minmax(0,1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); min-height: 100vh; overflow-y: auto; position: sticky; top: 0; }
.brand-mark { align-items: center; background: #000; display: flex; height: 70px; justify-content: center; padding: 4px 6px; text-decoration: none; width: 100%; }
.brand-mark img { display: block; height: auto; max-width: 100%; object-fit: contain; width: 100%; }
.sidebar nav { display: block; padding: 8px 0 30px; }
.sidebar nav a { align-items: center; color: #ddd; display: flex; gap: 10px; padding: 9px 14px; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a:focus-visible { background: #202020; color: white; outline: 0; }
.sidebar nav a span { color: white; text-align: center; width: 18px; }
.nav-label { color: #7c7c7c; font-size: 10px; letter-spacing: .12em; margin: 20px 14px 6px; text-transform: uppercase; }
.workspace { min-width: 0; }
.topbar { align-items: center; background: var(--topbar); box-shadow: 0 2px 9px #0005; display: flex; height: 72px; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.wordmark { align-items: center; display: flex; font-size: 19px; font-weight: 600; gap: 8px; letter-spacing: .45em; text-decoration: none; }
.wordmark img { height: 25px; margin-left: -4px; width: 25px; }
.wordmark b { background: var(--green); color: #101010; font-size: 10px; letter-spacing: .05em; margin-left: 4px; padding: 5px 7px; }
.customer-wordmark b { font-size: 13px; letter-spacing: .12em; margin-left: 0; padding: 7px 11px; }
.account { align-items: center; display: grid; gap: 1px 10px; grid-template-columns: auto auto auto; text-align: right; }
.top-status { align-items: center; display: flex; font-size: 11px; gap: 16px; margin: 0 auto; }
.local-clock { border-left: 1px solid #555; border-right: 1px solid #555; color: #ddd; flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; margin: 0 20px; padding: 8px 18px; white-space: nowrap; }
.system-meter { display: grid; flex: 0 0 auto; gap: 4px; font-size: 9px; font-variant-numeric: tabular-nums; width: 112px; }
.system-meter span { align-items: center; display: grid; gap: 4px; grid-template-columns: 22px 1fr 28px; }
.system-meter b { color: #bbb; font-weight: 600; }
.system-meter i, .system-metric-card i { background: #505050; border-radius: 2px; display: block; height: 5px; overflow: hidden; }
.system-meter em, .system-metric-card em { background: var(--green); display: block; height: 100%; transition: width .35s ease; width: 0; }
.system-meter strong { color: #ddd; font-weight: 500; text-align: right; }
.top-sound-off-form { display: none; }
.top-sound-off-form input { display: none; }
.top-sound-off { background: var(--green); border: 1px solid #a6ca50; color: #101010; flex: 0 0 auto; font-size: 12px; margin: 0 14px 0 0; padding: 8px 13px; white-space: nowrap; }
.top-sound-off:hover { background: #a6ca50; }
.browser-sound-toggle { align-items:center; color:#ccc; cursor:pointer; display:flex; flex:0 0 auto; font-size:10px; gap:5px; margin:0 10px 0 0; white-space:nowrap; }
.browser-sound-toggle input { accent-color:var(--green); height:14px; margin:0; width:14px; }
.mqtt-summary, .alarm-summary { align-items: center; background: #292929; display: flex; gap: 6px; padding: 8px 10px; text-decoration: none; }
.connection-dot { background: #777; border-radius: 50%; height: 8px; margin-left: 5px; width: 8px; }
.connection-dot.status-connected { background: #49bc58; box-shadow: 0 0 6px #49bc58aa; }
.connection-dot.status-error, .connection-dot.status-disconnected { background: #e54848; }
.alarm-summary strong { font-size: 14px; padding: 2px 6px; }.alarm-summary b { padding: 2px 5px; }
.summary-total, .summary-acked, .summary-normal { background: #173958; color: #d9e8f4; }
.summary-active { background: #e10000; color: white; }
.alarm-summary .is-zero { background: #5b5b5b; color: #ddd; }
.account small { color: var(--muted); grid-column: 1; text-transform: capitalize; }
.account a, .link-button { background: none; border: 0; color: #ddd; cursor: pointer; font: inherit; padding: 0; text-decoration: none; }
.account a:hover, .link-button:hover { color: var(--focus); }
.account form { grid-column: 3; grid-row: 1 / span 2; }
.language-toggle { background: #303030; border: 1px solid #777; border-radius: 3px; color: #fff; flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 8px 11px; text-decoration: none; }
.language-toggle:hover { background: #454545; border-color: var(--focus); }
.auth-language { margin-top: 16px; text-align: center; }
.auth-language .language-toggle { display: inline-block; }
.menu-toggle { background: transparent; border: 1px solid var(--line); color: white; display: none; font-size: 20px; padding: 6px 10px; }
main { margin: 0 auto; max-width: 1320px; padding: 46px 34px; width: 100%; }
.card { background: var(--panel); border: 1px solid #4a4a4a; box-shadow: 0 3px 12px #0005; margin-bottom: 22px; padding: 28px; }
.card h1 { border-bottom: 1px solid var(--line); font-size: 24px; font-weight: 400; margin: 0 0 28px; padding-bottom: 16px; }
.card h2 { font-size: 18px; font-weight: 500; }
label { color: #ddd; display: block; margin: 16px 0; }
input, select, textarea { background: #303030; border: 1px solid #777; color: white; display: block; margin-top: 6px; padding: 10px 11px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { border-color: var(--focus); outline: 2px solid #c8e87255; outline-offset: 1px; }
.check { align-items: center; display: flex; gap: 8px; }
.check input { accent-color: var(--green); margin: 0; width: auto; }
button { background: var(--green); border: 0; color: #101010; cursor: pointer; font-weight: 650; margin-right: 7px; padding: 10px 18px; }
button:hover { background: #a6ca50; }
button:disabled { background: #5b5b5b; color: #aaa; cursor: not-allowed; }
.form-options-disabled { opacity: .5; }
.danger { background: #4d4d4d; border: 1px solid var(--green); color: white; margin-top: 22px; }.danger:hover { background: #606060; }
table { border-collapse: collapse; font-size: 13px; width: 100%; }
th { color: #eee; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
th, td { border-bottom: 1px solid #9a9a9a; padding: 9px 8px; text-align: left; }
tbody tr:hover { background: #4b4b4b; }
.area-color { background: var(--area-color, #4a6a7a); border: 1px solid #ffffff55; border-radius: 50%; display: inline-block; height: 12px; margin-right: 7px; vertical-align: -1px; width: 12px; }
.areas-card .section-heading h1 { margin-bottom: 5px; }
.areas-card .page-intro { margin-bottom: 16px; }
.areas-table-wrap { border: 1px solid var(--line); overflow-x: auto; }
.areas-table { min-width: 680px; table-layout: fixed; }
.areas-table th, .areas-table td { padding: 7px 9px; vertical-align: middle; }
.areas-table th { background: #383838; }
.areas-table th:first-child { width: 34%; }
.areas-table th:nth-child(2) { width: 27%; }
.areas-table th:nth-child(3) { width: 22%; }
.areas-table .areas-rule-count { text-align: center; width: 70px; }
.areas-table .areas-action { text-align: right; width: 140px; }
.areas-table input, .areas-table select { height: 34px; margin: 0; padding: 5px 8px; }
.area-name-field { align-items: center; display: grid; gap: 8px; grid-template-columns: auto minmax(0, 1fr); }
.area-name-field .area-color { margin: 0; }
.area-color-field { align-items: center; display: flex; gap: 8px; }
.area-color-field input[type="color"] { flex: 0 0 38px; padding: 2px; width: 38px; }
.area-color-field code { color: var(--muted); font-size: 11px; white-space: nowrap; }
.areas-table .compact-action { margin: 0; padding: 7px 11px; }
.areas-table .areas-action .actions { flex-wrap: nowrap; justify-content: flex-end; }
.history-row.priority-1 td:first-child { border-left: 5px solid #e10000; }
.history-row.priority-2 td:first-child { border-left: 5px solid #e2c700; }
.history-row.priority-3 td:first-child { border-left: 5px solid #69c9ed; }
.history-row.priority-4 td:first-child { border-left: 5px solid #c15acb; }
.alarm-history-card { overflow: hidden; }
.alarm-history-card > .section-heading { align-items: center; }
.alarm-history-card > .section-heading h1 { margin-bottom: 5px; }
.history-table-scroll { border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.table-scroll-top { height: 18px; margin-bottom: 4px; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.table-scroll-top-inner { height: 1px; }
.history-table { table-layout: fixed; min-width: 100%; width: 1540px; }
.history-table th { background: #383838; position: sticky; top: 0; z-index: 1; }
.history-table th, .history-table td { overflow-wrap: anywhere; vertical-align: top; }
.history-table time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-table .history-alarm { width: 180px; }
.history-table .history-area { width: 130px; }
.history-table .history-description { width: 260px; }
.history-table .history-priority { width: 75px; }
.history-table .history-date { width: 135px; }
.history-table .history-message { width: 185px; }
.history-table .history-reason { width: 125px; }
.history-sort { align-items: center; display: flex; gap: 5px; text-decoration: none; }
.history-sort:hover { color: var(--focus); }
.history-pagination { align-items: center; display: flex; justify-content: space-between; margin-top: 16px; }
.history-pagination .button { margin-left: 7px; padding: 8px 13px; }
.sensor-list-card { overflow: hidden; }
.sensor-table-scroll { border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.sensor-table { table-layout: fixed; min-width: 100%; width: 1455px; }
.sensor-table th, .sensor-table td { overflow: hidden; overflow-wrap: normal; padding: 8px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.sensor-table time, .sensor-table code { white-space: nowrap; }
.sensor-table .sensor-status { width: 65px; }
.sensor-table .sensor-name { width: 235px; }
.sensor-table .sensor-eui { width: 165px; }
.sensor-table .sensor-profile { width: 115px; }
.sensor-table .sensor-broker { width: 125px; }
.sensor-table .sensor-seen { width: 145px; }
.sensor-table .sensor-channels { width: 405px; }
.sensor-table .sensor-actions { width: 200px; }
.sensor-table .actions { flex-wrap: nowrap; white-space: nowrap; }
.sensor-table .actions form { margin: 0; }
.sensor-table .danger { margin: 0; padding: 8px 11px; }
.device-channel-card { overflow: hidden; }
.device-channel-table-scroll { border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.device-channel-table.standard-table { min-width: 100%; table-layout: auto; width: 1700px; }
.device-channel-table th, .device-channel-table td { overflow: visible; padding: 8px 10px; text-overflow: clip; vertical-align: top; white-space: normal; }
.device-channel-table th { white-space: nowrap; }
.device-channel-table td:nth-child(1) { width: 65px; }
.device-channel-table td:nth-child(2) { min-width: 280px; overflow-wrap: anywhere; }
.device-channel-table td:nth-child(3) { min-width: 110px; }
.device-channel-table td:nth-child(4) { min-width: 220px; overflow-wrap: anywhere; }
.device-channel-table td:nth-child(5) { min-width: 90px; overflow-wrap: anywhere; }
.device-channel-table td:nth-child(6), .device-channel-table td:nth-child(7) { min-width: 190px; overflow-wrap: anywhere; }
.device-channel-table td:nth-child(8) { min-width: 165px; white-space: nowrap; }
.device-channel-table td:nth-child(9) { min-width: 225px; }
.device-channel-table .actions { flex-wrap: nowrap; white-space: nowrap; }
.device-channel-table .actions form, .device-channel-table .danger { margin: 0; }
.history-filters { align-items: end; background: #383838; display: grid; gap: 14px; grid-template-columns: minmax(220px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto; margin-bottom: 24px; padding: 14px 16px; }
.history-filters label { margin: 0; }
.history-filter-actions { align-items: center; display: flex; gap: 10px; padding-bottom: 1px; }
.history-filter-actions a { color: #d7e6ba; white-space: nowrap; }
.history-purge { align-items: end; background: #383838; display: flex; gap: 12px; margin: -10px 0 20px; padding: 12px 16px; }
.history-purge label { margin: 0; width: 220px; }
.history-purge button { margin: 0; }
.history-purge small { color: var(--muted); padding-bottom: 10px; }
.purge-result { background: #294b30; border-left: 4px solid #78d884; padding: 10px 13px; }
.page-intro { color: var(--muted); margin: -10px 0 22px; }
.rules-filter { align-items: end; background: #383838; display: flex; gap: 12px; margin-bottom: 24px; padding: 14px 16px; }
.rules-filter label { flex: 1; margin: 0; }
.rules-filter a { color: #d7e6ba; padding-bottom: 11px; }
.rule-row td:first-child { border-left: 5px solid #777; }
.rule-row.priority-1 td:first-child { border-left-color: #e10000; }
.rule-row.priority-2 td:first-child { border-left-color: #e2c700; }
.rule-row.priority-3 td:first-child { border-left-color: #69c9ed; }
.rule-row.priority-4 td:first-child { border-left-color: #c15acb; }
.rules-table td small { color: var(--muted); display: block; margin-top: 3px; }
.standard-table-scroll { border:1px solid var(--line); max-width:100%; overflow-x:auto; }
.standard-table { min-width:760px; table-layout:fixed; }
.standard-table th { background:#383838; position:sticky; top:0; z-index:1; }
.standard-table th,.standard-table td { line-height:1.35; overflow:hidden; padding:8px 9px; text-overflow:ellipsis; vertical-align:middle; }
.standard-table th button { background:transparent; color:inherit; font:inherit; letter-spacing:inherit; margin:0; padding:0; text-align:left; text-transform:inherit; }
.standard-table th button:hover { background:transparent; color:var(--focus); }
.standard-table-tools { margin-bottom:8px; }
.rules-table { min-width:1420px; width:100%; }
.rules-table th,.rules-table td { white-space:normal; }
.rules-table .rule-alarm { width:270px; }.rules-table .rule-area { width:90px; }.rules-table .rule-description { width:230px; }.rules-table .rule-channel { width:250px; }.rules-table .rule-condition { width:80px; }.rules-table .rule-status { width:80px; }.rules-table .rule-priority { width:70px; }.rules-table .rule-limit { width:65px; }.rules-table .rule-actions { width:150px; }.rules-table .rule-edit { width:105px; }
.rules-table td:nth-child(1),.rules-table td:nth-child(4) { overflow-wrap:anywhere; }
.rules-table td:nth-child(5),.rules-table td:nth-child(6),.rules-table td:nth-child(7),.rules-table td:nth-child(8) { white-space:nowrap; }
.rules-table .edit-link { display:inline-block; white-space:nowrap; }
.rules-filter.table-tools { margin-bottom:8px; }.rules-filter.table-tools button { margin:0; }.rules-filter .table-result-count { white-space:nowrap; }
.dashboard .section-heading h1 { margin-bottom: 0; }
.dashboard-updated { color: #78d884; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-grid { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 28px; }
.dashboard-grid-four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-grid-five { grid-template-columns: repeat(5,minmax(0,1fr)); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
a.button { background: var(--green); color: #111; display: inline-block; font-weight: 650; padding: 11px 16px; text-decoration: none; }
a.button.secondary { background: #303030; border: 1px solid #777; color: white; }
a.button:hover { filter: brightness(1.1); }
.dashboard-metric { background: #383838; border-left: 4px solid var(--green); display: flex; flex-direction: column; min-height: 108px; padding: 15px; text-decoration: none; }
.dashboard-metric:hover { background: #454545; }
.dashboard-metric span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.dashboard-metric strong { font-size: 25px; font-weight: 500; margin: 9px 0 4px; }
.dashboard-metric small { color: var(--muted); }
.dashboard-metric.metric-active { border-left-color: #e10000; }
.system-metric-card i { height: 7px; margin: 3px 0 8px; width: 100%; }
.dashboard-columns { display: grid; gap: 24px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.dashboard-list { background: #383838; }
.dashboard-list > * { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 13px 15px; text-decoration: none; }
.dashboard-list > *:last-child { border-bottom: 0; }
.dashboard-list a:hover { background: #454545; }
.dashboard-list strong { text-transform: capitalize; }
.display-settings { background: #383838; display: grid; gap: 22px 18px; grid-template-columns: repeat(2,minmax(240px,1fr)); padding: 22px; }
.display-setting-field { display: grid; grid-template-rows: auto 44px auto; }
.display-setting-field label { font-weight: 600; margin: 0 0 8px; }
.display-setting-field input, .display-setting-field select { height: 44px; margin: 0; }
.display-setting-field small { color: var(--muted); line-height: 1.4; margin-top: 8px; min-height: 2.8em; }
.display-settings-actions { border-top: 1px solid var(--line); display: flex; grid-column: 1/-1; justify-content: flex-end; padding-top: 18px; }
.display-settings-actions button { margin: 0; min-width: 210px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.actions button { font-size: 11px; padding: 6px 9px; }
.error, .success { border-left: 4px solid; padding: 11px 14px; }
.error { background: #5b1717; border-color: #ff4d4d; color: #fff; }
.success { background: #253d20; border-color: var(--green); color: #eefbdc; }
dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px; }
dt { color: var(--muted); } dd { margin: 0; }
.device { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 10px; }
.setpoint { border-left: 4px solid var(--green); border-top: 1px solid var(--line); margin: 24px 0; padding: 10px 18px; }
.alarm-action-editor { background: #383838; padding: 12px; }
.alarm-action-list { display: grid; gap: 8px; margin-bottom: 9px; }
.alarm-action-row { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(220px, 1fr) auto; }
.alarm-action-row select { margin: 0; }
.compact-action { font-size: 11px; margin: 0; padding: 8px 11px; }
.alarm-action-editor > small { color: var(--muted); display: block; margin-top: 9px; }
.section-heading, .channel-title { align-items: flex-start; display: flex; justify-content: space-between; }
.section-heading small, .channel-title small { color: var(--muted); letter-spacing: .14em; }
.section-heading h1, .channel-title h1 { border: 0; margin-bottom: 12px; }
.count { background: #173958; color: #d9e8f4; font-size: 13px; padding: 3px 7px; }
.status-dot { background: #666; border-radius: 50%; display: inline-block; height: 10px; width: 10px; }
.status-dot.enabled { background: #49bc58; box-shadow: 0 0 7px #49bc5888; }
.beacon-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 7px; text-transform: uppercase; }
.beacon-status.active { background: #238446; color: white; }
.beacon-status.disabled { background: #555; color: #ddd; }
.beacon-list-card { overflow:hidden; }
.beacon-table { min-width:1450px; width:100%; }
.beacon-table th,.beacon-table td { line-height:1.2; padding:6px 8px; white-space:nowrap; }
.beacon-table .beacon-name { width:170px; }.beacon-table .beacon-mac { width:160px; }.beacon-table .beacon-uuid { width:310px; }.beacon-table .beacon-number { width:65px; }.beacon-table .beacon-type { width:105px; }.beacon-table .beacon-rssi { width:65px; }.beacon-table .beacon-device { width:150px; }.beacon-table .beacon-seen { width:150px; }.beacon-table .beacon-state { width:90px; }.beacon-table .beacon-actions { width:145px; }
.beacon-table .beacon-identifier,.beacon-table .beacon-identifier code { overflow:visible; text-overflow:clip; white-space:nowrap; }
.beacon-table .actions { flex-wrap:nowrap; }.beacon-table .actions form { margin:0; }
.type-chip { background: #555; display: inline-block; font-size: 11px; padding: 4px 7px; }
.edit-link { color: #badd67; }
.live-summary { background: #383838; border: 1px solid var(--line); margin-bottom: 28px; padding: 16px; }
fieldset { border: 1px solid var(--line); margin: 20px 0; padding: 18px; }
legend { color: var(--muted); font-size: 12px; letter-spacing: .12em; padding: 0 8px; text-transform: uppercase; }
.field-grid { display: grid; gap: 18px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.coordinate-grid { display: grid; gap: 18px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.broker-grid { display: grid; gap: 18px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 28px; }
.broker-card { background: #383838; border-left: 4px solid var(--green); padding: 18px; }
.broker-card h2 { margin-top: 0; }.broker-card h2 small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.mqtt-base-topic-input { align-items: center; display: flex; margin-top: 6px; max-width: 620px; }.mqtt-base-topic-input code { background: #222; border: 1px solid #777; color: #d7e9a8; padding: 10px 11px; }.mqtt-base-topic-input input { border-left: 0; border-right: 0; margin: 0; }
.broker-critical { border-left-color: #e10000; }.broker-status { font-size: 18px; text-transform: uppercase; }
.status-connected { color: #76d681; }.status-error, .status-disconnected { color: #ff6666; }.status-disabled { color: var(--muted); }
.compact-danger { margin-top: 0; }
@media (max-width:820px) { .broker-grid{grid-template-columns:1fr} }
.alarm-panel .count { background: #173958; color: #d9e8f4; font-size: 14px; padding: 3px 8px; }
.alarm-panel-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 14px; margin-bottom: 28px; padding-bottom: 16px; }
.alarm-panel-heading h1 { border: 0; margin: 0; padding: 0; }
.alarm-panel-heading .live-indicator { margin-left: auto; }
.work-alone-panel { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }
.work-alone-panel h2 { align-items: center; display: flex; gap: 8px; }
.work-alone-grid { display: grid; gap: 8px; }
.work-alone-row { align-items: center; background: #173958; display: grid; gap: 12px; grid-template-columns: minmax(140px,1fr) minmax(140px,1fr) auto; padding: 12px; }
.work-alone-countdown { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 800; }
.live-indicator { color: #78d884; float: right; font-size: 10px; letter-spacing: .14em; margin-top: 8px; }
.live-indicator::before { background: #49bc58; border-radius: 50%; content: ""; display: inline-block; height: 8px; margin-right: 6px; width: 8px; }
.alarm-grid { display: grid; gap: 8px; }
.alarm-row { align-items: stretch; color: #fff; display: grid; gap: 0; grid-template-columns: minmax(420px,1.25fr) minmax(390px,1fr) 76px; min-height: 94px; padding: 0; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.alarm-content { display: grid; grid-template-columns: minmax(175px,.65fr) minmax(180px,1fr); min-width: 0; }
.alarm-tagname { align-items: center; color: #fff; display: flex; font-size: 17px; min-width: 0; overflow-wrap: anywhere; padding: 9px 10px; }
.alarm-description { display: flex; flex-direction: column; grid-column: 1/-1; min-width: 0; padding: 5px 10px 8px; }
.alarm-description small, .alarm-facts small { color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; opacity: 1; text-transform: uppercase; }
.alarm-description span { color: #fff; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.alarm-facts { display: grid; grid-auto-rows: minmax(22px,auto); grid-template-columns: 126px minmax(0,1fr); min-width: 0; }
.alarm-facts div { display: contents; }
.alarm-facts small, .alarm-facts span, .alarm-facts time, .alarm-facts strong { align-items: center; display: flex; padding: 3px 8px; }
.alarm-facts span, .alarm-facts time, .alarm-facts strong { color: #fff; font-size: 13px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.alarm-area-badge { align-items: center; align-self: center; background: var(--area-color, #4a6a7a); border: 1px solid #ffffff99; border-radius: 3px; box-shadow: 0 1px 3px #0005; color: white; display: flex; font-size: 13px; font-weight: 800; height: 30px; justify-content: center; justify-self: stretch; margin: 6px 12px; min-width: 140px; padding: 0 10px; text-align: center; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.alarm-row.priority-1 { background-color: #e10000; }.alarm-row.priority-2 { background-color: #9a8615; }.alarm-row.priority-3 { background-color: #287b9b; }.alarm-row.priority-4 { background-color: #91419a; }
.alarm-row.acked { background-image: linear-gradient(#0005, #0005); }.alarm-row.normal { background-color: #173958; color: #fff; background-image: linear-gradient(#0004, #0004); }
.alarm-actions { align-content: center; display: grid; gap: 5px; }.alarm-actions form { display: flex; margin: 0; }.alarm-actions button { background: #111; color: white; font-size: 12px; min-width: 76px; padding: 7px 8px; width: 100%; }.alarm-actions button:hover { background: #303030; }.alarm-channel-link { color: #fff; font-size: 11px; text-align: center; text-decoration: underline; }
.empty-state { color: var(--muted); padding: 40px; text-align: center; }
.table-tools { align-items: end; background: #383838; display: flex; gap: 18px; justify-content: space-between; margin: 14px 0 18px; padding: 12px 14px; }
.table-tools label { flex: 1; margin: 0; max-width: 560px; }
.table-tools input { margin-bottom: 0; margin-top: 5px; }
.table-result-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
th button[data-sort-column] { background: transparent; color: inherit; font: inherit; margin: -8px; padding: 8px; text-align: left; text-transform: inherit; white-space: nowrap; }
th button[data-sort-column]::after { color: #8f9699; content: "⇅"; font-size: 11px; margin-left: 7px; }
th button[data-sort-direction="ascending"]::after { color: var(--green); content: "▲"; }
th button[data-sort-direction="descending"]::after { color: var(--green); content: "▼"; }
th button[data-sort-column]:hover { background: #ffffff0c; }
.auth-shell { background: radial-gradient(circle at 50% 25%,#393939,#181818 70%); display: grid; min-height: 100vh; place-items: center; }
.auth-main { max-width: 430px; padding: 24px; width: 100%; }
.login-card { background: #262626; border-top: 4px solid var(--green); box-shadow: 0 12px 50px #0009; padding: 34px; }
.login-card h1 { font-size: 24px; font-weight: 400; }
.login-brand { align-items: center; display: flex; font-size: 19px; gap: 12px; }
.login-brand img { height: 54px; object-fit: contain; width: 54px; }
@media (max-width:1100px) { .top-status { display:none; }.alarm-row{grid-template-columns:minmax(360px,1fr) minmax(340px,1fr) 76px}.alarm-facts{grid-template-columns:112px minmax(0,1fr)} }
@media (max-width:820px) { .app-shell{grid-template-columns:1fr}.sidebar{box-shadow:8px 0 20px #0008;left:-230px;position:fixed;transition:left .2s;width:220px;z-index:30}.sidebar-open .sidebar{left:0}.menu-toggle{display:block}.wordmark{font-size:14px;letter-spacing:.25em}.account span,.account small{display:none}.topbar{padding:0 14px}main{padding:24px 14px}.card{overflow-x:auto;padding:20px}.alarm-row{grid-template-columns:1fr;min-width:260px}.alarm-content{grid-template-columns:minmax(130px,.7fr) minmax(130px,1fr)}.alarm-facts{grid-template-columns:112px minmax(0,1fr)}.alarm-actions{display:flex}.alarm-actions form{flex:0 0 76px}.alarm-actions button{width:76px} }
@media (max-width:950px) { .history-filters{grid-template-columns:1fr 1fr}.history-filter-actions{padding-bottom:0} }
@media (max-width:1150px) { .dashboard-grid-four,.dashboard-grid-five{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:700px) { .dashboard-grid,.dashboard-grid-four,.dashboard-grid-five,.dashboard-columns{grid-template-columns:1fr} }
@media (max-width:700px) { .coordinate-grid{grid-template-columns:1fr} }
@media (max-width:700px) { .rules-filter{align-items:stretch;flex-direction:column}.rules-filter a{padding-bottom:0} }
@media (max-width:700px) { .table-tools{align-items:stretch;flex-direction:column}.table-tools label{max-width:none} }

/* Audit history */
.audit-card { max-width: 1500px; }
.audit-heading { align-items: center; gap: 24px; }
.audit-heading .page-intro { margin: 0; }
.audit-export { flex: 0 0 auto; }
.audit-filters { align-items: end; background: #383838; border-left: 3px solid var(--accent); display: grid; gap: 12px; grid-template-columns: minmax(240px, 2fr) minmax(130px, .7fr) minmax(210px, 1.3fr) minmax(135px, .7fr) minmax(135px, .7fr) auto; margin: 22px 0 18px; padding: 14px; }
.audit-filters label { margin: 0; min-width: 0; }
.audit-filters input, .audit-filters select { margin: 5px 0 0; width: 100%; }
.audit-filter-actions { align-items: center; display: flex; gap: 12px; padding-bottom: 1px; white-space: nowrap; }
.audit-table-wrap { overflow-x: auto; }
.audit-table { min-width: 900px; }
.audit-table th:first-child { width: 190px; }
.audit-table th:nth-child(2) { width: 130px; }
.audit-table th:nth-child(3) { width: 260px; }
.audit-table th:nth-child(4) { width: 110px; }
.audit-time small { color: var(--muted); display: block; font-family: monospace; margin-top: 4px; }
.audit-action { background: #242424; border: 1px solid #555; border-radius: 3px; color: #e8e8e8; display: inline-block; padding: 3px 7px; }
.audit-outcome { border: 1px solid #777; border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 4px 9px; text-transform: uppercase; }
.audit-outcome-accepted, .audit-outcome-success { background: #263b23; border-color: #77a83e; color: #bce57e; }
.audit-outcome-rejected, .audit-outcome-failed, .audit-outcome-error { background: #452626; border-color: #bd6767; color: #ffb3b3; }
.audit-details summary { color: var(--link); cursor: pointer; font-weight: 700; }
.audit-details dl { display: grid; font-size: 12px; gap: 5px 10px; grid-template-columns: max-content 1fr; margin: 10px 0 0; max-width: 520px; }
.audit-details dt { color: var(--muted); text-transform: capitalize; }
.audit-details dd { margin: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
@media (max-width: 1200px) { .audit-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }.audit-search { grid-column: span 2; } }
@media (max-width: 700px) { .audit-heading { align-items: stretch; flex-direction: column; }.audit-filters { grid-template-columns: 1fr; }.audit-search { grid-column: auto; }.audit-filter-actions { justify-content: space-between; } }
@media (max-width:900px) { .display-settings{grid-template-columns:1fr} }
@media (max-width:500px) { .wordmark b{display:none}.account{gap:8px}dl{grid-template-columns:1fr} }
.password-change-required .top-status, .password-change-required .top-sound-off, .password-change-required .sidebar nav { display: none; }
.trend-filters { background:#383838; display:grid; gap:18px; margin-bottom:18px; padding:18px; }
.trend-filters label { margin:0; }.trend-filters input { margin:6px 0 0; width:100%; }
.trend-sensor-picker { display:grid; gap:16px; grid-template-columns:1fr 1fr; }.trend-sensor-column { background:#2c2c2c; border:1px solid var(--line); min-height:330px; padding:14px; }.trend-sensor-column.drag-over { border-color:var(--green); box-shadow:inset 0 0 0 2px #badd6744; }.trend-selected-column { border-top:3px solid var(--green); }
.trend-picker-heading { align-items:center; display:flex; justify-content:space-between; margin-bottom:11px; }.trend-picker-heading span { color:var(--muted); }.trend-search-label { display:block; font-size:11px; }.trend-sensor-list { display:grid; gap:7px; margin-top:12px; }.trend-sensor-item { align-items:center; background:#414141; border-left:3px solid #777; cursor:grab; display:grid; gap:10px; grid-template-columns:minmax(0,1fr) auto; padding:9px 10px; }.trend-sensor-item:active { cursor:grabbing; }.trend-sensor-item.selected { border-left-color:var(--green); }.trend-sensor-item.dragging { opacity:.45; }.trend-sensor-item div { min-width:0; }.trend-sensor-item strong,.trend-sensor-item small { display:block; overflow-wrap:anywhere; }.trend-sensor-item small { color:var(--muted); margin-top:3px; }.trend-sensor-item button { font-size:11px; margin:0; padding:7px 10px; }.trend-sensor-item button:disabled { cursor:not-allowed; opacity:.45; }.trend-drop-help { color:var(--muted); font-size:11px; margin:0 0 10px; }.trend-list-empty { padding:26px 10px; }.trend-date-filters { align-items:end; display:grid; gap:16px; grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) minmax(180px,.7fr) auto; }.trend-date-filters label>small { color:var(--muted); display:block; margin-top:5px; }.trend-live-toggle { align-items:center; background:#2c2c2c; display:grid; gap:0 8px; grid-template-columns:auto 1fr; min-height:64px; padding:9px 12px; }.trend-live-toggle input { height:20px; margin:0; width:20px; }.trend-live-toggle span { font-weight:700; }.trend-live-toggle small { grid-column:2; }
.trend-filter-actions { display:flex; gap:8px; }.trend-filter-actions button,.trend-filter-actions a { margin:0; white-space:nowrap; }
.trend-deadbands { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }.trend-deadbands form { align-items:end; background:#383838; display:flex; gap:8px; padding:10px 12px; }.trend-deadbands label { font-size:11px; margin:0; }.trend-deadbands input { margin:4px 0 0; width:110px; }.trend-deadbands button { margin:0; padding:10px; }
.trend-status { align-items:center; display:flex; justify-content:space-between; margin-bottom:10px; }.trend-status small { color:var(--muted); }
.trend-chart-wrap { background:#252525; border:1px solid var(--line); min-height:380px; overflow:hidden; }.trend-chart { display:block; height:380px; width:100%; }.trend-grid { stroke:#555; stroke-width:1; }.trend-axis-label { fill:#bbb; font-size:11px; }.trend-line { fill:none; stroke-width:2.2; vector-effect:non-scaling-stroke; }.trend-legend { display:flex; flex-wrap:wrap; gap:16px; margin:12px 0 20px; }.trend-legend span::before { background:var(--trend-color); content:""; display:inline-block; height:3px; margin-right:7px; vertical-align:middle; width:20px; }
#trend-digital-table[hidden],#trend-chart-wrap[hidden] { display:none; }
@media (max-width:800px) { .trend-sensor-picker{grid-template-columns:1fr}.trend-date-filters{grid-template-columns:1fr 1fr} }
@media (max-width:650px) { .trend-date-filters{grid-template-columns:1fr}.trend-filter-actions{flex-wrap:wrap}.trend-chart{height:310px}.trend-chart-wrap{min-height:310px} }
.trend-sensor-picker { gap:12px; }
.trend-sensor-column { min-height:190px; padding:10px; }
.trend-picker-heading { margin-bottom:7px; }
.trend-sensor-list { gap:5px; margin-top:8px; max-height:205px; overflow-y:auto; }
.trend-sensor-item { gap:8px; padding:6px 8px; }
.trend-top-empty { margin-bottom:14px; }
.trend-date-filters { align-items:stretch; background:#2c2c2c; border-top:1px solid var(--line); gap:12px; grid-template-columns:minmax(210px,1fr) minmax(210px,1fr) 230px auto; padding:14px; }
.trend-date-field { display:flex; flex-direction:column; font-size:12px; font-weight:650; justify-content:flex-end; }
.trend-date-field input { height:46px; margin-top:6px; }
.trend-date-field input:disabled { background:#333; color:#aaa; opacity:.65; }
.trend-live-toggle { align-content:center; border:1px solid var(--line); min-height:70px; padding:8px 12px; }
.trend-live-toggle small { line-height:1.25; }
.trend-filter-actions { align-items:stretch; display:flex; gap:8px; }
.trend-filter-actions button,.trend-filter-actions a { align-items:center; display:flex; height:70px; justify-content:center; min-width:112px; padding:0 16px; }
.trend-deadbands { background:#303030; display:block; margin-top:14px; padding:14px; }
.trend-deadband-heading { align-items:start; border-bottom:1px solid var(--line); display:grid; gap:5px 18px; grid-template-columns:210px 1fr; margin-bottom:12px; padding-bottom:10px; }
.trend-deadband-heading strong { color:var(--green); }.trend-deadband-heading p { color:var(--muted); line-height:1.4; margin:0; }
.trend-deadband-grid { display:grid; gap:8px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.trend-deadband-grid form { align-items:end; background:#3a3a3a; display:grid; gap:8px; grid-template-columns:minmax(0,1fr) auto; padding:10px; }
.trend-deadband-grid label { margin:0; min-width:0; }.trend-deadband-grid label span,.trend-deadband-grid label small { display:block; overflow-wrap:anywhere; }.trend-deadband-grid label small { color:var(--muted); margin-top:3px; }.trend-deadband-grid input { height:38px; margin:5px 0 0; width:100%; }.trend-deadband-grid button { height:38px; margin:0; padding:0 14px; }
@media (max-width:1100px) { .trend-date-filters{grid-template-columns:1fr 1fr}.trend-filter-actions button,.trend-filter-actions a{height:48px}.trend-live-toggle{min-height:64px} }
@media (max-width:650px) { .trend-date-filters{grid-template-columns:1fr}.trend-deadband-heading{grid-template-columns:1fr}.trend-filter-actions>*{flex:1} }
.trend-point { stroke:#202020; stroke-width:1.5; vector-effect:non-scaling-stroke; }
.alarm-map-card { padding-bottom: 20px; }
.alarm-map { background: #303030; height: min(72vh, 780px); min-height: 480px; width: 100%; }
.alarm-map-message { background: #3b321c; border-left: 4px solid #e2c700; color: #f4e9b0; margin: 12px 0 0; padding: 11px 14px; }
.alarm-map-info { color: #171717; display: grid; gap: 7px; max-width: 340px; min-width: 220px; padding: 4px; }
.alarm-map-info strong { font-size: 15px; overflow-wrap: anywhere; }
.alarm-map-info p { line-height: 1.4; margin: 2px 0; }
.alarm-map-info small { display: block; overflow-wrap: anywhere; }
.alarm-map-info-area { background: var(--area-color, #4a6a7a); border-radius: 3px; color: white; font-size: 11px; font-weight: 700; justify-self: start; padding: 4px 7px; text-shadow: 0 1px 2px #000; }
.work-alone-map-badge { background: #145f73; }
.work-alone-map-label { background: #102f3a; border: 1px solid #6ee7b7; border-radius: 3px; padding: 2px 4px; }
@media (max-width:700px) { .alarm-map{height:65vh;min-height:380px}.alarm-map-card{padding:14px} }
.heartbeat-card > .section-heading { margin-bottom: 18px; }
.heartbeat-card > .section-heading small { display: block; line-height: 1.4; }
.heartbeat-card > .page-intro { line-height: 1.45; margin: 0 0 24px; }
.heartbeat-refresh { display: block; margin-top: .75rem; color: var(--muted, #667085); }
.sidebar nav a.heartbeat-nav-alert { background: #681b1b; color: #fff; }
.sidebar nav a.heartbeat-nav-alert:hover { background: #7d2020; }
.heartbeat-nav-count { margin-left: auto; min-width: 1.35rem; padding: .1rem .35rem; border-radius: 999px; background: #fff; color: #681b1b; font-size: .7rem; line-height: 1.15rem; text-align: center; }
.database-card { max-width: 1600px; }
.database-status { border: 1px solid #777; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 5px 9px; text-transform: uppercase; }
.database-status-ok { background: #263b23; border-color: #77a83e; color: #bce57e; }
.database-status-drift { background: #452626; border-color: #bd6767; color: #ffb3b3; }
.database-summary { display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 22px; }
.database-summary > div { background: #383838; border-left: 3px solid var(--accent); display: flex; flex-direction: column; min-width: 0; padding: 14px; }
.database-summary small,.database-summary span { color: var(--muted); overflow-wrap: anywhere; }.database-summary strong { font-size: 19px; margin: 4px 0; overflow-wrap: anywhere; }
.database-repair { border-left: 4px solid #e2c700; }.database-repair code { background: #222; color: #d7e9a8; padding: 3px 6px; }.database-repair li { margin: 9px 0; }
.database-table-list { display: grid; gap: 9px; }.database-table { background: #333; border: 1px solid var(--line); }.database-table-drift { border-left: 4px solid #bd6767; }
.database-table summary { align-items: center; cursor: pointer; display: grid; gap: 14px; grid-template-columns: minmax(230px,1fr) 100px 110px 120px; padding: 13px 15px; }.database-table summary:hover { background: #ffffff08; }
.database-table-name { font-family: monospace; font-size: 14px; font-weight: 800; }.database-columns { overflow-x: auto; padding: 0 14px 14px; }.database-columns table { min-width: 760px; }
.database-issues { background: #452626; color: #ffcccc; margin: 0 14px 14px; padding: 10px 10px 10px 30px; }.database-column-missing,.database-column-mismatch,.database-column-unexpected { background: #452626; }.database-meta { color: var(--muted); margin: 0; padding: 0 14px 14px; }
@media (max-width:800px) { .database-summary{grid-template-columns:1fr 1fr}.database-table summary{grid-template-columns:1fr 90px}.database-table summary span:nth-child(3){display:none} }
@media (max-width:520px) { .database-summary{grid-template-columns:1fr} }
.heartbeat-type { display: inline-block; padding: .2rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; background: #e8eef5; }
.help-open { align-items:center; background:#333; border:1px solid #666; display:flex; gap:6px; margin:0; padding:7px 10px; white-space:nowrap; }
.help-open span { align-items:center; border:1px solid currentColor; border-radius:50%; display:inline-flex; font-size:11px; height:19px; justify-content:center; width:19px; }
.topbar-help-tools { align-items:center; display:flex; gap:7px; }
.language-flag { align-items:center; background:#333; border:1px solid #666; border-radius:3px; display:flex; font-size:21px; height:35px; justify-content:center; line-height:1; padding:0; text-decoration:none; width:39px; }
.language-flag:hover,.language-flag:focus-visible { background:#454545; border-color:var(--focus); }
.help-backdrop { background:#0009; inset:0; position:fixed; z-index:130; }
.help-drawer { background:#f6f7f3; bottom:0; box-shadow:-10px 0 32px #0008; color:#20251e; display:grid; grid-template-rows:auto 1fr auto; max-width:520px; position:fixed; right:0; top:0; transform:translateX(105%); transition:transform .2s ease; width:min(92vw,520px); z-index:131; }
.help-drawer[aria-hidden="false"] { transform:translateX(0); }
.help-drawer header { align-items:center; background:#242a22; color:#fff; display:grid; gap:12px; grid-template-columns:32px 1fr auto; padding:18px 22px; }
.help-drawer header>span { align-items:center; border:2px solid var(--green); border-radius:50%; color:var(--green); display:flex; font-weight:900; height:30px; justify-content:center; }
.help-drawer h2 { font-size:21px; margin:0; }
.help-close { background:transparent; color:#fff; font-size:30px; line-height:1; margin:0; padding:2px 7px; }
.help-body { overflow-y:auto; padding:24px; }
.help-purpose { border-left:4px solid var(--green); font-size:16px; line-height:1.5; margin:0 0 24px; padding:8px 0 8px 14px; }
.help-body h3,.manual-topics h3 { font-size:14px; margin:22px 0 8px; text-transform:uppercase; }
.help-body li,.manual-topics li { line-height:1.5; margin:8px 0; }
.help-important { background:#fff4cf; border-left:4px solid #c38b00; color:#342900; margin-top:24px; padding:12px 16px; }
.help-important h3 { margin-top:0; }
.help-drawer footer { background:#e5e8e1; border-top:1px solid #ccd0c8; padding:17px 24px; }
.help-drawer footer a { color:#315900; font-weight:800; }
body.help-opened { overflow:hidden; }
.manual-card { max-width:1200px; }
.manual-contents { background:#383838; display:grid; gap:6px; grid-template-columns:repeat(3,minmax(0,1fr)); margin:20px 0 28px; padding:18px; }
.manual-contents strong { color:var(--green); grid-column:1/-1; margin-bottom:6px; }
.manual-contents a { padding:5px 0; }
.manual-topics { display:grid; gap:18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.manual-topics article { background:#333; border-top:3px solid var(--accent); padding:20px; scroll-margin-top:20px; }
.manual-topics article h2 { margin-top:0; }
.manual-topics article>p { color:#ddd; line-height:1.5; }
@media (max-width:900px) { .manual-contents{grid-template-columns:repeat(2,minmax(0,1fr))}.manual-topics{grid-template-columns:1fr} }
@media (max-width:650px) { .help-open{font-size:0;gap:0;padding:7px}.help-open span{font-size:11px}.manual-contents{grid-template-columns:1fr}.help-drawer{width:100%} }
.heartbeat-type-sensor { background: #e4f3ed; color: #176b4b; }
.heartbeat-type-channel { background: #e8eefc; color: #294f9b; }
.heartbeat-type-mobile { background: #f4eafb; color: #70408f; }
.heartbeat-table td { white-space: nowrap; }
.heartbeat-table td:nth-child(4) { white-space: normal; min-width: 12rem; }
.heartbeat-filters { grid-template-columns: minmax(15rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto; }
@media (max-width: 1000px) { .heartbeat-filters { grid-template-columns: 1fr 1fr; } }
.mqtt-history-filters { align-items:end; grid-template-columns:minmax(260px,2fr) minmax(170px,1fr) minmax(140px,1fr) auto; }
.mqtt-filter-button { height:36px; justify-self:start; white-space:nowrap; }
.mqtt-history-table tbody tr { cursor:pointer; }.mqtt-history-table tbody tr:hover { background:#ffffff0a; }
.mqtt-details-backdrop { background:#0008; inset:0; position:fixed; z-index:120; }
.mqtt-details-panel { background:#f8f8f8; bottom:0; color:#222; max-width:760px; overflow-y:auto; padding:0 28px 28px; position:fixed; right:0; top:0; transform:translateX(100%); transition:transform .18s ease; width:min(48vw,760px); z-index:121; }
.mqtt-details-panel[aria-hidden="false"] { transform:translateX(0); }
.mqtt-details-panel header { align-items:center; background:#fff; border-bottom:1px solid #ddd; display:grid; gap:14px; grid-template-columns:auto 1fr auto; margin:0 -28px 22px; padding:18px 28px; position:sticky; top:0; z-index:1; }
.mqtt-details-panel h2 { font-size:18px; margin:0; }.mqtt-details-close { background:none; color:#777; font-size:30px; margin:0; padding:0 5px; }
.mqtt-details-panel dl { grid-template-columns:100px minmax(0,1fr); }.mqtt-details-panel dt { color:#777; }.mqtt-details-panel dd,.mqtt-details-panel code { overflow-wrap:anywhere; }
.mqtt-json-payload { background:#fff; border:1px solid #ddd; color:#174a86; font-size:13px; line-height:1.55; overflow:auto; padding:20px; white-space:pre-wrap; word-break:break-word; }
body.mqtt-details-open { overflow:hidden; }
@media (max-width:900px) { .mqtt-history-filters{grid-template-columns:1fr 1fr}.mqtt-details-panel{width:min(86vw,760px)} }
@media (max-width:600px) { .mqtt-history-filters{grid-template-columns:1fr}.mqtt-details-panel{padding:0 16px 16px;width:100%}.mqtt-details-panel header{margin:0 -16px 18px;padding:14px 16px} }
