:root{color-scheme:dark;--bg:#061017;--side:#06121a;--panel:#0b1c26;--panel2:#0e2430;--panel3:#102a36;--line:#1b3b4b;--line2:#28556a;--text:#eef8fb;--muted:#82a0ae;--blue:#24aef2;--cyan:#48d6e8;--green:#29d27d;--red:#ff5b67;--amber:#f1b947;--shadow:0 18px 50px rgba(0,0,0,.28)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;background:var(--bg);color:var(--text)}button,input,select{font:inherit}.shell{min-height:100vh;display:grid;grid-template-columns:190px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;background:var(--side);border-right:1px solid #183544;padding:0 10px 8px;display:flex;flex-direction:column}.brand{height:80px;display:flex;align-items:center;gap:10px;padding:0 9px;border-bottom:1px solid #17303b}.brandmark{width:38px;height:38px;border:1px solid #27627a;border-radius:10px;display:grid;place-items:center;color:#5ee7f5;background:#08212c;font-weight:900}.brand strong{font-size:14px;line-height:1.12;letter-spacing:.06em}.brand span{display:block;color:#7896a4;font-size:9px;margin-top:5px}.sidebar nav{padding-top:16px;display:grid;gap:3px}.nav{border:0;background:transparent;color:#9ab2be;display:flex;align-items:center;gap:9px;width:100%;min-height:42px;padding:10px 11px;border-radius:7px;text-align:left;font-size:11px;font-weight:750;cursor:pointer}.nav:hover,.nav.active{background:#0b2a3b;color:white}.nav.active{box-shadow:inset 3px 0 0 var(--blue)}.badge-count{margin-left:auto;background:#158dcc;color:#fff;border-radius:999px;padding:2px 6px;font-size:9px}.spacer{flex:1}.switcher{display:grid;gap:2px;padding:5px 0;margin-bottom:4px;border-top:1px solid #183544;border-bottom:1px solid #183544}.switcher a{height:30px;display:flex;align-items:center;gap:7px;padding:4px 8px;border:1px solid transparent;border-radius:7px;color:#b2c7d0;text-decoration:none;font-size:10px}.switcher a:hover,.switcher a.current{background:#0c2b3b;border-color:#1f6681;color:white}.switcher a.current{box-shadow:inset 2px 0 0 var(--blue)}.switcher i{font-style:normal;width:20px;height:20px;display:grid;place-items:center;border:1px solid #27627a;border-radius:5px;color:#54d9ef;font-size:8px}.user{padding:6px 8px;border-bottom:1px solid #183544}.user strong{display:block;font-size:11px}.user span{font-size:9px;color:#7896a4}.nav.compact{height:30px;min-height:30px;padding:4px 8px;margin-top:1px}.version{padding:6px 8px 0;color:#668695;font-size:8px}main{min-width:0}header{height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 25px;background:#07151d;border-bottom:1px solid #183544;position:sticky;top:0;z-index:20}header h1{font-size:22px;margin:0}.online{font-size:10px;color:var(--green);margin-top:5px}.online span{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:6px}.page{display:none;padding:26px;max-width:1650px}.page.active{display:block}.pagehead{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:20px}.pagehead h2{font-size:26px;margin:4px 0}.pagehead p{color:var(--muted);font-size:12px;margin:0}.eyebrow{font-size:9px;color:#4cd9ee;font-weight:900;letter-spacing:.18em}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:18px}.stats article{background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line);border-radius:12px;padding:14px 16px}.stats span{font-size:10px;color:var(--muted)}.stats strong{display:block;font-size:26px;margin-top:5px}.primary,.secondary,.danger{border-radius:8px;padding:9px 13px;font-weight:750;font-size:11px;cursor:pointer}.primary{border:1px solid #198fd0;background:linear-gradient(180deg,#1aa9f3,#1688d1);color:white;box-shadow:0 6px 18px rgba(36,174,242,.16)}.secondary{border:1px solid var(--line);background:#0a1b24;color:#d9e9ef}.danger{border:1px solid #9e3640;background:#5c1c24;color:#ffd7da}.toolbar{display:flex;align-items:center;gap:9px;margin-bottom:16px}.toolbar input,.toolbar select,.fields input,.fields select,.modal>label select,.assignment-row input,.assignment-row select,.site-browser input{border:1px solid var(--line);background:#071922;color:white;border-radius:8px;padding:9px 10px}.toolbar>input{flex:1}.toolbar label{font-size:11px;color:var(--muted);white-space:nowrap}.hidden{display:none!important}.warning{border:1px solid #80652a;background:#2b220d;color:#ffd96c;border-radius:9px;padding:11px 13px;font-size:11px;margin-bottom:12px}

/* Badass pole cards */
.pole-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:14px}.pole-card{position:relative;overflow:hidden;background:radial-gradient(circle at 92% 8%,rgba(36,174,242,.12),transparent 34%),linear-gradient(180deg,#0d2230,#091820);border:1px solid var(--line);border-radius:15px;padding:15px;box-shadow:var(--shadow)}.pole-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--blue)}.pole-card.solar::before{background:var(--amber)}.cardhead{display:flex;justify-content:space-between;gap:10px}.pole-title{display:flex;gap:10px;align-items:center}.health-ring{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--green);color:var(--green);font-size:14px;box-shadow:0 0 18px rgba(41,210,125,.15)}.health-ring.off{border-color:var(--red);color:var(--red)}.pole-title h3{font-size:14px;margin:0}.sub{font-size:9px;color:var(--muted);margin-top:3px}.profile-badge{font-size:8px;font-weight:900;letter-spacing:.07em;padding:5px 7px;border:1px solid #285267;border-radius:999px;color:#aeefff;background:#0b2531}.profile-badge.solar{color:#ffd36d;border-color:#6d5524;background:#261f0d}.metric-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:12px}.readout{background:linear-gradient(180deg,#0a1a23,#07141a);border:1px solid #1b3440;border-radius:9px;padding:9px;min-height:65px}.readout span{display:block;font-size:8px;color:#7f9ba8;text-transform:uppercase;letter-spacing:.06em}.readout strong{display:block;font-size:18px;margin-top:6px;line-height:1}.readout strong.good{color:#53df9a}.readout strong.bad{color:#ff7d86}.readout strong.warn{color:#ffd36d}.system-tile{position:relative}.system-light{position:absolute;right:9px;bottom:9px;width:18px;height:18px;border-radius:6px;background:#35434a;border:2px solid #72848c}.system-light.on{background:#30ad6e;border-color:#b5ffe0;box-shadow:0 0 20px rgba(48,173,110,.35)}.device-footer{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px;padding-top:9px;border-top:1px solid #18313d}.device-chip{font-size:8px;padding:5px 7px;border:1px solid #244553;border-radius:6px;color:#8fb2c1;background:#07161d}.device-chip b{color:#dcecf2}.solar-preview{margin-top:8px;padding:9px;border:1px dashed #725c2d;border-radius:9px;background:rgba(241,185,71,.04);color:#c8a85c;font-size:9px}

/* Health-style sites */
.site-workspace{display:grid;grid-template-columns:325px minmax(0,1fr);gap:12px;min-height:650px}.site-browser,.site-detail{background:linear-gradient(180deg,#0b1d27,#08171f);border:1px solid var(--line);border-radius:13px}.site-browser{padding:12px}.site-browser-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:10px}.site-browser-head strong{font-size:14px}.site-browser-head span{font-size:9px;color:var(--muted)}.site-browser input{width:100%;margin-bottom:9px}.site-mini{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px;border:1px solid #173747;border-radius:10px;margin-top:7px;cursor:pointer;background:#091923}.site-mini:hover,.site-mini.active{border-color:#268fc2;background:#0b2736;box-shadow:inset 3px 0 0 var(--blue)}.site-mini-icon{width:42px;height:42px;border-radius:9px;display:grid;place-items:center;background:#0c2b3a;color:#4ad5f0;font-size:16px}.site-mini strong{display:block;font-size:11px}.site-mini small{display:block;color:#6f8d9a;font-size:8px;margin-top:3px}.site-mini-stat{font-size:8px;color:#9cc1ce}.site-detail{padding:14px}.empty-detail{display:grid;place-items:center;text-align:center;color:var(--muted)}.site-detail-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}.site-detail-head h2{margin:0 0 4px;font-size:24px}.site-actions{display:flex;gap:6px}.site-summary{display:flex;gap:17px;margin-top:12px;font-size:9px;color:var(--muted)}.site-summary b{font-size:14px;color:white;margin-right:3px}.site-map{height:320px;border:1px solid var(--line);border-radius:11px;margin-top:14px;overflow:hidden;background:#07151b}.map-hidden-note{padding:18px;border:1px dashed #24434f;border-radius:10px;margin-top:14px;color:#6e8994;font-size:10px}.site-poles-title{display:flex;justify-content:space-between;align-items:center;margin:14px 0 8px}.site-poles-title h3{margin:0;font-size:14px}.site-pole-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:10px}

/* Devices */
.device-list{display:grid;gap:8px}.device-row{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(160px,1fr) 140px 190px;align-items:center;gap:12px;padding:11px 13px;background:linear-gradient(180deg,#0d2230,#091a23);border:1px solid var(--line);border-radius:11px}.device-name strong{display:block;font-size:12px}.device-name span,.device-row small{font-size:9px;color:var(--muted)}.device-state{font-size:9px}.available{color:var(--green)}.assigned{color:var(--amber)}.device-actions{text-align:right}.mini{padding:6px 8px;border-radius:6px;border:1px solid #285063;background:#0a202b;color:#d9edf3;font-size:9px;cursor:pointer}.mini.dangerish{border-color:#73353d;color:#ffadb3}

/* Modal + profiles */
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.74);display:grid;place-items:center;z-index:100;padding:20px}.modal{width:min(760px,96vw);max-height:90vh;overflow:auto;background:#091b25;border:1px solid #285063;border-radius:15px;padding:17px;box-shadow:0 30px 90px rgba(0,0,0,.48)}.modal.pole-modal{width:min(900px,96vw)}.modal.small{width:min(480px,96vw)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}.modal-head h3{font-size:20px;margin:3px 0}.x{border:1px solid var(--line);background:#07151d;color:white;border-radius:7px;width:32px;height:32px}.fields{display:grid;gap:10px}.fields.two{grid-template-columns:1fr 1fr}.fields label,.modal>label{display:grid;gap:5px;font-size:10px;color:#a9c0ca}.fields .wide{grid-column:1/-1}.check-row{display:flex!important;align-items:center;gap:8px!important;background:#071922;border:1px solid var(--line);border-radius:8px;padding:9px 10px}.profile-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}.profile-choice{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;text-align:left;border:1px solid #254652;border-radius:11px;background:#071820;color:white;padding:11px;cursor:pointer}.profile-choice:hover,.profile-choice.active{border-color:#2baeea;background:#0a2735;box-shadow:inset 3px 0 0 var(--blue)}.profile-choice[data-profile="solar"].active{border-color:#b58b31;box-shadow:inset 3px 0 0 var(--amber)}.profile-icon{grid-row:1/3;width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#0c3040;font-size:19px}.profile-choice[data-profile="solar"] .profile-icon{background:#31270e}.profile-choice strong{font-size:12px}.profile-choice small{color:#7895a1;font-size:8px}.assignment-panel{margin-top:13px;border:1px solid #234451;border-radius:11px;overflow:hidden}.assignment-title{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;background:#0b2632;border-bottom:1px solid #234451}.assignment-title span{font-size:9px;font-weight:900;letter-spacing:.12em;color:#54dbef}.assignment-title small{font-size:8px;color:#6e8994}.assignment-row{display:grid;grid-template-columns:180px 1fr 1.25fr;gap:8px;align-items:center;padding:10px 11px;border-bottom:1px solid #17313b}.assignment-row:last-child{border-bottom:0}.assignment-row strong{display:block;font-size:10px}.assignment-row small{display:block;font-size:8px;color:#6f8d99;margin-top:2px}.modal-actions{display:flex;gap:8px;align-items:center;margin-top:17px}.modal-actions span{flex:1}.toast{position:fixed;right:22px;bottom:22px;background:#0d2c38;border:1px solid #2f6b7f;border-radius:9px;padding:11px 14px;z-index:200;font-size:11px}

.leaflet-container{background:#07151b}
@media(max-width:1100px){.metric-strip{grid-template-columns:repeat(2,1fr)}.site-workspace{grid-template-columns:260px minmax(0,1fr)}.assignment-row{grid-template-columns:1fr}.device-row{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.shell{grid-template-columns:76px 1fr}.brand>div:last-child,.switcher b,.user span,.version{display:none}.page{padding:18px}.stats{grid-template-columns:repeat(2,1fr)}.site-workspace{grid-template-columns:1fr}.site-browser{max-height:300px;overflow:auto}.profile-picker{grid-template-columns:1fr}.fields.two{grid-template-columns:1fr}.fields .wide{grid-column:auto}.device-row{grid-template-columns:1fr}}

#deviceManagementPanel .assignment-row{grid-template-columns:180px minmax(0,1fr) auto}
#deviceManagementPanel .row-actions{display:flex;gap:6px;justify-content:flex-end}

/* v0.3.4 card cleanup */
.device-footer{display:none!important}
.card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #18313d;
}
.last-seen{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:8px;
  color:#8fb2c1;
  background:#07161d;
  border:1px solid #244553;
  border-radius:6px;
  padding:5px 7px;
}
.last-seen b{color:#dcecf2}
.card-edit-btn{
  min-width:62px;
  height:28px;
  padding:0 12px;
  border-radius:7px;
  border:1px solid #2a647c;
  background:linear-gradient(180deg,#0d3445,#0a2532);
  color:#dff8ff;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
}
.card-edit-btn:hover{
  border-color:#2bb8f2;
  background:#0d3a4e;
}
.system-tile{min-width:0}
.status-switch-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:5px;
}
.status-switch-wrap strong{
  margin-top:0!important;
}
.status-switch{
  position:relative;
  width:42px;
  height:24px;
  flex:0 0 42px;
  border-radius:999px;
  border:1px solid #3a5560;
  background:#25363d;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.32);
}
.status-switch i{
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#a3b2b8;
  box-shadow:0 1px 4px rgba(0,0,0,.45);
  transition:left .18s ease,background .18s ease;
}
.status-switch.on{
  border-color:#39cf87;
  background:#168a55;
  box-shadow:0 0 14px rgba(41,210,125,.18),inset 0 2px 5px rgba(0,0,0,.18);
}
.status-switch.on i{
  left:21px;
  background:#e8fff4;
}
.status-switch.off{
  border-color:#8b3d45;
  background:#5c242a;
}
.status-switch.off i{
  left:3px;
  background:#ffd7da;
}
.status-switch.unknown{
  opacity:.55;
}

/* v0.3.5 profile badge + live relay control */
.profile-badge{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:68px;
  height:24px;
  padding:0 9px;
  border-radius:6px;
  border:1px solid #24546a;
  background:#0a2430;
  color:#9cecff;
  font-size:8px;
  font-weight:900;
  line-height:1;
  letter-spacing:.08em;
  white-space:nowrap;
  box-shadow:none;
}
.profile-badge.solar{
  border-color:#705a2d;
  background:#241d0e;
  color:#ffd36d;
}
.system-tile{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.system-control{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:5px;
}
.system-control strong{
  margin:0!important;
  font-size:18px;
}
.system-toggle{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  cursor:pointer;
  flex:0 0 auto;
}
.system-toggle .toggle-track{
  position:relative;
  display:block;
  width:46px;
  height:25px;
  border-radius:999px;
  border:1px solid #5d7580;
  background:#2c3f47;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.32);
  transition:.16s ease;
}
.system-toggle .toggle-track i{
  position:absolute;
  top:3px;
  left:3px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:#c7d4d9;
  box-shadow:0 1px 5px rgba(0,0,0,.5);
  transition:left .16s ease,background .16s ease;
}
.system-toggle.on .toggle-track{
  background:#178a56;
  border-color:#40d68c;
  box-shadow:0 0 12px rgba(41,210,125,.16),inset 0 2px 4px rgba(0,0,0,.2);
}
.system-toggle.on .toggle-track i{
  left:24px;
  background:#effff7;
}
.system-toggle.off .toggle-track{
  background:#6b2930;
  border-color:#a84a54;
}
.system-toggle.off .toggle-track i{
  left:3px;
  background:#ffe4e6;
}
.system-toggle.unknown .toggle-track{
  opacity:.55;
}
.system-toggle.pending{
  opacity:.55;
  cursor:wait;
  pointer-events:none;
}
.system-toggle.pending .toggle-track{
  box-shadow:0 0 0 3px rgba(36,174,242,.10);
}
.command-state{
  min-height:11px;
  margin-top:3px;
  color:#6e98a7;
  font-size:7px;
  line-height:1.1;
}

/* v0.3.6 System Status alignment refinement */
.system-tile{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.system-tile > span{
  margin-bottom:7px;
}
.system-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) 46px;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:28px;
  margin-top:0;
}
.system-control strong{
  display:flex!important;
  align-items:center;
  height:25px;
  line-height:25px!important;
  margin:0!important;
  font-size:18px!important;
}
.system-toggle{
  display:block;
  width:46px;
  height:25px;
  justify-self:end;
  align-self:center;
  line-height:0;
}
.system-toggle .toggle-track{
  display:block;
  width:46px;
  height:25px;
  margin:0;
}
.command-state{
  display:block;
  min-height:9px;
  height:9px;
  margin-top:3px;
  line-height:9px;
}

/* v0.3.7 System Status control - single pill, no overlap */
.system-tile{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  min-width:0;
  overflow:hidden;
}
.system-tile > span{
  margin:0 0 8px 0!important;
}
.system-control{
  display:none!important;
}
.system-toggle{
  appearance:none;
  -webkit-appearance:none;
  display:grid!important;
  grid-template-columns:1fr 34px;
  align-items:center;
  width:100%!important;
  min-width:0!important;
  height:32px!important;
  margin:0!important;
  padding:3px 4px 3px 9px!important;
  border-radius:8px!important;
  border:1px solid #4a6570!important;
  background:#17262d!important;
  color:#d9e8ed!important;
  cursor:pointer;
  line-height:1!important;
  box-sizing:border-box!important;
}
.system-toggle .toggle-label{
  display:block;
  min-width:0;
  overflow:hidden;
  font-size:14px;
  font-weight:900;
  line-height:24px;
  text-align:left;
  white-space:nowrap;
}
.system-toggle .toggle-track{
  position:relative;
  display:block!important;
  width:30px!important;
  height:20px!important;
  margin:0!important;
  justify-self:end;
  border-radius:999px!important;
  border:1px solid #637780!important;
  background:#35464d!important;
  box-shadow:inset 0 1px 4px rgba(0,0,0,.32)!important;
}
.system-toggle .toggle-track i{
  position:absolute!important;
  top:2px!important;
  left:2px!important;
  width:14px!important;
  height:14px!important;
  border-radius:50%!important;
  background:#cfd9dd!important;
  transition:left .16s ease!important;
}
.system-toggle.on{
  border-color:#2baf70!important;
  background:#0e3928!important;
  color:#4ee69c!important;
}
.system-toggle.on .toggle-track{
  border-color:#39d087!important;
  background:#168a55!important;
}
.system-toggle.on .toggle-track i{
  left:12px!important;
  background:#f0fff7!important;
}
.system-toggle.off{
  border-color:#94404a!important;
  background:#3a1b20!important;
  color:#ff7f89!important;
}
.system-toggle.off .toggle-track{
  border-color:#a84a54!important;
  background:#6b2930!important;
}
.system-toggle.off .toggle-track i{
  left:2px!important;
  background:#ffe6e8!important;
}
.system-toggle.unknown{
  opacity:.6;
}
.system-toggle.pending{
  opacity:.55!important;
  cursor:wait!important;
  pointer-events:none!important;
}
.command-state{
  display:block!important;
  min-height:9px!important;
  height:9px!important;
  margin-top:3px!important;
  overflow:hidden;
  font-size:7px!important;
  line-height:9px!important;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* Edit button reliability / hit area */
.card-edit-btn{
  position:relative;
  z-index:3;
  pointer-events:auto!important;
  cursor:pointer!important;
}

/* v0.3.8 definitive System Status alignment */
.system-tile{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  overflow:visible!important;
}
.system-tile > span{
  margin:0 0 7px 0!important;
}
.system-state-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 34px!important;
  align-items:center!important;
  column-gap:7px!important;
  width:100%!important;
  min-width:0!important;
  height:24px!important;
}
.system-state-row strong{
  display:block!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  font-size:18px!important;
  line-height:24px!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
.system-toggle{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:block!important;
  justify-self:end!important;
  width:34px!important;
  height:20px!important;
  min-width:34px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  line-height:0!important;
  cursor:pointer!important;
}
.system-toggle .toggle-label{display:none!important}
.system-toggle .toggle-track{
  position:relative!important;
  display:block!important;
  width:34px!important;
  height:20px!important;
  margin:0!important;
  border-radius:999px!important;
  border:1px solid #667d87!important;
  background:#34464e!important;
  box-shadow:inset 0 1px 4px rgba(0,0,0,.32)!important;
}
.system-toggle .toggle-track i{
  position:absolute!important;
  top:2px!important;
  left:2px!important;
  width:14px!important;
  height:14px!important;
  border-radius:50%!important;
  background:#d2dde1!important;
  transition:left .16s ease!important;
}
.system-toggle.on .toggle-track{
  border-color:#3bd48a!important;
  background:#168a55!important;
}
.system-toggle.on .toggle-track i{
  left:16px!important;
  background:#f0fff7!important;
}
.system-toggle.off .toggle-track{
  border-color:#a84a54!important;
  background:#6b2930!important;
}
.system-toggle.off .toggle-track i{
  left:2px!important;
  background:#ffe6e8!important;
}
.system-toggle.pending{opacity:.55!important;pointer-events:none!important}
.command-state{
  display:block!important;
  width:100%!important;
  min-height:8px!important;
  height:8px!important;
  margin:2px 0 0 0!important;
  padding:0!important;
  overflow:hidden!important;
  font-size:7px!important;
  line-height:8px!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}

/* v0.3.9 OFF-state toggle alignment refinement */
.system-toggle.off .toggle-track{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:0!important;
}
.system-toggle.off .toggle-track i{
  position:absolute!important;
  top:2px!important;
  left:2px!important;
  width:14px!important;
  height:14px!important;
  margin:0!important;
  transform:none!important;
}
.system-toggle.off{
  padding:0!important;
  margin:0!important;
}

/* v0.4.0 - definitive compact System Status layout */
.metric-strip{
  grid-template-columns:1fr 1fr 1.08fr 1.12fr!important;
}
.system-tile{
  padding:8px 7px!important;
  min-width:0!important;
}
.system-tile > span{
  display:block!important;
  margin:0 0 8px 0!important;
  font-size:7.5px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.system-state-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:4px!important;
  width:100%!important;
  height:22px!important;
  min-width:0!important;
}
.system-state-row strong{
  display:block!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
  font-size:17px!important;
  line-height:22px!important;
  letter-spacing:-0.02em!important;
  white-space:nowrap!important;
}
.system-toggle{
  display:block!important;
  flex:0 0 28px!important;
  width:28px!important;
  min-width:28px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  border-radius:999px!important;
  line-height:0!important;
}
.system-toggle .toggle-track{
  position:relative!important;
  display:block!important;
  width:28px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  border-radius:999px!important;
  border:1px solid #687e87!important;
  background:#35474e!important;
  box-sizing:border-box!important;
}
.system-toggle .toggle-track i{
  position:absolute!important;
  top:2px!important;
  left:2px!important;
  width:12px!important;
  height:12px!important;
  margin:0!important;
  border-radius:50%!important;
  box-sizing:border-box!important;
}
.system-toggle.on .toggle-track{
  background:#168a55!important;
  border-color:#39d087!important;
}
.system-toggle.on .toggle-track i{
  left:12px!important;
  background:#f0fff7!important;
}
.system-toggle.off .toggle-track{
  background:#6b2930!important;
  border-color:#a84a54!important;
}
.system-toggle.off .toggle-track i{
  left:2px!important;
  background:#ffe6e8!important;
}
.command-state{
  margin-top:2px!important;
  height:7px!important;
  min-height:7px!important;
  line-height:7px!important;
  font-size:6.5px!important;
}

/* v0.4.1 - precision-center the System Status switch knob */
.system-toggle .toggle-track i{
  top:50%!important;
  width:12px!important;
  height:12px!important;
  margin:0!important;
  transform:translateY(-50%)!important;
}
.system-toggle.off .toggle-track i{
  left:2px!important;
}
.system-toggle.on .toggle-track i{
  left:13px!important;
}
