.vde{color:var(--iot-text,#e8f2ff);max-width:1700px;margin:auto;padding:8px 8px 40px}.vde *{box-sizing:border-box}.vde-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.vde-kicker{letter-spacing:2px;color:#67d6b1;font-size:11px;font-weight:800}.vde h1{font-size:29px;margin:7px 0}.vde-head p{margin:0;color:var(--iot-muted,#a7c1d5);font-size:13px}.vde-back{color:#a3dcfa;text-decoration:none;white-space:nowrap}.vde-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:var(--iot-card,#162b3d);padding:13px;border:1px solid var(--iot-border,#30465c);border-radius:13px;margin-bottom:14px}.vde button,.vde select,.vde input{font:inherit}.vde-toolbar label{display:flex;align-items:center;gap:10px;font-size:12px}.vde select,.vde input{background:var(--iot-bg,#0c1a2a);color:var(--iot-text,#e8f2ff);border:1px solid var(--iot-border,#40556b);border-radius:8px;padding:9px;min-width:0}.vde-toolbar select{max-width:400px}.vde-toolbar button{background:#226d60;color:white;border:1px solid #4cbd9b;border-radius:9px;padding:10px 20px;cursor:pointer}.vde #vdeStatus{color:#8ee0bd;font-size:12px}.vde #vdeStatus.error{color:#ffb3a4}.vde-layout{display:grid;grid-template-columns:210px minmax(0,1fr) 245px;gap:12px;align-items:start}.vde-library,.vde-main,.vde-properties{background:var(--iot-card,#162b3d);border:1px solid var(--iot-border,#30465c);border-radius:15px;padding:15px;min-height:360px}.vde h2{font-size:15px;margin:0 0 10px}.vde-library p,.vde-properties p,.vde-area-head small{font-size:11px;color:var(--iot-muted,#a9c0d1)}.vde-library-items{display:grid;gap:7px;margin-top:15px}.vde-add{padding:12px;display:flex;align-items:center;gap:12px;border:1px solid var(--iot-border,#40556b);border-radius:9px;background:var(--iot-bg,#0c1a2a);color:var(--iot-text,#fff);text-align:left;cursor:pointer}.vde-add span:first-child{color:#54c4a4;font-size:24px;width:28px;text-align:center}.vde-add:hover{border-color:#54c4a4}.vde-area-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}.vde-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.vde-card{padding:14px;min-height:154px;border-radius:14px;cursor:grab;border:1px solid var(--iot-border,#486178);background:var(--iot-bg,#101f30);overflow:hidden}.vde-card.selected{outline:2px solid #53d5ae}.vde-card-head{display:flex;justify-content:space-between;align-items:start;color:var(--accent)}.vde-card-head small{font-size:10px;opacity:.8}.vde-card-icon{display:flex;align-items:center;justify-content:center;font-size:27px;width:46px;height:46px;border-radius:14px;background:color-mix(in srgb,var(--accent) 20%,transparent)}.vde-card h3{font-size:14px;margin:12px 0;color:var(--iot-text,#fff);overflow-wrap:anywhere}.vde-placeholder{font-size:11px;color:var(--iot-muted,#9ab8ca)}.vde-chart{font-size:32px;color:var(--accent);white-space:nowrap;overflow:hidden}.vde-gauge{border:7px solid var(--accent);border-left-color:transparent;border-radius:50%;width:66px;height:66px;display:grid;place-items:center}.vde-value{font-size:22px;font-weight:750}.vde-empty{padding:40px 20px;text-align:center;border:1px dashed var(--iot-border,#40556b);border-radius:12px;font-size:13px;color:var(--iot-muted,#a9c0d1)}.vde-properties label{display:grid;gap:6px;margin:14px 0;font-size:12px}.vde-properties select,.vde-properties input{width:100%}.vde-hint{line-height:1.6}.vde-danger{padding:9px 12px;background:transparent;border:1px solid #e88282;color:#ffb2b2;border-radius:8px;cursor:pointer}.vde-card:focus-visible,.vde button:focus-visible{outline:2px solid #59c6fc}@media(max-width:1170px){.vde-layout{grid-template-columns:180px minmax(0,1fr)}.vde-properties{grid-column:1/-1;min-height:0}.vde-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.vde-layout{grid-template-columns:1fr}.vde-library,.vde-properties{min-height:0}.vde-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vde-head{flex-wrap:wrap}.vde-toolbar label{flex-wrap:wrap}}
.vde-card [data-reading-value]{overflow-wrap:anywhere}.vde-card .vde-gauge[data-reading-value]{font-size:13px;text-align:center;min-width:86px;width:max-content;max-width:100%;padding:5px;border-width:5px}.vde-properties #vdeSourceHint{line-height:1.5}

/* Patch 08B: contraste explícito para ações e opções do editor. */
.vde .vde-danger,.vde button.vde-danger{color:#ffd6d6!important;border-color:#f08b96!important;background:#42212b!important;font-weight:800!important}
.vde .vde-danger:hover{color:#ffffff!important;background:#70303c!important;border-color:#ffb6be!important}
.vde .vde-danger:focus-visible{outline:3px solid #ffc6cd;outline-offset:2px}
html[data-iot-theme="industrial"] .vde .vde-danger{color:#842638!important;background:#fff1f3!important;border-color:#aa4e5c!important}
html[data-iot-theme="industrial"] .vde .vde-danger:hover{color:#ffffff!important;background:#842638!important}

/* Patch 08C: contraste consolidado, sem sobrescrever as correções 08B */
html[data-iot-theme="mushroom"] .vde .vde-add,
.vde .vde-add{color:#f4fbff!important;background:#102133!important;border-color:#466580!important}
html[data-iot-theme="mushroom"] .vde .vde-add span,
.vde .vde-add span{color:#f4fbff!important;font-weight:750!important}
.vde .vde-add span:first-child{color:#60dcc1!important}
.vde .vde-add:hover{background:#1a364c!important;border-color:#60dcc1!important}
.vde h1,.vde h2,.vde h3{color:#f3faff!important}
.vde .vde-library p,.vde .vde-properties p,.vde .vde-area-head small,.vde .vde-hint{color:#c6dbeb!important}
.vde .vde-properties label{color:#e7f3fb!important}
.vde .vde-card h3{color:#f3faff!important}
.vde .vde-danger{color:#ffd6d6!important}
html[data-iot-theme="industrial"] .vde h1,
html[data-iot-theme="industrial"] .vde h2,
html[data-iot-theme="industrial"] .vde h3,
html[data-iot-theme="industrial"] .vde .vde-card h3{color:#15364c!important}
html[data-iot-theme="industrial"] .vde .vde-add{color:#17364c!important;background:#f7fbfe!important;border-color:#a8c2d3!important}
html[data-iot-theme="industrial"] .vde .vde-add span{color:#17364c!important}
html[data-iot-theme="industrial"] .vde .vde-add span:first-child{color:#188d78!important}
html[data-iot-theme="industrial"] .vde .vde-library p,
html[data-iot-theme="industrial"] .vde .vde-properties p,
html[data-iot-theme="industrial"] .vde .vde-area-head small,
html[data-iot-theme="industrial"] .vde .vde-hint{color:#435e73!important}
html[data-iot-theme="industrial"] .vde .vde-properties label{color:#15364c!important}

/* Biblioteca visual de ícones — TechRib */
.vde-picker-tools{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:6px}.vde-picker-tools input,.vde-picker-tools select{margin:0!important;width:100%!important}.vde-icon-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;max-height:245px;overflow:auto;padding:6px;border:1px solid #47617a;border-radius:10px;background:#102034}.vde .vde-icon-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#182d40!important;color:#eef8ff!important;border:1px solid #415f79;border-radius:8px;padding:8px 4px;min-width:0;cursor:pointer;font-size:9px}.vde-icon-option span{overflow-wrap:anywhere;text-align:center;line-height:1.25}.vde .vde-icon-option[aria-pressed="true"]{border:2px solid #65dfba!important;background:#24504b!important}.vde-svg-icon,.trv-svg-icon{display:block;width:var(--card-icon-size,36px);height:var(--card-icon-size,36px);max-width:100%;max-height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.vde .vde-icon-option svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.7}.vde-card-icon{width:max(46px,calc(var(--card-icon-size,36px) + 14px));height:max(46px,calc(var(--card-icon-size,36px) + 14px));max-width:100%}.vde-icon-empty{grid-column:1/-1;color:#c5dbea}.vde .vde-properties #vdeIcon{margin-top:6px}@media(max-width:540px){.vde-picker-tools{grid-template-columns:1fr}}
html[data-iot-theme="industrial"] .vde-icon-picker{background:#f0f6fb;border-color:#bdcfdf}html[data-iot-theme="industrial"] .vde .vde-icon-option{background:#fff!important;color:#17344c!important;border-color:#b6c9d9}html[data-iot-theme="industrial"] .vde .vde-icon-option[aria-pressed="true"]{background:#d8f4e9!important;border-color:#168c67!important}

/* Patch 12: prévia do estado real e estilo selecionado */
.vde #vdeButtonStyleWrap[hidden]{display:none!important}
.vde-card.vde-is-on{background:color-mix(in srgb,var(--accent) 20%,#102034);border-color:var(--accent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 25%,transparent)}
.vde-card.vde-is-on .vde-card-icon{color:#063328;background:var(--accent)}
.vde-card.vde-is-on .vde-value{color:var(--accent)}
.vde-card.vde-is-off .vde-card-icon{color:#adc4d7;background:#273d50}
html[data-iot-theme="industrial"] .vde-card.vde-is-on{background:color-mix(in srgb,var(--accent) 15%,#fff)}
/* Patch 15 */
.vde-card[data-size="micro"]{min-height:65px;padding:5px}.vde-card[data-size="small"]{min-height:100px;padding:8px}.vde-card[data-size="micro"] .vde-card-icon{height:23px;width:23px}.vde-card[data-size="micro"] svg{height:15px;width:15px}.vde-card[data-size="small"] .vde-card-icon{height:30px;width:30px}.vde-card[data-size="micro"] h3{font-size:10px;margin:4px 0}.vde-card[data-size="small"] h3{font-size:12px;margin:5px 0}.vde-card[data-size="micro"] .vde-value,.vde-card[data-size="small"] .vde-value{font-size:13px}.vde-card[data-size="micro"] .vde-placeholder{display:none}.vde-card[data-size="large"]{min-height:225px}.vde-card[data-size="xlarge"]{min-height:290px}.vde-group-preview{display:grid;gap:4px;font-size:10px}.vde-group-line{padding:5px;border:1px solid var(--iot-border);border-radius:6px}.vde-group-edit{display:grid;gap:5px;margin:10px 0;padding:8px;border:1px solid var(--iot-border);border-radius:7px}.vde-group-edit button,#vdeAddItem{cursor:pointer;padding:8px;color:#fff;background:#1b6857;border:1px solid #64c9aa;border-radius:7px}

/* Patch 14 — oito modelos da Visão Geral no Editor Visual e no Meu dashboard. */
.vde-card[data-visual-style="minimal"]{border-color:transparent;box-shadow:none;background:transparent}
.vde-card[data-visual-style="focus"] .vde-card-icon{width:max(75px,calc(var(--card-icon-size,36px) + 24px));height:max(75px,calc(var(--card-icon-size,36px) + 24px));margin:5px auto 8px}
.vde-card[data-visual-style="focus"] .vde-card-head{flex-direction:column;align-items:center;text-align:center}
.vde-card[data-visual-style="focus"] h2,.vde-card[data-visual-style="focus"] h3{text-align:center}
.vde-card[data-visual-style="round"]{border-radius:28px;text-align:center}
.vde-card[data-visual-style="round"] .vde-card-head{flex-direction:column;align-items:center}
.vde-card[data-visual-style="round"] .vde-card-icon{border-radius:50%;width:max(66px,calc(var(--card-icon-size,36px) + 18px));height:max(66px,calc(var(--card-icon-size,36px) + 18px))}
.vde-card[data-visual-style="horizontal"]{display:flex;flex-direction:column;justify-content:center}
.vde-card[data-visual-style="horizontal"] .vde-card-head{flex-direction:row;justify-content:flex-start}
.vde-card[data-visual-style="horizontal"] h2,.vde-card[data-visual-style="horizontal"] h3{margin:6px 0}
.vde-card[data-visual-style="compact"]{min-height:105px;padding:9px;border-radius:8px}
.vde-card[data-visual-style="compact"] .vde-card-icon{width:max(30px,calc(var(--card-icon-size,36px) + 4px));height:max(30px,calc(var(--card-icon-size,36px) + 4px))}
.vde-card[data-visual-style="compact"] h2,.vde-card[data-visual-style="compact"] h3{font-size:12px;margin:5px 0}
.vde-card[data-visual-style="industrial"]{border:2px solid var(--accent);border-radius:5px;box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent)}
.vde-card[data-visual-style="industrial"] h2,.vde-card[data-visual-style="industrial"] h3{text-transform:uppercase;letter-spacing:.04em;font-weight:850}
.vde-card[data-visual-style="glass"]{background:linear-gradient(130deg,color-mix(in srgb,var(--accent) 7%,var(--iot-bg,#101f30)) 0%,color-mix(in srgb,var(--accent) 20%,var(--iot-bg,#101f30)) 100%);border:1px solid color-mix(in srgb,var(--accent) 40%,var(--iot-border,#486178));border-radius:18px;box-shadow:0 6px 18px #0002,inset 0 1px 0 #ffffff22}
.vde-card[data-visual-style="glass"].vde-is-on{background:linear-gradient(130deg,color-mix(in srgb,var(--accent) 15%,var(--iot-bg,#101f30)),color-mix(in srgb,var(--accent) 30%,var(--iot-bg,#101f30)))}


/* Patch 18: micro mais limpo para interruptores */
.vde-card[data-size="micro"][data-card-type="switch"] .vde-value{display:none}
.vde-card[data-size="micro"][data-card-type="switch"] .vde-card-icon{width:30px;height:30px;border-radius:8px}
.vde-card[data-size="micro"][data-card-type="switch"] .vde-svg-icon,.vde-card[data-size="micro"][data-card-type="switch"] svg{width:19px;height:19px}
.vde-card[data-size="micro"][data-card-type="switch"] h3{margin:5px 0 3px;font-size:10px}

/* Patch 19: editor acompanha a apresentação real e alinhamento configurável */
.vde .vde-card[data-align="left"]{text-align:left}
.vde .vde-card[data-align="center"]{text-align:center}
.vde .vde-card[data-align="right"]{text-align:right}
.vde .vde-card[data-align="left"] .vde-card-head{justify-content:flex-start}
.vde .vde-card[data-align="center"] .vde-card-head{justify-content:center}
.vde .vde-card[data-align="right"] .vde-card-head{justify-content:flex-end}
.vde .vde-card[data-align] .vde-card-head small{display:none}
.vde .vde-card[data-align="left"] .vde-card-icon{margin-left:0;margin-right:auto}
.vde .vde-card[data-align="center"] .vde-card-icon{margin-left:auto;margin-right:auto}
.vde .vde-card[data-align="right"] .vde-card-icon{margin-left:auto;margin-right:0}
.vde .vde-card .vde-switch-preview{font-size:11px;font-weight:750;color:#fff;background:#226f57;border:1px solid #59c7a4;border-radius:7px;padding:5px 8px;margin-top:7px;text-align:center;line-height:1.2}
.vde-card[data-card-type="universal"]{min-height:100px}.vde-card[data-card-type="universal"] .vde-value{font-size:17px;margin-top:7px}.vde-universal-rgb{width:100%;height:8px;margin-top:8px;border-radius:999px;background:linear-gradient(90deg,var(--preview-rgb),color-mix(in srgb,var(--preview-rgb) 28%,transparent));box-shadow:0 0 12px color-mix(in srgb,var(--preview-rgb) 32%,transparent)}
.vde .vde-card.vde-is-off .vde-switch-preview{background:#34495b;border-color:#617b8c}
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-value,
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-placeholder{display:none!important}
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-card-icon{width:36px;height:36px;min-width:36px}
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-svg-icon{width:25px;height:25px}
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-switch-preview{font-size:9px;margin-top:4px;padding:4px}

/* Patch 20 - o editor apresenta a mesma densidade do dashboard */
.vde .vde-grid{align-items:start!important}
.vde .vde-grid>.vde-card{align-self:start!important;height:max-content}
.vde .vde-card[data-size="micro"][data-card-type="switch"]{min-height:0!important;height:fit-content!important;padding:7px!important}
.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-value,.vde .vde-card[data-size="micro"][data-card-type="switch"] .vde-placeholder{display:none!important}

/* Patch 22A — perfil de contraste unificado para editor */
html[data-iot-theme="mushroom"] .vde{
 --vde-theme-text:#eff8ff;--vde-theme-muted:#bacddd;--vde-theme-bg:#102133;
 --vde-theme-raised:#192f44;--vde-theme-border:#49677f;--vde-theme-accent:#66e6a4;
}
html[data-iot-theme="industrial"] .vde{
 --vde-theme-text:#18364e;--vde-theme-muted:#4e687c;--vde-theme-bg:#ffffff;
 --vde-theme-raised:#f3f8fc;--vde-theme-border:#afc5d8;--vde-theme-accent:#176db6;
}
.vde .vde-library,.vde .vde-main,.vde .vde-properties{color:var(--vde-theme-text);border-color:var(--vde-theme-border)}
.vde .vde-properties label,.vde .vde-card h3,.vde .vde-area-head h2{color:var(--vde-theme-text)!important}
.vde .vde-library p,.vde .vde-properties p,.vde .vde-area-head small,.vde .vde-hint,.vde .vde-placeholder{color:var(--vde-theme-muted)!important}
.vde .vde-properties input:not([type="color"]),.vde .vde-properties select,.vde .vde-toolbar select,
.vde .vde-icon-picker input,.vde .vde-icon-picker select{color:var(--vde-theme-text)!important;background:var(--vde-theme-bg)!important;border-color:var(--vde-theme-border)!important}
.vde .vde-add{color:var(--vde-theme-text)!important;background:var(--vde-theme-raised)!important;border-color:var(--vde-theme-border)!important}
.vde .vde-add span{color:var(--vde-theme-text)!important}
.vde .vde-add span:first-child{color:var(--vde-theme-accent)!important}
.vde .vde-card{border-color:var(--vde-theme-border)}
html[data-iot-theme="industrial"] .vde .vde-icon-option{background:#edf4fa!important;color:#18364e!important;border-color:#aac3d6!important}
html[data-iot-theme="industrial"] .vde .vde-icon-picker{background:#ffffff!important;border-color:#aac3d6!important}
html[data-iot-theme="industrial"] .vde .vde-card .vde-switch-preview{color:#ffffff!important}

/* Patch 22B: ferramentas seguras de organização por grade */
.vde-arrange{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:12px 0}
.vde .vde-arrange button{background:var(--vde-theme-raised,var(--iot-bg,#102034));color:var(--vde-theme-text,#e8f2ff);border:1px solid var(--vde-theme-border,#40556b);border-radius:8px;min-height:35px;padding:6px 8px;font-size:11px;cursor:pointer}
.vde .vde-arrange button:disabled{opacity:.4;cursor:not-allowed}
.vde .vde-arrange #vdeDuplicate{grid-column:1/-1;background:color-mix(in srgb,var(--vde-theme-accent,#53caaa) 18%,var(--vde-theme-raised,#102034))}
.vde-grid{align-items:start;grid-auto-flow:row}
.vde-card{align-self:start}

/* Patch 22D: tema B Industrial, editor visual integralmente claro. */
html[data-iot-theme="industrial"] .vde{color:#18364c!important}
html[data-iot-theme="industrial"] .vde .vde-head p,
html[data-iot-theme="industrial"] .vde .vde-back{color:#326681!important}
html[data-iot-theme="industrial"] .vde .vde-kicker{color:#147765!important}
html[data-iot-theme="industrial"] .vde .vde-toolbar,
html[data-iot-theme="industrial"] .vde .vde-library,
html[data-iot-theme="industrial"] .vde .vde-main,
html[data-iot-theme="industrial"] .vde .vde-properties{background:#fff!important;border-color:#b9cbd8!important;color:#19384e!important;box-shadow:0 1px 5px #203c5210}
html[data-iot-theme="industrial"] .vde .vde-main{background:#f3f7fa!important}
html[data-iot-theme="industrial"] .vde .vde-grid{background:transparent!important}
html[data-iot-theme="industrial"] .vde h1,
html[data-iot-theme="industrial"] .vde h2,
html[data-iot-theme="industrial"] .vde h3,
html[data-iot-theme="industrial"] .vde .vde-toolbar label,
html[data-iot-theme="industrial"] .vde .vde-properties label{color:#17364b!important}
html[data-iot-theme="industrial"] .vde .vde-library p,
html[data-iot-theme="industrial"] .vde .vde-properties p,
html[data-iot-theme="industrial"] .vde .vde-area-head small,
html[data-iot-theme="industrial"] .vde .vde-hint,
html[data-iot-theme="industrial"] .vde #vdeStatus{color:#49677c!important}
html[data-iot-theme="industrial"] .vde select,
html[data-iot-theme="industrial"] .vde input,
html[data-iot-theme="industrial"] .vde textarea{background:#fff!important;color:#17364b!important;border:1px solid #a7bbcc!important}
html[data-iot-theme="industrial"] .vde .vde-add,
html[data-iot-theme="industrial"] .vde .vde-icon-option{background:#fff!important;color:#18364c!important;border-color:#b6cad9!important}
html[data-iot-theme="industrial"] .vde .vde-add span{color:#18364c!important}
html[data-iot-theme="industrial"] .vde .vde-add span:first-child{color:#178472!important}
html[data-iot-theme="industrial"] .vde .vde-add:hover{background:#e9f5f1!important;border-color:#218d79!important}
html[data-iot-theme="industrial"] .vde .vde-icon-picker{background:#f4f8fa!important;border-color:#bacdda!important}
html[data-iot-theme="industrial"] .vde .vde-card{background:#fff!important;color:#17364b!important;border-color:#afc5d4!important;box-shadow:none}
html[data-iot-theme="industrial"] .vde .vde-card.selected{outline:2px solid #158673!important;outline-offset:0}
html[data-iot-theme="industrial"] .vde .vde-card h3,
html[data-iot-theme="industrial"] .vde .vde-card .vde-value,
html[data-iot-theme="industrial"] .vde .vde-card .vde-group-preview,
html[data-iot-theme="industrial"] .vde .vde-card .vde-group-line{color:#17364b!important}
html[data-iot-theme="industrial"] .vde .vde-card .vde-placeholder,
html[data-iot-theme="industrial"] .vde .vde-card .vde-card-head small{color:#516e81!important}
html[data-iot-theme="industrial"] .vde .vde-card .vde-group-line{background:#f6fafc!important;border-color:#c2d3df!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-on{background:#dff3eb!important;border-color:#32977d!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-off{background:#fff!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-off .vde-card-icon{color:#456477!important;background:#e7eff4!important}
html[data-iot-theme="industrial"] .vde .vde-card .vde-switch-preview{color:#fff!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-off .vde-switch-preview{background:#526a7d!important;color:#fff!important}
html[data-iot-theme="industrial"] .vde .vde-group-edit{background:#f7fafc!important;border-color:#c1d2dd!important;color:#17364b!important}
html[data-iot-theme="industrial"] .vde .vde-group-edit small,
html[data-iot-theme="industrial"] .vde .vde-group-edit span{color:#476679!important}
html[data-iot-theme="industrial"] .vde .vde-empty{background:#fff!important;color:#476679!important;border-color:#b7cada!important}
html[data-iot-theme="industrial"] .vde .vde-toolbar button,
html[data-iot-theme="industrial"] .vde .vde-group-edit button,
html[data-iot-theme="industrial"] .vde #vdeAddItem{background:#197e68!important;border-color:#208c72!important;color:#fff!important}
html[data-iot-theme="industrial"] .vde .vde-danger{color:#8c2d3a!important;background:#fff1f2!important;border-color:#ba6672!important}

/* Patch 24: posicionamento livre apenas quando escolhido */
.vde-grid.vde-grid--free{position:relative;display:block;min-height:380px;outline:1px dashed var(--iot-border,#9ab4c8);border-radius:10px;background-image:linear-gradient(to right,rgba(120,150,170,.08) 1px,transparent 1px),linear-gradient(to bottom,rgba(120,150,170,.08) 1px,transparent 1px);background-size:20px 20px}
.vde-grid--free>.vde-card{position:absolute;min-height:0!important;margin:0;overflow:auto;max-width:none;box-sizing:border-box}
.vde-free-drag{position:absolute;right:5px;top:5px;z-index:3;font-size:10px!important;padding:3px 6px!important;cursor:grab!important;touch-action:none;background:#286b62!important;color:#fff!important;border:1px solid #a4ead6!important;border-radius:5px!important}
.vde-free-resize{position:absolute;bottom:1px;right:1px;width:21px;height:21px;z-index:4;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg,transparent 43%,#42bd9f 44%,#42bd9f 54%,transparent 55%,transparent 68%,#42bd9f 69%,#42bd9f 78%,transparent 79%)}
.vde-grid:not(.vde-grid--free) .vde-free-drag,.vde-grid:not(.vde-grid--free) .vde-free-resize{display:none}
@media(max-width:700px){.vde-grid.vde-grid--free{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-height:0!important}.vde-grid--free>.vde-card{position:relative!important;left:auto!important;top:auto!important;width:auto!important;height:auto!important;grid-column:span 1!important}.vde-grid--free .vde-free-drag,.vde-grid--free .vde-free-resize{display:none}}

/* Patch 24A: alça visível e arraste confiável do redimensionamento */
.vde-grid--free>.vde-card{overflow:visible!important}
.vde-grid--free .vde-free-resize{display:block;position:absolute;right:0;bottom:0;width:25px;height:25px;z-index:20;touch-action:none;cursor:nwse-resize;background:#238c77;border:2px solid #c9fff0;border-radius:6px 0 8px 0;box-shadow:0 0 0 2px #071c2944}
.vde-grid--free .vde-free-resize::after{content:'↘';position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:17px;font-weight:900;line-height:1}
@media(max-width:700px){.vde-grid--free .vde-free-resize{display:none!important}}

/* Patch 27: exibir prévias e descrições sem texto ultrapassar a borda. */
.vde-card{overflow-wrap:anywhere}
.vde-card .vde-placeholder{white-space:normal;overflow-wrap:anywhere}
.vde-card .vde-chart{min-height:100px;width:100%;max-width:100%;display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center}
.vde-card .vde-chart svg{width:100%;max-width:100%;height:85px}
.vde-card .vde-chart small{font-size:10px;line-height:1.35;text-align:center}
.vde-grid--free>.vde-card{overflow:hidden!important}
.vde-grid--free>.vde-card .vde-free-drag,.vde-grid--free>.vde-card .vde-free-resize{position:absolute}

.vde29-section{margin-top:16px;font-size:12px;font-weight:800;letter-spacing:.02em;padding-bottom:6px;border-bottom:1px solid var(--iot-border,#40556b)}
.vde-properties #vdeChartAdvanced label:has(input[type="checkbox"]){display:flex;align-items:center;gap:8px;line-height:1.5}
.vde-properties #vdeChartAdvanced input[type="checkbox"]{width:auto;flex:none}
.vde29-chart svg{width:100%;height:auto!important;max-height:110px}


/* TechRib Patch 30: gerenciador de painéis */
.tr30-manager{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;padding:12px;border:1px solid #9db5c5;border-radius:12px;background:var(--iot-card,#f1f6fa);color:var(--iot-text,#16334a)}
.tr30-manager label{display:flex;gap:7px;align-items:center;font-size:13px;font-weight:700}
.tr30-manager select{max-width:330px;min-width:180px}
.tr30-manager select,.tr30-manager button{border-radius:8px;border:1px solid #9db5c5;padding:8px 10px;background:var(--iot-card,#fff);color:inherit;font:inherit}
.tr30-manager button{cursor:pointer;font-weight:650;font-size:12px}
.tr30-manager button:hover{border-color:#45ba99}

/* Patch 31: botoes sempre legiveis, independente do tema geral ou hover */
.tr30-manager button[type="button"]{background:#fff!important;color:#17374c!important;-webkit-text-fill-color:#17374c!important;border:1px solid #92acbf!important;opacity:1!important;visibility:visible!important;text-shadow:none!important;min-height:36px;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;line-height:1.25;font-size:12px!important;font-weight:700!important}
.tr30-manager button[type="button"]:hover,.tr30-manager button[type="button"]:focus-visible{background:#e0f4ee!important;color:#114b40!important;-webkit-text-fill-color:#114b40!important;border-color:#208772!important}
.tr30-manager button[type="button"]:disabled{opacity:.55!important}
.tr30-manager #trvExamples,.tr30-manager #vdeExamples{background:#18745f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#18745f!important}
.tr30-manager #trvExamples:hover,.tr30-manager #vdeExamples:hover{background:#105a4b!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.tr30-manager select{background:#fff!important;color:#17374c!important;-webkit-text-fill-color:#17374c!important}
/* Dashboards múltiplos: seções e séries reais. */
.vde-card[data-card-type="section"]{grid-column:1/-1!important;min-height:76px;background:transparent;border:0;border-bottom:1px solid var(--vde-border,#2d465c);box-shadow:none;border-radius:0;padding:16px 4px 8px}.vde-card[data-card-type="section"] .vde-card-head{display:none}.vde-card[data-card-type="section"] h3{font-size:14px;letter-spacing:1.25px;text-transform:uppercase;color:var(--accent,#54c4a4);margin:0}.vde-card[data-card-type="multi_chart"]{min-height:250px}.vde-card:has(#vdeHidden:checked){opacity:.65}
.vde{--iot-card:var(--tr-card);--iot-text:var(--tr-text);--iot-muted:var(--tr-muted);--iot-border:var(--tr-border);--iot-accent:var(--tr-accent);--iot-raised:var(--tr-raised);--iot-radius:var(--tr-radius)}
.vde-grid .vde-official-card{padding:11px 9px;min-height:116px;height:auto;background:var(--iot-card);border:1px solid var(--iot-border);border-left:4px solid var(--tile-accent);border-radius:calc(var(--iot-radius) - 2px);overflow:visible}
.vde-grid .vde-official-card.on{background:color-mix(in srgb,var(--tile-accent) 13%,var(--iot-card));border-color:color-mix(in srgb,var(--tile-accent) 54%,var(--iot-border))}
.vde-grid .vde-official-card .bench-channel-name{margin:8px 0 2px;min-height:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vde-grid .vde-official-card .bench-channel-sub{font-size:9px;color:var(--iot-muted)}
.vde-grid .vde-official-card .bench-edit[hidden]{display:none}


/* Biblioteca TechRib experimental: estilos visuais originais inspirados em interfaces arredondadas.
   Somente cardStyle: sem scripts de automacao e sem alteracao do canal ou estado. */
.trv .trv-grid .trv-card[data-visual-style="mushroom-soft"],
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-soft"],
.vde .vde-card[data-visual-style="mushroom-soft"]{
 border-radius:22px!important;
 background:color-mix(in srgb,var(--tr-card) 90%,var(--tr-accent) 10%)!important;
 border:1px solid var(--tr-border)!important;
 box-shadow:0 4px 15px #0000000b!important;
}
.trv .trv-grid [data-visual-style="mushroom-soft"] .bench-channel-icon,
.vde [data-visual-style="mushroom-soft"] .vde-card-icon{
 border-radius:50%!important;
 background:color-mix(in srgb,var(--tile-accent,var(--tr-accent)) 15%,var(--tr-card))!important;
}
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-soft"].on{
 background:color-mix(in srgb,var(--tile-accent,#468fef) 18%,var(--tr-card))!important;
 border-color:color-mix(in srgb,var(--tile-accent,#468fef) 52%,var(--tr-border))!important;
}
.trv .trv-grid .trv-card[data-visual-style="mushroom-tile"],
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-tile"],
.vde .vde-card[data-visual-style="mushroom-tile"]{
 border-radius:18px!important;
 background:var(--tr-card)!important;
 border:1px solid var(--tr-border)!important;
 box-shadow:0 4px 14px #00000012!important;
}
.trv .trv-grid [data-visual-style="mushroom-tile"] .bench-channel-icon,
.vde [data-visual-style="mushroom-tile"] .vde-card-icon{
 border-radius:14px!important;
 background:color-mix(in srgb,var(--tile-accent,var(--tr-accent)) 19%,var(--tr-card))!important;
}
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-tile"].on{
 background:color-mix(in srgb,var(--tile-accent,#468fef) 24%,var(--tr-card))!important;
 border-color:var(--tile-accent,#468fef)!important;
}
.trv .trv-grid .trv-card[data-visual-style="mushroom-chip"],
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-chip"],
.vde .vde-card[data-visual-style="mushroom-chip"]{
 border-radius:15px!important;
 border:1px solid var(--tr-border)!important;
 background:var(--tr-card)!important;
 box-shadow:none!important;
}
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-chip"]{
 padding:7px 8px!important;
}
.trv .trv-grid [data-visual-style="mushroom-chip"] .bench-channel-icon,
.vde [data-visual-style="mushroom-chip"] .vde-card-icon{
 border-radius:11px!important;
 background:color-mix(in srgb,var(--tile-accent,var(--tr-accent)) 14%,var(--tr-card))!important;
}
.trv .trv-grid .trv-official-card[data-visual-style="mushroom-chip"].on{
 border-color:var(--tile-accent,#468fef)!important;
 background:color-mix(in srgb,var(--tile-accent,#468fef) 12%,var(--tr-card))!important;
}
/* Contraste consistente nos dois temas */
html[data-iot-theme="industrial"] .trv .trv-official-card[data-visual-style^="mushroom-"]:not(.on) .bench-channel-icon .tr-icon{color:#1b5685!important;stroke:currentColor!important;fill:none!important}
html[data-iot-theme="mushroom"] .trv .trv-official-card[data-visual-style^="mushroom-"]:not(.on) .bench-channel-icon .tr-icon{color:#9dd5ee!important;stroke:currentColor!important;fill:none!important}


/* Patch 32 — editor mais compacto, nomes padronizados e RGB igualado ao card oficial */
.vde{--vde-panel-bg:var(--iot-card,#162b3d);--vde-panel-raised:var(--iot-bg,#102034);--vde-panel-border:var(--iot-border,#3f5870);--vde-panel-text:var(--iot-text,#eef7ff);--vde-panel-muted:var(--iot-muted,#bdd1df);--vde-panel-accent:#62dcb8}
html[data-iot-theme="mushroom"] .vde{--vde-panel-bg:#132538;--vde-panel-raised:#0e1f31;--vde-panel-border:#415f78;--vde-panel-text:#eef7ff;--vde-panel-muted:#bed1df;--vde-panel-accent:#62dcb8}
html[data-iot-theme="industrial"] .vde{--vde-panel-bg:#ffffff;--vde-panel-raised:#f4f8fb;--vde-panel-border:#b2c7d7;--vde-panel-text:#17374c;--vde-panel-muted:#567186;--vde-panel-accent:#1a836c}
.vde-layout{grid-template-columns:190px minmax(0,1fr) 230px;gap:10px}
.vde-library,.vde-main,.vde-properties{background:var(--vde-panel-bg)!important;border-color:var(--vde-panel-border)!important;color:var(--vde-panel-text)!important;padding:12px;border-radius:14px}
.vde-library,.vde-properties{position:sticky;top:10px;max-height:calc(100vh - 88px);overflow:auto}
.vde-library-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.vde-add{min-height:84px;padding:10px 8px;gap:8px;justify-content:flex-start;flex-direction:column;text-align:center;background:var(--vde-panel-raised)!important;color:var(--vde-panel-text)!important;border-color:var(--vde-panel-border)!important}
.vde-add span:first-child{font-size:20px;width:auto;color:var(--vde-panel-accent)!important}
.vde-add span:last-child{font-size:11px;line-height:1.25;color:var(--vde-panel-text)!important}
.vde h1,.vde h2,.vde h3,.vde .vde-area-head h2,.vde .vde-properties label,.vde .vde-toolbar label{color:var(--vde-panel-text)!important}
.vde .vde-library p,.vde .vde-properties p,.vde .vde-area-head small,.vde .vde-hint,.vde .vde-placeholder,.vde .vde-card-head small{color:var(--vde-panel-muted)!important}
.vde select,.vde input,.vde textarea,.vde .vde-arrange button,.vde .vde-toolbar button,.vde .vde-icon-option,.vde .vde-icon-picker{background:var(--vde-panel-raised)!important;color:var(--vde-panel-text)!important;border-color:var(--vde-panel-border)!important}
.vde .vde-icon-option span{color:inherit!important}
.vde-picker-tools{grid-template-columns:minmax(0,1fr) 120px}
.vde-icon-picker{grid-template-columns:repeat(3,minmax(0,1fr));max-height:210px}
.vde-properties label{gap:5px;margin:10px 0;font-size:11px}
.vde select,.vde input{padding:8px}
.vde-grid{gap:9px}
.vde-card{padding:12px;min-height:132px}
.vde-card h3{font-size:13px;margin:8px 0}
.vde-card .vde-value{font-size:19px}
.vde-card[data-size="small"]{min-height:112px}
.vde-card[data-size="small"] .vde-card-icon{width:34px;height:34px}
.vde-card[data-size="small"] .vde-svg-icon{width:20px;height:20px}
.vde-card[data-size="small"] h3{font-size:12px;margin:6px 0}
.vde-card[data-size="small"] .vde-value{font-size:15px}
.vde-card[data-size="small"] .vde-placeholder{font-size:10px}
.vde-rgb-compact{display:grid;gap:7px;margin-top:4px}
.vde-rgb-top{display:flex;align-items:center;gap:9px}
.vde-rgb-wheel{width:52px;height:52px;flex:none;border-radius:50%;background:conic-gradient(#ff5151,#ffac35,#ffe35c,#4edc92,#56baff,#7479ff,#c26cff,#ff5151);padding:6px;box-shadow:0 0 0 2px color-mix(in srgb,var(--vde-panel-border) 55%,transparent)}
.vde-rgb-wheel-core{display:block;width:100%;height:100%;border-radius:50%;background:radial-gradient(circle at 50% 40%,#ffffff 0 56%,#eef4f7 57% 100%);box-shadow:inset 0 0 0 2px #24384a22}
.vde-rgb-meta{display:grid;gap:2px;min-width:0}
.vde-rgb-meta strong{font-size:11px;line-height:1.2;color:var(--vde-panel-text)}
.vde-rgb-meta small{font-size:10px;line-height:1.2;color:var(--vde-panel-muted)}
.vde-rgb-swatches{display:flex;gap:5px;flex-wrap:wrap}
.vde-rgb-swatch{width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 1px #ffffff3a inset,0 0 0 1px color-mix(in srgb,var(--vde-panel-border) 55%,transparent)}
.vde-rgb-apply{height:22px;border-radius:8px;background:linear-gradient(90deg,#72dcb9,#60cdb2);color:#093127;font-weight:800;font-size:10px;display:grid;place-items:center}
.vde-rgb-dim{display:grid;grid-template-columns:auto 1fr auto;gap:6px;align-items:center}
.vde-rgb-dim small,.vde-rgb-dim strong{font-size:10px;color:var(--vde-panel-muted)}
.vde-rgb-dim-track{height:8px;border-radius:999px;background:color-mix(in srgb,var(--vde-panel-border) 45%,transparent);overflow:hidden}
.vde-rgb-dim-fill{display:block;height:100%;width:78%;background:linear-gradient(90deg,#6ed7b4,#70e0c0)}
.vde-rgb-state{width:max-content;min-width:72px;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--vde-panel-accent) 22%,transparent);color:var(--vde-panel-accent);font-size:10px;font-weight:800}
.vde-dimmer-preview,.vde-blind-preview{display:grid;gap:8px;margin-top:8px}
.vde-dimmer-value,.vde-blind-label{font-size:11px;font-weight:800;color:var(--vde-panel-text)}
.vde-dimmer-track{height:10px;border-radius:999px;background:color-mix(in srgb,var(--vde-panel-border) 45%,transparent);overflow:hidden}
.vde-dimmer-fill{display:block;height:100%;width:72%;background:linear-gradient(90deg,#66dbc0,#57b8ff)}
.vde-blind-graphic{display:grid;gap:4px}
.vde-blind-slat{height:6px;border-radius:999px;background:linear-gradient(90deg,color-mix(in srgb,var(--vde-panel-accent) 32%,transparent),color-mix(in srgb,var(--vde-panel-border) 70%,transparent))}
html[data-iot-theme="industrial"] .vde .vde-card,
html[data-iot-theme="industrial"] .vde .vde-toolbar,
html[data-iot-theme="industrial"] .vde .vde-library,
html[data-iot-theme="industrial"] .vde .vde-properties{background:var(--vde-panel-bg)!important;color:var(--vde-panel-text)!important;border-color:var(--vde-panel-border)!important}
html[data-iot-theme="industrial"] .vde .vde-main{background:#f4f8fb!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-on{background:#dff3eb!important;border-color:#3a9f86!important}
html[data-iot-theme="industrial"] .vde .vde-card.vde-is-off{background:#fff!important}
html[data-iot-theme="mushroom"] .vde .vde-card,
html[data-iot-theme="mushroom"] .vde .vde-toolbar,
html[data-iot-theme="mushroom"] .vde .vde-library,
html[data-iot-theme="mushroom"] .vde .vde-properties{background:var(--vde-panel-bg)!important;color:var(--vde-panel-text)!important;border-color:var(--vde-panel-border)!important}
@media(max-width:1320px){.vde-layout{grid-template-columns:170px minmax(0,1fr) 215px}.vde-library-items{grid-template-columns:1fr}}
@media(max-width:1170px){.vde-library,.vde-properties{position:static;max-height:none}.vde-layout{grid-template-columns:1fr}.vde-library-items{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.vde-library-items{grid-template-columns:repeat(2,minmax(0,1fr))}.vde-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.vde-library-items{grid-template-columns:1fr}.vde-picker-tools{grid-template-columns:1fr}.vde-grid{grid-template-columns:1fr}}

/* TechRib V5 — modo livre e alças de redimensionamento identificáveis */
.vde .vde-free-action{min-height:36px!important;max-width:240px;padding:8px 11px!important;border-radius:9px!important;background:#155e57!important;color:#fff!important;border:1px solid #51cbae!important;cursor:pointer;font-size:11px!important;font-weight:800!important;line-height:1.25;text-align:center}
.vde .vde-free-action[aria-pressed="true"]{background:#d9f4e7!important;color:#104a3c!important;border-color:#239b74!important;box-shadow:0 0 0 2px #52c69c38}
.vde-grid.vde-grid--free>.vde-card{overflow:visible!important}
.vde-grid.vde-grid--free>.vde-card .vde-free-drag{display:grid!important;place-items:center;top:3px!important;right:32px!important;z-index:30!important;background:#2c786f!important;color:#fff!important;border:1px solid #9cf0d2!important;cursor:grab!important;white-space:nowrap}
.vde-grid.vde-grid--free>.vde-card .vde-free-resize{display:grid!important;place-items:center!important;right:0!important;bottom:0!important;width:26px!important;height:26px!important;z-index:35!important;background:#238c77!important;border:2px solid #c9fff0!important;border-radius:7px 0 9px 0!important;cursor:nwse-resize!important}
.vde-grid.vde-grid--free>.vde-card .vde-free-resize::after{content:'↘';font-size:18px;line-height:1;color:#fff}
html[data-iot-theme="industrial"] .vde .vde-free-action{background:#146b5b!important;color:#fff!important}
html[data-iot-theme="industrial"] .vde .vde-free-action[aria-pressed="true"]{background:#d9f4e7!important;color:#104a3c!important}
@media(max-width:700px){.vde-grid.vde-grid--free>.vde-card .vde-free-drag,.vde-grid.vde-grid--free>.vde-card .vde-free-resize{display:none!important}}

/* TechRib V6 — tamanhos e ícones no editor coincidentes com o card salvo. */
.vde .vde-card[data-card-type="universal"] .vde-card-icon{width:calc(var(--vde-icon-size,36px) + 10px);height:calc(var(--vde-icon-size,36px) + 10px);max-width:100%}
.vde .vde-card[data-card-type="universal"] .vde-card-icon .vde-svg-icon{width:var(--vde-icon-size,36px);height:var(--vde-icon-size,36px);max-width:100%;max-height:100%}
.vde .vde-card[data-card-type="universal"][data-size="micro"]{min-height:65px!important;padding:5px!important}
.vde .vde-card[data-card-type="universal"][data-size="small"]{min-height:105px!important;padding:9px!important}
.vde .vde-card[data-card-type="universal"][data-size="medium"]{min-height:150px!important;padding:13px!important}
.vde .vde-card[data-card-type="universal"][data-size="large"]{min-height:190px!important;padding:16px!important}
.vde .vde-card[data-card-type="universal"][data-size="xlarge"]{min-height:230px!important;padding:20px!important}
.vde .vde-card.vde-official-card .bench-channel-icon svg{width:min(var(--trd-icon-size,24px),52px)!important;height:min(var(--trd-icon-size,24px),52px)!important;max-width:100%;max-height:100%}
