:root{
  --bg:#0b1220;
  --card:#111827;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --line:rgba(255,255,255,.08);
  --pri:#22c55e;
  --sec:#334155;
  --danger:#ef4444;
  --panel:rgba(17,24,39,.85);
  --panel-strong:rgba(17,24,39,.98);
  --input-bg:rgba(2,6,23,.4);
  --button-bg:rgba(51,65,85,.35);
  --pill-bg:rgba(255,255,255,.06);
  --body-bg:linear-gradient(180deg,#0b1220,#070b14);
  --grid-bg:rgba(2,6,23,.25);
  --grid-border:rgba(255,255,255,.08);
  --menu-bg:rgba(16,24,39,.92);
  --menu-border:rgba(255,255,255,.10);
  --surface-muted:rgba(255,255,255,.035);
  --select-bg:#141822;
  --select-text:rgba(255,255,255,.95);
  --inline-form-bg:rgba(20,24,34,.92);
  --inline-form-text:rgba(255,255,255,.92);
  --inline-form-border:rgba(255,255,255,.12);

  /* Tab/Subtab UI (customizable from Settings) */
  --tab-font-size:16px;
  --subtab-font-size:15px;
  --tab-font-family: ;
  --tab-font-weight:600;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--body-bg);
  color:var(--text);
}
body.themeLight{
  --bg:#f3f4f6;
  --card:#ffffff;
  --muted:#64748b;
  --text:#0f172a;
  --line:rgba(15,23,42,.14);
  --sec:#e2e8f0;
  --panel:rgba(255,255,255,.92);
  --panel-strong:rgba(255,255,255,.98);
  --input-bg:rgba(255,255,255,.88);
  --button-bg:rgba(226,232,240,.8);
  --pill-bg:rgba(15,23,42,.06);
  --body-bg:linear-gradient(180deg,#f8fafc,#e2e8f0);
  --grid-bg:rgba(15,23,42,.06);
  --grid-border:rgba(15,23,42,.12);
  --menu-bg:rgba(255,255,255,.98);
  --menu-border:rgba(15,23,42,.14);
  --surface-muted:rgba(15,23,42,.04);
  --select-bg:#ffffff;
  --select-text:#0f172a;
  --inline-form-bg:rgba(255,255,255,.95);
  --inline-form-text:#0f172a;
  --inline-form-border:rgba(15,23,42,.14);
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; flex-direction:column;
  padding:8px 10px;
  gap:8px;
  background:var(--panel);
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(10px);
}

/* Linia 1: GSweb (stanga) + TAB dropdown (centru) + Setari (dreapta) */
.headerTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.brandMini{display:flex; align-items:center; gap:10px; min-width:86px}
.brandMini .title{display:block; font-weight:800; letter-spacing:.3px; white-space:nowrap}
body.editMode #brandDropZone.brandDropTarget{
  outline:2px dashed rgba(34,197,94,.7);
  border-radius:10px;
  background:rgba(34,197,94,.12);
}
body.editMode #brandDropZone.brandDropFlash{
  background:rgba(34,197,94,.28);
  transition:background .2s ease;
}

.brand{display:flex; align-items:center; gap:10px}
.brand .title,
.brand .sub{display:none}
.dot{
  width:12px;height:12px;border-radius:999px;
  background:var(--danger);
  box-shadow:0 0 0 4px rgba(239,68,68,.15);
}
.title{font-weight:700; letter-spacing:.3px}

.actions{display:flex; gap:10px; align-items:center}

/* Centru header: tab dropdown se îngustează pe mobil; titlul … ca să rămână vizibile ✎ și ▾ */
.navTop{
  flex:1;
  min-width:0;
  max-width:100%;
  display:flex;
  justify-content:center;
}
.tabDropBtn .pillText{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}
.tabDropBtn .miniBtns,
.tabDropBtn .chev{ flex-shrink:0; }

/* Linia 2: Subtaburi — scroll orizontal pe bară când pill-urile depășesc lățimea */
.subtabsBar{
  width:100%;
  min-width:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.subtabsBar .subtabs{
  width:max-content;
  min-width:100%;
  box-sizing:border-box;
  overflow:visible;
}

.wrap{padding:14px; max-width:980px; margin:0 auto; width:100%; box-sizing:border-box}
@media (max-width: 640px){
  .wrap{padding:8px 6px 14px; max-width:100%}
}
@media (max-width: 400px){
  .wrap{padding:6px 4px 12px}
}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

.hidden{display:none !important}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width:640px){ .grid2{grid-template-columns:1fr} }

/* Câmp parolă + buton arată/ascunde (login) */
.authPassWrap{
  position:relative;
  width:100%;
}
.authPassWrap #pass{
  padding-right:48px;
  box-sizing:border-box;
}
.authPassToggle{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  padding:0;
  margin:0;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(15,23,42,.75);
  color:var(--text);
  font-size:18px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.authPassToggle:hover{ filter:brightness(1.1); }
.authPassToggle:active{ transform:translateY(-50%) scale(0.96); }
.authPassToggle:disabled{
  opacity:0.45;
  cursor:not-allowed;
  pointer-events:none;
}

input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--input-bg);
  color:var(--text);
  outline:none;
}
select, textarea{
  border:1px solid var(--line);
  background:var(--input-bg);
  color:var(--text);
}
input:focus{border-color:rgba(34,197,94,.5)}

.row{display:flex; gap:10px; margin-top:10px}
.row > *{flex:1}

button{
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--button-bg);
  color:var(--text);
  cursor:pointer;
}
button.primary{background:rgba(34,197,94,.18); border-color:rgba(34,197,94,.35)}
button.secondary{background:var(--button-bg)}
button.danger{background:rgba(239,68,68,.14); border-color:rgba(239,68,68,.35)}
button.ghost{background:transparent}
button:hover{filter:brightness(1.08)}

.iconbtn{
  width:44px; height:44px;
  display:inline-flex; align-items:center; justify-content:center;
  position:relative;
}
.iconbtn.ok{ box-shadow: 0 0 0 4px rgba(34,197,94,.14); border-color: rgba(34,197,94,.28); }
.iconbtn.bad{ box-shadow: 0 0 0 4px rgba(239,68,68,.14); border-color: rgba(239,68,68,.28); }
.iconbtn .dot{
  position:absolute;
  left:10px; top:10px;
  width:10px; height:10px;
  border-radius:50%;
  pointer-events:none;
}

.pillbtn{
  height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--pill-bg);
  color:var(--text);
  font-weight:700;
}
.pillbtn:hover{filter:brightness(1.08)}

.drawerHeadBtns{display:flex; align-items:center; gap:8px}
.drawerHeadBtns .themeToggle{
  font-size:18px;
  flex-shrink:0;
}

.hint{color:var(--muted); margin-top:10px; font-size:13px}

.dash{display:flex; flex-direction:column; gap:10px}

.tabs, .subtabs{display:flex; gap:8px; overflow:auto; padding-bottom:6px}
/* Subtab glow/border may extend upward; give room so it doesn't get clipped in the scroll container */
.subtabs{ padding-top:6px; }

/* === Mobile-friendly TAB dropdown (B) === */
.tabs{overflow:visible; padding-bottom:0}
.tabDropdown{
  position:relative;
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
}
.tabDropBtn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  max-width:100%;
  width:100%;
  box-sizing:border-box;
}
.tabDropBtn{font-size:var(--tab-font-size); font-weight:var(--tab-font-weight); font-family:var(--tab-font-family, inherit)}
.tabDropBtn .chev{opacity:.75; font-size:12px}
.tabDropMenu{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:calc(100% + 10px);
  width:min(320px, calc(100vw - 24px));
  max-height:60vh;
  overflow:auto;
  padding:10px;
  border-radius:16px;
  background:var(--menu-bg);
  border:1px solid var(--menu-border);
  box-shadow:0 18px 40px rgba(0,0,0,.45);
  display:none;
  z-index:60;
  backdrop-filter: blur(10px);
}
.tabDropdown.open .tabDropMenu{display:block}

/* === TAB dropdown items: lista verticala (nu wrap orizontal) === */
.tabDropItem{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  color:#e5e7eb;
  font-size:var(--tab-font-size);
  font-weight:var(--tab-font-weight);
  font-family:var(--tab-font-family, inherit);
  text-align:left;
  margin:0 0 8px 0;
}
.tabDropItem:last-child{margin-bottom:0}
.tabDropItem.active{
  background:rgba(34,197,94,.10);
  border-color:rgba(34,197,94,.35);
}
.tabDropItem--add{
  justify-content:center;
  margin-top:4px;
  border-style:dashed;
  font-weight:800;
}
.tabDropItem--add:hover{filter:brightness(1.08)}
.pill.pill--addSubtab{
  min-width:42px;
  justify-content:center;
  border-style:dashed;
  font-weight:900;
  flex:0 0 auto;
}
.pill.pill--addSubtab .pillText{
  font-size:1.15em;
  line-height:1;
}
.tabDropItem .miniBtns{display:flex; gap:8px; margin-left:8px}
.tabDropItem .miniBtn{
  width:28px; height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  font-size:14px;
}
.tabDropItem .miniBtn:active{transform:scale(.98)}

/* Reorder list (Tab/Subtab modal) – i13: placeholder între rânduri; pe telefon nu scrollă tot modalul la tragere */
.reorderList{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  touch-action:none;
}
.reorderItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  cursor:grab;
  touch-action:none;
}
.reorderItem .label{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
  pointer-events:none;
}
.reorderItem .trashBtn{
  width:34px;
  height:34px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  cursor:pointer;
  opacity:.95;
}
.reorderItem .trashBtn:hover{ filter:brightness(1.15); }
.reorderItem .trashBtn:active{ transform:scale(.98); }
.reorderItem .trashBtn{ touch-action:manipulation; flex-shrink:0; }
.reorderItem .handle{
  width:36px;
  min-width:36px;
  height:36px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  cursor:grab;
  flex-shrink:0;
}
.reorderItem.dragging{
  opacity:.85;
  filter:brightness(1.08);
  cursor:grabbing;
}
.reorderItem.dragging .handle{ cursor:grabbing; }
.reorderPlaceholder{
  flex-shrink:0;
  border-radius:14px;
  border:2px dashed rgba(34,197,94,.5);
  background:rgba(34,197,94,.08);
  pointer-events:none;
  box-sizing:border-box;
}
.tabItemRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  margin:0 0 8px 0;
}
.tabItemRow:last-child{margin-bottom:0}
.tabItemRow.active{
  background:rgba(34,197,94,.10);
  border-color:rgba(34,197,94,.35);
}
.tabItemLabel{font-weight:700}
.tabItemBtn{
  width:30px; height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  color:#e5e7eb;
}
.tabItemBtn:active{transform:scale(.98)}

.pill{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--pill-bg, rgba(2,6,23,.35));
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:var(--subtab-font-size);
  font-weight:var(--tab-font-weight);
  font-family:var(--tab-font-family, inherit);
}
.pill.active{
  border-color: var(--subtab-active-border, rgba(34,197,94,.45));
  background: var(--subtab-active-bg, rgba(34,197,94,.14));
  box-shadow:
    0 0 var(--subtab-active-glow, 0px) var(--subtab-active-border, rgba(34,197,94,.45)),
    0 0 calc(var(--subtab-active-glow, 0px) / 2) var(--subtab-active-border, rgba(34,197,94,.35));
}

.pill .pillText{white-space:nowrap}
.pill .subtabHandle{
  width:26px; height:26px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  display:grid; place-items:center;
  padding:0;
  font-size:14px;
  cursor:grab;
  flex-shrink:0;
}
.pill .subtabHandle:active{ cursor:grabbing; }
.subtabs .pill.subtabDragging{
  opacity:1;
  filter:brightness(1.12);
  cursor:grabbing;
  z-index:10;
  position:relative;
  box-shadow:0 6px 20px rgba(0,0,0,.35);
}
.subtabPlaceholder{
  flex-shrink:0;
  border-radius:999px;
  border:2px dashed rgba(34,197,94,.5);
  background:rgba(34,197,94,.08);
  pointer-events:none;
}
.pill .miniBtns{display:flex; gap:6px; margin-left:2px}
.pill .miniBtn{
  width:26px; height:26px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  display:grid; place-items:center;
  padding:0;
  font-size:13px;
}
.pill .miniBtn:hover{filter:brightness(1.15)}

.grid{
  position:relative;
  min-height:60vh;
  box-sizing:border-box;
  background:var(--grid-bg);
  border:1px dashed var(--grid-border);
  border-radius:16px;
  padding:10px;
}

.pkg{
  position:absolute;
  overflow:hidden;
  box-sizing:border-box;
  border-radius:16px;
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:0 10px 20px rgba(0,0,0,.25);
  padding:12px;
  touch-action: pan-y;
  -webkit-user-select:none;
  user-select:none;
}
body.editMode .pkg{
  touch-action:none;
  overflow:visible;
}
body.editMode .pkg.pkg--editSelected{
  z-index:56;
  border-color:rgba(34,197,94,.88);
  box-shadow:
    0 10px 20px rgba(0,0,0,.25),
    0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkgMoveSurface{
  position:absolute;
  z-index:59;
  inset:28px;
  background:transparent;
  pointer-events:none;
  touch-action:none;
}
body.editMode .pkg.pkg--editSelected .pkgMoveSurface{
  pointer-events:auto;
  cursor:grab;
}
body.editMode .pkg.pkg--editSelected .pkgMoveSurface:active{
  cursor:grabbing;
}
body.editMode .pkg--widget .pkgMoveSurface{
  inset:0;
  z-index:55;
  pointer-events:none !important;
}
body.editMode .pkg.pkg--widgetSelected .pkgMoveSurface{
  pointer-events:none !important;
  cursor:default;
}
.pkgHead{display:flex; justify-content:space-between; gap:10px; align-items:center}
.pkgTitle{font-weight:700}
.badge{font-size:12px; color:var(--muted)}

.pkgHeadRight{display:flex; align-items:center; gap:8px}
.pkgMiniBtn{
  width:28px; height:28px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  display:grid; place-items:center;
  padding:0;
  font-size:14px;
}
.pkgMiniBtn:hover{filter:brightness(1.15)}

.pkgBody{margin-top:10px; display:grid; gap:10px}
/* A1/A2: card SEN – grid mini-carduri per valoare; redimensionare și poziție din setări */
.pkg--sen .pkgBody{
  padding:8px 8px 10px !important;
  display:flex;
  justify-content:var(--sen-mini-justify, center);
  align-items:var(--sen-mini-align, center);
  overflow:hidden;
  min-height:0;
}
.pkg--sen .pkgBody .pkgSenBody{ max-width:100%; min-width:0; }
.pkgSenBody{ display:flex; flex-direction:column; gap:6px; }
.pkgSenBody.senGrid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.pkgSenBody .senItem{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:12px;
  background:rgba(0,0,0,.2);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:var(--sen-mini-w, auto);
  min-width:0;
  min-height:var(--sen-mini-h, 64px);
  text-align:center;
  overflow:hidden;
}
.pkgSenBody .senItem .senLbl{ font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:4px; }
.pkgSenBody .senItem .senValRow{ display:flex; align-items:baseline; justify-content:center; flex-wrap:nowrap; gap:5px; min-width:0; max-width:100%; }
.pkgSenBody .senItem .senVal{ font-size:22px; font-weight:700; color:var(--text); line-height:1.2; }
.pkgSenBody .senItem .senUnit{ font-size:14px; color:var(--muted); flex-shrink:0; }
@media (max-width:380px){ .pkgSenBody.senGrid{ grid-template-columns:1fr; } }
.pkgSenBody .senRow{ font-size:14px; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.pkgSenBody .senLabel{ color:var(--muted); min-width:80px; }
.pkgSenBody .senVal{ font-weight:600; color:var(--text); }
/* B1: Irigație – fie 1 buton mare (1 zonă), fie 4 butoane mici pe un rând (4 zone) */
.pkg--irig .pkgBody{ padding:6px 2px 8px !important; }
/* Card irigație: aceleași padding-uri pentru 1 zonă sau 4 zone (butoane compacte) */
.pkg--irig:has(.irigBody--4),
.pkg--irig:has(.irigBody--1){
  padding-left:0 !important;
  padding-right:0 !important;
  padding-top:2px !important;
  padding-bottom:4px !important;
  display:flex;
  flex-direction:column;
}
.pkg--irig .pkgHead{ display:none !important; }
.pkg--irig:has(.irigBody--4) .pkgBody,
.pkg--irig:has(.irigBody--1) .pkgBody{
  padding:2px 0 6px !important;
  margin-top:0 !important;
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.pkg--irig:has(.irigBody--4) .irigBody--4,
.pkg--irig:has(.irigBody--1) .irigBody--1{
  flex:1 1 auto;
  min-height:0;
}
.irigBody{ display:flex; flex-direction:column; gap:6px; }
.pkg--irig:has(.irigBody--4) .irigBody,
.pkg--irig:has(.irigBody--1) .irigBody{ gap:2px; }
.irigZone{
  display:flex;
  flex-direction:column;
  gap:0;
  background:rgba(0,0,0,.12);
  border-radius:6px;
  border:1px solid var(--line);
  min-width:0;
  overflow:hidden;
  isolation:isolate;
  position:relative;
}
body.editMode .pkg--irig .irigBtnMain{
  pointer-events:none;
  cursor:default;
}
body.editMode .irigZoneHandle{
  position:absolute;
  top:2px;
  right:2px;
  z-index:4;
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.45);
  color:var(--muted);
  font-size:14px;
  line-height:1;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
body.editMode .irigZoneHandle:active{ cursor:grabbing; }
body.editMode .irigZone.irigZoneDragging{
  opacity:.92;
  box-shadow:0 8px 20px rgba(0,0,0,.35);
  filter:brightness(1.08);
}
body.editMode .irigZonePlaceholder{
  min-width:0;
  border-radius:6px;
  border:2px dashed rgba(34,197,94,.55);
  background:rgba(34,197,94,.08);
  box-sizing:border-box;
}
.irigBtnMain{ border-radius:6px; font-weight:600; border:1px solid var(--line); cursor:pointer; transition:filter .15s, background .15s; background:var(--surface-elevated, #334155); color:var(--text); }
.irigBtnMain.irigBtnOn{ background:var(--irig-on-bg, var(--primary, #16a34a)) !important; color:#fff !important; border-color:#fff !important; }
.irigBtnMain:hover:not([aria-disabled]){ filter:brightness(1.1); }
.irigBtnMain[aria-disabled]{ opacity:.6; cursor:not-allowed; }
.irigProgram{
  color:var(--muted);
  line-height:1.2;
  display:flex;
  flex:0 0 34px;
  align-items:center;
  justify-content:center;
  min-width:0;
  width:100%;
  height:34px;
  max-height:34px;
  padding:0;
  overflow:hidden;
  cursor:pointer;
  pointer-events:auto;
  position:relative;
  z-index:2;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  box-sizing:border-box;
  border-top:1px solid rgba(255,255,255,.06);
}
.irigProgram:hover{ filter:brightness(1.15); }
.irigProgramMain{
  width:100%;
  height:100%;
  display:flex;
}
.irigProgramMain .irigProgramTrack{
  flex:1 1 auto;
  width:100%;
}
.irigProgramTrack{
  position:relative;
  width:100%;
  height:100%;
  max-height:100%;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  border:1px solid rgba(34,197,94,.35);
  background:rgba(2,6,23,.88);
  box-sizing:border-box;
}
.irigProgramFill{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:0;
  max-width:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, rgba(34,197,94,.55), rgba(34,197,94,.35));
  transition:width .4s ease;
  pointer-events:none;
  z-index:0;
}
.irigProgramFill--program{
  background:linear-gradient(90deg, rgba(34,197,94,.55), rgba(34,197,94,.35));
}
.irigProgramFill--timer{
  background:linear-gradient(90deg, rgba(6,182,212,.65), rgba(8,145,178,.45));
}
.irigProgramTrack--timer{
  border-color:rgba(6,182,212,.35);
}
.irigProgramTrack--timer:not(.hasProgress){
  border-color:rgba(6,182,212,.28);
}
.irigProgramSummary--timer{
  color:#cffafe;
}
.irigProgramTrack.irigBarTier--0 .irigProgramSummary{ font-size:.82em; }
.irigProgramSummary{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  max-width:100%;
  padding:4px 6px;
  border-radius:0;
  border:none;
  background:transparent;
  color:#d1fae5;
  font-size:.88em;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;
  box-sizing:border-box;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigProgramTrack:not(.hasProgress) .irigProgramSummary{
  border:none;
  background:transparent;
  border-radius:0;
  text-shadow:none;
}
.irigProgramTrack:has(.irigProgramSummary--empty){
  border-color:rgba(148,163,184,.22);
  background:rgba(15,23,42,.4);
}
.irigProgramTrack:not(.hasProgress) .irigProgramSummary--empty{
  color:var(--muted);
}
.irigProgramSummary--empty{
  color:var(--muted);
  border:none !important;
  background:transparent !important;
}

/* Editor program IRIG: 2 rânduri — sus ON/OFF, jos zile (încape în modal) */
.irigProgramModalCard{
  width:min(98vw, 520px) !important;
  max-width:min(98vw, 520px) !important;
}
.irigProgramModalActions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}
.irigProgramModalActionsRight{
  display:flex;
  gap:10px;
  margin-left:auto;
}
.irigProgramAutosaveStatus{
  flex:1 1 auto;
  min-width:70px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  text-align:center;
}
.irigProgramAutosaveStatus.isSaving{ color:#a5f3fc; }
.irigProgramAutosaveStatus.isSaved{ color:#86efac; }
.irigProgramAutosaveStatus.isError{ color:#fbbf24; }
.irigProgramModalHeadMain{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1 1 auto;
}
.irigProgramModalHeadMain .modalTitle{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.irigProgInfoBtn{
  flex:0 0 auto;
  width:36px;
  height:36px;
  font-size:17px;
  font-style:italic;
  font-weight:800;
  line-height:1;
}
.irigProgInfoBtn.isOn{
  border-color:rgba(34,197,94,.45);
  box-shadow:0 0 0 3px rgba(34,197,94,.2);
  color:#86efac;
}
.irigHistorySourceBtn{
  flex:0 0 auto;
  height:32px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:#e2e8f0;
  font-size:12px;
  font-weight:700;
  line-height:30px;
  white-space:nowrap;
  cursor:pointer;
}
.irigHistorySourceBtn[data-source="placa"]{
  border-color:rgba(56,189,248,.45);
  background:rgba(14,165,233,.16);
  color:#7dd3fc;
}
.irigProgHintPanel{
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.2);
}
.irigProgHintPanel.hidden{ display:none; }
.irigProgHintPanel .irigProgHint{ margin:0 0 8px; }
.irigProgHintPanel .irigProgMapHint{ margin:0; }
.irigProgHintPanel .irigTimerHint{ margin:0; }
.irigProgramModalCard .modalBody .f{ min-width:0; }
.irigModalModeBar{
  display:flex;
  gap:0;
  margin:0 0 12px;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(0,0,0,.15);
}
.irigModalModeBtn{
  flex:1 1 50%;
  margin:0;
  padding:10px 8px;
  border:none;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-size:clamp(14px, 3.5vw, 16px);
  font-weight:700;
  cursor:pointer;
  touch-action:manipulation;
}
.irigModalModeBtn.isOn{
  background:var(--primary, #16a34a);
  color:#fff;
}
.irigProgramModal--timerMode .irigModalModeBtn[data-irig-mode="timer"].isOn{
  background:linear-gradient(180deg, #0891b2, #0e7490);
  color:#ecfeff;
}
.irigProgramModal:not(.irigProgramModal--timerMode) .irigModalModeBtn[data-irig-mode="program"].isOn{
  background:var(--primary, #16a34a);
  color:#fff;
}
.irigModalModeBtn:hover:not(.isOn){ background:rgba(255,255,255,.06); }
.irigProgTotalWrap{
  margin:0 0 12px;
}
.irigProgTotalWrap.hidden{ display:none; }
.irigProgTotalBar{
  width:100%;
  cursor:pointer;
  touch-action:manipulation;
  border-radius:10px;
  outline:none;
}
.irigProgTotalBar:hover .irigProgTotalTrack{ filter:brightness(1.08); }
.irigProgTotalBar:focus-visible .irigProgTotalTrack{
  box-shadow:0 0 0 2px rgba(251,191,36,.55);
}
.irigProgTotalTrack{
  position:relative;
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:10px;
  border:1px solid rgba(251,191,36,.45);
  background:rgba(69,26,3,.55);
  box-sizing:border-box;
  transition:filter .15s ease;
}
.irigProgTotalFill{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:0;
  max-width:100%;
  background:linear-gradient(90deg, rgba(251,191,36,.55), rgba(217,119,6,.38));
  transition:width .4s ease;
  pointer-events:none;
  z-index:0;
}
.irigProgTotalLabel{
  position:relative;
  z-index:1;
  padding:4px 8px;
  font-size:clamp(10px, 2.5vw, 12px);
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:#fde68a;
  white-space:normal;
  text-align:center;
  line-height:1.25;
  overflow:hidden;
  max-width:100%;
  box-sizing:border-box;
}
.irigProgTotalTrack:not(.hasProgress) .irigProgTotalLabel{
  color:var(--muted);
  text-shadow:none;
}
.irigProgTotalTrack.hasProgress .irigProgTotalLabel{
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigTotalHighlight{
  display:inline-block;
  padding:4px 12px;
  border-radius:8px;
  border:1px solid rgba(254,243,199,.75);
  background:rgba(120,53,15,.55);
  color:#fffbeb;
  font-size:clamp(16px, 4.5vw, 22px);
  font-weight:800;
  line-height:1.15;
  letter-spacing:.01em;
}
.irigProgTotalLabel .irigTotalHighlight{
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigProgTodayPanel{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:10px;
}
.irigProgTodayPanel.hidden{ display:none; }
.irigProgTodayHead{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.irigProgTodayBack{
  flex:0 0 auto;
  font-size:13px;
  padding:6px 10px;
}
.irigProgTodayTitle{
  flex:1 1 auto;
  min-width:0;
  font-size:15px;
  font-weight:800;
  color:#a5f3fc;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.irigProgTodayBody{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.irigHistoryDayNav{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  padding:6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(2,6,23,.22);
}
.irigHistoryDayBtn{
  flex:0 0 auto;
  padding:6px 9px;
  font-size:12px;
  font-weight:800;
}
.irigHistoryDayBtn:disabled{
  opacity:.42;
  cursor:not-allowed;
}
.irigHistoryDayLabel{
  flex:1 1 auto;
  min-width:0;
  text-align:center;
  color:#fffbeb;
  font-size:13px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.irigModalPanel.hidden{ display:none; }
.irigTimerHint{
  margin:0 0 10px;
  font-size:clamp(12px, 3vw, 14px);
  color:var(--muted);
  line-height:1.35;
}
.irigTimerEditor{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
  min-width:0;
  max-width:100%;
}
.irigTimerRows{ display:flex; flex-direction:column; gap:10px; width:100%; min-width:0; }
.irigTimerRow{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 8px;
  border-radius:12px;
  background:rgba(0,0,0,.12);
  border:1px solid rgba(255,255,255,.06);
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.irigTimerRowTimes{
  display:flex;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:5px;
  width:100%;
  min-width:0;
}
.irigTimerRowSide{
  display:grid;
  grid-template-rows:1fr auto;
  align-self:stretch;
  justify-items:center;
  gap:0;
  flex:0 0 auto;
}
.irigTimerRowSide .irigLocalToggle{
  grid-row:2;
  margin:clamp(12px, 3.5vw, 18px) 0 0;
}
.irigTimerModeRow{
  display:flex;
  gap:6px;
  width:100%;
  min-width:0;
}
.irigTimerModeBtn{
  flex:1 1 50%;
  margin:0;
  padding:8px 6px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--muted);
  font-size:clamp(13px, 3.2vw, 15px);
  font-weight:700;
  cursor:pointer;
  touch-action:manipulation;
}
.irigTimerModeBtn.isOn{
  background:rgba(96, 165, 250, .22);
  border-color:rgba(96, 165, 250, .45);
  color:#fff;
}
.irigTimerRow.isClock .irigTimerStart{ display:none !important; }
.irigTimerRow.isClock .irigTimerRowSide{
  grid-template-rows:auto;
}
.irigTimerRow.isClock .irigTimerRowSide .irigLocalToggle{
  grid-row:1;
  margin-top:0;
}
.irigTimerClockExtra{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  min-width:0;
}
.irigTimerClockExtra[hidden],
.irigTimerEveryWrap[hidden],
.irigTimerClockDays[hidden],
.irigTimerPhaseDelay[hidden],
.irigTimerPhaseClock[hidden]{ display:none !important; }
.irigTimerClockRepeatRow,
.irigTimerClockDates{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:center;
  width:100%;
}
.irigTimerClockLabel{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  min-width:0;
}
.irigTimerRepeatSelect,
.irigTimerEveryN,
.irigTimerDate{
  min-height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  color:inherit;
  font-size:14px;
  font-weight:700;
  padding:4px 8px;
}
.irigTimerEveryN{ width:4.2em; }
.irigTimerClockDays{
  display:flex;
  gap:4px;
  width:100%;
}
.irigLocalToggle{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:clamp(36px, 9vw, 42px);
  height:clamp(36px, 9vw, 42px);
  padding:0;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.irigLocalToggle.isOn{
  background:var(--primary, #16a34a);
  border-color:rgba(255,255,255,.35);
  color:#fff;
}
.irigLocalToggle.isOn:hover{ filter:brightness(1.08); }
.irigLocalToggle:disabled,
.irigLocalToggle.isDisabled{
  opacity:.45;
  cursor:not-allowed;
}
.irigLocalPinSvg{ display:block; pointer-events:none; }
.irigProgEnableToggle{
  position:relative;
  flex:0 0 auto;
  display:block;
  width:clamp(56px, 14vw, 64px);
  height:clamp(28px, 7vw, 32px);
  padding:0;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(15,23,42,.85);
  cursor:pointer;
  touch-action:manipulation;
  overflow:hidden;
  transition:background .25s ease, border-color .25s ease;
}
.irigProgEnableToggle.isOn{
  background:#06b6d4;
  border-color:rgba(6,182,212,.65);
}
.irigProgEnableKnob{
  position:absolute;
  top:50%;
  left:3px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.35);
  transform:translateY(-50%);
  transition:left .25s ease;
  z-index:2;
  pointer-events:none;
}
.irigProgEnableToggle.isOn .irigProgEnableKnob{
  left:calc(100% - 25px);
}
.irigProgEnableText{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:10px;
  font-weight:900;
  letter-spacing:.03em;
  line-height:1;
  z-index:1;
  pointer-events:none;
  transition:left .25s ease, right .25s ease, color .25s ease;
}
.irigProgEnableToggle:not(.isOn) .irigProgEnableText{
  right:7px;
  left:auto;
  color:#94a3b8;
}
.irigProgEnableToggle.isOn .irigProgEnableText{
  left:8px;
  right:auto;
  color:#fff;
}
.irigTimerStart{
  align-self:center;
  grid-row:1;
  flex:0 0 auto;
  min-width:clamp(72px, 18vw, 88px);
  padding:8px 10px;
  font-size:clamp(13px, 3.2vw, 15px);
  font-weight:700;
  white-space:nowrap;
}
.irigTimerStart.isOn{
  background:linear-gradient(180deg, #0891b2, #0e7490);
  border-color:rgba(6,182,212,.55);
  color:#ecfeff;
}
.irigTimerStart.isOn:hover{ filter:brightness(1.08); }
.irigTimerStart.isPending{
  opacity:.88;
  cursor:wait;
}
.irigTimerStart:disabled{
  opacity:.75;
  cursor:wait;
}
.irigProgramEditor{ display:flex; flex-direction:column; gap:12px; width:100%; min-width:0; max-width:100%; overscroll-behavior:contain; }
.irigProgRows{ display:flex; flex-direction:column; gap:10px; width:100%; min-width:0; }
.irigProgRow{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  padding:10px 8px;
  border-radius:12px;
  background:rgba(0,0,0,.12);
  border:1px solid rgba(255,255,255,.06);
  overflow-x:hidden;
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.irigProgRow.isDisabled{
  border-color:rgba(148,163,184,.14);
  background:rgba(15,23,42,.14);
}
.irigProgRowTimes{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:5px;
  width:100%;
  min-width:0;
}
.irigProgTimeBlock{
  display:flex;
  flex:1 1 0;
  min-width:0;
  align-items:center;
  gap:4px;
}
.irigProgRowDays{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:4px;
  width:100%;
  min-width:0;
  position:relative;
  z-index:0;
  padding-top:4px;
}
.irigProgRowProgress{
  width:100%;
  min-width:0;
  margin-top:2px;
}
.irigProgRowProgress--na .irigProgRowTrack{
  opacity:.5;
}
.irigTimerRowProgress--wait .irigProgRowTrack{
  opacity:.65;
}
.irigTimerRowProgress--wait .irigProgRowProgressLabel{
  color:var(--muted);
  font-style:italic;
}
.irigProgRowTrack{
  position:relative;
  width:100%;
  min-height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(2,6,23,.55);
  box-sizing:border-box;
}
.irigTimelineTrack{
  background:
    linear-gradient(90deg,
      rgba(255,255,255,.10) 0 1px,
      transparent 1px 25%,
      rgba(255,255,255,.10) 25% calc(25% + 1px),
      transparent calc(25% + 1px) 50%,
      rgba(255,255,255,.10) 50% calc(50% + 1px),
      transparent calc(50% + 1px) 75%,
      rgba(255,255,255,.10) 75% calc(75% + 1px),
      transparent calc(75% + 1px) 100%),
    rgba(2,6,23,.55);
}
.irigTimelineSeg{
  position:absolute;
  top:4px;
  bottom:4px;
  min-width:2px;
  border-radius:999px;
  z-index:1;
  box-shadow:0 0 10px rgba(0,0,0,.35);
}
.irigTimelineSeg--program{ background:linear-gradient(90deg, rgba(34,197,94,.92), rgba(22,163,74,.72)); }
.irigTimelineSeg--timer{ background:linear-gradient(90deg, rgba(6,182,212,.95), rgba(8,145,178,.76)); }
.irigTimelineSeg--manual{ background:linear-gradient(90deg, rgba(251,146,60,.95), rgba(234,88,12,.76)); }
.irigTimelineSeg--unknown{ background:linear-gradient(90deg, rgba(148,163,184,.78), rgba(100,116,139,.62)); }
.irigTimelineTrack--clickable{
  cursor:pointer;
  transition:filter .15s ease, border-color .15s ease;
}
.irigTimelineTrack--clickable:hover,
.irigTimelineTrack--clickable:focus-visible{
  filter:brightness(1.1);
  border-color:rgba(251,191,36,.45);
  outline:none;
}
.irigProgRowFill{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:0;
  max-width:100%;
  background:linear-gradient(90deg, rgba(34,197,94,.5), rgba(34,197,94,.32));
  transition:width .4s ease;
  pointer-events:none;
  z-index:0;
}
.irigProgRowFill--program{
  background:linear-gradient(90deg, rgba(34,197,94,.5), rgba(34,197,94,.32));
}
.irigProgRowFill--timer{
  background:linear-gradient(90deg, rgba(6,182,212,.65), rgba(8,145,178,.45));
}
.irigProgRowTrack--timer{
  border-color:rgba(6,182,212,.35);
}
.irigProgRowTrack--timer.hasProgress .irigProgRowProgressLabel{
  color:#cffafe;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigProgRowProgressLabel{
  position:relative;
  z-index:1;
  padding:3px 8px;
  font-size:clamp(11px, 2.8vw, 13px);
  font-weight:600;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
  box-sizing:border-box;
}
.irigProgRowTrack.hasProgress .irigProgRowProgressLabel{
  color:#d1fae5;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigProgRowProgressList{
  display:flex;
  flex-direction:column;
  gap:4px;
  width:100%;
}
.irigProgAddInterval{
  align-self:flex-start;
  font-size:12px;
  padding:4px 10px;
  margin-top:2px;
}
.irigProgExtraIntervals{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
}
.irigProgExtraInterval{
  padding:8px;
  border-radius:10px;
  border:1px dashed rgba(255,255,255,.12);
  background:rgba(0,0,0,.08);
}
.irigProgExtraHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.irigProgExtraLabel{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}
.irigProgExtraTimes{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.irigTodayModalCard{
  width:min(98vw, 480px) !important;
  max-width:min(98vw, 480px) !important;
}
.irigTodayModalBodyWrap{
  padding:12px 14px !important;
}
.irigTodayModalBody{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.irigTodayEmpty,
.irigTodayEspDayWarn,
.irigTodayTotal{
  margin:0;
  font-size:13px;
  color:var(--muted);
}
.irigTodayEspDayWarn{
  color:#fbbf24;
  text-align:center;
}
.irigTodayRow{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.irigTodayRowHead{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}
.irigTodayRowP{
  flex:0 0 auto;
  font-weight:800;
  color:#86efac;
  font-size:13px;
}
.irigTodayRowTime{
  font-size:13px;
  color:#e2e8f0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.irigTodayTrack{
  position:relative;
  min-height:36px;
  border-radius:8px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(2,6,23,.55);
}
.irigTodayOverview{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(2,6,23,.20);
}
.irigVChart{
  --irig-vchart-hour:18px;
}
.irigVChartPlot{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.irigVChartChartRow{
  display:grid;
  grid-template-columns:48px minmax(0, 1fr);
  grid-template-rows:auto 1fr;
  gap:4px 6px;
  align-items:stretch;
}
.irigVChartXHead{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  text-align:center;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  min-height:11px;
}
.irigVChartYAxis{
  grid-column:1;
  grid-row:2;
  position:relative;
  height:calc(24 * var(--irig-vchart-hour));
  color:var(--muted);
  font-size:9px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  line-height:1;
}
.irigVChartHourLabel{
  position:absolute;
  right:0;
  transform:translateY(-50%);
  white-space:nowrap;
}
.irigVChartGrid{
  grid-column:2;
  grid-row:2;
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  height:calc(24 * var(--irig-vchart-hour));
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  overflow:hidden;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.08) 0 1px,
      transparent 1px calc(100% / 24)
    ),
    rgba(2,6,23,.35);
}
.irigVChartOffCol{
  background:rgba(0,0,0,.08);
}
.irigVChartOnCol{
  position:relative;
  border-left:1px dashed rgba(255,255,255,.14);
  background:rgba(34,197,94,.05);
}
.irigVChartSeg{
  position:absolute;
  left:10%;
  right:10%;
  min-height:3px;
  border-radius:5px;
  box-shadow:0 0 8px rgba(0,0,0,.35);
}
.irigVChartSeg--program{ background:linear-gradient(180deg, rgba(34,197,94,.95), rgba(22,163,74,.78)); }
.irigVChartSeg--timer{ background:linear-gradient(180deg, rgba(6,182,212,.98), rgba(8,145,178,.8)); }
.irigVChartSeg--manual{ background:linear-gradient(180deg, rgba(251,146,60,.98), rgba(234,88,12,.8)); }
.irigVChartSeg--unknown{ background:linear-gradient(180deg, rgba(148,163,184,.85), rgba(100,116,139,.68)); }
.irigVChartTotal{
  text-align:center;
  font-size:clamp(14px, 3.8vw, 18px);
  font-weight:800;
  color:#fffbeb;
  font-variant-numeric:tabular-nums;
}
.irigClockWrap{
  display:flex;
  justify-content:center;
  padding:4px 0 2px;
}
.irigClockWrap--tappable{
  cursor:pointer;
  border-radius:12px;
  outline:none;
}
.irigClockWrap--tappable:focus-visible{
  box-shadow:0 0 0 2px rgba(34,211,238,.55);
}
.irigClockTapHint{
  margin:0;
  text-align:center;
  font-size:clamp(11px, 2.8vw, 12px);
  color:var(--muted);
}
.irigClockZoomToggle{
  display:block;
  width:100%;
  margin:0;
  padding:8px 10px;
  font-size:clamp(13px, 3.4vw, 15px);
  font-weight:700;
  text-align:center;
  border-radius:10px;
  background:rgba(15,23,42,.55);
}
.irigClockSvg{
  width:min(100%, 280px);
  height:auto;
  display:block;
  pointer-events:none;
}
.irigClockWrap--tappable .irigClockSvg{
  pointer-events:auto;
}
.irigClockTrack{
  fill:rgba(2,6,23,.38);
  stroke:rgba(255,255,255,.1);
  stroke-width:.6;
}
.irigClockSeg{
  stroke:rgba(0,0,0,.25);
  stroke-width:.4;
  pointer-events:all;
  cursor:pointer;
}
.irigClockSeg:hover{
  stroke:rgba(255,255,255,.45);
  stroke-width:.55;
}
.irigClockSeg--program{ fill:rgba(34,197,94,.92); }
.irigClockSeg--timer{ fill:rgba(6,182,212,.94); }
.irigClockSeg--manual{ fill:rgba(251,146,60,.94); }
.irigClockSeg--unknown{ fill:rgba(148,163,184,.82); }
.irigClockTick{
  stroke:rgba(255,255,255,.22);
  stroke-width:.55;
  pointer-events:none;
}
.irigClockTick--major{
  stroke:rgba(255,255,255,.38);
  stroke-width:.75;
}
.irigClockTick--half{
  stroke:rgba(255,255,255,.14);
  stroke-width:.45;
}
.irigClockHourLabel{
  fill:var(--muted);
  font-size:8px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  pointer-events:none;
}
.irigClockHourLabel--pm{
  font-size:6.5px;
}
.irigClockPeriod{
  fill:var(--muted);
  font-size:7px;
  font-weight:800;
  letter-spacing:.08em;
  pointer-events:none;
}
.irigClockCenter{
  fill:#fffbeb;
  font-size:clamp(10px, 2.8vw, 13px);
  font-weight:800;
  font-variant-numeric:tabular-nums;
  pointer-events:none;
}
.irigClockZoom{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}
.irigClockZoomHead{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 8px;
}
.irigClockZoomBack{
  font-size:12px;
  padding:4px 8px;
}
.irigClockZoomTitle{
  flex:1 1 auto;
  font-size:clamp(13px, 3.4vw, 15px);
  font-variant-numeric:tabular-nums;
  color:#fffbeb;
}
.irigClockZoomSpans{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.irigClockZoomSpanBtn{
  font-size:11px;
  padding:3px 7px;
  min-width:2.2em;
}
.irigClockZoomSpanBtn.isOn{
  color:#022c22;
  background:#67e8f9;
  border-color:transparent;
}
.irigClockZoomShift{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.irigClockZoomTapAt{
  font-size:12px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.irigClockZoomTrackWrap{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.irigClockZoomTrack{
  position:relative;
  height:44px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(2,6,23,.55);
  overflow:hidden;
}
.irigClockZoomSeg{
  position:absolute;
  top:6px;
  bottom:6px;
  border-radius:6px;
  box-sizing:border-box;
  cursor:pointer;
}
.irigClockZoomSeg.isFocus,
.irigClockZoomEvent.isFocus{
  outline:2px solid #fde68a;
  outline-offset:1px;
  z-index:2;
}
.irigClockZoomSeg.irigTimelineSeg--program{ background:rgba(34,197,94,.92); }
.irigClockZoomSeg.irigTimelineSeg--timer{ background:rgba(6,182,212,.94); }
.irigClockZoomSeg.irigTimelineSeg--manual{ background:rgba(251,146,60,.94); }
.irigClockZoomSeg.irigTimelineSeg--unknown{ background:rgba(148,163,184,.82); }
.irigClockZoomMarker{
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  margin-left:-1px;
  background:rgba(253,224,71,.9);
  box-shadow:0 0 6px rgba(253,224,71,.5);
  pointer-events:none;
  z-index:3;
}
.irigClockZoomAxis{
  position:relative;
  height:16px;
  margin:0 2px;
}
.irigClockZoomTick{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  font-size:9px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.irigClockZoomTick::before{
  content:"";
  display:block;
  width:1px;
  height:4px;
  margin:0 auto 1px;
  background:rgba(255,255,255,.25);
}
.irigClockZoomStats{
  margin:0;
  font-size:clamp(11px, 2.8vw, 12px);
  color:var(--muted);
}
.irigClockZoomList{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:min(42vh, 280px);
  overflow:auto;
  padding-right:2px;
}
.irigClockZoomEmpty{
  margin:0;
  padding:10px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  border-radius:10px;
  border:1px dashed rgba(255,255,255,.12);
}
.irigClockZoomEvent{
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-areas:
    "kind time dur"
    "note note note";
  gap:2px 10px;
  align-items:baseline;
  width:100%;
  text-align:left;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(2,6,23,.45);
  color:inherit;
  cursor:pointer;
  font:inherit;
}
.irigClockZoomEventKind{
  grid-area:kind;
  font-size:12px;
  font-weight:700;
}
.irigClockZoomEventTime{
  grid-area:time;
  font-size:13px;
  font-variant-numeric:tabular-nums;
  font-weight:600;
}
.irigClockZoomEventDur{
  grid-area:dur;
  font-size:12px;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
}
.irigClockZoomEventNote{
  grid-area:note;
  font-size:11px;
  color:#fbbf24;
}
.irigClockZoomEvent--program .irigClockZoomEventKind{ color:#86efac; }
.irigClockZoomEvent--timer .irigClockZoomEventKind{ color:#67e8f9; }
.irigClockZoomEvent--manual .irigClockZoomEventKind{ color:#fdba74; }
.irigClockZoomEvent--unknown .irigClockZoomEventKind{ color:#cbd5e1; }
.irigTodayTrack--overview{
  min-height:44px;
  border-color:rgba(251,191,36,.35);
}
.irigTodayTrack--overview .irigTodayLabel{
  font-size:clamp(16px, 4vw, 22px);
  color:#fffbeb;
}
.irigTimelineAxis{
  display:flex;
  justify-content:space-between;
  gap:6px;
  padding:0 2px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.irigTimelineLegend{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}
.irigTimelineLegend span{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.irigTimelineLegendDot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.irigTimelineLegendDot--program{ background:#22c55e; }
.irigTimelineLegendDot--timer{ background:#06b6d4; }
.irigTimelineLegendDot--manual{ background:#fb923c; }
.irigTimelineLegendDot--unknown{ background:#94a3b8; }
.irigTodayFill{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:0;
  max-width:100%;
  background:linear-gradient(90deg, rgba(34,197,94,.5), rgba(34,197,94,.32));
  transition:width .4s ease;
  pointer-events:none;
}
.irigTodayLabel{
  position:relative;
  z-index:1;
  padding:4px 10px;
  font-size:clamp(14px, 3.8vw, 20px);
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  line-height:1.15;
}
.irigTodayTrack.hasProgress .irigTodayLabel{
  color:#d1fae5;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigTodayRow--program .irigTodayRowP{ color:#86efac; }
.irigTodayTrack--program{ border-color:rgba(34,197,94,.35); }
.irigTodayFill--program{
  background:linear-gradient(90deg, rgba(34,197,94,.5), rgba(34,197,94,.32));
}
.irigTodayTrack--program.hasProgress .irigTodayLabel{
  color:#d1fae5;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigTodayRow--intr .irigTodayLabel{ color:#fbbf24; }
.irigTodayRow--intr .irigTodayRowTime::after{ content:" · întrerupt"; color:#f59e0b; font-size:.9em; }
.irigTodayRow--timer.irigTodayRow--intr .irigTodayRowTime::after{ content:none; }
.irigTodayRow--timer .irigTodayRowP{ color:#67e8f9; }
.irigTodayTrack--timer{ border-color:rgba(6,182,212,.35); }
.irigTodayFill--timer{
  background:linear-gradient(90deg, rgba(6,182,212,.65), rgba(8,145,178,.45));
}
.irigTodayTrack--timer.hasProgress .irigTodayLabel{
  color:#cffafe;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigTodayRow--manual .irigTodayRowP{ color:#fdba74; }
.irigTodayTrack--manual{ border-color:rgba(251,146,60,.35); }
.irigTodayFill--manual{
  background:linear-gradient(90deg, rgba(251,146,60,.5), rgba(234,88,12,.32));
}
.irigTodayTrack--manual.hasProgress .irigTodayLabel{
  color:#ffedd5;
  text-shadow:0 0 4px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.irigTodayModalFoot{
  justify-content:flex-end;
}
.irigProgRowNum{
  flex:0 0 auto;
  width:1.2em;
  font-size:clamp(14px, 3.5vw, 18px);
  font-weight:700;
  color:var(--muted);
  text-align:center;
  line-height:1;
  user-select:none;
}
.irigProgTime{
  flex:1 1 0;
  min-width:2.5em;
  width:auto;
  max-width:none;
  min-height:clamp(52px, 14vw, 64px);
  padding:8px 6px;
  text-align:center;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(15,23,42,.85);
  color:var(--text);
  font-size:clamp(22px, 6vw, 30px);
  font-weight:600;
  font-variant-numeric:tabular-nums;
  box-sizing:border-box;
  position:relative;
  z-index:2;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  -webkit-touch-callout:none;
  user-select:none;
  -webkit-user-select:none;
  cursor:text;
}
@media (pointer: coarse){
  .irigProgTime:focus{
    caret-color:transparent;
  }
  .irigProgTime:focus::placeholder{
    color:transparent;
  }
}
.irigProgTime:focus,
.irigProgTime--active{
  outline:none;
  border-color:var(--primary, #16a34a);
  box-shadow:0 0 0 3px rgba(22,163,74,.35);
}
.irigTimerTimeBlock .irigProgPhase{
  pointer-events:none;
  padding:0 4px;
}
.irigTimerTimeBlock .irigProgTime{
  min-width:2.65em;
}
.irigProgTime--invalid{
  border-color:rgba(245,158,11,.85);
  box-shadow:0 0 0 2px rgba(245,158,11,.25);
}
.irigProgTime--invalid::placeholder{
  color:rgba(245,158,11,.95);
  font-weight:600;
}
/* .f input { width:100% } — override doar în editor program */
.f .irigProgramEditor .irigProgTime{
  width:auto !important;
  min-width:2.5em !important;
  max-width:none !important;
  flex:1 1 0 !important;
  min-height:clamp(52px, 14vw, 64px) !important;
  padding:8px 6px !important;
  font-size:clamp(22px, 6vw, 30px) !important;
  font-variant-numeric:tabular-nums !important;
}
/* Modal: ON/OFF pe 2 rânduri (laptop, telefon pe lat — nu doar viewport ≤480px) */
.irigProgramModalCard .irigProgRowTimes{
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-rows:auto auto;
  gap:6px 4px;
  align-items:center;
}
.irigProgramModalCard .irigProgRow .irigProgRowNum{
  grid-row:1 / span 2;
  grid-column:1;
  align-self:center;
}
.irigProgramModalCard .irigProgTimeBlock--on{
  grid-row:1;
  grid-column:2;
}
.irigProgramModalCard .irigProgTimeBlock--off{
  grid-row:2;
  grid-column:2;
}
.irigProgramModalCard .irigProgRow .irigProgEnableToggle{
  grid-row:1;
  grid-column:3;
  align-self:center;
  justify-self:center;
}
.irigProgramModalCard .irigProgRow .irigProgRemove{
  grid-row:2;
  grid-column:3;
  align-self:center;
  justify-self:center;
}
.irigProgramModalCard .irigTimerRowTimes{
  display:grid;
  grid-template-columns:auto 1fr auto auto;
  grid-template-rows:auto auto;
  gap:6px 4px;
  align-items:center;
}
.irigProgramModalCard .irigTimerRow .irigProgRowNum{
  grid-row:1 / span 2;
  grid-column:1;
  align-self:center;
}
.irigProgramModalCard .irigTimerTimeBlock--delay{
  grid-row:1;
  grid-column:2;
}
.irigProgramModalCard .irigTimerTimeBlock--dur{
  grid-row:2;
  grid-column:2;
}
.irigProgramModalCard .irigTimerRowSide{
  grid-row:1 / span 2;
  grid-column:3;
  align-self:stretch;
}
.irigProgramModalCard .irigTimerRow .irigProgRemove{
  grid-row:1 / span 2;
  grid-column:4;
  align-self:center;
}
.irigProgramModalCard .irigProgTime,
.f .irigProgramEditor .irigProgTime{
  font-size:clamp(17px, 4.5vw, 22px) !important;
  min-height:clamp(44px, 12vw, 52px) !important;
  min-width:2.4em !important;
  flex:1 1 0 !important;
}
.irigProgramModalCard .irigTimerTimeBlock .irigProgTime{
  min-width:2.55em !important;
}
.irigProgTime::-webkit-outer-spin-button,
.irigProgTime::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.irigProgDayBtn{
  flex:1 1 0;
  min-width:0;
  width:auto;
  max-width:52px;
  aspect-ratio:1;
  height:auto;
  max-height:48px;
  padding:0;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:clamp(13px, 3.2vw, 18px);
  font-weight:700;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  box-sizing:border-box;
}
.irigProgDayBtn.isOn{
  background:var(--primary, #16a34a);
  border-color:rgba(255,255,255,.35);
  color:#fff;
}
.irigProgDayBtn:hover{ filter:brightness(1.12); }
.irigProgRemove{
  flex:0 0 auto;
  width:clamp(40px, 10vw, 48px);
  height:clamp(40px, 10vw, 48px);
  min-width:clamp(40px, 10vw, 48px);
  padding:0;
  font-size:clamp(22px, 5.5vw, 28px);
  line-height:1;
}
.irigProgPhase{
  flex:0 0 auto;
  font-size:clamp(14px, 3.5vw, 18px);
  font-weight:700;
  color:var(--muted);
  letter-spacing:.02em;
  user-select:none;
  padding:0 2px;
}
.irigProgRowDays .irigLocalToggle{
  flex:0 0 auto;
  margin-left:auto;
}
.irigProgHint{
  margin:0 0 10px;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}
.irigProgAdd{
  align-self:flex-start;
  min-width:56px;
  height:clamp(48px, 12vw, 64px);
  padding:0 16px;
  font-size:clamp(24px, 6vw, 32px);
  font-weight:700;
  line-height:1;
}

/* 4 zone: grid pe un rând */
.irigBody--4{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:6px;
  align-items:stretch;
  width:100%;
  min-width:0;
}
.pkg--irig:has(.irigBody--4){
  width:calc(100% - var(--pkg-left-px, 0px)) !important;
  min-width:336px;
  max-width:100%;
  box-sizing:border-box;
}
.pkg--irig:has(.irigBody--4) .pkgBody{
  width:100%;
  max-width:100%;
  min-width:0;
}
/* 1 zonă: o singură coloană; lățimea cardului vine din W/H grilă (setări), conținutul umple cardul */
.irigBody--1{
  display:flex;
  flex-direction:column;
  width:100%;
  max-width:100%;
  gap:2px;
  align-items:stretch;
  min-width:0;
}
.irigBody--4 .irigZone,
.irigBody--1 .irigZone{
  padding:2px 1px 4px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:2px;
  height:100%;
  min-height:0;
  width:100%;
  min-width:0;
  max-width:100%;
  /* un singur strat vizual: butonul .irigBtnMain (altfel zona gri pare „umbră” în spate) */
  background:transparent;
  border:none;
  box-shadow:none;
  overflow:hidden;
}
.irigBody--4 .irigBtnMain,
.irigBody--1 .irigBtnMain{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  padding:6px 4px;
  font-size:19px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-sizing:border-box;
}
.irigBody--4 .irigProgram,
.irigBody--1 .irigProgram{
  flex:0 0 auto;
  height:28px;
  max-height:28px;
  min-height:0;
  font-size:12px;
  margin-top:0;
  padding:0 3px;
  border-top:1px solid rgba(255,255,255,.06);
}
.irigBody--4 .irigProgram{ font-size:10px; }
.irigBody--4 .irigProgramSummary{ font-size:10px; padding:3px 4px; }
/* Card mic: umbră mai scurtă decât .pkg generic (0 10px 20px), fără efect de „straturi” */
.pkg.pkg--irig:has(.irigBody--1){
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.pkg.pkg--irig:has(.irigBody--1) .pkgBody{
  width: 100%;
  max-width: 100%;
}

/* Mobile: butoane irigație (1 sau 4 zone) – aceleași dimensiuni compacte */
@media (max-width: 600px) {
  .pkg--irig:has(.irigBody--4) .pkgBody,
  .pkg--irig:has(.irigBody--1) .pkgBody{ padding:2px 0 5px !important; margin-top:0 !important; }
  .irigBody--4,
  .irigBody--1{ gap:2px; }
  .irigBody--4 .irigZone,
  .irigBody--1 .irigZone{ padding:2px 0 4px; gap:2px; }
  .irigBody--4 .irigBtnMain,
  .irigBody--1 .irigBtnMain{
    flex:1 1 auto;
    min-height:0;
    height:auto;
    padding:5px 2px;
    font-size:clamp(14px, 3.4vw, 17px);
  }
  .irigBody--4 .irigZone,
  .irigBody--1 .irigZone{ min-height:0; }
  .irigBody--4 .irigProgram,
  .irigBody--1 .irigProgram{
    flex:0 0 auto;
    height:24px;
    max-height:24px;
    font-size:9px;
    padding:0 2px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .irigProgramSummary{ font-size:9px; padding:3px 4px; }
}
@media (max-width: 400px) {
  .irigBody--4 .irigBtnMain,
  .irigBody--1 .irigBtnMain{ min-height:34px; padding:5px 0; }
}
.pkgBtns{display:flex; gap:10px}
.pkgBtns button{flex:1}

.drawer{
  position:fixed; top:0; right:0; height:100%; width:min(420px, 92vw);
  background:var(--panel-strong);
  border-left:1px solid var(--line);
  z-index:910;
  display:flex; flex-direction:column;
}
@media (max-width: 640px){
  .drawer{
    width:100vw;
    max-width:100vw;
    background:var(--panel-strong);
  }
}
.drawerHead{display:flex; justify-content:space-between; align-items:center; padding:14px; border-bottom:1px solid var(--line)}
.drawerTitle{font-weight:800; font-size:18px}
.drawerSub{color:var(--muted); font-size:12px}
.drawerSub.buildInfo{opacity:.75}
.drawerBody{padding:14px; overflow-y:auto; overflow-x:hidden; min-width:0}
.sectionTitle{font-weight:700; margin-bottom:6px}

/* Collapsible sections in Settings drawer */
.sectionToggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
}
.sectionToggle .chev{opacity:.85; transition:transform .18s ease}
.sectionToggle.isOpen .chev{transform:rotate(180deg)}
.sectionBody{margin-top:10px}

.terminalPanel{
  margin-top:14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface-muted);
}
#terminalSectionBody .terminalPanel{ margin-top:0; }
.terminalPanelHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.terminalPanelHead .sectionTitle{ margin-bottom:2px; }
.terminalHeadActions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.terminalEditOnly{ display:none !important; }
body.editMode .terminalHeadActions.terminalEditOnly{ display:flex !important; }
body.editMode .terminalEditor.terminalEditOnly{ display:block !important; }
body.editMode .terminalEditor.terminalEditOnly.hidden{ display:none !important; }
.terminalManage{
  padding:10px;
  border:1px solid rgba(34,197,94,.16);
  border-radius:14px;
  background:rgba(2,6,23,.24);
}
.terminalActiveInfo{
  margin-top:8px;
  color:#a7f3d0;
  font-size:12px;
  line-height:1.35;
}
.terminalActiveInfo.isClockWarn,
.irigProgSourceHint.isClockWarn{
  color:#fca5a5;
}
.terminalEditor{
  margin-top:10px;
  padding:10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(15,23,42,.55);
}
.terminalEditorTitle{
  font-weight:700;
  margin-bottom:10px;
}
.terminalEditorGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.terminalEditorGrid .f:first-child{ grid-column:1 / -1; }
.terminalEditorActions,
.terminalTools,
.terminalCommandRow{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.terminalEditorActions{ justify-content:flex-end; flex-wrap:wrap; }
.terminalTools button{ flex:1; }
.terminalPanel button:disabled,
.terminalPanel input:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.terminalOutput{
  min-height:340px;
  max-height:560px;
  overflow:auto;
  margin:10px 0 0;
  padding:14px;
  border:1px solid rgba(34,197,94,.22);
  border-radius:8px;
  background:#020617;
  color:#d1fae5;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.35);
  font:13px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space:pre-wrap;
  word-break:break-word;
}
.terminalCommandRow input{ flex:1; min-width:0; }
.terminalCommandRow button{ min-width:92px; }
@media (max-width:520px){
  .terminalPanelHead,
  .terminalCommandRow{ flex-direction:column; }
  .terminalEditorGrid{ grid-template-columns:1fr; }
  .terminalHeadActions{ width:100%; }
  .terminalHeadActions button{ flex:1; }
  .terminalOutput{
    min-height:300px;
    max-height:48vh;
  }
  .terminalCommandRow button{ width:100%; }
}

/* Package settings modal: make collapsible headers clearly clickable */
#pkgModal .sectionToggle{
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(16,185,129,.12);
  cursor:pointer;
  margin-top:10px;
}
#pkgModal .sectionToggle.isOpen{
  background:rgba(16,185,129,.18);
}
/* Acordeon secundar: dreapta, lățime după text (max ~jumătate din rând) */
#pkgModal .sectionToggle.sectionToggle--secondary{
  background:rgba(148, 163, 184, .14);
  border-color:rgba(148, 163, 184, .38);
  font-weight:600;
  font-size:12px;
  line-height:1.25;
  padding:7px 10px;
  gap:6px;
  margin-top:8px;
  margin-left:auto;
  border-radius:11px;
  width:fit-content;
  max-width:50%;
  box-sizing:border-box;
  text-align:left;
}
#pkgModal .sectionToggle.sectionToggle--secondary.isOpen{
  background:rgba(96, 165, 250, .2);
  border-color:rgba(96, 165, 250, .45);
}
#pkgModal .sectionBody{margin-top:10px;}
hr{border:none; border-top:1px solid var(--line); margin:14px 0}

.switchRow{display:flex; justify-content:space-between; align-items:center; gap:10px}
.drawerBody > .switchRow{margin-bottom:16px}
.switchRow input{width:auto}

.backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  z-index:900;
}

.devList{margin-top:10px; display:grid; gap:8px}
.historyPollDevices{
  margin-top:4px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(2,6,23,.18);
}
.historyPollDevicesHead,
.historyPollDeviceRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.historyPollDevicesHead > span{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.historyPollDevicesHead button{padding:6px 8px; font-size:12px}
.historyPollDeviceList{display:grid; gap:7px; margin-top:9px}
.historyPollDeviceRow{
  padding:8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(15,23,42,.28);
}
.historyPollDeviceMeta{min-width:0; display:grid; gap:2px}
.historyPollDeviceMeta strong{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.historyPollDeviceMeta small{color:var(--muted)}
.historyPollDeviceRow button{flex:0 0 auto; min-width:82px; padding:7px 9px}
.historyPollDeviceEmpty{margin:0; color:var(--muted); font-size:12px}
.devItem{
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(2,6,23,.25);
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.devItem small{color:var(--muted)}
.devItem button{flex:0 0 auto; padding:10px 10px}
.devItem .devMain,
.devItem .devDetails,
.devOtaPanel,
.devHardwarePanel{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.devItem .devDetails{overflow:hidden}
.devHwTableWrap{max-width:100%; overflow:auto}
.devOtaStatus{
  display:block;
  width:100%;
  min-height:18px;
  overflow-wrap:anywhere;
}
.devOtaStatus.isOk{color:#86efac}
.devOtaStatus.isError{color:#fca5a5}

@media (max-width:640px){
  .drawerBody{padding:10px}
  .devItem{padding:8px}
  .devItem .devMain{align-items:flex-start !important}
  .devItem .devMain > div:first-child{min-width:0; overflow-wrap:anywhere}
  .devItem .formGrid{grid-template-columns:1fr}
  .devOtaPanel input[type="file"]{max-width:100%; padding:9px}
  .devOtaPanel button{flex:1 1 140px}

  .devHwTable{
    display:block;
    min-width:0 !important;
    width:100% !important;
  }
  .devHwTable thead{display:none}
  .devHwTable tbody{display:grid; gap:10px}
  .devHwTable tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px 10px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(255,255,255,.025);
  }
  .devHwTable tr.hidden{display:none}
  .devHwTable td{
    display:grid;
    gap:4px;
    min-width:0;
    padding:0;
  }
  .devHwTable td:first-child{grid-column:1 / -1}
  .devHwTable td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
  }
  .devHwTable td:first-child::before{display:none}
  .devHwTable select,
  .devHwTable input[type="number"]{
    width:100% !important;
    max-width:100%;
    min-width:0;
  }
}


/* Vent package widgets */
.ventGrid{display:grid; grid-template-columns:110px 1fr; gap:12px; align-items:stretch}
@media (max-width:520px){ .ventGrid{grid-template-columns:90px 1fr;} }

.levelWrap{
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(2,6,23,.25);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:space-between;
}
.levelBar{
  position:relative;
  width:28px;
  flex:1;
  min-height:140px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  overflow:hidden;
}
.levelFill{
  position:absolute;
  left:0; right:0; bottom:0;
  height:0%;
  background:rgba(34,197,94,.45);
}
.levelVal{font-weight:800}
.tempBox{
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(2,6,23,.25);
  padding:10px;
  display:grid;
  gap:8px;
}
.tempRow{display:flex; justify-content:space-between; gap:10px; align-items:baseline}
.tempRow b{font-size:18px}
.small{color:var(--muted); font-size:12px}
.cfgRow{display:flex; gap:10px}
.cfgRow input{flex:1}
.pkgCfgBtn{
  width:28px; height:28px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  display:grid; place-items:center;
  padding:0;
  font-size:14px;
}
.pkgCfgBtn:hover{filter:brightness(1.15)}


/* ---- VENT v2 layout (like ref) ---- */
.ventCard{display:flex; flex-direction:column; gap:12px; height:100%;}
.ventHdr{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(2,6,23,.25);
}
.ventPill{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  font-size:12px;
  color:var(--text);
  white-space:nowrap;
}
.ventMain{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:14px;
  align-items:stretch;
}
@media (max-width:520px){
  .ventMain{grid-template-columns:120px 1fr;}
}

.distBox{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(2,6,23,.25);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}
.distScale{
  width:100%;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
}
.distBarWrap{
  position:relative;
  width:44px;
  flex:1;
  min-height:180px;
  border-radius:18px;
  border:1px solid var(--level-outline, var(--line));
  /* glow-ul conturului e controlat separat prin --outline-glow */
  box-shadow: 0 0 var(--outline-glow, 0px) 0 var(--level-outline, rgba(255,255,255,.10));
  background:rgba(255,255,255,.06);
  overflow:hidden;
}
.distDots{
  position:absolute; inset:10px;
  border-radius:14px;
  background-image: radial-gradient(var(--dots-rgba, rgba(255,255,255,.10)) var(--dots-size, 1.2px), transparent calc(var(--dots-size, 1.2px) + 0.8px));
  background-size: 12px 12px;
  pointer-events:none;
  /* glow-ul punctelor (intensitate) */
  filter: drop-shadow(0 0 var(--dots-glow, 0px) var(--dots-rgba, rgba(255,255,255,.15)));
}
.distFill{
  position:absolute; left:0; right:0; bottom:0;
  height:0%;
  background:rgba(34,197,94,.28);
}
.distVal{
  font-weight:800;
  font-size:18px;
}

.tempPanel{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(2,6,23,.25);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.tempBig{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
}
.tempBig .label{color:var(--muted); font-size:12px; letter-spacing:.2px}
.tempBig .value{font-size:28px; font-weight:900}
.limitsRow{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.limitsRow .lim{
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.06);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.lim small{color:var(--muted)}
.lim input{padding:10px; border-radius:12px;}

.ventBtns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:auto;
}
.ventBtns button{
  padding:14px 12px;
  border-radius:18px;
  font-weight:800;
  letter-spacing:.4px;
}


/* ---- VENT v3 (limits on bar + buttons under bar) ---- */
.distBarWrap{ position:relative; }
.limOverlay{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  width:84px;
  display:flex;
  justify-content:center;
  z-index:3;
  pointer-events:auto;
}
.limOverlay.top{ top:8px; }
.limOverlay.bottom{ bottom:8px; }

.limOverlay input{
  width:84px;
  text-align: var(--lim-align, center);
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--lim-border, var(--line));
  background: var(--lim-bg, rgba(17,24,39,.55));
  color: var(--lim-text, var(--text));
  font-weight: var(--lim-font-weight, 800);
  font-size: var(--lim-font-size, 13px);
}

.limOverlay input[readonly]{
  cursor: default;
}

/* Run mode: ± lângă limită (fără tastatură) */
.limOverlay.limLimRow{
  width: auto;
  min-width: 118px;
  max-width: min(148px, calc(100% + 56px));
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}
.limOverlay.limLimRow input{
  width: 48px;
  min-width: 0;
  flex: 0 0 auto;
  padding: 6px 4px;
  font-size: 12px;
}
.limStepBtn{
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(15,23,42,.88);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.limStepBtn:hover{ filter: brightness(1.12); }
.limStepBtn:active{ transform: scale(0.96); }

/* VENT: pe bară doar pastilă cu valoarea; ± și câmp mare în modal */
.limOverlay.limPillOnly{
  width: auto;
  max-width: min(64px, calc(100% - 4px));
  display: flex;
  justify-content: center;
}
.limPillBtn{
  width: 100%;
  max-width: 56px;
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--lim-border, var(--line));
  background: var(--lim-bg, rgba(17,24,39,.55));
  color: var(--lim-text, var(--text));
  font-weight: var(--lim-font-weight, 800);
  font-size: var(--lim-font-size, 13px);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.limPillBtn:hover{ filter: brightness(1.08); }
.limPillBtn:active{ transform: scale(0.97); }

.pkg--vent button:disabled{
  opacity: 0.45;
  filter: grayscale(20%);
  cursor: not-allowed;
}

.distBtns{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
}
.distBtns button{
  width:100%;
  padding:14px 12px;
  border-radius:18px;
  font-weight:900;
  letter-spacing:.5px;
}
.tempPanel{ min-height:260px; }


/* ---- Modal layer ---- */
.modal{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.55);
  z-index:1000;
  padding:18px;
}
.modalCard{
  width:min(720px, 100%);
  max-height: min(84vh, 900px);
  overflow:hidden;
  border-radius:22px;
  border:1px solid var(--line);
  background:var(--panel-strong);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}
.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px 14px;
  border-bottom:1px solid var(--line);
}
.modalKicker{ color:var(--muted); font-size:12px; }
.modalTitle{ font-size:18px; font-weight:900; }
.modalBody{
  padding:14px;
  overflow:auto;
  max-height: calc(84vh - 140px);
}
.modalBody.gsweb-touch-lock{
  overflow:hidden;
  overscroll-behavior:none;
}
.modalFoot{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px;
  border-top:1px solid var(--line);
}
.pinRelFieldRow{
  display:flex;
  gap:8px;
  align-items:stretch;
}
.pinRelFieldRow input{
  flex:1;
  min-width:0;
}
.pinRelFieldRow .pinRelOpenBtn{
  flex:0 0 auto;
  white-space:nowrap;
}
.pinRelModalCard{
  width:min(640px, 100%);
}
.pinRelRows{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:10px;
}
.pinRelRow{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap:8px;
  align-items:end;
}
.pinRelTimeoutWrap{
  margin-top:12px;
}
@media (max-width:560px){
  .pinRelRow{
    grid-template-columns: 1fr auto;
  }
  .pinRelRow .f:first-child{ grid-column:1 / -1; }
}
.ventLimModalCard{
  width: min(400px, calc(100vw - 28px));
}
.ventLimHint{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 16px;
  text-align: center;
}
.ventLimBigRow{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.ventLimBigStep{
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15,23,42,.92);
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ventLimBigStep:hover{ filter: brightness(1.1); }
.ventLimBigStep:active{ transform: scale(0.96); }
.ventLimBigInput{
  flex: 1 1 auto;
  min-width: 0;
  max-width: 180px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.38);
  color: var(--text);
}
.ghost{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:16px;
  padding:12px 14px;
  font-weight:800;
}
.formGrid{ display:grid; gap:12px; }
.f{ display:grid; gap:6px; }
.f span{ color:var(--muted); font-size:12px; }
.f input, .f select{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
}
.split2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:520px){ .split2{ grid-template-columns:1fr; } }
.hintLine{ color:var(--muted); font-size:12px; margin-top:4px; }

/* range + number row (F52) */
.rangeRow{ display:flex; align-items:center; gap:10px; }
.rangeRow input[type=range]{ flex:1; width:100%; margin:0; padding:0; }
.rangeRow input[type=number]{ width:86px; padding:12px 10px; }
.styleSection input[type=range]{ width:100%; margin:0; padding:0; }

.sectionResetRow{ display:flex; justify-content:flex-end; margin-top:10px; }

/* Resize handles (F52) */
.resizeHandle{ position:absolute; width:14px; height:14px; border-radius:6px; border:1px solid rgba(255,255,255,.30); background:rgba(15,23,42,.92); box-shadow:0 8px 24px rgba(0,0,0,.45); z-index:50; }
.resizeHandle.br{ right:-6px; bottom:-6px; cursor:se-resize; }
body.editMode .widgetBox{ position:relative; }
body.editMode .widgetLevel{ position:relative; }



/* ---- Compact pkg head ---- */
.pkgHead{ padding:10px 12px !important; }
.pkgTitle{ font-size:16px !important; font-weight:800 !important; opacity:.92; }
.badge{ opacity:.7; }
.pkgBody{ padding:10px 12px 12px !important; }

/* ---- VENT v4 compact ---- */
.ventMain{ grid-template-columns: 1fr !important; }
.distBox{ position:relative; padding:10px !important; }
.distBarWrap{ width:56px !important; min-height:220px !important; }
.distVal{ margin-top:8px; font-size:16px !important; opacity:.95; }
.tempPanel{ display:none !important; } /* temp moves into badge */

.tempBadge{
  position:absolute;
  right:10px;
  top:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  border-radius:18px;
  padding:10px 12px;
  min-width:120px;
}
.tempBadge .label{ color:var(--muted); font-size:12px; letter-spacing:.2px; }
.tempBadge .value{ font-size:22px; font-weight:900; margin-top:2px; }


/* ---- VENT v5 single card (no nested panels) ---- */
.distBox{
  border:none !important;
  background:transparent !important;
  padding:0 !important;
  align-items:center !important;
}
.distScale{ display:none !important; } /* min/max only in settings */
.tempBadge{
  position:absolute;
  right:0;
  top:0;
  border:none !important;
  background:transparent !important;
  padding:0 !important;
  min-width:auto !important;
  text-align:right;
  opacity:.95;
}
.tempBadge .label{ font-size:12px; }
.tempBadge .value{ font-size:20px !important; }

.distBarWrap{
  margin-top:28px; /* space for temp */
  width:64px !important;
  min-height:240px !important;
  background:rgba(255,255,255,.10) !important; /* only the bar is "albicios" */
  border:1px solid rgba(255,255,255,.10) !important;
}
.distCenterVal{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-weight: var(--level-val-weight, 900);
  font-size: var(--level-val-size, 20px);
  color:var(--text);
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  pointer-events:none;
  z-index:4;
}
.limOverlay input{
  background:rgba(0,0,0,.28) !important;
}

.distBtns{ margin-top:16px !important; width:220px; }
.distBtns button{ padding:16px 14px !important; }


/* ---- VENT v6 title near temp ---- */
.pkgHead{ background:transparent !important; border:none !important; padding:0 !important; }
.pkgHead .pkgTitle{ display:none !important; }
.pkgHead .badge{ display:none !important; }
.pkgHead .pkgHeadRight{ display:none !important; } /* we'll render actions elsewhere for VENT */

.pkgBody{ position:relative; }

.pkgActions{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  gap:8px;
  z-index:20;
}
.pkgActions .iconbtn{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
}

/* Overlay gear (Edit mode) - sits on the package border, top-right */
.pkgCfgOverlay{
  position:absolute;
  top:-14px;
  right:-14px;
  width:34px;
  height:34px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.22);
  background:rgba(15,23,42,.92);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:60;
  cursor:pointer;
}
.pkgCfgOverlay:hover{ filter:brightness(1.18); }
.pkgCfgOverlay:active{ transform:scale(.98); }


/* Widget gear (Edit mode) - for sub elements inside a package */
.widgetBox{ position:relative; }
.widgetCfgOverlay{
  position:absolute;
  top:-12px;
  right:-12px;
  width:28px;
  height:28px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.22);
  background:rgba(15,23,42,.92);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:70;
  cursor:pointer;
}
.widgetCfgOverlay:hover{ filter:brightness(1.18); }
.widgetCfgOverlay:active{ transform:scale(.98); }

/* Make sure widget wrappers don't change layout */
.widgetBtn{ width:100%; }
.widgetBtn > button{ width:100%; }

.ventHeaderSimple{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  margin-top:8px;
  margin-bottom:8px;
}
.ventHdrSpacer{ width:38px; height:38px; }

.ventHdrActions{
  justify-self:end;
  display:flex;
  gap:8px;
  z-index:30;
}
.ventHdrActions.is-hidden{ visibility:hidden; pointer-events:none; }
.ventHdrActions .iconbtn{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
}

.ventName{
  font-size:16px;
  font-weight:900;
  opacity:.92;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:0 6px;
}
.tempInline{
  text-align:right;
}
.tempInline .label{ color:var(--muted); font-size:12px; letter-spacing:.2px; }
.tempInline .value{ font-size:18px; font-weight:900; margin-top:2px; }

.tempBadge{ display:none !important; } /* not used now */
.distBarWrap{ margin-top:0 !important; }


/* ---- VENT v7: no header box + compact mobile ---- */
.pkg--vent .pkgHead{ display:none !important; }
.pkg--vent .pkgBody{
  padding:12px 14px 14px !important;
  position:relative;
  height:100%;
  min-height:0;
  overflow:hidden;
  box-sizing:border-box;
}
.pkg--vent .ventCard{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.pkg--vent .ventMain{
  flex:1;
  min-height:0;
  overflow:hidden;
}

/* actions floating */
.pkg--vent .pkgActions{
  position:absolute;
  top:10px;
  right:10px;
  display:flex;
  gap:8px;
  z-index:20;
}
.pkg--vent .pkgActions .iconbtn{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
}

/* header (title + gear) */
.pkg--vent .ventHeader{
  margin:6px 0 10px;
}
.pkg--vent .ventName{
  font-size:16px;
  font-weight:900;
  opacity:.92;
}
.pkg--vent .tempInline{ text-align:right; }
.pkg--vent .tempInline .label{ color:var(--muted); font-size:12px; }
.pkg--vent .tempInline .value{ font-size:18px; font-weight:900; }

/* single card look: no extra translucent panels */
.pkg--vent .ventCard{ background:transparent !important; border:none !important; }
.pkg--vent .distBox{ background:transparent !important; border:none !important; padding:0 !important; }

.pkg--vent .distBarWrap{
  margin:0 auto;
  width:64px;
  min-height:250px;
  background:rgba(255,255,255,.10);
  border:1px solid var(--level-outline, rgba(255,255,255,.10));
  border-radius:18px;
  position:relative;
}

.pkg--vent .distCenterVal{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:20px;
  text-shadow:0 2px 10px rgba(0,0,0,.45);
  z-index:4;
  pointer-events:none;
}

.pkg--vent .devLabel{
  margin-top:10px;
  opacity:.65;
  text-align:center;
}

.pkg--vent .distBtns{
  margin:14px auto 0;
  /* keep button block consistent even if the card is wider (avoid 'giant' buttons on large cards) */
  width:min(220px, 100%);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pkg--vent .distBtns button{
  width:100%;
  padding:16px 14px;
  border-radius:18px;
  font-weight:900;
}

/* mobile tighter */
@media (max-width:520px){
  .pkg--vent .pkgBody{ padding:10px 12px 12px !important; }
  .pkg--vent .ventHeader{ margin:4px 0 8px; }
  .pkg--vent .distBarWrap{ min-height:230px; }
  .pkg--vent .distBtns button{ padding:14px 12px; }
}


/* ===== VENT incremental 1-4 ===== */
/* 1) scoate albiciosul de sus (header-ul) doar la VENT */
.pkg--vent .pkgHead{ display:none !important; }

/* card curat: fara panouri translucide in plus */
.pkg--vent{ background: transparent !important; border:1px solid rgba(255,255,255,.06) !important; box-shadow:none !important; }
.pkg--vent .pkgBody{ background: transparent !important; border:none !important; padding:12px 14px 14px !important; }

/* 3) ascunde id/device label (ramane doar in setari) */
.pkg--vent .devLabel{ display:none !important; }

/* 4) apropie graficul de butoane */
.pkg--vent .distBtns{ margin-top:10px !important; }
@media (max-width:520px){
  .pkg--vent .pkgBody{ padding:10px 12px 12px !important; }
  .pkg--vent .distBtns{ margin-top:8px !important; }
}

/* 2) titlu centrat + TEMP/UMID centrat deasupra graficului */
.pkg--vent .ventHeader{ display:grid; justify-content:stretch; margin:2px 0 8px; }
.pkg--vent .ventTopCenter{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.pkg--vent .ventName{ font-size:16px; font-weight:900; text-align:center; opacity:.92; }
.pkg--vent .metricsRow{ display:flex; gap:14px; align-items:flex-end; justify-content:center; }
.pkg--vent .metric{ display:flex; gap:6px; align-items:flex-end; }
.pkg--vent .metric .label{ color:var(--muted); font-size:12px; letter-spacing:.2px; }
.pkg--vent .metric .value{ font-size:16px; font-weight:900; }

/* Build tag is shown in Settings (drawer) only; keep it out of the header UI */
.buildTag{display:none !important; font-size:12px;opacity:.45;font-weight:700;margin-left:6px;}

/* ---- Modal style editor ---- */
.sep{ border:none; border-top:1px solid rgba(255,255,255,.08); margin:14px 0; }
.styleGrid{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin-top:10px; }
@media (max-width:700px){ .styleGrid{ grid-template-columns:1fr; } }
.styleSection{ border:1px solid rgba(255,255,255,.06); border-radius:16px; padding:12px; background:rgba(255,255,255,.03); }
.styleTitle{ font-weight:900; margin-bottom:10px; }
.styleSubTitle{ font-weight:900; opacity:.8; margin:10px 0 6px; font-size:12px; letter-spacing:.2px; }


/* ---- VENT v9: fara TEMP/UMID in card + fara chenar sus ---- */
.pkg--vent .ventCard{ background:transparent !important; border:none !important; box-shadow:none !important; padding:0 !important; }
.pkg--vent .ventHeader{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 0 10px !important;
  padding:0 !important;
  background:transparent !important;
  border:none !important;
  outline:none !important;
}
.pkg--vent .ventName{
  font-size:16px;
  font-weight:900;
  text-align:center;
  opacity:.92;
}

/* ---- Per-package style vars (saved in config_json.style) ---- */
.pkg--vent{
  font-family: var(--font-family, inherit);
  background: rgba(255,255,255,.02);
  border: var(--card-border-w,1px) solid rgba(255,255,255,.06);
  border-color: var(--card-border-c, rgba(255,255,255,.06));
  border-radius: var(--card-radius,22px);
  box-shadow: var(--card-shadow, none);
}
.pkg--vent{
  /* allow "transparent" by opacity=0 */
  background: color-mix(in srgb, var(--card-bg, #000000) calc(var(--card-opacity,0) * 100%), transparent);
}
.pkg--vent .ventName{
  font-family: var(--font-family, inherit);
  font-size: var(--title-size,16px);
  font-weight: var(--title-weight,900);
  color: var(--title-color, var(--text));
  text-align: var(--title-align, center);
}
.pkg--vent .ventHdrActions .iconbtn{
  color: var(--icon-color, var(--text));
  font-size: var(--icon-size,16px);
}
.pkg--vent.icons-left .ventHeader{ grid-template-columns: 38px 1fr 38px; }
.pkg--vent.icons-left .ventHdrActions{ justify-self:start !important; grid-column:1 !important; }
.pkg--vent.icons-left .ventHdrSpacer{ grid-column:3 !important; }
/* optional: show gear on the left (keeps title perfectly centered) */
.pkg--vent.icons-left .ventHdrActions{ justify-self:start; grid-column:1; }
.pkg--vent.icons-left .ventHdrSpacer{ grid-column:3; }

.pkg--vent .distBarWrap{
  background: var(--level-empty, rgba(2,6,23,.35));
}
.pkg--vent .distFill{ background: color-mix(in srgb, var(--level-fill, rgba(34,197,94,.28)) 28%, transparent); }
.pkg--vent .distVal{ color: var(--level-text, var(--text)); }
/* punctele sunt controlate prin intensitate (alpha + glow), nu prin opacity */
.pkg--vent .distDots{ opacity: 1; }

.pkg--vent .distBtns{
  width: min(var(--btn-block-w, 220px), 100%);
  gap: var(--btn-gap, 10px);
}
.pkg--vent .distBtns button{
  padding: var(--btn-pad-y, 16px) var(--btn-pad-x, 14px);
  border-radius: var(--btn-radius, 18px);
  font-size: var(--btn-font, 14px);
}
.pkg--vent .distBtns button[data-btn="close"]{
  background: var(--close-off-bg, rgba(255,255,255,.06));
  border-color: var(--close-border, var(--line));
  color: var(--close-txt, var(--text));
}
.pkg--vent .distBtns button[data-btn="open"]{
  background: var(--open-off-bg, rgba(34,197,94,.18));
  border-color: var(--open-border, var(--line));
  color: var(--open-txt, var(--text));
}
/* ON colors (momentan doar la apasare) */
.pkg--vent .distBtns button[data-btn="close"]:active{ background: var(--close-on-bg, rgba(255,255,255,.12)); }
.pkg--vent .distBtns button[data-btn="open"]:active{ background: var(--open-on-bg, rgba(34,197,94,.28)); }


/* ---- VENT v10: scoate chenarul patrat (border) ---- */
.pkg--vent{
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* select style */
#pkgDeviceSelect{width:100%;}

.modal[aria-hidden="true"]{display:none !important;}
.modal[aria-hidden="false"]{display:block !important;}

/* Inline package form in settings drawer */
.inlineForm{
  padding:10px 10px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  margin:10px 0 12px;
}
.inlineForm .row{ display:flex; gap:10px; margin-top:8px; }
.inlineForm .row:first-child{ margin-top:0; }
.inlineForm .row.right{ justify-content:flex-end; }
.inlineForm select, .inlineForm input{ flex:1; }

#pkgCreateModal{ display:none !important; }


/* === INLINE_PKG_UI_v1: form mai aerisit in Setari (Pachete) === */
#settingsDrawer .inlineForm{
  padding:12px;
  margin:10px 0 12px;
}
#settingsDrawer .inlineForm .row{
  gap:10px;
}
#settingsDrawer .inlineForm select,
#settingsDrawer .inlineForm input{
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
}
#settingsDrawer .inlineForm .row.right{
  gap:12px;
}
#settingsDrawer .inlineForm .row.right .secondary,
#settingsDrawer .inlineForm .row.right .primary{
  min-height:42px;
  padding:10px 14px;
  border-radius:14px;
  min-width:120px;
}

/* Pe ecrane inguste (drawer), pune campurile pe randuri, nu 2 coloane */
@media (max-width: 520px){
  #settingsDrawer .inlineForm .row{
    flex-direction:column;
  }
  #settingsDrawer .inlineForm .row.right{
    flex-direction:row;
    justify-content:space-between;
  }
  #settingsDrawer .inlineForm .row.right .secondary,
  #settingsDrawer .inlineForm .row.right .primary{
    flex:1;
    min-width:0;
  }
}

/* mini labels for inline package form */
#settingsDrawer .fieldMini{ flex:1; display:flex; flex-direction:column; gap:6px; }
#settingsDrawer .miniLabel{ font-size:12px; opacity:.75; padding-left:2px; }


/* === INLINE_PKG_UI_fix_select: Tab/Subtab full width === */
#settingsDrawer .inlineForm .fieldMini{ min-width:0; }
#settingsDrawer .inlineForm .fieldMini select,
#settingsDrawer .inlineForm .fieldMini input{
  width:100% !important;
  flex:1 1 auto !important;
  min-width:0 !important;
}
#settingsDrawer .inlineForm .row{
  align-items:stretch;
}
#settingsDrawer .inlineForm select{
  appearance:auto;
}


/* === INLINE_PKG_UI_fix3: force Tab/Subtab controls usable (aggressive) === */
.inlineForm .fieldMini select,
.inlineForm .fieldMini input{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.inlineForm .fieldMini select{
  min-height:44px !important;
  padding:10px 12px !important;
  border-radius:14px !important;
}
.inlineForm .row{
  width:100% !important;
}
.inlineForm .fieldMini{
  flex:1 1 0 !important;
  width:100% !important;
  min-width:0 !important;
}
/* if some global select styles collapse width */
select#inPkgTab, select#inPkgSubtab{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
}

/* === INLINE_SELECT_OPTIONS_FIX: make dropdown options readable in Settings === */
.inlineForm select{
  background:#fff !important;
  color:#111 !important;
}
.inlineForm select option{
  background:#fff !important;
  color:#111 !important;
}

/* === INLINE_SELECT_DARK_FIX30b: dark selects/options in inline package form === */
.inlineForm select,
.inlineForm input{
  background: var(--inline-form-bg) !important;
  color: var(--inline-form-text) !important;
  border: 1px solid var(--inline-form-border) !important;
}
.inlineForm select option{
  background: var(--inline-form-bg) !important;
  color: var(--inline-form-text) !important;
}

/* Settings drawer select/options: theme-aware native dropdown. */
#settingsDrawer select{
  background-color: var(--select-bg) !important;
  color: var(--select-text) !important;
}
#settingsDrawer select option{
  background-color: #fff !important;
  color: #111 !important;
}
#settingsDrawer select option:checked,
#settingsDrawer select option:hover{
  background-color: #2563eb !important;
  color: #fff !important;
}

.gsCustomSelectMenu{
  position:fixed;
  z-index:99999;
  min-width:180px;
  max-height:min(320px, 70vh);
  overflow:auto;
  padding:6px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel-strong);
  color:var(--text);
  box-shadow:0 20px 60px rgba(0,0,0,.55);
}
.gsNativeSelectHidden{
  position:absolute !important;
  opacity:0 !important;
  pointer-events:none !important;
  width:1px !important;
  height:1px !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
}
.gsCustomSelectButton{
  width:100%;
  min-height:42px;
  padding:10px 36px 10px 12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:#141822;
  color:#fff;
  font-weight:800;
  text-align:left;
  cursor:pointer;
  position:relative;
  box-sizing:border-box;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.gsCustomSelectButton::after{
  content:"▾";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  color:#fff;
  opacity:.9;
}
.gsCustomSelectButton:focus{
  outline:2px solid rgba(37,99,235,.9);
  outline-offset:2px;
}
#settingsDrawer .gsCustomSelectButton{
  flex:1 1 auto;
}
.gsCustomSelectOption{
  width:100%;
  display:block;
  padding:12px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#fff;
  text-align:left;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.gsCustomSelectOption:hover,
.gsCustomSelectOption.isSelected{
  background:#2563eb;
  color:#fff;
}
.gsCustomSelectOption.isDisabled{
  opacity:.45;
  cursor:not-allowed;
}


/* === F4: Vent buttons consistent width (match gsweb24 feel) === */
.ventCard .distBtns{
  width: 100%;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}
.ventCard .distBtns button{
  padding: 12px 10px;
  border-radius: 16px;
}

/* === F7: style vars override (must be last) === */
.pkg--vent{
  font-family: var(--font-family, inherit) !important;
  border-radius: var(--card-radius,22px) !important;
  border: var(--card-border-w,1px) solid var(--card-border-c, rgba(255,255,255,.06)) !important;
  box-shadow: var(--card-shadow, none) !important;
  background: color-mix(in srgb, var(--card-bg, #000000) calc(var(--card-opacity,0) * 100%), transparent) !important;
}
.pkg--vent .ventName{
  font-family: var(--font-family, inherit) !important;
  font-size: var(--title-size,16px) !important;
  font-weight: var(--title-weight,900) !important;
  color: var(--title-color, var(--text)) !important;
  text-align: var(--title-align, center) !important;
}
.pkg--vent .ventHdrActions .iconbtn{
  color: var(--icon-color, var(--text)) !important;
  font-size: var(--icon-size,16px) !important;
}
.pkg--vent.icons-left .ventHeader{ grid-template-columns: 38px 1fr 38px; }
.pkg--vent .distBarWrap{
  background: var(--level-empty, rgba(2,6,23,.35)) !important;
  width: var(--level-w, 64px) !important;
  /* IMPORTANT: keep a safe minimum so the graph never "disappears" when package height is small */
  min-height: 180px !important;
  height: var(--level-h, 240px) !important;
  border-radius: var(--level-radius, 18px) !important;
}
/* orientation */
.pkg--vent .distBarWrap.level-h{
  width: var(--level-w, 260px) !important;
  height: var(--level-h, 64px) !important;
}
.pkg--vent .distBarWrap.level-h .distFill{
  width: 0%;
  height: 100% !important;
  left: 0 !important;
  bottom: 0 !important;
}
.pkg--vent .distBarWrap.level-h.axis-flip .distFill{
  left: auto !important;
  right: 0 !important;
}
.pkg--vent .distBarWrap.level-h .limOverlay.top{
  top: 50% !important;
  left: 6px !important;
  right: auto !important;
  transform: translateY(-50%) !important;
}
.pkg--vent .distBarWrap.level-h .limOverlay.bottom{
  top: 50% !important;
  right: 6px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
}

.pkg--vent .distFill{ background: var(--level-fill, rgba(34,197,94,.28)) !important; }
.pkg--vent .distBarWrap.axis-flip .distFill{ bottom: auto !important; top: 0 !important; }
.pkg--vent .distVal{ color: var(--level-text, var(--text)) !important; }
.pkg--vent .distDots{ opacity: 1 !important; }
.pkg--vent .distBtns{ width: min(var(--btn-block-w, 220px), 100%) !important; gap: var(--btn-gap, 10px) !important; align-items: center !important; }
/* IMPORTANT: allow horizontal resize (override base width:100%) */
.pkg--vent .distBtns button{ width: auto !important; height: auto !important; }
.pkg--vent .distBtns button[data-btn="close"]{
  padding: var(--close-pad-y, var(--btn-pad-y, 12px)) var(--close-pad-x, var(--btn-pad-x, 10px)) !important;
  border-radius: var(--close-radius, var(--btn-radius, 16px)) !important;
  font-size: var(--close-font, var(--btn-font, 14px)) !important;
  height: var(--btn-close-h, auto) !important;
}
.pkg--vent .distBtns button[data-btn="open"]{
  padding: var(--open-pad-y, var(--btn-pad-y, 12px)) var(--open-pad-x, var(--btn-pad-x, 10px)) !important;
  border-radius: var(--open-radius, var(--btn-radius, 16px)) !important;
  font-size: var(--open-font, var(--btn-font, 14px)) !important;
  height: var(--btn-open-h, auto) !important;
}

.pkg--vent .distBtns button[data-btn="close"]{ width: min(var(--btn-close-w, 220px), 100%) !important; }
.pkg--vent .distBtns button[data-btn="open"]{ width: min(var(--btn-open-w, 220px), 100%) !important; }
.pkg--vent .distBtns button[data-btn="close"]{ background: var(--close-off-bg, rgba(255,255,255,.06)) !important; border-color: var(--close-border, var(--line)) !important; color: var(--close-txt, var(--text)) !important; }
.pkg--vent .distBtns button[data-btn="open"]{ background: var(--open-off-bg, rgba(34,197,94,.18)) !important; border-color: var(--open-border, var(--line)) !important; color: var(--open-txt, var(--text)) !important; }
.pkg--vent .distBtns button[data-btn="close"].isOn{ background: var(--close-on-bg, rgba(255,255,255,.12)) !important; }
.pkg--vent .distBtns button[data-btn="open"].isOn{ background: var(--open-on-bg, rgba(34,197,94,.28)) !important; }
.pkg--vent .distBtns button[data-btn="close"]:active{ background: var(--close-on-bg, rgba(255,255,255,.12)) !important; }
.pkg--vent .distBtns button[data-btn="open"]:active{ background: var(--open-on-bg, rgba(34,197,94,.28)) !important; }




/* === Mobile UX fixes (F17) === */
button, .btn, .pill, .miniBtn, .iconBtn, .pkg, .pkg * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button, .btn, .pill, .miniBtn, .iconBtn {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  touch-action: manipulation;
}

/* allow page scroll on mobile */
html, body { height: auto; min-height: 100%; }
body { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.gsweb-modal-open{
  overflow:hidden;
  overscroll-behavior:none;
}

/* default: allow vertical panning over packages; edit mode disables to favor drag/resize */
.pkg { touch-action: pan-y; }
body.editMode .pkg { touch-action: none; }

@media (max-width: 640px){
  /* make dashboard scroll area reliable on iOS */
  .dash { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.gsweb-modal-open .dash{
    overflow:hidden;
  }
  /* Mobil Run + Edit: același canvas absolut (x/y din layout) */
  .grid{
    display: block !important;
    position: relative !important;
    gap: 0 !important;
  }
  .pkg{
    position: absolute !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .pkg--irig:has(.irigBody--4){
    max-width: 100% !important;
  }
  .pkg.pkg--irig:has(.irigBody--1){
    width: var(--irig-layout-w, auto) !important;
    max-width: 100% !important;
  }
  /* Rozete ⚙ / mânere resize: în interiorul cardului ca să nu fie tăiate la marginea viewport */
  .pkgCfgOverlay{
    top: 6px !important;
    right: 6px !important;
  }
  .resizeHandle.br{
    right: 4px !important;
    bottom: 4px !important;
  }
}

body.editMode .gridDropTarget{
  position:absolute;
  pointer-events:none;
  border:2px dashed rgba(34,197,94,.65);
  border-radius:12px;
  background:rgba(34,197,94,.1);
  z-index:5;
  box-sizing:border-box;
}

/* === GSweb40_F26 (Pinch Zoom) ===
   Cerinta: sa poti mari/micsora cu doua degete (pinch) pe iPhone/Android.
   Pastram restul identic cu baza (F25).
   Nota: touch-action pe .pkg bloca uneori pinch-zoom pe mobil; permitem explicit pinch-zoom.
*/
.pkg { touch-action: pan-y pinch-zoom !important; }
body.editMode .pkg { touch-action: pinch-zoom !important; }


/* === F52: Level (graph) sizing/orientation + per-button sizing === */
.pkg--vent .distBarWrap{
  width: var(--level-w, 64px) !important;
  /* keep minimum height so the bar is always visible */
  min-height: 180px !important;
  height: var(--level-h, 240px) !important;
  border-radius: var(--level-radius, 18px) !important;
  /* visible: pastilele limite (+ modal) pot depăși lățimea barei */
  overflow: visible !important;
}
/* Clip rotunjit doar pentru grafic (fill + puncte + valoare); limitele rămân în afară */
.pkg--vent .distBarClip{
  position:absolute;
  inset:0;
  border-radius:inherit;
  overflow:hidden;
  z-index:1;
  pointer-events:none;
}
/* Fill sub limite — altfel distFill (fără z-index) acoperă limOverlay top */
.pkg--vent .distFill{
  z-index: 2 !important;
}
.pkg--vent .limOverlay{
  z-index: 12 !important;
}
/* Bara verticală e ~64px — limitele nu depășesc graficul (capsule înguste) */
.pkg--vent .distBarWrap:not(.level-h) .limOverlay{
  width: calc(100% - 6px) !important;
  max-width: calc(100% - 6px) !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.pkg--vent .distBarWrap:not(.level-h) .limOverlay input:not([type="hidden"]){
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 3px 2px !important;
  font-size: 11px !important;
  box-sizing: border-box !important;
}
/* Pastilă limită încadrată pe lățimea barei */
.pkg--vent .distBarWrap:not(.level-h) .limOverlay.limPillOnly{
  min-width: 0 !important;
  max-width: min(56px, calc(100% - 2px)) !important;
}
.pkg--vent .distBarWrap:not(.level-h) .limPillBtn{
  max-width: 100% !important;
  font-size: 12px !important;
  padding: 6px 6px !important;
}
.pkg--vent .distBarWrap.level-h{
  width: var(--level-w, 240px) !important;
  height: var(--level-h, 64px) !important;
  margin-top: 28px !important;
}
.pkg--vent .distBarWrap.level-h .distFill{
  height: 100% !important;
  width: var(--level-pct, 0%) !important;
  bottom: 0 !important;
  left: 0 !important;
}
.pkg--vent .distBarWrap.level-h.axis-flip .distFill{
  left: auto !important;
  right: 0 !important;
}
.pkg--vent .distBarWrap.level-h .limOverlay.top{ top: 50% !important; left: 6px !important; right: auto !important; transform: translateY(-50%); }
.pkg--vent .distBarWrap.level-h .limOverlay.bottom{ top: 50% !important; right: 6px !important; left: auto !important; transform: translateY(-50%); }

.pkg--vent .distCenterVal{
  font-size: var(--level-val-size, 20px) !important;
  font-weight: var(--level-val-weight, 900) !important;
}

/* Per-button size + typography */
.pkg--vent .distBtns button[data-btn="close"]{
  width: min(var(--btn-close-w, 220px), 100%) !important;
  height: var(--btn-close-h, auto) !important;
  border-radius: var(--btn-close-radius, var(--btn-radius, 16px)) !important;
  font-size: var(--btn-close-font, var(--btn-font, 14px)) !important;
  padding: var(--btn-close-pad-y, var(--btn-pad-y, 12px)) var(--btn-close-pad-x, var(--btn-pad-x, 10px)) !important;
}
.pkg--vent .distBtns button[data-btn="open"]{
  width: min(var(--btn-open-w, 220px), 100%) !important;
  height: var(--btn-open-h, auto) !important;
  border-radius: var(--btn-open-radius, var(--btn-radius, 16px)) !important;
  font-size: var(--btn-open-font, var(--btn-font, 14px)) !important;
  padding: var(--btn-open-pad-y, var(--btn-pad-y, 12px)) var(--btn-open-pad-x, var(--btn-pad-x, 10px)) !important;
}


/* === F90 SEN (Senzori) === */
.pkg--sen .senBody{display:grid; place-items:center; height:100%;}
.senBox{display:grid; gap:8px; place-items:center; text-align:center; width:100%;}
.senVal{font-size:46px; font-weight:900; letter-spacing:.5px;}
.senMeta{font-size:13px; opacity:.75}
.pkg.senLow{outline:2px solid rgba(245,158,11,.9);}
.pkg.senHigh{outline:2px solid rgba(239,68,68,.9);}
.pkg.senOk{outline:2px solid rgba(34,197,94,.9);}



/* F95 Sensors Basic (doar în .senWrap, nu în .pkgSenBody) */
.senWrap{padding:10px}
.senWrap .senTitle{font-weight:700;margin-bottom:8px;opacity:.95}
.senWrap .senGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.senWrap .senItem{border:1px solid rgba(255,255,255,.10);border-radius:14px;padding:10px;background:rgba(0,0,0,.18)}
.senWrap .senLbl{font-size:12px;opacity:.8}
.senWrap .senVal{font-size:22px;font-weight:800;line-height:1.1;margin:6px 0}
.senWrap .senUnit{font-size:12px;opacity:.8}
.senWrap .senHint{margin-top:8px;font-size:12px;opacity:.7}


/* === G186: card în chenar + resize margini Edit === */
body.editMode .pkgCfgOverlay{
  top:6px !important;
  right:6px !important;
}
body.editMode .resizeHandle.br{
  right:4px !important;
  bottom:4px !important;
}
.pkg--vent .pkgBody{
  height:100%;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
.pkg--vent .ventCard{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.pkg--vent .ventMain{
  flex:1;
  min-height:0;
  display:flex !important;
  flex-direction:column !important;
  width:100%;
  overflow:hidden;
}
.pkg--vent .distBox{
  flex:1;
  min-height:0;
  display:flex !important;
  flex-direction:column !important;
  align-items:center;
  width:100%;
  overflow:hidden;
}
.pkg--vent .widgetLevel{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
  max-width:100%;
  overflow:hidden;
}
.pkg--vent .distBarWrap{
  flex:1 1 auto !important;
  min-height:72px !important;
  max-height:100% !important;
  height:auto !important;
  overflow:hidden !important;
}
.pkg--vent .distBtns{
  flex-shrink:0 !important;
  width:100% !important;
  max-width:100% !important;
}
@media (min-width: 641px) {
  body:not(.editMode) .pkg--vent{
    max-height:min(520px, 62vh);
  }
}
.pkg--irig .pkgBody,
.pkg--sen .pkgBody{
  height:100%;
  min-height:0;
  overflow:hidden;
}

body.editMode .pkgEdgeHandle{
  position:absolute;
  z-index:72;
  background:transparent;
  touch-action:none;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
body.editMode .pkg.pkg--editSelected .pkgEdgeHandle,
body.editMode .pkg.pkg--widgetSelected .pkgEdgeHandle{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
body.editMode .pkgEdgeHandle::before{
  content:"";
  position:absolute;
  background:transparent;
}
body.editMode .pkgEdgeHandle::after{
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 2px rgba(2,6,23,.55);
  pointer-events:none;
  transition:transform .12s ease, box-shadow .12s ease;
}
body.editMode .pkgEdgeHandle:hover::after,
body.editMode .pkgEdgeHandle:active::after{
  transform:scale(1.2);
  box-shadow:0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkgEdgeHandle--n{
  top:0;
  left:50%;
  width:80px;
  height:36px;
  margin-left:-40px;
  cursor:ns-resize;
}
body.editMode .pkgEdgeHandle--n::before{
  left:0;
  right:0;
  top:-10px;
  bottom:-6px;
}
body.editMode .pkgEdgeHandle--n::after{
  left:50%;
  top:0;
  transform:translate(-50%, -50%);
}
body.editMode .pkgEdgeHandle--n:hover::after,
body.editMode .pkgEdgeHandle--n:active::after{
  transform:translate(-50%, -50%) scale(1.2);
}
body.editMode .pkgEdgeHandle--s{
  bottom:0;
  left:50%;
  width:80px;
  height:36px;
  margin-left:-40px;
  cursor:ns-resize;
}
body.editMode .pkgEdgeHandle--s::before{
  left:0;
  right:0;
  top:-6px;
  bottom:-10px;
}
body.editMode .pkgEdgeHandle--s::after{
  left:50%;
  bottom:0;
  transform:translate(-50%, 50%);
}
body.editMode .pkgEdgeHandle--s:hover::after,
body.editMode .pkgEdgeHandle--s:active::after{
  transform:translate(-50%, 50%) scale(1.2);
}
body.editMode .pkgEdgeHandle--e{
  top:50%;
  right:0;
  width:36px;
  height:80px;
  margin-top:-40px;
  cursor:ew-resize;
}
body.editMode .pkgEdgeHandle--e::before{
  top:0;
  bottom:0;
  left:-6px;
  right:-10px;
}
body.editMode .pkgEdgeHandle--e::after{
  right:0;
  top:50%;
  transform:translate(50%, -50%);
}
body.editMode .pkgEdgeHandle--e:hover::after,
body.editMode .pkgEdgeHandle--e:active::after{
  transform:translate(50%, -50%) scale(1.2);
}
body.editMode .pkgEdgeHandle--w{
  top:50%;
  left:0;
  width:36px;
  height:80px;
  margin-top:-40px;
  cursor:ew-resize;
}
body.editMode .pkgEdgeHandle--w::before{
  top:0;
  bottom:0;
  left:-10px;
  right:-6px;
}
body.editMode .pkgEdgeHandle--w::after{
  left:0;
  top:50%;
  transform:translate(-50%, -50%);
}
body.editMode .pkgEdgeHandle--w:hover::after,
body.editMode .pkgEdgeHandle--w:active::after{
  transform:translate(-50%, -50%) scale(1.2);
}
@media (max-width:640px){
  body.editMode .pkgMoveSurface{
    inset:32px;
  }
  body.editMode .pkgEdgeHandle--n,
  body.editMode .pkgEdgeHandle--s{
    width:96px;
    height:48px;
    margin-left:-48px;
  }
  body.editMode .pkgEdgeHandle--e,
  body.editMode .pkgEdgeHandle--w{
    width:48px;
    height:96px;
    margin-top:-48px;
  }
  body.editMode .pkgEdgeHandle--n::before{
    top:-14px;
    bottom:-8px;
  }
  body.editMode .pkgEdgeHandle--s::before{
    top:-8px;
    bottom:-14px;
  }
  body.editMode .pkgEdgeHandle--e::before{
    left:-8px;
    right:-14px;
  }
  body.editMode .pkgEdgeHandle--w::before{
    left:-14px;
    right:-8px;
  }
  body.editMode .pkgEdgeHandle::after{
    width:12px;
    height:12px;
  }
}

/* === G210: widget VENT — mânere resize cu degetul (ca cardul) === */
body.editMode .pkg--editSelected .widgetBox{
  position:relative;
  z-index:60;
  overflow:visible;
}
body.editMode .widgetEdgeHandle{
  position:absolute;
  z-index:65;
  background:transparent;
  touch-action:none;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
body.editMode .pkg--editSelected .widgetEdgeHandle{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
body.editMode .widgetEdgeHandle::before{
  content:"";
  position:absolute;
  background:transparent;
}
body.editMode .widgetEdgeHandle::after{
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 2px rgba(2,6,23,.55);
  pointer-events:none;
  transition:transform .12s ease, box-shadow .12s ease;
}
body.editMode .widgetEdgeHandle:hover::after,
body.editMode .widgetEdgeHandle:active::after{
  transform:scale(1.2);
  box-shadow:0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .widgetEdgeHandle--e{
  top:50%;
  right:0;
  width:28px;
  height:48px;
  margin-top:-24px;
  cursor:ew-resize;
}
body.editMode .widgetEdgeHandle--e::before{
  top:0;
  bottom:0;
  left:-6px;
  right:-10px;
}
body.editMode .widgetEdgeHandle--e::after{
  right:0;
  top:50%;
  transform:translate(50%, -50%);
}
body.editMode .widgetEdgeHandle--e:hover::after,
body.editMode .widgetEdgeHandle--e:active::after{
  transform:translate(50%, -50%) scale(1.2);
}
body.editMode .widgetEdgeHandle--s{
  bottom:0;
  left:50%;
  width:48px;
  height:28px;
  margin-left:-24px;
  cursor:ns-resize;
}
body.editMode .widgetEdgeHandle--s::before{
  left:0;
  right:0;
  top:-6px;
  bottom:-10px;
}
body.editMode .widgetEdgeHandle--s::after{
  left:50%;
  bottom:0;
  transform:translate(-50%, 50%);
}
body.editMode .widgetEdgeHandle--s:hover::after,
body.editMode .widgetEdgeHandle--s:active::after{
  transform:translate(-50%, 50%) scale(1.2);
}
@media (max-width:640px){
  body.editMode .widgetEdgeHandle--e{
    width:44px;
    height:56px;
    margin-top:-28px;
  }
  body.editMode .widgetEdgeHandle--e::before{
    left:-10px;
    right:-14px;
  }
  body.editMode .widgetEdgeHandle--s{
    width:56px;
    height:44px;
    margin-left:-28px;
  }
  body.editMode .widgetEdgeHandle--s::before{
    top:-10px;
    bottom:-14px;
  }
  body.editMode .widgetEdgeHandle::after{
    width:12px;
    height:12px;
  }
}

/* === G190/G191: grilă milimetrică Edit + bloc 4×4 cm evident === */
.gridPlacement{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
  pointer-events:none;
  z-index:0;
  display:none;
}
body.editMode .grid{
  --grid-cell-px:28px;
  --grid-cm-px:28px;
  --grid-mm-px:2.8px;
  --grid-block-px:calc(var(--grid-cm-px) * 4);
  border:1px solid rgba(255,255,255,.06);
  background-color:rgba(2,6,23,.35);
}
body.editMode .gridPlacement{
  display:block;
  background-color:rgba(2,6,23,.55);
  background-image:
    radial-gradient(rgba(255,255,255,.09) 0.8px, transparent 0.8px),
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.17) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.17) 1px, transparent 1px);
  background-size:
    var(--grid-mm-px) var(--grid-mm-px),
    var(--grid-mm-px) var(--grid-mm-px),
    var(--grid-mm-px) var(--grid-mm-px),
    calc(var(--grid-cm-px) / 2) calc(var(--grid-cm-px) / 2),
    calc(var(--grid-cm-px) / 2) calc(var(--grid-cm-px) / 2),
    var(--grid-cm-px) var(--grid-cm-px),
    var(--grid-cm-px) var(--grid-cm-px),
    var(--grid-block-px) var(--grid-block-px),
    var(--grid-block-px) var(--grid-block-px);
  background-repeat:repeat;
}
body.editMode .pkg{
  z-index:1;
}

/* === G193: grilă Edit extensibilă + lățime telefon === */
body.editMode .dash{
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
body.editMode .grid{
  width:100%;
  box-sizing:border-box;
}
@media (max-width:640px){
  body.editMode .grid{
    border-radius:12px;
  }
}

/* === G211: Card + Widget builder v1 === */
.pkg--card{
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
  border-radius:0;
}
.pkg--card .pkgBody--card{
  width:100%;
  height:100%;
  margin-top:0 !important;
  padding:0 !important;
  display:block;
  gap:0;
  overflow:hidden;
}
body.editMode .pkg.pkg--card .pkgBody--card,
body.editMode .pkg.pkg--card .cardBuilder,
body.editMode .pkg.pkg--card .cardBuilderCanvas{
  overflow:visible !important;
}
body.editMode .pkg.pkg--card.pkg--cardHasWidgetSelected{
  z-index:70;
  overflow:visible;
}
body.editMode .pkg.pkg--card.pkg--cardHasWidgetSelected .pkgMoveSurface{
  pointer-events:none !important;
}
body.editMode .pkg.pkg--card.pkg--cardHasWidgetSelected .cardBuilder,
body.editMode .pkg.pkg--card.pkg--cardHasWidgetSelected .cardBuilderCanvas,
body.editMode .pkg.pkg--card.pkg--cardHasWidgetSelected .pkgBody--card{
  overflow:visible !important;
}
body.editMode .pkg.pkg--card.pkg--editSelected{
  border-color:transparent;
  box-shadow:none;
}
body.editMode .pkg.pkg--card.pkg--editSelected .cardBuilder{
  box-shadow:0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkg--card .pkgMoveSurface{
  inset:0;
}
.cardBuilder{
  width:100%;
  height:100%;
  position:relative;
  border-radius:var(--card-radius, 18px);
  border:1px solid color-mix(in srgb, var(--card-border, #fff) 45%, transparent);
  background:rgba(2,6,23,.18);
  background:color-mix(in srgb, var(--card-bg, #020617) 24%, transparent);
  overflow:hidden;
}
.cardBuilderTitle{
  position:absolute;
  left:10px;
  right:42px;
  top:8px;
  z-index:2;
  font-size:13px;
  font-weight:900;
  opacity:.72;
  pointer-events:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cardBuilderCanvas{
  position:absolute;
  inset:0;
  overflow:visible;
}
.cardBuilderEmpty{
  position:absolute;
  inset:42px 12px 12px;
  border:1px dashed rgba(255,255,255,.16);
  border-radius:14px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  padding:12px;
}
.pkg--widget{
  padding:0;
  background:transparent;
  box-shadow:none;
}
body.editMode .pkg.pkg--widget.pkg--widgetSelected{
  z-index:56;
  border:2px solid rgba(34,197,94,.88);
  box-shadow:
    0 10px 20px rgba(0,0,0,.25),
    0 0 0 2px rgba(34,197,94,.55);
}
.pkg--widget .pkgBody--widget{
  width:100%;
  height:100%;
  margin-top:0 !important;
  padding:0 !important;
  display:block;
  gap:0;
  overflow:visible;
}
.pkg.pkg--widget:has(.cardWidget--styled_button.cardWidget--withProgram){
  overflow:visible;
}
.pkg--widget .freeWidget{
  position:relative;
  width:100%;
  height:100%;
  left:auto !important;
  top:auto !important;
  box-sizing:border-box;
}
.pkg--widget .freeWidget.cardWidget--styled_button.cardWidget--withProgram{
  overflow:visible !important;
}
body.editMode .pkg--widget.pkg--widgetSelected .freeWidget.cardWidget--selected{
  outline:2px solid rgba(34,197,94,.88);
  box-shadow:
    0 8px 20px rgba(0,0,0,.18),
    0 0 0 2px rgba(34,197,94,.55);
}
.cardWidget{
  position:absolute;
  z-index:64;
  border-radius:var(--cw-radius, 12px);
  background:var(--cw-bg, rgba(15,23,42,.55));
  color:var(--cw-text, #e5e7eb);
  font-size:var(--cw-font, 16px);
  border:1px solid rgba(255,255,255,.10);
  overflow:visible;
  touch-action:none;
  user-select:none;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.cardWidgetContent{
  width:100%;
  height:100%;
  overflow:hidden;
  border-radius:inherit;
  display:grid;
  place-items:center;
}
body.editMode .cardWidget.cardWidget--selected{
  outline:2px solid rgba(34,197,94,.88);
  box-shadow:
    0 8px 20px rgba(0,0,0,.18),
    0 0 0 2px rgba(34,197,94,.55);
}
.cardWidgetSizeSection{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cardWidgetSizeGrid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}
.cardWidgetSizeGrid .f{
  min-width:0;
}
.cardWidgetSizeGrid input{
  width:100%;
}
.cardWidgetPresetRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.cardWidgetPresetRow button{
  flex:1 1 96px;
}
.cardWidgetText{
  width:100%;
  padding:6px 8px;
  font-weight:800;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cardWidgetButton{
  width:100%;
  height:100%;
  border:0;
  border-radius:inherit;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:900;
}
body.editMode .cardWidgetButton{
  pointer-events:none;
}
body:not(.editMode) .cardWidget--styled_button .cardWidgetButton{
  pointer-events:auto;
  cursor:pointer;
}
body:not(.editMode) .cardWidget--styled_button{
  touch-action:manipulation;
}
body:not(.editMode) .cardWidget--styled_button:not(.cardWidget--withProgram){
  background:transparent !important;
  border-color:transparent;
  box-shadow:none;
}
body.editMode .cardWidget--styled_button.cardWidget--selected,
body.editMode .cardWidget--styled_button.cardWidget--withProgram.cardWidget--selected,
body.editMode .cardWidget--labeled_value.cardWidget--selected,
body.editMode .cardWidget--program.cardWidget--selected,
body.editMode .cardWidget--button_pb.cardWidget--selected{
  overflow:visible;
  z-index:68;
}
.cardWidget--styled_button:not(.cardWidget--withProgram) .cardWidgetButton{
  width:100%;
  height:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.16);
  background:var(--cw-bg, rgba(15,23,42,.55));
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  transition:filter .15s, background .15s, border-color .15s, box-shadow .15s;
}
.cardWidget--styled_button .cardWidgetButton.isOn,
.cardWidget--styled_button .cardWidgetButton[aria-pressed="true"]{
  border-color:rgba(34,197,94,.92) !important;
  box-shadow:0 0 0 1px rgba(34,197,94,.5);
}
.cardWidget--styled_button .cardWidgetContent{
  overflow:hidden;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  padding:0;
  height:100%;
  min-height:0;
}
.cardWidget--styled_button.cardWidget--withProgram{
  z-index:66;
  overflow:visible !important;
  background:transparent !important;
  border-color:transparent;
  box-shadow:none;
}
body:not(.editMode) .cardWidget--styled_button.cardWidget--withProgram{
  border-color:transparent;
  box-shadow:none;
  outline:none;
}
.cardWidget--styled_button.cardWidget--withProgram .cardWidgetButton{
  width:100%;
  height:100%;
  box-sizing:border-box;
  padding:0;
  border-radius:var(--cw-radius, 12px);
  border:1px solid rgba(255,255,255,.16);
  background:var(--cw-bg, rgba(15,23,42,.55));
  color:var(--cw-text, #e5e7eb);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  transition:filter .15s, background .15s, border-color .15s, box-shadow .15s;
}
.cardWidget--styled_button.cardWidget--withProgram .cardWidgetButton.isOn,
.cardWidget--styled_button.cardWidget--withProgram .cardWidgetButton[aria-pressed="true"]{
  background:var(--cw-on-bg, #16a34a) !important;
  border-color:rgba(34,197,94,.92) !important;
  box-shadow:0 0 0 1px rgba(34,197,94,.5);
}
.cardWidget--styled_button.cardWidget--withProgram .cardWidgetButton:hover:not([aria-disabled]){
  filter:brightness(1.1);
}
.cardWidgetProgramBarDock{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  width:100%;
  height:var(--grid-cell-px, 28px);
  min-height:0;
  max-height:var(--grid-cell-px, 28px);
  margin:0;
  padding:0 2px;
  box-sizing:border-box;
  border:none;
  border-top:none;
  border-radius:0;
  background:transparent;
  overflow:visible;
  z-index:1;
  flex:none;
}
.cardWidget--styled_button.cardWidget--withProgram .cardWidgetProgramBarDock{
  --prog-radius:4px;
  --prog-font:12px;
}
.cardWidget--styled_button .cardWidgetProgramBarDock .irigProgramMain{
  width:100%;
  height:100%;
  min-height:0;
}
.cardWidget--styled_button .cardWidgetProgramBarDock .irigProgramTrack{
  width:100%;
  height:100%;
  max-height:100%;
  box-sizing:border-box;
  border:1px solid var(--prog-border, rgba(34,197,94,.35));
  border-radius:var(--prog-radius, 4px);
  min-height:0;
}
.cardWidget--styled_button .cardWidgetProgramBarDock .irigProgramTrack.irigBarTier--0 .irigProgramSummary{
  font-size:calc(var(--prog-font, 12px) * 0.92);
  padding:1px 4px;
  line-height:1.1;
}
.cardWidget--styled_button .cardWidgetProgramBarDock.irigProgram{
  height:var(--grid-cell-px, 28px);
  max-height:var(--grid-cell-px, 28px);
  min-height:0;
  flex:none;
  border-top:none;
}
.cardWidget--styled_button .irigProgramFill--program{
  background:linear-gradient(90deg, color-mix(in srgb, var(--prog-fill, #22c55e) 75%, transparent), color-mix(in srgb, var(--prog-fill, #22c55e) 45%, transparent));
}
.cardWidget--styled_button .irigProgramSummary{
  font-size:var(--prog-font, 12px);
  padding:2px 6px;
  line-height:1.15;
  color:var(--prog-text, #d1fae5);
}
.cardWidget--styled_button .irigProgramTrack.irigBarTier--0 .irigProgramSummary{
  font-size:calc(var(--prog-font, 12px) * 0.9);
}
body:not(.editMode) .cardWidget--styled_button .cardWidgetProgramBarDock{
  pointer-events:auto;
  cursor:pointer;
  touch-action:manipulation;
}
body.editMode .cardWidget--styled_button .cardWidgetProgramBarDock{
  pointer-events:none;
}
.cardWidgetLevel{
  position:relative;
  width:100%;
  height:100%;
  background:rgba(255,255,255,.07);
  overflow:hidden;
}
.cardWidgetLevelFill{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:var(--level-pct, 50%);
  background:var(--level-fill, #22c55e);
  opacity:.8;
}
.cardWidgetLevel--h .cardWidgetLevelFill{
  top:0;
  bottom:0;
  right:auto;
  width:var(--level-pct, 50%);
  height:100%;
}
.cardWidgetLevelText{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  z-index:2;
  font-weight:900;
  text-shadow:0 2px 8px rgba(0,0,0,.45);
}
.cardWidgetSlider{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:6px;
  padding:6px 8px;
  box-sizing:border-box;
}
.cardWidgetSliderValue{
  font-weight:800;
  text-align:center;
  line-height:1.1;
}
.cardWidgetSliderRange{
  width:100%;
  accent-color:var(--slider-fill, #23c48e);
  cursor:pointer;
}
body.editMode .cardWidgetSliderRange{
  pointer-events:none;
}
.cardWidgetStep{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:1fr 1.4fr 1fr;
  gap:4px;
  align-items:stretch;
  padding:4px;
  box-sizing:border-box;
}
.cardWidgetStepBtn{
  border:1px solid rgba(255,255,255,.14);
  border-radius:10px;
  background:rgba(15,23,42,.55);
  color:inherit;
  font-size:1.4em;
  font-weight:800;
  cursor:pointer;
}
.cardWidgetStepValue{
  display:grid;
  place-items:center;
  font-weight:900;
  border-radius:10px;
  background:rgba(255,255,255,.06);
}
body.editMode .cardWidgetStepBtn{
  pointer-events:none;
}
.cardWidgetLed{
  width:min(72%, 56px);
  aspect-ratio:1;
  margin:auto;
  border-radius:50%;
  background:var(--led-off, #334155);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.08), 0 0 0 1px rgba(0,0,0,.35);
}
.cardWidgetLed[aria-pressed="true"]{
  background:var(--led-on, #23c48e);
  box-shadow:0 0 18px color-mix(in srgb, var(--led-on, #23c48e) 55%, transparent), inset 0 0 0 2px rgba(255,255,255,.12);
}
.cardWidgetGauge{
  position:relative;
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.cardWidgetGaugeDial{
  width:78%;
  aspect-ratio:1;
  border-radius:50%;
  background:
    conic-gradient(var(--gauge-fill, #23c48e) calc(var(--gauge-pct, 0) * 1%), rgba(255,255,255,.08) 0);
  mask: radial-gradient(circle at center, transparent 54%, #000 55%);
  -webkit-mask: radial-gradient(circle at center, transparent 54%, #000 55%);
}
.cardWidgetGaugeValue{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-weight:900;
  z-index:1;
}
.cardWidgetValueDisplay{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  padding:6px;
  box-sizing:border-box;
  font-weight:900;
}
.cardWidget--button .cardWidgetButton{
  width:100%;
  height:100%;
}
.cardWidget--button .cardWidgetButton.isOn,
.cardWidget--button .cardWidgetButton[aria-pressed="true"]{
  background:var(--cw-on, #16a34a);
}
.cardWidgetTextInputWrap,
.cardWidgetNumericWrap{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  padding:6px;
  box-sizing:border-box;
}
.cardWidgetTextInput,
.cardWidgetNumericInput{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.16);
  border-radius:10px;
  background:rgba(2,6,23,.55);
  color:inherit;
  font:inherit;
  font-weight:700;
  padding:8px 10px;
}
body.editMode .cardWidgetTextInput,
body.editMode .cardWidgetNumericInput{
  pointer-events:none;
}
.cardWidgetTimer{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:8px;
  box-sizing:border-box;
}
.cardWidgetTimerRow{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-weight:700;
}
.cardWidgetTimerHint{
  font-size:.78em;
  opacity:.7;
}
body:not(.editMode) .cardWidget--button .cardWidgetButton{
  cursor:pointer;
}
body.editMode .cardWidget--button.cardWidget--selected,
body.editMode .cardWidget--slider.cardWidget--selected,
body.editMode .cardWidget--step_control.cardWidget--selected,
body.editMode .cardWidget--value_display.cardWidget--selected,
body.editMode .cardWidget--led.cardWidget--selected,
body.editMode .cardWidget--gauge.cardWidget--selected{
  outline:2px solid rgba(56,189,248,.85);
}
.cardWidget--labeled_value .cardWidgetContent{
  padding:0;
  overflow:hidden;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
}
body.editMode .cardWidget--labeled_value .cardWidgetEditHit{
  position:absolute;
  inset:0;
  z-index:80;
  margin:0;
  padding:0;
  border:0;
  border-radius:inherit;
  background:transparent;
  cursor:pointer;
  pointer-events:auto;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
body.editMode .cardWidget--labeled_value .cardWidgetHandle{
  z-index:81;
}
.cardWidget--labeled_value .cardWidgetLvButton,
.cardWidget--labeled_value .cardWidgetLvBody{
  width:100%;
  height:100%;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:2px;
  padding:4px 6px;
  border:1px solid rgba(255,255,255,.10);
  background:var(--cw-bg, rgba(15,23,42,.55));
  font:inherit;
  font-weight:800;
  min-width:0;
}
.cardWidget--labeled_value .cardWidgetLvButton .cardWidgetLvLabel{
  font-size:calc(var(--cw-font, 22px) * 0.45);
  font-weight:600;
  color:var(--muted, #94a3b8);
  text-transform:uppercase;
  letter-spacing:.04em;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cardWidget--labeled_value .cardWidgetLvButton .cardWidgetLvValue{
  font-size:var(--cw-font, 22px);
  font-weight:800;
  color:var(--cw-text, #e5e7eb);
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.editMode .cardWidget--labeled_value.cardWidget--selected{
  z-index:68;
  overflow:visible;
}
.cardWidget--limit{
  z-index:68;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  overflow:visible;
}
.cardWidget--limit .cardWidgetContent{
  overflow:visible;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.editMode .cardWidget--limit .cardWidgetLimPill{
  pointer-events:none;
}
.cardWidget--program,
.cardWidget--button_pb{
  z-index:66;
  background:transparent !important;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  overflow:hidden;
}
body:not(.editMode) .cardWidget--program,
body:not(.editMode) .cardWidget--button_pb{
  border-color:transparent;
  box-shadow:none;
  outline:none;
}
body:not(.editMode) .cardWidget--program.cardWidget--withProgram{
  border:none;
  box-shadow:none;
}
.cardWidget--program .cardWidgetContent,
.cardWidget--button_pb .cardWidgetContent{
  overflow:hidden;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  padding:0;
}
.cardWidgetProgramStack{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:2px 1px 4px;
  box-sizing:border-box;
}
.cardWidgetProgramStack--buttonOnly{
  padding-bottom:2px;
}
.cardWidgetProgramStack--barOnly{
  gap:0;
  padding:0 2px;
  box-sizing:border-box;
}
.cardWidget--program .cardWidgetProgramStack--barOnly .irigProgram{
  flex:1 1 auto;
  width:100%;
  height:100%;
  max-height:100%;
  min-height:0;
  padding:0 2px;
  border-top:none;
}
.cardWidget--program .cardWidgetProgramStack--barOnly .irigProgramMain{
  width:100%;
  height:100%;
  min-height:0;
}
.cardWidget--program .cardWidgetProgramStack--barOnly .irigProgramTrack{
  height:100%;
  max-height:100%;
  min-height:0;
}
.cardWidget--program .cardWidgetProgramStack--barOnly .irigProgramTrack.irigBarTier--0 .irigProgramSummary{
  font-size:calc(var(--prog-font, 12px) * 0.92);
  padding:1px 4px;
  line-height:1.1;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack{
  gap:0;
  padding:0 2px;
  box-sizing:border-box;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .cardWidgetProgramBtn{
  flex:1 1 auto;
  min-height:0;
  margin-bottom:0;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .irigProgram{
  flex:0 0 auto;
  width:100%;
  height:var(--grid-cell-px, 28px);
  max-height:var(--grid-cell-px, 28px);
  min-height:0;
  padding:0 2px;
  border-top:none;
  --prog-radius:4px;
  --prog-font:12px;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .irigProgramMain{
  width:100%;
  height:100%;
  min-height:0;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .irigProgramTrack{
  height:100%;
  max-height:100%;
  min-height:0;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .irigProgramTrack.irigBarTier--0 .irigProgramSummary{
  font-size:calc(var(--prog-font, 12px) * 0.92);
  padding:1px 4px;
  line-height:1.1;
}
body:not(.editMode) .cardWidget--button_pb.cardWidget--withProgram{
  border:none;
  box-shadow:none;
}
.cardWidget--button_pb .cardWidgetProgramStack--buttonOnly .cardWidgetProgramBtn{
  flex:1 1 100%;
  min-height:100%;
}
.cardWidgetCheckRow{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  margin-bottom:4px;
}
.cardWidgetCheckRow input[type="checkbox"]{
  width:auto;
  margin:0;
  flex:0 0 auto;
}
.cardWidgetProgramBtn{
  flex:1 1 auto;
  min-height:0;
  width:100%;
  height:auto;
  padding:6px 4px;
  border-radius:var(--cw-radius, 6px);
  border:1px solid var(--irig-border, rgba(255,255,255,.16));
  background:var(--irig-off-bg, var(--cw-bg, #334155));
  color:var(--irig-txt, var(--cw-text, #e5e7eb));
  font:inherit;
  font-size:var(--cw-font, 19px);
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  cursor:pointer;
  transition:filter .15s, background .15s;
}
.cardWidgetProgramBtn.irigBtnOn{
  background:var(--irig-on-bg, var(--prog-fill, var(--primary, #16a34a))) !important;
  color:#fff !important;
  border-color:#fff !important;
}
.cardWidgetProgramBtn:hover:not([aria-disabled]){
  filter:brightness(1.1);
}
.cardWidget--program .irigProgram,
.cardWidget--button_pb .irigProgram{
  flex:0 0 auto;
  width:100%;
  height:28px;
  max-height:28px;
  min-height:0;
  padding:0 3px;
  border-top:1px solid rgba(255,255,255,.06);
}
.cardWidget--program .irigProgramTrack,
.cardWidget--button_pb .irigProgramTrack{
  border-radius:var(--prog-radius, 4px);
  border-width:1px;
  border-color:var(--prog-border, rgba(34,197,94,.35));
  min-height:0;
}
.cardWidget--button_pb.cardWidget--withProgram .cardWidgetProgramStack .irigProgramTrack{
  border-radius:var(--prog-radius, 4px);
}
.cardWidget--program .irigProgramFill--program,
.cardWidget--button_pb .irigProgramFill--program{
  background:linear-gradient(90deg, color-mix(in srgb, var(--prog-fill, #22c55e) 75%, transparent), color-mix(in srgb, var(--prog-fill, #22c55e) 45%, transparent));
}
.cardWidget--program .irigProgramSummary,
.cardWidget--button_pb .irigProgramSummary{
  font-size:var(--prog-font, 12px);
  padding:2px 6px;
  line-height:1.15;
  color:var(--prog-text, #d1fae5);
}
.cardWidget--program .irigProgramTrack.irigBarTier--0 .irigProgramSummary,
.cardWidget--button_pb .irigProgramTrack.irigBarTier--0 .irigProgramSummary{
  font-size:calc(var(--prog-font, 12px) * 0.9);
}
body:not(.editMode) .cardWidget--program .irigProgram,
body:not(.editMode) .cardWidget--button_pb .irigProgram{
  pointer-events:auto;
  cursor:pointer;
  touch-action:manipulation;
}
body.editMode .cardWidget--program .irigProgram,
body.editMode .cardWidget--button_pb .irigProgram{
  pointer-events:none;
}
body.editMode .cardWidget--program .cardWidgetProgramBtn,
body.editMode .cardWidget--button_pb .cardWidgetProgramBtn{
  pointer-events:none;
}
body.editMode .cardWidgetHandle{
  position:absolute;
  z-index:70;
  background:transparent;
  touch-action:none;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
body.editMode .cardWidget--selected .cardWidgetHandle{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
body.editMode .cardWidgetHandle::after{
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 2px rgba(2,6,23,.55);
}
body.editMode .cardWidgetHandle--n,
body.editMode .cardWidgetHandle--s{
  left:50%;
  width:64px;
  height:34px;
  margin-left:-32px;
  cursor:ns-resize;
}
body.editMode .cardWidgetHandle--n{ top:0; }
body.editMode .cardWidgetHandle--s{ bottom:0; }
body.editMode .cardWidgetHandle--n::after{ left:50%; top:0; transform:translate(-50%, -50%); }
body.editMode .cardWidgetHandle--s::after{ left:50%; bottom:0; transform:translate(-50%, 50%); }
body.editMode .cardWidgetHandle--e,
body.editMode .cardWidgetHandle--w{
  top:50%;
  width:34px;
  height:64px;
  margin-top:-32px;
  cursor:ew-resize;
}
body.editMode .cardWidgetHandle--e{ right:0; }
body.editMode .cardWidgetHandle--w{ left:0; }
body.editMode .cardWidgetHandle--e::after{ right:0; top:50%; transform:translate(50%, -50%); }
body.editMode .cardWidgetHandle--w::after{ left:0; top:50%; transform:translate(-50%, -50%); }
@media (max-width:640px){
  body.editMode .cardWidgetHandle--n,
  body.editMode .cardWidgetHandle--s{
    width:82px;
    height:44px;
    margin-left:-41px;
  }
  body.editMode .cardWidgetHandle--e,
  body.editMode .cardWidgetHandle--w{
    width:44px;
    height:82px;
    margin-top:-41px;
  }
  body.editMode .cardWidgetHandle::after{
    width:12px;
    height:12px;
  }
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget.cardWidget--selected{
  overflow:visible !important;
  z-index:74;
  outline:2px solid rgba(34,197,94,.88);
  outline-offset:1px;
  box-shadow:
    0 8px 20px rgba(0,0,0,.18),
    0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--styled_button.cardWidget--withProgram.cardWidget--selected{
  overflow:visible !important;
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--styled_button.cardWidget--selected{
  outline:none;
  box-shadow:none;
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--labeled_value.cardWidget--selected{
  outline:none;
  box-shadow:none;
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--selected .cardWidgetContent{
  overflow:visible;
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--selected .cardWidgetHandle{
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
  z-index:76;
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--styled_button.cardWidget--selected .cardWidgetButton{
  outline:2px solid rgba(34,197,94,.88);
  outline-offset:2px;
  box-shadow:0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkg.pkg--card:not(.pkg--editSelected) .cardWidget--labeled_value.cardWidget--selected .cardWidgetButton{
  outline:2px solid rgba(34,197,94,.88);
  outline-offset:2px;
  box-shadow:0 0 0 2px rgba(34,197,94,.55);
}
body.editMode .pkg.pkg--card.pkg--editSelected .cardWidget--selected{
  outline:none !important;
  box-shadow:none !important;
}
body.editMode .pkg.pkg--card.pkg--editSelected .cardWidgetHandle{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.gsWidgetBox{
  position:static;
  width:100%;
  z-index:auto;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.gsWidgetBox button{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
  padding:10px 12px;
  text-align:left;
}
.gsWidgetBox button:active{
  transform:translateY(1px);
}
.cardWidgetModalCard,
.cardPackageModalCard{
  width:min(560px, 94vw);
}
.cardWidgetAlignSection{
  margin-top:12px;
}
.cardWidgetAlignLabel{
  display:block;
  font-size:12px;
  font-weight:700;
  opacity:.75;
  margin-bottom:8px;
}
.colorFieldControls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.colorFieldControls input[type="color"]{
  flex:0 0 auto;
  min-width:52px;
}
.colorFieldControls .colorImplicitBtn{
  padding:4px 10px;
  font-size:12px;
  font-weight:700;
  border-radius:8px;
  white-space:nowrap;
}
input[type="color"].isColorImplicit{
  outline:1px dashed rgba(148,163,184,.55);
  outline-offset:2px;
}

.cardWidgetAlignBtns{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
}
.cardWidgetAlignBtn{
  padding:8px 10px;
  font-size:13px;
  font-weight:700;
  border-radius:10px;
}


.cardWidgetJoystick{width:100%;height:100%;display:flex;flex-direction:column;gap:4px;padding:6px;box-sizing:border-box}
.cardWidgetJoystickPad{position:relative;flex:1;min-height:0;border-radius:50%;background:radial-gradient(circle at center,rgba(255,255,255,.08),rgba(0,0,0,.25));border:1px solid rgba(255,255,255,.12);touch-action:none}
.cardWidgetJoystickKnob{position:absolute;width:28%;height:28%;border-radius:50%;background:#23c48e;transform:translate(-50%,-50%);left:50%;top:50%;box-shadow:0 4px 12px rgba(0,0,0,.35)}
.cardWidgetJoystickXY{text-align:center;font-weight:700;font-size:.85em;opacity:.85}
.cardWidgetZergba{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px;box-sizing:border-box}
.cardWidgetZergbaInput{width:72%;height:42%;min-height:36px;border:none;background:transparent;cursor:pointer}
.cardWidgetZergbaHex{font-weight:800}
.cardWidgetLcd{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:8px;box-sizing:border-box;background:#0b3d2e;color:#9affc7;font-family:ui-monospace,Consolas,monospace;border-radius:8px}
.cardWidgetLcdLine{white-space:pre;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.cardWidgetMenuWrap{width:100%;height:100%;display:grid;place-items:center;padding:8px;box-sizing:border-box}
.cardWidgetMenu{width:100%;padding:8px;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:rgba(2,6,23,.55);color:inherit;font:inherit;font-weight:700}
.cardWidgetImage{width:100%;height:100%;background-position:center;background-repeat:no-repeat;border-radius:inherit}
.cardWidgetImageEmpty{width:100%;height:100%;display:grid;place-items:center;opacity:.6;font-weight:700}
.cardWidgetMusic{width:100%;height:100%;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:6px;box-sizing:border-box}
.cardWidgetMusic button{border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(15,23,42,.55);color:inherit;font-size:1.1em;cursor:pointer}
body.editMode .cardWidgetMusic button,body.editMode .cardWidgetMenu,body.editMode .cardWidgetZergbaInput{pointer-events:none}

.cardWidgetTableWrap{width:100%;height:100%;overflow:auto;padding:4px;box-sizing:border-box}
.cardWidgetTable{width:100%;border-collapse:collapse;font-size:.85em}
.cardWidgetTable td{border-bottom:1px solid rgba(255,255,255,.08);padding:4px 6px}
.cardWidgetVideo,.cardWidgetMap{width:100%;height:100%;position:relative;overflow:hidden;border-radius:inherit}
.cardWidgetVideo iframe,.cardWidgetMap iframe{width:100%;height:100%;border:0;background:#000}
.cardWidgetMapMeta{position:absolute;left:6px;bottom:6px;padding:2px 6px;border-radius:6px;background:rgba(0,0,0,.55);font-size:.75em;font-weight:700}
.cardWidgetChart{width:100%;height:100%;position:relative;padding:4px;box-sizing:border-box}
.cardWidgetChartCanvas{width:100%;height:100%;display:block}
.cardWidgetChartValue{position:absolute;right:8px;top:6px;font-weight:800;opacity:.9}
