/* DOM CONTROL | Mapa budynku v1.0 -- wszystkie style modułu mają prefiks dcm- */
:root{color-scheme:dark}
.dcm-root{--dcm-bg:#071425;--dcm-panel:#0b1e32;--dcm-panel2:#0e263d;--dcm-line:#28516d;--dcm-muted:#96b6ce;--dcm-text:#e8f4ff;--dcm-accent:#ff861b;--dcm-info:#77c6e9;--dcm-success:#25d5a3;color:var(--dcm-text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Arial,sans-serif;min-width:0;box-sizing:border-box}
.dcm-root *{box-sizing:border-box}
.dcm-root button,.dcm-root a{font:inherit}
.dcm-root button{cursor:pointer}
.dcm-root button:focus-visible,.dcm-root a:focus-visible{outline:2px solid var(--dcm-accent);outline-offset:3px}
.dcm-root .dcm-heading{background:linear-gradient(110deg,#0f2942,#081a2d);border:1px solid #234963;border-radius:12px;padding:19px 21px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:15px}
.dcm-root h1{margin:0;font-size:clamp(20px,2vw,29px);line-height:1.2;letter-spacing:.015em}
.dcm-root .dcm-heading p{margin:5px 0 0;color:var(--dcm-muted);font-size:12px}
.dcm-root .dcm-pill{font-size:11px;border:1px solid #20546a;border-radius:8px;padding:5px 9px;white-space:nowrap;color:#a9c5d9}
.dcm-root .dcm-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:12px;align-items:stretch}
.dcm-root .dcm-card{background:linear-gradient(150deg,#0c2137,#08192b);border:1px solid #2a5570;border-radius:12px;padding:16px;min-width:0}
.dcm-root .dcm-section-head{display:flex;align-items:center;gap:9px;margin-bottom:8px;color:#eef7ff;font-weight:800;font-size:13px;letter-spacing:.02em}
.dcm-root .dcm-section-head .dcm-glyph{color:var(--dcm-accent);font-size:20px}
.dcm-root .dcm-note{font-size:12px;color:var(--dcm-muted);margin:0 0 17px}
.dcm-root .dcm-map{border:1px solid #366780;border-radius:10px;position:relative;min-height:475px;display:flex;align-items:center;justify-content:center;padding:20px 12px;background-color:#071d30;background-image:linear-gradient(#16415a40 1px,transparent 1px),linear-gradient(90deg,#16415a40 1px,transparent 1px);background-size:24px 24px;isolation:isolate}
.dcm-root .dcm-sketch-badge{position:absolute;right:11px;top:11px;font-size:10px;border:1px solid #3c738a;border-radius:7px;padding:6px 9px;color:#a5cadc;background:#092139}
.dcm-root .dcm-plan{width:100%;max-width:780px;height:auto;overflow:visible}
.dcm-root .dcm-area{cursor:pointer;fill:#15374a50;stroke:#79b8d3;stroke-width:3;transition:fill .15s,stroke .15s;outline:none}
.dcm-root .dcm-area:hover,.dcm-root .dcm-area:focus{fill:#e07e2227;stroke:#ffb25c}
.dcm-root .dcm-area.is-selected{fill:#e8812433;stroke:#ff8b24;filter:drop-shadow(0 0 5px #ff7b2280)}
.dcm-root .dcm-room-text{font-size:15px;font-weight:750;fill:#e9f3ff;pointer-events:none;text-anchor:middle}
.dcm-root .dcm-stairs-line{stroke:#73bad6;stroke-width:2.1;pointer-events:none}
.dcm-root .dcm-stairs-arrow{fill:none;stroke:#c3e8fa;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.dcm-root .dcm-plan-pin{cursor:pointer;outline:none}
.dcm-root .dcm-plan-pin .dcm-pin-ring{fill:#0c3044;stroke:#5dd0fa;stroke-width:2.4}
.dcm-root .dcm-plan-pin:hover .dcm-pin-ring,.dcm-root .dcm-plan-pin:focus-visible .dcm-pin-ring{stroke:#ff981f;filter:drop-shadow(0 0 6px #ff8f25)}
.dcm-root .dcm-map-footer{display:flex;gap:15px;align-items:center;flex-wrap:wrap;margin-top:13px;font-size:12px;color:#a7c3da}
.dcm-root .dcm-map-footer strong{color:#f0f6fa}
.dcm-root .dcm-sidebar{display:flex;flex-direction:column;gap:12px;min-width:0}
.dcm-root .dcm-levels{display:grid;gap:5px}
.dcm-root .dcm-level,.dcm-root .dcm-room{border:1px solid transparent;background:transparent;color:#dceefa;text-align:left;border-radius:8px;padding:8px 10px;width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px}
.dcm-root .dcm-level:hover,.dcm-root .dcm-room:hover{background:#15344c}
.dcm-root .dcm-level.is-selected,.dcm-root .dcm-room.is-selected{border-color:var(--dcm-accent);background:#f889191a;box-shadow:inset 4px 0 var(--dcm-accent)}
.dcm-root .dcm-level-name{display:flex;align-items:center;gap:12px}
.dcm-root .dcm-level-icon{color:#83c6e8;font-size:18px}
.dcm-root .dcm-level.is-selected .dcm-level-icon{color:var(--dcm-accent)}
.dcm-root .dcm-empty{border:1px dashed #2a5972;border-radius:9px;padding:17px;text-align:center;color:var(--dcm-muted);font-size:12px;background:#0e2738}
.dcm-root .dcm-device-row{display:flex;align-items:center;gap:10px;border:1px solid #32617b;border-radius:9px;background:#0d2a40;padding:11px 12px;position:relative}
.dcm-root .dcm-device-icon{font-size:22px;color:#69cef6}
.dcm-root .dcm-device-title{font-weight:750;color:#e5f2fb}
.dcm-root .dcm-device-sub{font-size:11px;color:var(--dcm-muted)}
.dcm-root .dcm-badge{font-size:10px;color:#9fc7dd;border:1px solid #42677d;border-radius:7px;padding:3px 6px;margin-left:auto;white-space:nowrap}
.dcm-root .dcm-device-action{padding:5px 9px;border:1px solid #47738b;background:#1a3a51;border-radius:7px;color:#e8f4ff;cursor:pointer}
.dcm-root .dcm-device-action:disabled{cursor:default;opacity:.65}
.dcm-root .dcm-tooltip{position:absolute;z-index:15;max-width:min(340px,calc(100vw - 60px));width:max-content;min-width:240px;border:1px solid #5286a2;border-radius:10px;background:#0b253a;box-shadow:0 14px 40px #000a;padding:12px 14px;color:#e7f4ff;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .13s,visibility .13s}
.dcm-root .dcm-tooltip.is-visible{visibility:visible;opacity:1}
.dcm-root .dcm-tooltip-title{font-size:13px;font-weight:800;margin-bottom:5px}
.dcm-root .dcm-tooltip-line{color:#bad2df;font-size:11px;margin:3px 0}
.dcm-root .dcm-tooltip-clients{margin:8px 0 0;padding:7px 0 0;border-top:1px solid #305774;list-style:none;font-size:11px;max-height:175px;overflow:hidden}
.dcm-root .dcm-tooltip-clients li{margin-bottom:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dcm-root .dcm-tooltip-foot{font-size:10px;color:#79b8d2;margin-top:7px}
.dcm-root .dcm-status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#8193a0;margin-right:4px}
.dcm-root .dcm-status-dot.is-online{background:var(--dcm-success)}
.dcm-root .dcm-status-dot.is-offline{background:#f27676}
.dcm-root .dcm-dialog-backdrop{position:fixed;inset:0;background:#030b16c9;z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px}
.dcm-root .dcm-dialog{width:min(760px,100%);max-height:90vh;overflow:auto;background:#0b2035;border:1px solid #42718e;box-shadow:0 20px 80px #000b;border-radius:14px;padding:22px}
.dcm-root .dcm-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.dcm-root .dcm-dialog h2{margin:0;font-size:22px}
.dcm-root .dcm-close{border:1px solid #3f6b84;background:#16354d;color:white;border-radius:8px;padding:6px 11px}
.dcm-root .dcm-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}
.dcm-root .dcm-fact{background:#102e46;border:1px solid #2b536d;padding:10px;border-radius:9px;min-width:0}
.dcm-root .dcm-fact span{display:block;font-size:10px;color:#a3c1d5}
.dcm-root .dcm-fact strong{display:block;word-break:break-word;font-size:13px;margin-top:4px}
.dcm-root .dcm-table-wrap{overflow:auto}
.dcm-root table{border-collapse:collapse;width:100%;font-size:12px}
.dcm-root th,.dcm-root td{padding:8px;border-bottom:1px solid #284862;text-align:left;white-space:nowrap}
.dcm-root th{color:#8fbed8;font-size:11px}
.dcm-root .dcm-primary{background:#e97816;border:1px solid #fca046;color:#081423;text-decoration:none;padding:10px 14px;border-radius:8px;display:inline-block;font-weight:800;margin-top:14px}
.dcm-root .dcm-disclaimer{color:#95b8d0;font-size:11px;margin:12px 0 0}
.dcm-root .dcm-muted{color:#a5bfd0}
@media (max-width:1000px){.dcm-root .dcm-layout{grid-template-columns:1fr}.dcm-root .dcm-map{min-height:390px}.dcm-root .dcm-sidebar{display:grid;grid-template-columns:1fr 1fr}.dcm-root .dcm-sidebar .dcm-network-card{grid-column:1/-1}}
@media (max-width:650px){.dcm-root .dcm-heading{align-items:flex-start;flex-direction:column}.dcm-root .dcm-sidebar{display:flex}.dcm-root .dcm-map{min-height:270px;padding:10px}.dcm-root .dcm-facts{grid-template-columns:1fr}}
/* wyłącznie samodzielny podgląd (nie przenosimy tych styli do panelu DOM CONTROL) */
body.dom-map-preview{margin:0;background:#061222;color:#e8f4ff;font-family:system-ui,Segoe UI,sans-serif}
.preview-shell{display:grid;grid-template-columns:190px minmax(0,1fr);min-height:100vh}
.preview-navigation{background:#071527;border-right:1px solid #214765;padding:20px 10px}
.preview-brand{font-size:15px;font-weight:900;letter-spacing:.13em;padding:4px 6px 30px;white-space:nowrap}
.preview-brand span{color:#ff861b}.preview-brand small{display:block;font-size:7px;color:#86b9d1;letter-spacing:.25em;margin-top:4px}
.preview-navigation nav{display:grid;gap:7px;font-size:12px}
.preview-navigation nav div{padding:11px;border-radius:8px;color:#b2d0e5}
.preview-navigation nav div.active{border:1px solid #ff861b;color:#fff;background:#fa86111c}
.preview-side-note{font-size:10px;color:#6e9cb9;margin-top:40px;line-height:1.6}
.preview-content{padding:14px;min-width:0}
@media (max-width:800px){.preview-shell{grid-template-columns:1fr}.preview-navigation{display:none}}

/* DC_POWER_GLOW_V1: zielony LIVE, pomaranczowy hover */
/* Dziala tylko na znacznikach z klasą ustawiana z danych LIVE, nie na pomieszczeniach. */
.dcm-root .dcm-plan-pin.dcm-device-powered {
  filter: drop-shadow(0 0 3px rgba(44,255,130,.9)) drop-shadow(0 0 9px rgba(31,228,112,.65));
}
.dcm-root .dcm-plan-pin.dcm-device-powered > .dcm-pin-ring,
.dcm-root .dcm-plan-pin.dcm-device-powered > circle:first-of-type,
.dcm-root .dcm-plan-pin.dcm-device-powered > rect:first-of-type {
  stroke: #46ff96;
  stroke-width: 2.8px;
}
/* Priorytet uzytkownika: przy hover/focus pomarancz, takze dla ikon aktywnych. */
.dcm-root .dcm-plan-pin:hover,
.dcm-root .dcm-plan-pin:focus-visible {
  filter: drop-shadow(0 0 4px rgba(255,151,44,.95)) drop-shadow(0 0 9px rgba(255,135,28,.7));
}
.dcm-root .dcm-plan-pin:hover > .dcm-pin-ring,
.dcm-root .dcm-plan-pin:hover > circle:first-of-type,
.dcm-root .dcm-plan-pin:hover > rect:first-of-type,
.dcm-root .dcm-plan-pin:focus-visible > .dcm-pin-ring,
.dcm-root .dcm-plan-pin:focus-visible > circle:first-of-type,
.dcm-root .dcm-plan-pin:focus-visible > rect:first-of-type {
  stroke: #ff9e36;
}
