/* NOC8-DESK — visualizador remoto e página do painel */

/* ---------- visualizador ---------- */
.dv-body{background:#05090C;color:#E3ECF1;height:100vh;display:flex;flex-direction:column;overflow:hidden}
.dv-bar{display:flex;align-items:center;gap:14px;padding:8px 14px;background:#0B141A;border-bottom:1px solid #18262F;flex:none;min-height:54px;flex-wrap:wrap;
  --surface:#101A21;--surface-2:#15212A;--line:#223340;--ink:#E3ECF1;--muted:#7E919D;--accent:#4AB0DC;--accent-ink:#04131B;--crit:#EF6C6C;--crit-soft:#321616}
.dv-logo{font:700 18px/1 var(--f-display);letter-spacing:.04em;color:#fff}
.dv-logo b{color:#2BC274;font-weight:700}
.dv-who{display:flex;align-items:center;gap:10px;min-width:0}
.dv-who .dot{width:9px;height:9px;border-radius:50%;background:#7E919D;flex:none}
.dv-who .dot.on{background:#3DC47C;box-shadow:0 0 0 3px rgba(61,196,124,.18)}
.dv-who .dot.off{background:#EF6C6C}
.dv-who-txt{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.dv-who-txt b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.dv-who-txt span{font-size:12px;color:#7E919D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:420px}
.dv-stats{font-size:11.5px;color:#7E919D;white-space:nowrap}
.dv-spacer{flex:1}
.dv-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.dv-sel{width:auto;padding:5px 8px;font-size:12.5px;background:#101A21;border-color:#223340;color:#E3ECF1}
.dv-btn{color:#CFE2EC}
.dv-btn:hover{background:#15212A}
.dv-btn.danger{background:transparent;border-color:#5a2a2a;color:#EF6C6C}
.dv-btn.danger:hover{background:#321616}
.dv-menu-wrap{position:relative}
.dv-menu{position:absolute;right:0;top:calc(100% + 6px);background:#101A21;border:1px solid #223340;border-radius:9px;box-shadow:0 10px 40px rgba(0,0,0,.5);padding:6px;z-index:20;min-width:260px}
.dv-menu button{display:flex;width:100%;justify-content:space-between;gap:16px;background:none;border:0;color:#E3ECF1;padding:8px 10px;border-radius:6px;cursor:pointer;text-align:left;font-size:13px}
.dv-menu button:hover{background:#15212A}
.dv-menu kbd{font:500 11.5px var(--f-mono);color:#7E919D}
.dv-menu .sep{height:1px;background:#223340;margin:5px 4px}

.dv-stage{flex:1;position:relative;overflow:auto;display:flex;outline:none;background:#05090C;min-height:0}
.dv-canvas{display:block;margin:auto;flex:none;image-rendering:auto;background:#000;cursor:default;box-shadow:0 0 0 1px #18262F}
.dv-canvas.control{cursor:none} /* a seta do próprio PC remoto já vem na imagem */

.dv-overlay{position:absolute;inset:0;display:grid;place-items:center;background:rgba(5,9,12,.82);backdrop-filter:blur(2px);z-index:5;padding:16px}
.dv-overlay.hidden{display:none}
.dv-ov-card{text-align:center;max-width:460px;display:flex;flex-direction:column;align-items:center;gap:10px}
.dv-ov-card h2{font-size:22px;color:#fff}
.dv-ov-card p{color:#AFC0CA;margin:0;font-size:14px}
.dv-ov-ico svg{width:42px;height:42px;color:#4AB0DC}
.dv-ov-ico.warn svg{color:#E6A93E} .dv-ov-ico.crit svg{color:#EF6C6C}
.dv-spin{width:38px;height:38px;border-radius:50%;border:3px solid #223340;border-top-color:#4AB0DC;animation:dvspin .9s linear infinite}
@keyframes dvspin{to{transform:rotate(360deg)}}
.dv-toast{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);background:#2D2310;color:#E6A93E;border:1px solid #5b4718;padding:8px 14px;border-radius:9px;font-size:13px;z-index:6;max-width:min(720px,90%);text-align:center}
.dv-ro{position:absolute;top:12px;right:14px;background:rgba(16,26,33,.9);border:1px solid #223340;color:#AFC0CA;font-size:12px;padding:4px 10px;border-radius:999px;display:flex;gap:6px;align-items:center;z-index:4}
.dv-ro svg{width:14px;height:14px}
.dv-body .modal-bg{z-index:50}
.dv-body .card{--surface:#101A21;--line:#223340;--line-2:#1A2833;--ink:#E3ECF1;--muted:#7E919D;--accent:#4AB0DC;--accent-ink:#04131B;--surface-2:#15212A;background:#101A21;color:#E3ECF1;border-color:#223340}
.dv-body .textarea{background:#0B141A;color:#E3ECF1;border-color:#223340}
@media (max-width:900px){ .hide-sm{display:none} .dv-stats{display:none} .dv-who-txt b{max-width:160px} .dv-who-txt span{max-width:200px} }

/* ---------- página do painel ---------- */
.dk-os{display:inline-flex;align-items:center;gap:6px}
.dk-os svg{width:15px;height:15px;color:var(--muted)}
.dk-id{font:600 13px var(--f-mono);letter-spacing:.04em;white-space:nowrap}
.dk-live{display:inline-flex;align-items:center;gap:5px}
.dk-actions{display:flex;gap:6px;justify-content:flex-end}
.dk-cmd{display:flex;gap:8px;align-items:stretch}
.dk-cmd pre{flex:1;margin:0;background:var(--code-bg);color:var(--code-ink);font:12.5px/1.5 var(--f-mono);padding:10px 12px;border-radius:var(--r-sm);white-space:pre-wrap;word-break:break-all}
.dk-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;color:var(--ink-2);font-size:13.5px}
.dk-note{display:flex;gap:10px;align-items:flex-start;background:var(--surface-2);border:1px solid var(--line-2);border-radius:var(--r-sm);padding:10px 12px;font-size:13px;color:var(--ink-2)}
.dk-note svg{color:var(--warn);margin-top:2px}
.dk-dl{display:flex;gap:10px;flex-wrap:wrap}

/* autorização × senha de acesso emergencial */
.dv-choose{display:flex;flex-direction:column;align-items:stretch;gap:14px;width:min(420px,90vw);margin-top:6px}
.dv-pass{display:flex;flex-direction:column;gap:7px;text-align:left;background:#101A21;border:1px solid #223340;border-radius:10px;padding:12px 14px;width:min(420px,90vw)}
.dv-pass label{font-size:12.5px;font-weight:600;color:#AFC0CA}
.dv-pass .input{background:#0B141A;color:#E3ECF1;border-color:#223340;flex:1}
.dv-pass-err{color:#EF6C6C;font-size:12.5px;min-height:16px}
.dv-pass-note{color:#7E919D;font-size:11.5px}
.dv-ov-card #ov-actions{flex-direction:column}

/* grupos */
.dk-ck{width:34px;padding-right:0!important}
.dk-ck input,.dk-grp-h input{width:16px;height:16px;cursor:pointer;accent-color:var(--accent)}
.tbl tr.dk-grp td{background:var(--surface-2);padding:8px 14px;cursor:pointer;user-select:none;border-bottom:1px solid var(--line)}
.tbl tr.dk-grp:hover td{background:var(--surface-3)}
.dk-grp-h{display:flex;align-items:center;gap:10px}
.dk-grp-h b{font-family:var(--f-display);font-size:15px;letter-spacing:.02em}
.dk-caret svg{width:16px;height:16px;transition:transform .15s;color:var(--muted)}
.dk-grp.closed .dk-caret svg{transform:rotate(-90deg)}
.dk-grp-dot{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}
.dk-bulk{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);border-radius:var(--r-sm);padding:8px 12px;margin-bottom:14px;font-size:13.5px}
.dk-bulk .select{width:auto;min-width:180px;padding:5px 9px}
.dk-color{width:24px;height:24px;border-radius:7px;border:2px solid transparent;cursor:pointer;padding:0}
.dk-color.sel{border-color:var(--ink);box-shadow:0 0 0 2px var(--surface) inset}
.dk-flist{display:flex;flex-direction:column;border:1px solid var(--line-2);border-radius:var(--r-sm);overflow:hidden}
.dk-frow{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--line-2)}
.dk-frow:last-child{border-bottom:0}
/* preenchimento automático do navegador não pinta o campo de amarelo */
.dv-pass .input:-webkit-autofill,.dv-pass .input:-webkit-autofill:hover,.dv-pass .input:-webkit-autofill:focus{-webkit-text-fill-color:#E3ECF1;-webkit-box-shadow:0 0 0 1000px #0B141A inset;caret-color:#E3ECF1;transition:background-color 9999s}

/* envio de arquivos */
.dv-drop{position:absolute;inset:12px;border:2px dashed #2BC274;border-radius:14px;background:rgba(5,9,12,.9);display:grid;place-items:center;z-index:7;pointer-events:none}
.dv-drop > div{display:flex;flex-direction:column;align-items:center;gap:8px;color:#E3ECF1;text-align:center}
.dv-drop svg{width:40px;height:40px;color:#2BC274}
.dv-drop b{font:600 19px var(--f-display)}
.dv-drop span{color:#AFC0CA;font-size:13px}
.dv-xfers{position:absolute;left:14px;bottom:14px;display:flex;flex-direction:column;gap:8px;z-index:8;width:min(360px,calc(100% - 28px))}
.dv-xfer{background:#101A21;border:1px solid #223340;border-radius:10px;padding:10px 12px;box-shadow:0 8px 30px rgba(0,0,0,.45);display:flex;flex-direction:column;gap:6px}
.dv-xfer-h{display:flex;align-items:center;gap:8px;min-width:0}
.dv-xfer-h svg{width:16px;height:16px;color:#4AB0DC;flex:none}
.dv-xfer.ok .dv-xfer-h svg{color:#2BC274} .dv-xfer.err .dv-xfer-h svg{color:#EF6C6C}
.dv-xfer-h b{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;color:#E3ECF1}
.dv-xfer-x{background:none;border:0;color:#7E919D;cursor:pointer;font-size:13px;padding:2px 4px;border-radius:5px}
.dv-xfer-x:hover{background:#1A2833;color:#E3ECF1}
.dv-xfer-bar{height:4px;border-radius:2px;background:#1A2833;overflow:hidden}
.dv-xfer-bar i{display:block;height:100%;background:#4AB0DC;transition:width .2s}
.dv-xfer.ok .dv-xfer-bar i{background:#2BC274} .dv-xfer.err .dv-xfer-bar i{background:#EF6C6C}
.dv-xfer-s{font-size:11.5px;color:#AFC0CA;word-break:break-all}

/* escolher a pasta de destino */
.dv-dest{width:min(820px,100%);display:flex;flex-direction:column;max-height:86vh}
.dv-dest .card-h h3{flex:1}
.dv-dest-b{display:grid;grid-template-columns:220px 1fr;min-height:340px;flex:1;overflow:hidden;border-bottom:1px solid #223340}
.dv-dest-q{border-right:1px solid #223340;padding:8px;overflow:auto;display:flex;flex-direction:column;gap:2px}
.dv-dest-qi,.dv-dest-d{display:flex;align-items:center;gap:9px;width:100%;background:none;border:0;color:#E3ECF1;padding:8px 10px;border-radius:7px;cursor:pointer;text-align:left;font-size:13px}
.dv-dest-qi:hover,.dv-dest-d:hover{background:#15212A}
.dv-dest-qi svg,.dv-dest-d svg{width:16px;height:16px;color:#4AB0DC;flex:none}
.dv-dest-d svg{color:#E6A93E}
.dv-dest-qi span,.dv-dest-d span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dv-dest-r{display:flex;flex-direction:column;min-width:0}
.dv-dest-path{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #1A2833;font-size:12.5px;color:#AFC0CA}
.dv-dest-path span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dv-dest-list{flex:1;overflow:auto;padding:6px;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));align-content:start;gap:2px}
.dv-dest-l{color:#7E919D;font-size:12.5px;padding:10px}
.dv-dest-new{display:flex;gap:8px;padding:8px 10px;border-top:1px solid #1A2833}
.dv-dest-new .input{background:#0B141A;color:#E3ECF1;border-color:#223340}
.dv-dest-f{display:flex;align-items:center;gap:8px;padding:12px 14px}
.dv-dest-err{flex:1;color:#EF6C6C;font-size:12.5px}
@media (max-width:700px){ .dv-dest-b{grid-template-columns:1fr} .dv-dest-q{border-right:0;border-bottom:1px solid #223340;max-height:140px} }

/* NOC8-DESK: cartões por cliente */
.dk-card{gap:10px}
.dk-card-name{font:600 15.5px var(--f-display);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.dk-card-empty{opacity:.7}
.dk-card-bar{height:5px;border-radius:3px;background:var(--line);overflow:hidden}
.dk-card-bar i{display:block;height:100%;background:var(--ok);border-radius:3px}
.dk-warn{color:var(--warn);display:inline-flex;align-items:center;gap:4px}
.dk-card .small svg{width:14px;height:14px;vertical-align:-2px}
.dk-back{display:inline-flex;align-items:center;gap:4px}
.dk-back svg{width:14px;height:14px}

/* visualizador: ponteiro desenhado pela página (aparece em qualquer navegador) */
.dv-cursor{position:fixed;left:0;top:0;pointer-events:none;z-index:40;will-change:transform;line-height:0}
.dv-cursor svg{display:block;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.45))}
.dv-menu button:disabled{opacity:.4;cursor:default}
.dv-btn.active{background:#15212A;color:#4AB0DC}
/* teclado virtual (ABNT2) */
.dv-vkb{flex:none;background:#0B141A;border-top:1px solid #18262F;padding:8px 10px 10px;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.dv-vkb-in{max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:5px}
.dv-vkb-row{display:flex;gap:5px}
.dv-key{flex:1;min-width:0;height:38px;padding:0 4px;border-radius:7px;border:1px solid #223340;background:#101A21;color:#E3ECF1;font:500 13px var(--f-body,system-ui);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-key:hover{background:#15212A}
.dv-key:active{background:#1C2B36;transform:translateY(1px)}
.dv-key.mod{color:#AFC0CA}
.dv-key.on{background:#4AB0DC;color:#04131B;border-color:#4AB0DC}
.dv-key.sas{color:#E7B64B}
@media (max-width:700px){.dv-key{height:34px;font-size:11px;padding:0 2px}.dv-vkb-row{gap:3px}.dv-vkb-in{gap:3px}}

.dv-pass-when{font-size:12.5px;color:#AFC0CA;margin-top:6px}
.dv-pass-when b{color:#E3ECF1;font-weight:600}

/* NOC8-DESK: editar/excluir cliente no cartão */
.dk-card-tools{display:inline-flex;gap:2px;margin:-6px -8px -6px 0}
.dk-card-tools .btn{width:28px;height:28px;padding:0;opacity:.55}
.dk-card:hover .dk-card-tools .btn{opacity:1}
.dk-card-tools .btn svg{width:15px;height:15px}
@media (hover:none){.dk-card-tools .btn{opacity:1}}

/* NOC8-DESK: importar / exportar */
.dk-io-sum{font-size:13.5px;margin-top:4px}
.dk-io-list{max-height:320px;overflow:auto;border:1px solid var(--line);border-radius:8px;margin-top:8px}
.dk-io-row{display:grid;grid-template-columns:70px minmax(120px,200px) 1fr;gap:10px;padding:7px 10px;border-bottom:1px solid var(--line);font-size:13px;align-items:baseline}
.dk-io-row:last-child{border-bottom:0}
.dk-io-row.bad{color:var(--warn)}
@media (max-width:640px){.dk-io-row{grid-template-columns:1fr}}

/* NOC8-DESK: chat com o usuário */
.dv-badge{min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:#D93B3B;color:#fff;font:600 11px/17px var(--f-body,system-ui);text-align:center;margin-left:4px}
.dv-btn.dim{opacity:.55}
.dv-chat{position:fixed;right:14px;bottom:14px;width:min(340px,calc(100vw - 28px));z-index:30;display:flex;flex-direction:column;background:#101A21;border:1px solid #223340;border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.55);overflow:hidden;max-height:560px}
.dv-chat-h{display:flex;align-items:center;gap:10px;padding:10px 10px 10px 14px;background:#0B141A;border-bottom:1px solid #18262F}
.dv-chat-h>svg{width:18px;height:18px;color:#4AB0DC;flex:none}
.dv-chat-h b{display:block;font-size:14px}
.dv-chat-h span{display:block;font-size:11.5px;color:#7E919D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-chat-list{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px;min-height:120px}
.dv-chat-empty{color:#7E919D;font-size:12.5px;text-align:center;margin:auto 8px;line-height:1.5}
.dv-msg{max-width:85%;padding:7px 10px 8px;border-radius:12px;font-size:13.5px;line-height:1.4;word-wrap:break-word;white-space:pre-wrap}
.dv-msg.in{align-self:flex-start;background:#15212A;border-bottom-left-radius:4px}
.dv-msg.out{align-self:flex-end;background:#143A2A;border-bottom-right-radius:4px}
.dv-msg-who{font-size:11px;color:#4AB0DC;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-msg.out .dv-msg-who{color:#3DD687;text-align:right}
.dv-chat-f{display:flex;gap:8px;padding:10px;border-top:1px solid #18262F;background:#0B141A}
.dv-chat-f textarea{flex:1;resize:none;background:#101A21;color:#E3ECF1;border-color:#223340;font-size:13.5px;min-height:40px;max-height:120px}
.dv-chat-f .btn{align-self:flex-end;height:40px;width:44px;padding:0;justify-content:center}
