:root{--d387-gap:10px;--d387-row:82px}.d387-editor{max-width:1600px;margin:0 auto;padding:0 4px 30px;color:#0f172a}.d387-topbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:14px}.d387-kicker{font-size:11px;font-weight:900;letter-spacing:.15em;color:#2563eb}.d387-topbar h1{font-size:34px;margin:4px 0}.d387-topbar p{color:#64748b;margin:0}.d387-actions{display:flex;gap:8px;flex-wrap:wrap}.d387-btn{border:0;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.d387-btn.primary{background:#16a34a;color:#fff}.d387-btn.ghost{background:#fff;color:#0f172a;border:1px solid #cbd5e1}.d387-help{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;padding:11px 14px;border-radius:12px;margin-bottom:14px}.d387-workspace{display:grid;grid-template-columns:285px minmax(0,1fr);gap:14px;align-items:start}.d387-catalog{position:sticky;top:10px;background:#fff;border:1px solid #dbe3ed;border-radius:16px;overflow:hidden;max-height:calc(100vh - 30px)}.d387-catalog-head{padding:14px;border-bottom:1px solid #e2e8f0}.d387-catalog-head input{width:100%;margin-top:10px;padding:9px;border:1px solid #cbd5e1;border-radius:9px}.d387-catalog #d387CatalogList{padding:8px;overflow:auto;max-height:calc(100vh - 130px)}.d387-catalog-item{width:100%;display:grid;grid-template-columns:36px 1fr;gap:8px;text-align:left;padding:10px;border:1px solid transparent;background:#fff;border-radius:11px;cursor:pointer}.d387-catalog-item:hover{background:#f8fafc;border-color:#bfdbfe}.d387-catalog-item .ico{font-size:22px}.d387-catalog-item b{display:block;font-size:13px}.d387-catalog-item small{display:block;color:#64748b;line-height:1.25;margin-top:2px}.d387-stage-wrap{background:#fff;border:1px solid #dbe3ed;border-radius:16px;overflow:hidden;min-width:0}.d387-stage-head{display:flex;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #e2e8f0}.d387-stage-head span{color:#64748b;font-size:12px}.d387-grid-ruler{display:grid;grid-template-columns:repeat(12,1fr);gap:var(--d387-gap);padding:6px 12px;color:#94a3b8;font-size:9px;text-align:center;background:#f8fafc}.d387-stage{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:var(--d387-row);gap:var(--d387-gap);padding:12px;min-height:650px;align-content:start;background-color:#f1f5f9;background-image:linear-gradient(rgba(148,163,184,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,.08) 1px,transparent 1px);background-size:100% calc(var(--d387-row) + var(--d387-gap)),calc((100% - 11*var(--d387-gap))/12 + var(--d387-gap)) 100%}.d387-widget{position:relative;min-width:0;min-height:0;border:2px solid var(--accent,#2563eb);border-radius:14px;background:var(--bg,#fff);box-shadow:0 3px 12px rgba(15,23,42,.08);overflow:hidden;user-select:none}.d387-widget.dragging{opacity:.8;z-index:20;box-shadow:0 12px 30px rgba(15,23,42,.22)}.d387-widget-head{height:34px;display:flex;align-items:center;gap:6px;padding:0 8px;border-bottom:1px solid #e2e8f0;background:rgba(248,250,252,.94)}.d387-widget-head .drag{cursor:grab;font-weight:900;color:#64748b}.d387-widget-head b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.d387-widget-head button{border:0;background:transparent;cursor:pointer;padding:3px;font-size:13px}.d387-widget-preview{height:calc(100% - 34px);display:flex;align-items:center;justify-content:center;text-align:center;padding:10px;box-sizing:border-box}.d387-widget-preview .big{font-size:28px;font-weight:900}.d387-widget-preview small{display:block;color:#64748b;margin-top:4px}.d387-resize{position:absolute;right:2px;bottom:2px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:nwse-resize;font-weight:900;color:var(--accent,#2563eb);background:rgba(255,255,255,.9);border-radius:7px}.d387-dialog{border:0;border-radius:18px;padding:0;width:min(680px,94vw);box-shadow:0 24px 70px rgba(15,23,42,.3)}.d387-dialog::backdrop{background:rgba(15,23,42,.55)}.d387-dialog form{padding:0;margin:0}.d387-dialog-head{display:flex;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #e2e8f0}.d387-dialog-head small{color:#2563eb;font-weight:900}.d387-dialog-head h2{margin:3px 0 0}.d387-close{border:0;background:#f1f5f9;border-radius:9px;font-size:23px;width:38px;height:38px}.d387-formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 20px}.d387-formgrid label{font-size:12px;font-weight:700}.d387-formgrid input,.d387-formgrid select,.d387-formgrid textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid #cbd5e1;border-radius:9px;margin-top:5px}.d387-formgrid input[type=color]{height:42px;padding:3px}.d387-formgrid .full{grid-column:1/-1}.d387-formgrid .check{display:flex;align-items:center;gap:8px}.d387-formgrid .check input{width:auto;margin:0}.d387-type-config{padding-top:4px}.d387-type-config .d387-config-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.d387-dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid #e2e8f0}.d387-empty{grid-column:1/-1;padding:40px;text-align:center;color:#64748b}
/* runtime */
#sgw387-live-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:82px;gap:10px;margin:0 0 14px;align-content:start}.sgw387-live-widget{min-width:0;min-height:0;border:1px solid #dbe3ed;border-top:3px solid var(--accent,#2563eb);border-radius:15px;background:var(--bg,#fff);overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.05);display:flex;flex-direction:column}.sgw387-live-head{padding:9px 12px 6px;font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:space-between}.sgw387-live-body{flex:1;min-height:0;padding:8px 12px 10px;overflow:auto}.sgw387-number{font-size:34px;font-weight:950;line-height:1}.sgw387-muted{font-size:10px;color:#64748b}.sgw387-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sgw387-mini{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px}.sgw387-mini small{font-size:8px;color:#64748b;text-transform:uppercase;font-weight:900}.sgw387-mini b{display:block;font-size:20px;margin-top:3px}.sgw387-pay-list{margin-top:8px;border-top:1px solid #e2e8f0}.sgw387-pay-row{display:grid;grid-template-columns:45px 1fr auto;gap:6px;padding:6px 0;border-bottom:1px solid #f1f5f9;font-size:10px}.sgw387-band-values{display:flex;gap:18px;align-items:end}.sgw387-band-values b{font-size:24px}.sgw387-down{color:#2563eb}.sgw387-up{color:#16a34a}.sgw387-meter{height:8px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-top:9px}.sgw387-meter i{display:block;height:100%;background:var(--accent,#7c3aed);width:0}.sgw387-ext{display:flex;flex-wrap:wrap;gap:7px}.sgw387-ext-item{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;font-size:10px}.sgw387-ext-item i{width:7px;height:7px;border-radius:50%;background:#94a3b8}.sgw387-ext-item.normal i{background:#22c55e}.sgw387-ext-item.instabilidade i{background:#f59e0b}.sgw387-ext-item.falha i{background:#ef4444}.sgw387-clock{font-size:34px;font-weight:900}.sgw387-custom-text{white-space:pre-wrap;line-height:1.5}.sgw387-config-needed{color:#b45309;background:#fffbeb;border:1px dashed #f59e0b;padding:10px;border-radius:10px;font-size:11px}
body.sgw387-custom-dashboard .v167-dashboard>.v167-hero,body.sgw387-custom-dashboard .v167-dashboard>.v167-payments-card{display:none!important}body.sgw387-custom-dashboard [id^="dd38"][id$="dashboard-status"]{display:none!important}
@media(max-width:900px){.d387-workspace{grid-template-columns:1fr}.d387-catalog{position:relative;max-height:none}.d387-catalog #d387CatalogList{max-height:350px}.d387-topbar{flex-direction:column}#sgw387-live-grid{display:flex;flex-direction:column}.sgw387-live-widget{min-height:110px}.d387-stage{overflow:auto;min-width:900px}}

/* ==== SGW V388 MULTI INTERFACES + ICONES ==== */
.d388-iface-help{grid-column:1/-1;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;padding:9px 10px;border-radius:9px;font-size:11px;line-height:1.35;margin-top:3px}
.d388-iface-tools{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:10px 0 7px}.d388-iface-tools input{margin:0!important;flex:1}.d388-iface-tools>div{display:flex;gap:5px}.d388-iface-tools button{border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:8px 9px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}
.d388-iface-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:250px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;padding:7px;background:#f8fafc}.d388-iface-list label{display:flex!important;align-items:center;gap:8px;background:#fff;border:1px solid #e2e8f0;border-radius:9px;padding:8px;cursor:pointer;min-width:0}.d388-iface-list label:hover{border-color:#60a5fa}.d388-iface-list input{width:auto!important;margin:0!important}.d388-iface-list span{min-width:0}.d388-iface-list b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.d388-iface-list small{display:block;color:#64748b;font-size:9px;margin-top:2px}.d388-no-iface{padding:16px;border:1px dashed #f59e0b;background:#fffbeb;color:#92400e;border-radius:10px;margin-top:10px}
.sgw388-multi-band{display:flex;flex-direction:column;gap:5px}.sgw388-band-sep{height:1px;background:#e2e8f0;margin:2px 0 4px}
.sgw388-agg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.sgw388-agg-head small{font-size:8px;font-weight:900;color:#64748b;letter-spacing:.06em}.sgw388-agg-values{display:flex;gap:18px;align-items:center;margin-top:5px}.sgw388-agg-values span{font-size:12px}.sgw388-agg-values b{font-size:22px}.sgw388-agg-status{font-size:9px;font-weight:900;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:5px 8px;white-space:nowrap}.sgw388-agg-meter{margin:8px 0}.sgw388-agg-list{display:flex;flex-direction:column;gap:4px;margin-top:4px}.sgw388-band-small{display:grid;grid-template-columns:minmax(80px,1fr) auto auto;gap:10px;align-items:center;padding:5px 7px;background:#f8fafc;border:1px solid #eef2f7;border-radius:8px;font-size:9px}.sgw388-band-small span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sgw388-band-small .down{color:#2563eb;font-weight:800}.sgw388-band-small .up{color:#16a34a;font-weight:800}
.sgw387-ext{gap:8px}.sgw387-ext-item{padding:6px 8px;gap:7px}.sgw388-app-icon,.sgw388-app-fallback{width:23px;height:23px;flex:0 0 23px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background:#fff}.sgw388-app-icon img{width:20px;height:20px;display:block;object-fit:contain}.sgw388-app-icon>span,.sgw388-app-fallback{font-size:10px;font-weight:900;background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}.sgw388-ext-copy{min-width:0}.sgw388-ext-copy b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sgw388-ext-copy small{display:flex;align-items:center;gap:4px;font-size:8px;color:#64748b;margin-top:1px}.sgw388-ext-copy small i{width:7px;height:7px;border-radius:50%;background:#94a3b8}.sgw387-ext-item.normal .sgw388-ext-copy small i{background:#22c55e}.sgw387-ext-item.instabilidade .sgw388-ext-copy small i{background:#f59e0b}.sgw387-ext-item.falha .sgw388-ext-copy small i{background:#ef4444}
@media(max-width:700px){.d388-iface-list{grid-template-columns:1fr}.d388-iface-tools{align-items:stretch;flex-direction:column}.sgw388-band-small{grid-template-columns:1fr auto}.sgw388-band-small .up{grid-column:2}.sgw388-agg-values{gap:10px;flex-direction:column;align-items:flex-start}}
/* ==== FIM SGW V388 ==== */


/* ==== SGW V389 MAIS CARDS ==== */
.d389-cat-title{position:sticky;top:0;z-index:2;margin:10px 0 6px;padding:7px 8px;background:#eaf0f8;border-radius:8px;color:#334155;font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.06em}
.d387-catalog-item{border-left:3px solid var(--cat-accent,#2563eb)!important}.d387-widget-head .clone{color:#475569}
.sgw389-label{font-size:10px;font-weight:950;letter-spacing:.08em;color:#475569;margin-bottom:5px}.sgw389-money{font-size:25px;font-weight:950;line-height:1.1;color:#0f172a}.sgw389-single-app{display:flex;align-items:center;gap:12px}.sgw389-single-app>.sgw388-app-icon,.sgw389-single-app>.sgw388-app-fallback{width:38px;height:38px;flex-basis:38px}.sgw389-single-app>.sgw388-app-icon img{width:32px;height:32px}.sgw389-single-app>div>b{display:block;font-size:15px}.sgw389-single-app>div>span{display:flex;align-items:center;gap:5px;margin-top:3px;font-size:10px;font-weight:900;color:#64748b}.sgw389-single-app>div>span i{width:8px;height:8px;border-radius:50%;background:#94a3b8}.sgw389-single-app>div>span.normal i{background:#22c55e}.sgw389-single-app>div>span.instabilidade i{background:#f59e0b}.sgw389-single-app>div>span.falha i{background:#ef4444}.sgw389-single-app>div>small{display:block;margin-top:4px;color:#94a3b8;font-size:8px}
/* ==== FIM SGW V389 ==== */

/* ==== SGW V390 GRAFICO DE BANDA QUASE EM TEMPO REAL ==== */
.sgw390-chart-box{margin-top:10px;border:1px solid #dbe3ed;border-radius:11px;background:linear-gradient(180deg,#fbfdff,#f8fafc);padding:8px 9px 7px;overflow:hidden}
.sgw390-chart-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px;color:#64748b;font-size:8px;font-weight:850;letter-spacing:.025em}.sgw390-chart-head>span:last-child{display:flex;gap:10px;white-space:nowrap}.sgw390-chart-head .down{color:#2563eb}.sgw390-chart-head .up{color:#16a34a}
.sgw390-traffic-chart{display:block;width:100%;height:128px;overflow:visible}.sgw390-traffic-chart .grid line{stroke:#e2e8f0;stroke-width:1;vector-effect:non-scaling-stroke;stroke-dasharray:4 4}.sgw390-traffic-chart polyline{fill:none;stroke-width:2.4;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.sgw390-traffic-chart polyline.rx{stroke:#2563eb}.sgw390-traffic-chart polyline.tx{stroke:#16a34a}
.sgw390-chart-legend{display:flex;align-items:center;gap:12px;margin-top:3px;color:#64748b;font-size:8px}.sgw390-chart-legend span{display:inline-flex;align-items:center;gap:4px}.sgw390-chart-legend i{width:14px;height:3px;border-radius:999px;display:inline-block}.sgw390-chart-legend i.rx{background:#2563eb}.sgw390-chart-legend i.tx{background:#16a34a}.sgw390-chart-legend span:last-child{margin-left:auto}
.sgw390-chart-wait{margin-top:10px;min-height:74px;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc;color:#64748b;font-size:9px}
@media(max-width:700px){.sgw390-chart-head{align-items:flex-start;flex-direction:column}.sgw390-traffic-chart{height:105px}}
/* ==== FIM SGW V390 ==== */

/* ==== SGW V391 EDITOR VISUAL PROFISSIONAL ==== */
.d391-editor{max-width:1780px}.d391-toolbar{display:flex;align-items:center;gap:14px;justify-content:space-between;background:#0f172a;color:#fff;border-radius:14px;padding:10px 12px;margin-bottom:14px;box-shadow:0 6px 22px rgba(15,23,42,.12)}
.d391-live-status{display:flex;align-items:center;gap:7px;font-size:11px}.d391-live-status i{width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}.d391-live-status span{color:#cbd5e1}.d391-tip{font-size:10px;color:#cbd5e1}.d391-devices{display:flex;gap:4px;padding:3px;background:#1e293b;border-radius:9px}.d391-devices button{border:0;background:transparent;color:#cbd5e1;border-radius:7px;padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer}.d391-devices button.active{background:#fff;color:#0f172a}
.d387-catalog-head small{display:block;color:#64748b;font-size:10px;margin-top:4px}.d391-stage-wrap{transition:max-width .2s ease;margin-left:auto;margin-right:auto}.d391-stage-wrap[data-device=tablet]{max-width:900px}.d391-stage-wrap[data-device=mobile]{max-width:430px}.d391-device-shell{overflow:auto;background:#e9eff6}.d391-stage-wrap[data-device=mobile] .d387-grid-ruler{display:none}.d391-stage-wrap[data-device=mobile] .d387-stage{display:flex;flex-direction:column;min-width:0!important;min-height:650px}.d391-stage-wrap[data-device=mobile] .d387-widget{min-height:120px;width:100%}.d391-stage-wrap[data-device=mobile] .d387-resize,.d391-stage-wrap[data-device=mobile] .drag{opacity:.35}
.d391-widget{border:1px solid #dbe3ed!important;border-top:3px solid var(--accent,#2563eb)!important;border-radius:var(--radius,16px)!important;background:var(--bg,#fff)!important;display:flex;flex-direction:column}.d391-widget:hover{box-shadow:0 9px 25px rgba(15,23,42,.16)}
.d391-editbar{position:absolute;z-index:8;right:5px;top:5px;display:flex;align-items:center;gap:2px;padding:3px;border:1px solid #cbd5e1;border-radius:8px;background:rgba(255,255,255,.94);box-shadow:0 2px 7px rgba(15,23,42,.08);opacity:.15;transition:opacity .15s}.d391-widget:hover .d391-editbar,.d391-widget.dragging .d391-editbar{opacity:1}.d391-editbar .drag{cursor:grab;padding:2px 5px;color:#475569;font-weight:950}.d391-editbar button{border:0;background:transparent;border-radius:5px;padding:3px 4px;cursor:pointer;font-size:11px}.d391-editbar button:hover{background:#e2e8f0}.d391-size{font-size:8px;color:#64748b;font-weight:850;padding:0 3px}.d391-preview-head{padding-right:112px!important;min-height:28px}.d391-preview-body{padding-top:8px!important;overflow:auto}.d391-preview-body.align-center{text-align:center}.d391-preview-body.align-right{text-align:right}.d391-preview-body.align-center .sgw387-pair,.d391-preview-body.align-right .sgw387-pair{text-align:left}
.d391-layout-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;border:1px solid #dbe3ed;background:#f8fafc;padding:10px;border-radius:11px}.d391-layout-fields>strong{grid-column:1/-1;font-size:11px;color:#334155}.d391-layout-fields label{font-size:10px}.d391-dialog{width:min(780px,96vw)}
.d391-percent b{font-size:30px;line-height:1;font-weight:950}.d391-percent small{display:block;color:#64748b;font-size:10px;margin-top:6px}.d391-progress{height:9px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-top:9px}.d391-progress i{height:100%;display:block;background:var(--accent,#2563eb);border-radius:999px}.d391-progress-card>b{font-size:27px}.d391-progress-card>span{font-size:10px;color:#64748b;margin-left:6px}.d391-progress-card>small{display:block;color:#64748b;font-size:9px;margin-top:5px}.d391-date b{display:block;font-size:28px}.d391-date span{color:#64748b;text-transform:capitalize}.d391-section-title{font-size:22px;font-weight:950;letter-spacing:-.02em}.d391-separator{height:2px;background:var(--accent,#cbd5e1);width:100%;border-radius:99px}.d391-space-label{height:100%;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;border-radius:9px;color:#94a3b8;font-size:9px;letter-spacing:.1em}.d391-link-preview{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.d391-link-preview>span{font-size:28px}.d391-link-preview small{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#94a3b8}.d391-spark{display:block;width:100%;height:78px;margin:8px 0 5px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}.d391-spark polyline{fill:none;stroke-width:1.8;vector-effect:non-scaling-stroke}.d391-spark .rx{stroke:#2563eb}.d391-spark .tx{stroke:#16a34a}.d391-spark-wait{height:58px;margin:7px 0;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;border-radius:8px;color:#94a3b8;font-size:9px}
/* Runtime V391 */
.sgw387-live-widget{border-radius:var(--radius,16px)!important}.sgw387-live-widget.align-center .sgw387-live-body{text-align:center}.sgw387-live-widget.align-right .sgw387-live-body{text-align:right}.sgw387-live-widget.align-center .sgw387-pair,.sgw387-live-widget.align-right .sgw387-pair{text-align:left}.d391-live-space{background:transparent!important;border-color:transparent!important;box-shadow:none!important}.d391-live-title{background:transparent!important;border-color:transparent!important;box-shadow:none!important}.d391-live-separator{background:transparent!important;border-color:transparent!important;box-shadow:none!important;justify-content:center}.d391-live-link{display:flex;height:100%;min-height:48px;align-items:center;justify-content:center;gap:9px;border:1px solid color-mix(in srgb,var(--accent,#2563eb) 30%,#e2e8f0);border-radius:12px;background:color-mix(in srgb,var(--accent,#2563eb) 8%,#fff);color:#0f172a;text-decoration:none}.d391-live-link span{font-size:22px}.d391-live-link b{font-size:13px}
@media(max-width:1100px){.d391-toolbar{align-items:flex-start;flex-wrap:wrap}.d391-tip{width:100%}}@media(max-width:700px){.d391-layout-fields{grid-template-columns:1fr 1fr}.d391-toolbar{display:block}.d391-devices{margin:8px 0;width:max-content}.d391-live-status{margin-bottom:6px}}
/* ==== FIM SGW V391 ==== */


/* ==== SGW V393 EDITOR ULTRA ==== */
.d393-grid-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.d393-grid-controls label{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:800;color:#cbd5e1}.d393-grid-controls select{border:1px solid #475569;background:#1e293b;color:#fff;border-radius:7px;padding:5px 7px;font-weight:800}
.d387-grid-ruler{overflow:hidden}.d387-grid-ruler span{min-width:0;overflow:hidden}.d393-presets{grid-column:1/-1;display:flex;gap:5px;flex-wrap:wrap}.d393-presets button{border:1px solid #cbd5e1;background:#fff;border-radius:7px;padding:5px 8px;font-size:9px;font-weight:800;cursor:pointer}.d393-presets button:hover{border-color:#2563eb;color:#2563eb}.d393-locked{border-style:double}.d393-locked .drag{cursor:not-allowed!important;opacity:.4}.d393-problem-list{display:flex;flex-wrap:wrap;gap:6px}.d393-problem-list>span{display:flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid #fecaca;background:#fff1f2;border-radius:9px;font-size:9px}.d393-problem-list small{color:#b91c1c;font-weight:900}.d393-semaforo{height:100%;min-height:70px;display:grid;grid-template-columns:20px 1fr;grid-template-rows:1fr 1fr;align-items:center;column-gap:8px}.d393-semaforo i{grid-row:1/-1;width:18px;height:18px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 6px #dcfce7}.d393-semaforo b{font-size:28px;align-self:end}.d393-semaforo span{font-size:10px;font-weight:900;color:#64748b;align-self:start}.d393-semaforo.warn i{background:#f59e0b;box-shadow:0 0 0 6px #fef3c7}.d393-semaforo.crit i{background:#ef4444;box-shadow:0 0 0 6px #fee2e2}.d393-semaforo.warn span{color:#b45309}.d393-semaforo.crit span{color:#b91c1c}
@media(max-width:700px){.d393-grid-controls{margin:8px 0}.d393-hide-mobile{opacity:.45}.d391-stage-wrap[data-device=mobile] .d393-hide-mobile{display:none!important}.d393-presets{display:grid;grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){#sgw387-live-grid .d393-live-hide-mobile{display:none!important}}
/* ==== FIM SGW V393 ==== */


/* ==========================================================
 SGW V488 - DASHBOARD EDITOR V387 + CONFIG V453
 Somente visual.
 Nao altera Dashboard V450, cards ativos, APIs ou configuracoes salvas.
 ========================================================== */

.d387-editor{color:#eaf4ff!important}
.d387-kicker{color:#60a5fa!important}
.d387-topbar h1{color:#f6faff!important}
.d387-topbar p{color:#91afd0!important}
.d387-btn.ghost{background:#0a294b!important;color:#eaf4ff!important;border-color:#205985!important}
.d387-help{background:#0b2d51!important;color:#9dceff!important;border-color:#246799!important}

/* Catalogo */
.d387-catalog{background:#061a33!important;color:#eaf4ff!important;border-color:#17466f!important;box-shadow:0 12px 30px rgba(0,0,0,.16)!important}
.d387-catalog-head{background:#071f3b!important;border-color:#17466f!important}
.d387-catalog-head h2,.d387-catalog-head h3,.d387-catalog-head b{color:#f6faff!important}
.d387-catalog-head input{background:#041a34!important;color:#f1f8ff!important;border-color:#1a507f!important}
.d387-catalog-head input::placeholder{color:#7897b8!important}
.d387-catalog-item{background:#071f3b!important;color:#eaf4ff!important;border-color:transparent!important}
.d387-catalog-item:hover{background:#0b2d51!important;border-color:#3b82f6!important}
.d387-catalog-item b{color:#f6faff!important}
.d387-catalog-item small{color:#91afd0!important}

/* Stage */
.d387-stage-wrap{background:#061a33!important;border-color:#17466f!important;box-shadow:0 12px 30px rgba(0,0,0,.16)!important}
.d387-stage-head{background:#071f3b!important;color:#eaf4ff!important;border-color:#17466f!important}
.d387-stage-head b,.d387-stage-head h3{color:#f6faff!important}
.d387-stage-head span{color:#91afd0!important}
.d387-grid-ruler{background:#04182f!important;color:#7897b8!important}
.d387-stage{
  background-color:#031327!important;
  background-image:
    linear-gradient(rgba(66,111,154,.16) 1px,transparent 1px),
    linear-gradient(90deg,rgba(66,111,154,.12) 1px,transparent 1px)!important
}

/* Widgets */
.d387-widget{background:var(--bg,#071f3b)!important;color:#eaf4ff!important;box-shadow:0 6px 18px rgba(0,0,0,.22)!important}
.d387-widget-head{background:rgba(7,31,59,.96)!important;color:#eaf4ff!important;border-color:#17466f!important}
.d387-widget-head .drag{color:#91afd0!important}
.d387-widget-head b{color:#f6faff!important}
.d387-widget-head button{color:#cfe2f7!important}
.d387-widget-preview{color:#dcecff!important}
.d387-widget-preview small{color:#91afd0!important}
.d387-resize{background:#0a294b!important;border:1px solid #205985!important}

/* Dialog editor */
.d387-dialog{background:#061a33!important;color:#eaf4ff!important;border:1px solid #205985!important;box-shadow:0 28px 90px rgba(0,0,0,.52)!important}
.d387-dialog::backdrop{background:rgba(1,7,17,.76)!important}
.d387-dialog-head{background:#071f3b!important;color:#eaf4ff!important;border-color:#17466f!important}
.d387-dialog-head small{color:#70b7ff!important}
.d387-dialog-head h2{color:#f6faff!important}
.d387-close{background:#0a294b!important;color:#eaf4ff!important}
.d387-formgrid label{color:#cfe2f7!important}
.d387-formgrid input,.d387-formgrid select,.d387-formgrid textarea{background:#041a34!important;color:#f1f8ff!important;border-color:#1a507f!important}
.d387-formgrid input::placeholder,.d387-formgrid textarea::placeholder{color:#7897b8!important}
.d387-formgrid .check input[type="checkbox"]{
  appearance:auto!important;-webkit-appearance:checkbox!important;
  width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;
  max-width:17px!important;max-height:17px!important;padding:0!important;margin:0!important;
  accent-color:#1677ff!important
}
.d387-dialog-actions{background:#071f3b!important;border-color:#17466f!important}
.d387-empty{color:#91afd0!important}

/* Runtime V387, quando usado */
.sgw387-live-widget{background:#071f3b!important;color:#eaf4ff!important;border-color:#17466f!important;box-shadow:0 6px 18px rgba(0,0,0,.16)!important}
.sgw387-live-head{color:#f6faff!important}
.sgw387-live-body{color:#dcecff!important}
.sgw387-muted{color:#91afd0!important}
.sgw387-mini{background:#0a294b!important;color:#eaf4ff!important;border-color:#205985!important}
.sgw387-mini small{color:#91afd0!important}
.sgw387-pay-list{border-color:#17466f!important}
.sgw387-pay-row{border-color:#12395f!important}
.sgw387-meter{background:#04182f!important}
.sgw387-ext-item{background:#0a294b!important;color:#dcecff!important;border-color:#205985!important}
.sgw387-config-needed{background:#3b300d!important;color:#ffe08a!important;border-color:#866a14!important}

/* Config V453 */
.v453-config-page{max-width:1480px!important;margin:0 auto!important;color:#eaf4ff!important}
.v453-config-head small{color:#60a5fa!important}
.v453-config-head h1{color:#f6faff!important}
.v453-config-head p{color:#91afd0!important}
.v453-config-card{background:linear-gradient(180deg,#071f3b,#061a33)!important;color:#eaf4ff!important;border-color:#17466f!important;box-shadow:0 10px 28px rgba(0,0,0,.14)!important}
.v453-config-field label{color:#cfe2f7!important}
.v453-config-field input[type="text"]{background:#041a34!important;color:#f1f8ff!important;border-color:#1a507f!important}
.v453-config-field input[type="text"]::placeholder{color:#7897b8!important}

.v453-switch-row{background:#0a294b!important;color:#dcecff!important;border:1px solid #205985!important;border-radius:10px!important}
.v453-switch-row b{color:#f6faff!important}
.v453-switch-row small{color:#91afd0!important}
.v453-switch-row input[type="checkbox"]{
  appearance:auto!important;-webkit-appearance:checkbox!important;
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  max-width:18px!important;max-height:18px!important;padding:0!important;margin:0!important;
  accent-color:#1677ff!important
}

.v453-card-list{border-color:#17466f!important}
.v453-card-item{background:#071f3b!important;color:#eaf4ff!important;border:1px solid #17466f!important}
.v453-card-item:hover{background:#0b2d51!important;border-color:#246799!important}
.v453-card-item b{color:#f6faff!important}
.v453-card-item small{color:#91afd0!important}
.v453-card-item input[type="checkbox"]{
  appearance:auto!important;-webkit-appearance:checkbox!important;
  width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;
  max-width:17px!important;max-height:17px!important;padding:0!important;margin:0!important;
  accent-color:#1677ff!important
}
.v453-order button{background:#0a294b!important;color:#cfe2f7!important;border:1px solid #205985!important}
.v453-order button:hover{background:#0b3157!important;color:#9dceff!important}

.v453-actions{border-color:#17466f!important}
.v453-actions button{background:#0a294b!important;color:#eaf4ff!important;border:1px solid #205985!important}
.v453-actions #v453Save{background:#2563eb!important;color:#fff!important;border-color:#3b82f6!important}
.v453-actions #v453Reset{background:#3b300d!important;color:#ffe08a!important;border-color:#866a14!important}

/* Nao interfere no menu superior */
#sgw450TopShell{isolation:isolate}


/* ==========================================================
 SGW V490 - RESIDUOS REAIS V489
 DASHBOARD EDITOR: V388 / V389 / V390 / V391 / V393
 ========================================================== */

/* V388 - seletor/lista de interfaces */
.d388-iface-tools input{
  background:#041a34 !important;
  color:#f1f8ff !important;
  border-color:#1a507f !important;
}
.d388-iface-tools button{
  background:#0a294b !important;
  color:#cfe2f7 !important;
  border-color:#205985 !important;
}
.d388-iface-list{
  background:#04182f !important;
  color:#dcecff !important;
  border-color:#17466f !important;
}
.d388-iface-list label{
  background:#071f3b !important;
  color:#dcecff !important;
  border-color:#17466f !important;
}
.d388-iface-list label:hover{
  background:#0b2d51 !important;
}
.d388-iface-list input[type="checkbox"]{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  width:17px !important;
  height:17px !important;
  min-width:17px !important;
  min-height:17px !important;
  max-width:17px !important;
  max-height:17px !important;
  padding:0 !important;
  margin:0 !important;
  accent-color:#1677ff !important;
}

/* V388 agregados */
.sgw388-agg-head small{
  color:#91afd0 !important;
}
.sgw388-agg-values b{
  color:#f6faff !important;
}
.sgw388-agg-values small{
  color:#91afd0 !important;
}

/* V389 - categorias e KPIs */
.d389-cat-title{
  background:#0a2a4e !important;
  color:#c5e2ff !important;
  border:1px solid #17466f !important;
}
.d387-widget-head .clone{
  color:#9dceff !important;
}
.sgw389-label{
  color:#91afd0 !important;
}
.sgw389-money{
  color:#f6faff !important;
}
.sgw389-single-app{
  color:#dcecff !important;
}
.sgw389-single-app b{
  color:#f6faff !important;
}
.sgw389-single-app small{
  color:#91afd0 !important;
}

/* V390 - gráficos */
.sgw390-chart-head,
.sgw390-chart-legend{
  color:#91afd0 !important;
}
.sgw390-chart-wait{
  background:#04182f !important;
  color:#91afd0 !important;
  border-color:#24618e !important;
}

/* V391 - barra de edição e layout */
.d391-live-status span{
  color:#cfe2f7 !important;
}
.d387-catalog-head small{
  color:#91afd0 !important;
}
.d391-editbar{
  background:rgba(7,31,59,.96) !important;
  color:#eaf4ff !important;
  border-color:#205985 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.25) !important;
}
.d391-editbar button{
  background:#0a294b !important;
  color:#cfe2f7 !important;
  border-color:#205985 !important;
}
.d391-editbar button:hover{
  background:#0b3157 !important;
  color:#9dceff !important;
}
.d391-layout-fields{
  background:#04182f !important;
  color:#dcecff !important;
  border-color:#17466f !important;
}
.d391-layout-fields > strong{
  color:#f6faff !important;
}
.d391-layout-fields label{
  color:#cfe2f7 !important;
}
.d391-layout-fields input,
.d391-layout-fields select{
  background:#041a34 !important;
  color:#f1f8ff !important;
  border-color:#1a507f !important;
}
.d391-percent small{
  color:#91afd0 !important;
}
.d391-progress{
  background:#04182f !important;
}

/* V393 - presets */
.d393-presets button{
  background:#0a294b !important;
  color:#cfe2f7 !important;
  border-color:#205985 !important;
}
.d393-presets button:hover,
.d393-presets button.active{
  background:#0b3157 !important;
  color:#9dceff !important;
  border-color:#3b82f6 !important;
}
