.ld-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:12px;margin:12px 0}.ld-card{display:block;width:100%;text-align:left;background:#fff!important;color:#172033!important;padding:14px;border:2px solid;border-left-width:7px;border-radius:12px;box-shadow:0 2px 5px #17203312;min-width:0}.ld-card.green{border-color:#15803d}.ld-card.orange{border-color:#c46205}.ld-card.red{border-color:#b91c1c}.ld-line,.ld-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.ld-badge{display:inline-block;border-radius:20px;padding:4px 9px;font-size:.8rem;font-weight:750}.ld-badge.green{background:#dcfce7;color:#14532d}.ld-badge.orange{background:#ffedd5;color:#7c2d12}.ld-badge.red{background:#fee2e2;color:#991b1b}.ld-location{font-size:.9rem;margin:4px 0 10px;color:#475569}.ld-reading{display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 10px;padding:8px 0;border-top:1px solid #e2e8f0}.ld-reading strong{font-size:1.55rem}.ld-reading time{grid-column:1/-1;font-size:.82rem;color:#475569}.ld-open{display:block;margin-top:10px;font-size:.85rem;font-weight:700}.ld-reasons,.ld-warning{background:#fff7ed;color:#7c2d12;padding:8px;border-radius:6px}.ld-table{overflow:auto;max-height:48vh}.ld-table table{width:100%;border-collapse:collapse}.ld-table td,.ld-table th{text-align:left;padding:9px;border-bottom:1px solid #cbd5e1;white-space:nowrap}.ld-tabs{display:flex;gap:8px;margin:15px 0}.ld-tabs [aria-selected=true]{background:#1e3a5f;color:#fff}.ld-alert{border:1px solid #cbd5e1;border-radius:9px;padding:12px;margin:8px 0}.ld-alert>span{float:right}#liveDevicesNav.ld-red{border-bottom:4px solid #b91c1c}#liveDevicesNav.ld-orange{border-bottom:4px solid #c46205}#liveDevicesNav.ld-green{border-bottom:4px solid #15803d}.ld-card:focus-visible{outline:3px solid #2563eb;outline-offset:3px}

#mainNav #liveDevicesNav{order:2}

.ld-position-editor{margin:10px 0 14px;border:1px solid #cbd5e1;border-radius:10px;padding:12px;background:#f8fafc;color:#172033}/* Keep controls and position names in the same cell on phones.
   Global input{width:100%} previously made each checkbox occupy an entire row,
   pushing its text outside the panel. */
#liveDevicesView .ld-position-editor{box-sizing:border-box;max-width:100%;min-width:0;overflow-x:hidden;}
#liveDevicesView .ld-position-list,#liveDevicesView .ld-push-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:100%;min-width:0;gap:8px;margin:10px 0;box-sizing:border-box;}
#liveDevicesView .ld-position-list .ld-position-item,#liveDevicesView .ld-push-choices .ld-push-choice{display:grid!important;grid-template-columns:22px minmax(0,1fr);column-gap:10px;align-items:center;min-height:44px;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:9px 10px;background:var(--panel,#fff);color:var(--ink,#17212b);border:1px solid var(--border,#cbd5e1);border-radius:8px;cursor:pointer;}
#liveDevicesView .ld-position-list .ld-position-item input[type="checkbox"],#liveDevicesView .ld-push-choices .ld-push-choice input[type="checkbox"]{appearance:auto;display:block!important;width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;min-height:20px!important;margin:0!important;padding:0!important;flex:0 0 20px!important;justify-self:start;box-sizing:border-box;}
#liveDevicesView .ld-position-list .ld-position-name,#liveDevicesView .ld-push-choices .ld-position-name{display:block;min-width:0;width:auto;line-height:1.3;white-space:normal;overflow-wrap:anywhere;word-break:normal;}
#liveDevicesView .ld-position-editor button[data-live-save-access]{max-width:100%;min-height:44px;white-space:normal;}
@media(max-width:760px){#liveDevicesView .ld-position-list,#liveDevicesView .ld-push-choices{grid-template-columns:minmax(0,1fr);}#liveDevicesView .ld-position-list .ld-position-item,#liveDevicesView .ld-push-choices .ld-push-choice{padding:8px 10px;}}


/* Compact traditional battery and Wi-Fi gauges on every live-device card. */
.ld-health-strip{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:6px 0 10px;margin-bottom:3px;border-bottom:1px solid #e2e8f0;color:#334155}
.ld-health-ind{display:inline-flex;align-items:center;gap:5px;font-size:.82rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}
.ld-health-ind svg{display:block;flex:none;width:24px;height:20px}
.ld-health-ind .ld-health-battery-icon{width:27px;height:17px}
.ld-health--low{color:#a34b08}
.ld-health--ok{color:#17603a}
.ld-health--unknown{color:#64748b}
.ld-health-ind span{white-space:nowrap}
@media(max-width:390px){.ld-health-strip{gap:10px}}

.ld-laptop{border-style:solid}.ld-laptop .ld-laptop-heartbeat{font-size:1rem;line-height:1.35;overflow-wrap:anywhere}.ld-laptop .ld-reading{min-height:38px}.ld-laptop .ld-reading time{grid-column:auto;font-size:.82rem}.ld-laptop .ld-location{overflow-wrap:anywhere}

/* Read-only sensor Help shared securely from Energy Tracker. */
.ld-help-view{display:grid;gap:12px;margin-top:12px}
.ld-help-block{padding:12px;border:1px solid #d4dce6;border-radius:9px;background:rgba(148,163,184,.08)}
.ld-help-block h4{margin:0 0 10px;font-size:1rem}
.ld-help-entry{border-top:1px solid #d4dce6;padding-top:9px;margin-top:9px}
.ld-help-entry p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;margin:6px 0}
.ld-help-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:9px;margin:12px 0}
.ld-help-photos figure{margin:0;border:1px solid #cbd5e1;border-radius:8px;overflow:hidden}
.ld-help-photos img{display:block;width:100%;height:140px;object-fit:cover}
.ld-help-photos figcaption{padding:8px;font-size:.82rem;overflow-wrap:anywhere}
.ld-help-view .muted{font-size:.82rem}
@media(max-width:420px){.ld-help-photos{grid-template-columns:repeat(2,minmax(0,1fr))}.ld-help-photos img{height:120px}}

/* Help belongs to one selected asset; controller Help never inherits to PHE/tanks. */
.ld-help-asset-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px}
.ld-help-choice{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;white-space:normal;min-height:72px;border:1px solid #8194a8;border-radius:8px;padding:10px;background:transparent;color:inherit;cursor:pointer}
.ld-help-choice>strong{font-size:.94rem}
.ld-help-choice>small{font-size:.77rem;opacity:.8;overflow-wrap:anywhere}
.ld-help-choice>span{font-size:.76rem;opacity:.85;margin-top:auto}
.ld-help-choice--active{outline:2px solid #2563eb;outline-offset:1px}
.ld-help-choice:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.ld-help-warning{padding:10px;border-left:3px solid #f59e0b;line-height:1.4}
.ld-card .ld-reading[data-live-channel]{border-radius:4px}
.ld-card .ld-reading[data-live-channel]:active{background:rgba(148,163,184,.2)}
@media(max-width:420px){.ld-help-asset-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* One asset per tile, including probes sharing the same controller. */
.ld-card .ld-reading{display:flex;flex-direction:column;gap:6px;align-items:flex-start;margin:14px 0}.ld-card .ld-reading>strong{font-size:1.7rem;line-height:1.15}.ld-card strong,.ld-card small{overflow-wrap:anywhere}.ld-card:focus-visible{outline:3px solid #2563eb;outline-offset:3px}

.ld-reading-note{white-space:pre-wrap;overflow-wrap:anywhere;min-width:12rem}.ld-water-editor textarea{min-width:12rem;max-width:100%;box-sizing:border-box}


.ld-card.grey{border-color:#64748b}.ld-badge.grey{background:#e2e8f0;color:#334155}

.ld-solar{min-width:0;grid-column:1/-1;border-color:#6885a2;box-sizing:border-box}
.ld-solar h3{margin:0 0 .5rem}
.ld-solar table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-size:.9rem}
.ld-solar th,.ld-solar td{padding:.3rem .15rem;text-align:left;white-space:normal;overflow-wrap:anywhere}
.ld-solar>small{display:block;margin-top:.5rem}

/* Honeywell AHU — one room-focused Safety card with an in-card half-degree
   adjustment slot. Command buttons are DISABLED until safely commissioned. */
.ld-ahu-card{min-width:0;display:grid;gap:8px;align-content:start}
.ld-ahu-card .ld-ahu-open{all:unset;display:grid;gap:7px;min-width:0;cursor:pointer;color:inherit;width:100%;box-sizing:border-box}
.ld-ahu-card .ld-ahu-open:focus-visible{outline:3px solid #2563eb;outline-offset:3px;border-radius:8px}
.ld-ahu-card .ld-ahu-open .ld-line{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap}
.ld-ahu-card .ld-ahu-open strong{margin:0}
.ld-ahu-room{display:grid;gap:1px;margin-top:3px}
.ld-ahu-room small{font-size:.82rem;color:#475569}
.ld-ahu-room strong{font-size:clamp(1.8rem,3vw,2.35rem);color:#0f172a;font-variant-numeric:tabular-nums}
.ld-ahu-minors{display:flex;gap:6px 16px;flex-wrap:wrap;padding:8px 0;border-block:1px solid #cbd5e1}
.ld-ahu-minors span{font-size:.88rem;color:#334155}
.ld-ahu-minors b{color:#0f172a}
.ld-ahu-controls{display:grid;gap:7px;padding-top:6px;border-top:1px solid #cbd5e1}
.ld-ahu-controls>span{font-size:.85rem;font-weight:700}
.ld-ahu-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ld-ahu-buttons button{min-height:44px;border-radius:9px;white-space:nowrap}
.ld-ahu-buttons button:disabled{opacity:.65;cursor:not-allowed}
.ld-ahu-controls small{font-size:.75rem;color:#475569;line-height:1.4}
.ld-ahu-triplet{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding-block:14px}
.ld-ahu-triplet>div{display:grid;gap:7px;background:#eaf4fc;border:1px solid #9fc3dc;color:#10293e;border-radius:10px;padding:12px;min-width:0}
.ld-ahu-triplet small{font-size:.78rem;line-height:1.4}
.ld-ahu-triplet strong{font-size:1.2rem;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:560px){.ld-ahu-triplet{grid-template-columns:1fr}.ld-ahu-room strong{font-size:2rem}}

/* Verified AHU maintenance read-only points: same groups and mapping as Energy. */
.ld-ahu-maintenance{display:grid;gap:10px;margin:18px 0;padding:14px;border:1px solid #94a3b8;border-radius:12px;min-width:0}
.ld-ahu-maintenance h3,.ld-ahu-maintenance h4{margin:4px 0}
.ld-ahu-maintenance .muted{margin:4px 0}
.ld-ahu-maintenance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:9px}
.ld-ahu-maintenance-point{display:grid;gap:6px;align-content:start;border:1px solid #a7b6c5;border-radius:9px;padding:11px;min-width:0}
.ld-ahu-maintenance-point>span{font-size:.85rem}
.ld-ahu-maintenance-point>strong{font-size:1.25rem;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.ld-ahu-maintenance-point>small{font-size:.72rem;opacity:.8;overflow-wrap:anywhere}
@media(max-width:570px){.ld-ahu-maintenance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ld-ahu-maintenance-point{padding:9px}.ld-ahu-maintenance-point>strong{font-size:1.05rem}}
