/* Shared gauge + disconnected styles — used by GaugeView on Dashboard AND Setpoints */
    .gauge-card.obj-disconnected { position:relative; }
    .disc-overlay { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
        background:#FCECEC; border-radius:inherit; color:#C0392B; font-weight:800; letter-spacing:.03em; text-align:center; padding:8px; }
    html[data-theme="dark"] .disc-overlay { background:#2A1516; color:#FCA5A5; }
    .disc-overlay > span:last-child { font-size:20px; font-weight:900; letter-spacing:.08em; color:#C0392B; }
    html[data-theme="dark"] .disc-overlay > span:last-child { color:#F87171; }
    .disc-inner { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:70px; color:#C0392B; }
    .disc-inner .disc-name { font-size:13px; font-weight:800; color:var(--bx-ti-l,#334155); }
    .disc-inner i { font-size:24px; color:#C0392B; }
    .disc-inner .disc-big { font-size:18px; font-weight:900; letter-spacing:.08em; color:#C0392B; }
    html[data-theme="dark"] .disc-inner .disc-big, html[data-theme="dark"] .disc-inner i { color:#F87171; }
    .disc-overlay i { font-size:26px; }
    .disc-overlay .disc-name { font-size:13px; font-weight:800; text-transform:none; opacity:.95; }
    html[data-theme="dark"] .disc-overlay { background:rgba(220,38,38,.18); color:#FCA5A5; }
    .lm-tile.obj-disconnected { border-color:#EF4444 !important; background:#FEECEC !important; }
    .disc-inline { color:#B91C1C; font-weight:800; font-size:12px; text-transform:uppercase; display:flex; align-items:center; gap:5px; margin-top:6px; }
    html[data-theme="dark"] .lm-tile.obj-disconnected { background:rgba(220,38,38,.14) !important; }
    html[data-theme="dark"] .disc-inline { color:#FCA5A5; }
    @media (max-width:768px) {
        /* Masonry (JS) positions cards absolutely into the shortest column so shorter cards pack
           up under taller ones. Clear min-width so the JS column width wins; trim padding for phones. */
        .dash-grid > * { min-width:0 !important; box-sizing:border-box !important; }
        /* Mode selector: keep its two buttons side by side and readable on a narrow card. */
        .ms-seg { grid-template-columns:1fr 1fr; }
        .ms-btn { padding:12px 4px; font-size:13px; }
        .gauge-card, .dash-tile { padding-left:12px !important; padding-right:12px !important; }
        .gstatus-label { font-size:13px; }
        .gstat2-label { font-size:12.5px; }
        .gmetric { gap:9px; } .gmetric-icon { width:26px; height:26px; } .gmetric-num { font-size:21px; } .gmetric-name { font-size:11.5px; }

        /* Fixed desktop card heights are too short for the narrow 2-column layout and clip
           titles / values / buttons. On phones let every card grow to fit its content. */
        /* Value tiles and metric cards grow to fit their text; the fixed-height gauge, control
           and status cards keep their uniform heights (their graphics/fonts scale to fit). */
        .dash-grid .gmetric-card, .dash-grid .dash-tile {
            height:auto !important; min-height:0 !important; overflow:visible !important;
        }
        /* Titles and parameter names wrap onto a second line instead of being cut off. */
        .dash-grid .card h5, .dash-grid .card h6,
        .gstatus-name, .gmetric-name, .dash-tile > .mb-1 {
            white-space:normal !important; overflow-wrap:break-word; word-break:normal;
        }
        /* Grouped valve + horizontal controls: stack the image above the controls so the
           OPEN / CLOSE (and toggle) row gets the full card width and never clips. */
        .grp-h { flex-wrap:wrap; gap:10px; }
        .grp-h-left, .grp-h-body { width:100%; }
        .ctrl-h { flex-wrap:wrap; gap:12px; }
        /* Scale gauge / fan / light graphics so they never overflow the narrow column. */
        .gauge-svg, .fan-svg, .tube-light, .grow-light { max-width:100% !important; height:auto !important; }
        .gstat2-icon svg { max-width:100%; }
        .fanlight-row { flex-wrap:wrap; gap:10px; justify-content:center; }
        /* Titles use a smaller font so cards stay compact instead of expanding. */
        .dash-grid .card h5, .dash-grid .card h6 { font-size:13px; }
        .dash-tile > .mb-1 { font-size:11px !important; }
        .dash-tile-num { font-size:clamp(18px,8vw,30px); }
        .gmetric-name { font-size:11px; }
        /* Radial/Half: show the value below the arc and hide the tiny in-SVG value on phones. */
        .gauge-radial .gauge-below, .gauge-half .gauge-below { display:flex; align-items:baseline; justify-content:center; gap:3px; margin-top:4px; }
        .gauge-radial .gauge-below-num, .gauge-half .gauge-below-num { font-size:clamp(18px,7vw,28px); }
        .gauge-radial .gauge-svg text.gauge-big, .gauge-half .gauge-svg text.gauge-big,
        .gauge-radial .gauge-svg text.gval, .gauge-half .gauge-svg text.gval { display:none; }
    }
    .dash-grid > .obj-gaugeh { height:176px; justify-content:center; overflow:hidden; }
    .dash-grid > .obj-gaugeh > .card-body, .dash-grid > .sync-tgt > .card-body { display:flex; flex-direction:column; justify-content:space-evenly; height:100%; width:100%; }
    .dash-grid > .obj-gaugeh > .card-body > .nc-seg, .dash-grid > .obj-gaugeh > .card-body > .nc-step { width:100%; }
    .gauge-card { min-width:150px; background:var(--pp-bg-l,#FFFFFF); border:1px solid var(--pp-bd-l,#E3E3EC);
        border-radius:16px; padding:14px 16px 12px; align-self:flex-start; display:flex; flex-direction:column;
        align-items:center; --gauge-track:#EDEDF2; --gauge-val:var(--pp-va-l,#1A1A24); }
    .gauge-card .gauge-title { font-size:13px; font-weight:700; color:var(--pp-ti-l,#1A1A24); margin-bottom:6px; text-align:center; }
    .gauge-below { display:none; }
    .gauge-below-num { font-weight:800; color:var(--gauge-val); line-height:1; }
    .gauge-below-unit { font-size:.72em; color:#7A7A8C; margin-left:3px; }
    .gauge-svg text.gauge-big { font-size:21px; font-weight:800; font-family:inherit; }
    .gauge-svg text.gauge-mid { font-size:15px; font-weight:800; font-family:inherit; }
    .gauge-svg text.gval { fill:var(--pp-va-l,#1A1A24); }
    .gval-h { color:var(--pp-va-l,#1A1A24); }
    html[data-theme="dark"] .gauge-svg text.gval { fill:var(--pp-va-d,#F0F0F5); }
    html[data-theme="dark"] .gval-h { color:var(--pp-va-d,#F0F0F5); }
    .gauge-svg text.gauge-unit { font-size:11px; font-weight:600; fill:#7A7A8C; }
    .gauge-trend { display:flex; align-items:baseline; gap:6px; align-self:stretch; }
    .gauge-big2 { font-size:30px; font-weight:800; }
    .gauge-unit2 { font-size:12px; color:#7A7A8C; }
    html[data-theme="dark"] .gauge-card { background:var(--pp-bg-d,#1F1F2C); border-color:var(--pp-bd-d,#2A2A38);
        --gauge-track:#2A2A38; --gauge-val:var(--pp-va-d,#F0F0F5); }
    html[data-theme="dark"] .gauge-card .gauge-title { color:var(--pp-ti-d,#F0F0F5); }
    html[data-theme="dark"] .gauge-svg text.gauge-unit, html[data-theme="dark"] .gauge-unit2 { fill:#8A8AA0; color:#8A8AA0; }
    .gauge-card.gstatus { align-items:stretch; min-width:200px; height:139px; padding:12px 16px; border-radius:16px; border-width:1px; justify-content:center; overflow:hidden; }
    .gstatus-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; min-height:26px; }
    .gstatus-name { font-size:clamp(11px,3.6vw,15px); font-weight:800; color:var(--pp-ti-l,#1A1A24); letter-spacing:.01em; line-height:1.25; flex:1 1 auto; min-width:0; }
    .gstatus-icon { flex:0 0 auto; }
    html[data-theme="dark"] .gstatus-name { color:var(--pp-ti-d,#F0F0F5); }
    .gstatus-icon { font-size:clamp(15px,5.5vw,26px); line-height:1; flex:none; }
    .gstatus-val { display:flex; align-items:baseline; gap:8px; margin:2px 0 1px; }
    .gstatus-num { font-size:clamp(18px,7vw,34px); font-weight:800; line-height:1; color:var(--gauge-val); overflow-wrap:anywhere; }
    .gstatus-unit { font-size:14px; font-weight:600; color:#7A7A8C; }
    html[data-theme="dark"] .gstatus-unit { color:#8A8AA0; }
    .gstatus-rule { height:3px; background:var(--gauge-track,#EDEDF2); border-radius:3px; margin:4px 0 4px; align-self:stretch; width:100%; }
    .gstatus-label { font-size:15px; font-weight:800; letter-spacing:.06em; }
    .gauge-card.gbig { min-width:200px; justify-content:center; }
    .gstat2 { display:flex; align-items:center; gap:14px; min-width:0; }
    .gstat2-stacked { flex-direction:column; align-items:stretch; gap:3px; }
    .gstat2-top { display:flex; align-items:center; gap:10px; min-width:0; }
    .gstat2-stacked .gstat2-name { min-height:0; align-items:center; flex:1 1 auto; min-width:0; white-space:normal; overflow-wrap:break-word; }
    .gstat2-icon { font-size:clamp(20px,7.7vw,38px); line-height:1; flex:none; }
    .gstat2-icon.gtri { display:flex; align-items:center; justify-content:center; }
    .gstat2-icon.gtri svg { width:clamp(22px,8.4vw,42px); height:auto; display:block; }
    .dash-grid.glow-on > *:not(.gstatus) { box-shadow:0 0 15px rgba(var(--brand-primary-rgb,99,102,241),.22); }
    html[data-theme="dark"] .dash-grid.glow-on > *:not(.gstatus) { box-shadow:0 0 18px rgba(var(--brand-primary-rgb,99,102,241),.40); }
    html[data-theme="dark"] .dash-grid > .gauge-card, html[data-theme="dark"] .dash-grid > .dash-tile { border-color:rgba(var(--brand-primary-rgb,99,102,241),.45); }
    .card.obj-transparent, .obj-transparent, .obj-transparent > .card-body, .obj-transparent .card-body { background:transparent !important; background-color:transparent !important; }
    .gstat2-body { display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
    .gstat2-name { font-size:clamp(11px,3vw,13px); font-weight:700; color:var(--pp-ti-l,#55555F); letter-spacing:.01em; line-height:1.25; min-height:2.4em; display:flex; align-items:flex-start; flex:1 1 auto; min-width:0; }
    html[data-theme="dark"] .gstat2-name { color:var(--pp-ti-d,#B5B5C4); }
    .gstat2-valrow { display:flex; align-items:baseline; gap:6px; margin:2px 0 0; flex-wrap:nowrap; min-width:0; justify-content:flex-end; }
    .gstat2-stacked .gstat2-label { text-align:right; }
    .gstat2-num { font-size:clamp(18px,7vw,34px); font-weight:800; line-height:1.05; color:var(--gauge-val); letter-spacing:-.01em; white-space:nowrap; min-width:0; }
    .gstat2-unit { font-size:14px; font-weight:600; color:#7A7A8C; }
    html[data-theme="dark"] .gstat2-unit { color:#8A8AA0; }
    .gstat2-rule { height:2px; background:var(--gauge-track,#EDEDF2); border-radius:2px; margin:8px 0 7px; align-self:stretch; }
    .gstat2-label { font-size:14px; font-weight:800; letter-spacing:.06em; }
    .gstatus.sev0 { border-color:#16B981; box-shadow:0 0 16px rgba(22,185,129,.20); } .gstatus.sev0 .gstatus-label, .gstatus.sev0 .gstat2-label { color:#16B981; }
    .gstatus.sev1 { border-color:#F59E0B; box-shadow:0 0 16px rgba(245,158,11,.28); } .gstatus.sev1 .gstatus-label, .gstatus.sev1 .gstat2-label { color:#F59E0B; }
    .gstatus.sev2 { border-color:#EF4444; box-shadow:0 0 22px rgba(239,68,68,.42); } .gstatus.sev2 .gstatus-label, .gstatus.sev2 .gstat2-label { color:#EF4444; }
    html[data-theme="dark"] .gstatus.sev0 { box-shadow:0 0 18px rgba(22,185,129,.45); }
    html[data-theme="dark"] .gstatus.sev1 { box-shadow:0 0 18px rgba(245,158,11,.52); }
    html[data-theme="dark"] .gstatus.sev2 { box-shadow:0 0 22px rgba(239,68,68,.62); }
    .gstatus.sev1 { background:color-mix(in srgb, #F59E0B 7%, var(--pp-bg-l,#FFFFFF)); }
    .gstatus.sev2 { background:color-mix(in srgb, #EF4444 8%, var(--pp-bg-l,#FFFFFF)); }
    html[data-theme="dark"] .gstatus.sev1 { background:color-mix(in srgb, #F59E0B 14%, var(--pp-bg-d,#1F1F2C)); }
    html[data-theme="dark"] .gstatus.sev2 { background:color-mix(in srgb, #EF4444 16%, var(--pp-bg-d,#1F1F2C)); }
    .gstatus.sev0 .gstatus-icon { color:#16B981; }
    .gstatus.sev1 .gstatus-icon { color:#F59E0B; }
    .gstatus.sev2 .gstatus-icon { color:#EF4444; filter:drop-shadow(0 0 8px rgba(239,68,68,.45)); animation:esan-glowpulse 1.6s ease-in-out infinite; }
    .gstatus.sev0 .gstatus-rule { background:#16B981; }
    .gstatus.sev1 .gstatus-rule { background:#F59E0B; }
    .gstatus.sev2 .gstatus-rule { background:#EF4444; }
    .gstatus.gbig .gstat2-icon { background:none; }
    .gstatus.gbig.sev0 .gstat2-icon { color:#16B981; filter:drop-shadow(0 0 9px rgba(22,185,129,.55)); }
    .gstatus.gbig.sev1 .gstat2-icon { color:#F59E0B; filter:drop-shadow(0 0 11px rgba(245,158,11,.6)); animation:esan-blink 1s ease-in-out infinite; }
    .gstatus.gbig.sev2 .gstat2-icon { color:#EF4444; animation:esan-blink .7s ease-in-out infinite; }
    .gauge-card.gmetric-card { min-width:180px; height:88px; align-items:stretch; justify-content:center; padding:8px 16px; overflow:hidden; }
    .gmetric { display:flex; align-items:center; gap:12px; }
    .gmetric-icon { width:34px; height:34px; object-fit:contain; flex:none; }
    .gmetric-body { display:flex; flex-direction:column; gap:2px; min-width:0; }
    .gmetric-name { font-size:12.5px; font-weight:700; color:var(--pp-ti-l,#55555F); line-height:1.25; flex:1 1 auto; min-width:0; }
    html[data-theme="dark"] .gmetric-name { color:var(--pp-ti-d,#B5B5C4); }
    .gmetric-valrow { display:flex; align-items:baseline; gap:6px; }
    .gmetric-num { font-size:26px; font-weight:800; line-height:1; color:var(--gauge-val); }
    .gmetric-unit { font-size:12px; font-weight:600; color:#7A7A8C; }
