:root {
  --bg: #0f1115; --panel: #171a21; --panel2: #1e222b; --border: #2a2f3a;
  --text: #e6e9ef; --muted: #9aa4b2; --accent: #4c8bf5; --accent2: #2f6fe0;
  --good: #35c46b; --danger: #e5484d; --warn: #e5a23d;
  --nav-w: 56px; --nav-w-open: 220px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); color-scheme: dark; }
a { color: var(--accent); text-decoration: none; }
button {
  font: inherit; cursor: pointer; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); padding: 6px 12px; border-radius: 6px;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent2); border-color: var(--accent2); }
button.primary:hover { background: var(--accent); }
button.danger { border-color: var(--danger); color: #ffb4b6; }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
button svg { display: block; }
input, select, textarea {
  font: inherit; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; width: 100%;
}
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }

/* Login */
#login { display: flex; align-items: center; justify-content: center; height: 100%; }
#login .card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 28px; width: 340px; }
#login h1 { font-size: 18px; margin: 0 0 4px; }
#login p { color: var(--muted); margin: 0 0 8px; }
#login .err { color: var(--danger); min-height: 18px; margin-top: 10px; font-size: 13px; }
#login button { width: 100%; margin-top: 18px; }
.login-box { width: 340px; }
.downloads { margin-top: 14px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.dl-title { display: block; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.dl-links { display: flex; flex-direction: column; gap: 8px; }
.dl-btn {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 14px; border: 1px solid var(--accent2); border-radius: 8px;
  background: var(--panel2); color: var(--text);
}
.dl-btn:hover { background: var(--accent2); border-color: var(--accent); }
.dl-os { flex: none; display: flex; color: var(--accent); }
.dl-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dl-txt strong { font-size: 14px; }
.dl-txt small { color: var(--muted); font-size: 11px; }
.dl-get { flex: none; display: flex; color: var(--accent); transition: transform .15s; }
.dl-btn:hover .dl-os, .dl-btn:hover .dl-get, .dl-btn:hover .dl-txt small { color: #fff; }
.dl-btn:hover .dl-get { transform: translateY(2px); }
/* Bloco "instalar em uma nova máquina" (tela Máquinas): reusa os .dl-btn da
   tela de login em versão compacta, lado a lado. */
.install-box {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  background: var(--panel2); margin: 0 0 18px;
}
.install-box h3 { margin: 0 0 8px; }
.install-box .hint { margin: 8px 0 0; }
.install-dl { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-btn.small-dl { padding: 8px 12px; gap: 10px; min-width: 210px; }
.dl-btn.small-dl .dl-txt strong { font-size: 13px; }

.ver { color: var(--muted); font-size: 11px; opacity: 0.8; }
#verLogin { margin-top: 14px; text-align: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; flex: none; }

/* ===== App shell: sidenav + content ===== */
#app { display: none; height: 100%; }
#app.active { display: flex; }
#content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; }

/* Side nav (collapsible; collapsed = icons only) */
#sidenav {
  width: var(--nav-w-open); flex: none; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden; transition: width .18s ease;
}
#sidenav.collapsed { width: var(--nav-w); }
#sidenav .lbl { white-space: nowrap; overflow: hidden; }
#sidenav.collapsed .lbl { display: none; }
.nav-top { padding: 10px 8px 6px; }
.nav-btn {
  width: 40px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: transparent; border-color: transparent; color: var(--muted);
}
.nav-btn:hover { color: var(--text); border-color: var(--border); }
.nav-brand { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; font-weight: 700; font-size: 13px; }
#sidenav.collapsed .nav-brand { justify-content: center; padding: 10px 0 4px; }
#nav { flex: 1; padding: 8px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
#nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  background: transparent; border-color: transparent; color: var(--muted); border-radius: 8px; text-align: left;
}
#nav button svg { flex: none; }
#nav button:hover { color: var(--text); background: var(--panel2); }
#nav button.active { color: var(--text); background: var(--panel2); border-color: var(--border); }
#sidenav.collapsed #nav button { justify-content: center; padding: 9px 0; }
.nav-foot { padding: 10px; border-top: 1px solid var(--border); }
.nav-user { display: flex; align-items: center; gap: 10px; }
#sidenav.collapsed .nav-user { justify-content: center; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none;
}
.nav-user .lbl { display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; }
.nav-user .lbl a { font-size: 11px; }
.nav-foot .ver { margin-top: 8px; padding-left: 2px; }

/* ===== Tabs (sessões) ===== */
.tabbar {
  display: flex; align-items: flex-end; gap: 4px; padding: 8px 12px 0; background: var(--panel);
  border-bottom: 1px solid var(--border); overflow-x: auto; flex: none; min-height: 45px;
}
.tab {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px;
  background: transparent; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
  color: var(--muted); cursor: pointer; white-space: nowrap; user-select: none;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg); border-color: var(--border); color: var(--text); }
.tab .tclose {
  display: flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 4px; color: var(--muted); border: none; background: transparent; padding: 0;
}
.tab .tclose:hover { color: #ffb4b6; background: var(--panel2); }
#view-online { display: flex; flex-direction: column; }
.tabpanes { flex: 1; min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; display: none; min-height: 0; }
.pane.active { display: flex; flex-direction: column; }

/* ===== Cards de máquinas ===== */
#pane-home { overflow-y: auto; }
.filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 4;
}
.filterbar select, .filterbar input { width: auto; padding: 5px 8px; font-size: 12px; }
.filterbar .fl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.filterbar .fsep { color: var(--muted); font-size: 12px; }
.filterbar .fcount { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.agent-grid { padding: 18px 20px; width: 100%; }
.cust-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin: 14px 2px 8px; }
.cust-label:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.acard { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.acard.off { opacity: .68; }
.acard:hover { border-color: #3a4150; }
.acard-head { display: flex; align-items: center; gap: 10px; }
.acard-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.acard.on .acard-ico { color: var(--accent); }
.acard-names { flex: 1; min-width: 0; }
.acard-names .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard-names .cu { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.acard-meta b { color: var(--text); font-weight: 500; }
.acard-actions { display: flex; gap: 6px; margin-top: 2px; }
.empty { color: var(--muted); padding: 40px 16px; text-align: center; width: 100%; }
.badge { font-size: 10px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.badge.win { color: #7db4ff; border-color: #2f4c7a; }
.badge.linux { color: #ffd479; border-color: #6b5a2a; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; flex: none; }
.pill.on { background: rgba(53,196,107,.15); color: var(--good); }
.pill.off { background: rgba(229,72,77,.15); color: var(--danger); }
/* Veredito do diagnóstico de vídeo: bad = gargalo na máquina (CPU),
   warn = gargalo no link, off = sem dados. */
.pill.bad { background: rgba(229,72,77,.15); color: var(--danger); }
.pill.warn { background: rgba(224,150,45,.16); color: #e0962d; }

/* ===== Sessão (pane) ===== */
.sess-bar {
  padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--panel);
  display: flex; align-items: center; gap: 10px; min-height: 44px; flex: none;
}
.sess-bar .title { font-weight: 600; font-size: 13px; }
.sess-bar .spacer { flex: 1; }
.mode-chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.mode-chip.view { background: rgba(229,162,61,.15); color: var(--warn); }
.mode-chip.ok { background: rgba(53,196,107,.15); color: var(--good); }
.sess-body { flex: 1; min-height: 0; display: flex; position: relative; }
.desk-area { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; background: #000; outline: none; position: relative; }
/* O fit() do JS é dono do tamanho do canvas (derivado do devicePixelRatio);
   flex:none impede o flexbox de encolhê-lo quando transborda no zoom fixo. */
.desk-area canvas { flex: none; }
/* Zoom fixo (1:1/150%/200%): a área rola; margin:auto centraliza o canvas
   menor que a área e mantém a origem alcançável quando é maior (com
   justify/align center o canto superior esquerdo ficaria inacessível). */
.desk-area.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.desk-area.zoomed canvas { margin: auto; }
.fps-chip {
  position: absolute; left: 12px; bottom: 12px; z-index: 5;
  font-size: 11px; padding: 3px 9px; border-radius: 10px; white-space: nowrap;
  background: rgba(0,0,0,.55); color: rgba(255,255,255,.75);
  font-variant-numeric: tabular-nums; pointer-events: none;
}

/* Seletor de resolução do stream (barra da sessão de desktop) */
.res-sel {
  font-size: 11px; padding: 3px 6px; border-radius: 6px;
  background: var(--panel2); color: var(--text); border: 1px solid var(--border);
}

/* Cursor remoto renderizado pelo browser (desacoplado do fps do vídeo).
   Formas não mapeadas usam a seta. O hotspot da seta fica no canto superior
   esquerdo do SVG; I-beam e cruz são centralizados via transform. */
.remote-cursor {
  position: absolute; width: 20px; height: 20px; z-index: 6; pointer-events: none;
  background-repeat: no-repeat; background-size: 20px 20px;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20"%3E%3Cpath d="M2 1 L2 16 L6 12.5 L9 19 L11.5 18 L8.7 11.6 L14 11.6 Z" fill="%23fff" stroke="%23000" stroke-width="1.2"/%3E%3C/svg%3E');
}
.remote-cursor.cur-ibeam {
  transform: translate(-50%, -50%);
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20"%3E%3Cpath d="M6 2 H14 M10 2 V18 M6 18 H14" fill="none" stroke="%23000" stroke-width="3.4"/%3E%3Cpath d="M6 2 H14 M10 2 V18 M6 18 H14" fill="none" stroke="%23fff" stroke-width="1.6"/%3E%3C/svg%3E');
}
.remote-cursor.cur-hand {
  transform: translate(-7px, 0);
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20"%3E%3Cpath d="M7 18 L4.5 12.5 Q3.5 10.5 5.2 10 Q6.5 9.7 7.2 11 L7.5 11.6 L7.5 3.4 Q7.5 2 8.8 2 Q10 2 10 3.4 L10 8 L10.6 8 Q11 6.8 12.2 7 Q13.2 7.2 13.3 8.2 Q13.8 7.6 14.7 7.9 Q15.7 8.2 15.6 9.3 Q16.5 9.2 16.8 10 L16.8 13 Q16.8 15.5 15.5 18 Z" fill="%23fff" stroke="%23000" stroke-width="1.1"/%3E%3C/svg%3E');
}
.remote-cursor.cur-cross {
  transform: translate(-50%, -50%);
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20"%3E%3Cpath d="M10 2 V18 M2 10 H18" fill="none" stroke="%23000" stroke-width="3"/%3E%3Cpath d="M10 2 V18 M2 10 H18" fill="none" stroke="%23fff" stroke-width="1.4"/%3E%3C/svg%3E');
}
.term-full { flex: 1; min-height: 0; background: #000; padding: 6px; }

/* Painel lateral: resumo de hardware (desktop) */
.side-mon { width: 320px; flex: none; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; transition: width .15s ease; }
.side-mon.expanded { width: 560px; }
.panel-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex: none; }
.panel-head .ttl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); flex: 1; }
.panel-head button { padding: 3px 6px; background: transparent; border-color: transparent; color: var(--muted); }
.panel-head button:hover { color: var(--text); border-color: var(--border); }
.mon-body { flex: 1; overflow-y: auto; padding: 14px; }
.mon-when { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.metric { margin-bottom: 14px; }
.metric .lbl-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; }
.metric .lbl-row .v { color: var(--muted); }
.mbar { height: 10px; background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.mbar > span { display: block; height: 100%; background: var(--good); transition: width .4s ease; }
.mbar > span.warn { background: var(--warn); }
.mbar > span.crit { background: var(--danger); }
.mon-section { margin-top: 18px; }
.mon-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.procs { display: flex; flex-wrap: wrap; gap: 5px; }
.procs .chip { background: var(--panel2); }
.mon-empty { color: var(--muted); font-size: 13px; }
/* Monitor como aba própria */
.mon-page { flex: 1; overflow-y: auto; padding: 20px 24px; }
.mon-page .metric, .mon-page .mon-section { max-width: 720px; }

/* Terminal acoplado (desktop) */
.term-dock { height: 38%; min-height: 160px; flex: none; border-top: 1px solid var(--border); background: #000; display: flex; flex-direction: column; }
.term-dock.expanded { height: 65%; }
.term-dock .panel-head { background: var(--panel); }
.term-dock .term-host { flex: 1; min-height: 0; padding: 4px 6px; }

/* Botões flutuantes (monitor minimizado / terminal fechado) */
.fabs { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 5; }
.fab {
  display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 20px;
  background: var(--panel2); border: 1px solid var(--border); color: var(--text); font-size: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.fab:hover { border-color: var(--accent); }

/* ===== Chat + arquivos ===== */
.side-chat { width: 340px; flex: none; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.chat-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-panel.dropping { outline: 2px dashed var(--accent); outline-offset: -6px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; border-radius: 10px; padding: 7px 10px; font-size: 13px; }
.chat-msg.me { align-self: flex-end; background: var(--accent2); }
.chat-msg.them { align-self: flex-start; background: var(--panel2); border: 1px solid var(--border); }
.chat-meta { font-size: 10px; color: rgba(255,255,255,.65); margin-bottom: 2px; }
.chat-msg.them .chat-meta { color: var(--muted); }
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-file { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chat-fname { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-fsize { color: rgba(255,255,255,.7); font-size: 11px; }
.chat-msg.them .chat-fsize { color: var(--muted); }
.chat-chip { font-size: 10px; padding: 1px 7px; border-radius: 9px; white-space: nowrap; }
.chat-chip:empty { display: none; }
.chat-chip.ok { background: rgba(53,196,107,.2); color: var(--good); }
.chat-chip.err { background: rgba(229,72,77,.25); color: #ffb4b6; }
.chat-chip.wait { background: rgba(229,162,61,.2); color: var(--warn); }
.chat-chip.off { background: rgba(154,164,178,.18); color: var(--muted); }
.chat-fact { display: inline-flex; gap: 6px; }
.chat-dl { font-size: 11px; text-decoration: underline; color: inherit; }
.chat-retry { font-size: 10px; padding: 1px 7px; border-radius: 9px; }
.chat-inrow { display: flex; align-items: flex-end; gap: 6px; padding: 8px; border-top: 1px solid var(--border); flex: none; }
.chat-inrow .chat-input { flex: 1; resize: none; min-height: 32px; max-height: 110px; padding: 6px 9px; font-size: 13px; }
.chat-inrow button { flex: none; }
.fab.attn { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(76,139,245,.35), 0 4px 14px rgba(0,0,0,.45); }
/* Chat como aba própria */
.chat-page { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 0; background: var(--bg); }
.chat-page .chat-panel { width: 100%; max-width: 860px; background: var(--panel); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
/* Conversa na auditoria (somente leitura) */
.chat-audit { max-width: 860px; margin-top: 10px; }
.chat-audit .chat-list { max-height: 480px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.chat-audit .chat-older { margin-bottom: 8px; }

/* ===== Management views ===== */
#view-manage { overflow-y: auto; padding: 22px 26px; }
#manage h2 { margin: 0 0 4px; font-size: 18px; }
#manage .hint { color: var(--muted); margin: 0 0 18px; }
#manage h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 10px; }
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.table tr:hover td { background: var(--panel); }
.card2 { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 20px; max-width: 640px; }
/* O diagnóstico de vídeo tem tabelas largas (três colunas de fps): usa a
   largura disponível e rola na horizontal em telas estreitas. */
.perf-video { max-width: none; overflow-x: auto; }
.perf-video table { min-width: 900px; }
.perf-video tr.clickable { cursor: pointer; }
.perf-video tr.clickable:hover td { background: var(--panel2); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.permlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 6px; }
.permlist label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 13px; }
.permlist input { width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; padding: 2px 7px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.actions { display: flex; gap: 6px; }
.formActions { margin-top: 16px; display: flex; gap: 8px; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; z-index: 50; }
.toast.err { border-color: var(--danger); color: #ffb4b6; }

/* ===== Análise de Performance ===== */
.badge.tel-off { color: var(--warn); border-color: #6b5a2a; }
.perf-filters, .perf-period, .perf-settings { max-width: 980px; }
.perf-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.perf-grid input, .perf-grid select { width: auto; padding: 6px 8px; font-size: 13px; }
.perf-grid input.num { width: 74px; }
.perf-grid .fl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.perf-settings .row { align-items: center; margin-top: 6px; }
.perf-settings input.num { max-width: 110px; }
.perf-chart { position: relative; max-width: 980px; margin-top: 4px; }
.chart-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px 4px; }
.perf-svg { display: block; width: 100%; height: auto; }
.perf-svg .grid { stroke: #262b36; stroke-width: 1; }
.perf-svg .axis { stroke: #3a4150; stroke-width: 1; }
.perf-svg .tick { fill: var(--muted); font-size: 10px; }
.perf-svg .endlbl { fill: var(--text); font-size: 11px; }
.perf-svg .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.perf-svg .series.max { stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .75; }
.perf-svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 6px 2px 8px; }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.chart-legend .lg-item.hint { color: var(--muted); }
.chart-legend .lg-toggle { margin: 0; cursor: pointer; }
.chart-legend .lg-toggle input { width: auto; }
.chart-legend .swatch { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.chart-tip { position: absolute; z-index: 10; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.perf-point { max-width: 980px; margin-top: 14px; }
.perf-pointcard { max-width: 980px; }
.perf-pointcard .metric { max-width: 620px; }
