:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #16181d;
  --muted: #646b78;
  --line: #e3e6ec;
  --accent: #2456e6;
  --accent-soft: #e8eeff;
  --ok: #138a4e;
  --ok-soft: #e3f5ea;
  --bad: #d22d3d;
  --bad-soft: #fde8ea;
  --warn: #b26a00;
  --warn-soft: #fff2dc;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --panel: #171a21; --text: #e8eaf0; --muted: #9aa1ae; --line: #2a2f3a;
    --accent: #6b8cff; --accent-soft: #1f2846; --ok: #3ccf82; --ok-soft: #13291f;
    --bad: #ff6b76; --bad-soft: #3a1a1e; --warn: #f0b24a; --warn-soft: #33270f;
    --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hidden { display: none !important; }
a { color: var(--accent); }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 0 0 12px; }

/* marca */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.logo { width: 22px; height: 22px; background: var(--accent); clip-path: path("M11 0 3 3v6c0 5 3.4 9.7 8 11 4.6-1.3 8-6 8-11V3z"); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 6px; }

/* topo */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.tabs a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.tabs a:hover { background: var(--bg); color: var(--text); }
.tabs a.active { background: var(--accent-soft); color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.live.on i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

/* números */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 16px 20px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); } .stat.ok b { color: var(--ok); }

main { padding: 16px 20px 40px; }

/* layout painel */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { margin-right: auto; }
.card-body { padding: 14px; }
.sticky { position: sticky; top: 70px; }

/* controles */
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: grid; gap: 5px; font-weight: 500; font-size: 13px; }
label small { font-weight: 400; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { width: auto; }
.search { max-width: 240px; }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; background: var(--panel); color: var(--muted); font-weight: 500; }
.chip.active { background: var(--text); color: var(--panel); border-color: var(--text); }
.error { color: var(--bad); margin: 0; min-height: 1em; font-size: 13px; }

/* lista de celulares */
.devices { list-style: none; margin: 0; padding: 0; }
.device { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.device:last-child { border-bottom: 0; }
.device:hover { background: var(--bg); }
.device.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 40% { background: var(--bad-soft); } }
.device.flash-new { animation: flashnew 2s; }
@keyframes flashnew { 0%, 50% { background: var(--ok-soft); } }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--ok); }
.device .name { font-weight: 600; }
.device .sub { color: var(--muted); font-size: 12px; }
.device .right { text-align: right; display: grid; gap: 4px; justify-items: end; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.empty { color: var(--muted); padding: 30px 14px; text-align: center; }

/* feed ao vivo */
.feed { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 230px); overflow: auto; }
.feed li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.feed li.new { animation: slidein .5s; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }
.feed .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.ico.block { background: var(--bad-soft); color: var(--bad); }
.ico.add { background: var(--accent-soft); color: var(--accent); }
.ico.rem { background: var(--bg); color: var(--muted); }
.ico.dev { background: var(--ok-soft); color: var(--ok); }
.ico.access { background: var(--accent-soft); color: var(--accent); }
.feed .t { font-size: 13px; }
.feed .meta { font-size: 12px; color: var(--muted); }
.feed a { cursor: pointer; }

/* tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
tr.blocked td { background: var(--bad-soft); }
td .pkg { color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; word-break: break-all; }
td.actions { text-align: right; white-space: nowrap; }
.url { font-size: 12px; word-break: break-all; }

/* detalhe */
.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; text-decoration: none; font-weight: 600; cursor: pointer; }
.dev-header { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 16px; }
.dev-header .info { flex: 1; min-width: 220px; }
.dev-header .info h2 { font-size: 20px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.kv div span { display: block; font-size: 12px; color: var(--muted); }
.kv div b { font-weight: 600; }
.alert { margin: 0 16px 16px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }

/* diálogo */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--panel); color: var(--text); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 12, 18, .45); }
dialog form { padding: 22px; display: grid; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; }
.seg label { display: block; }
.seg input { display: none; }
.seg span { display: block; padding: 6px 18px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg input:checked + span { background: var(--accent); color: #fff; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: var(--panel); padding: 10px 14px; border-radius: 10px; max-width: 340px; font-size: 13px; animation: slidein .3s; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); color: #fff; }

.settings { display: grid; gap: 16px; max-width: 760px; }
.row { display: flex; gap: 8px; align-items: end; }
.row > :first-child { flex: 1; }
.downloads li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.downloads { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--muted); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .feed { max-height: 420px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .tabs { order: 3; flex-basis: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 12px 16px 0; }
  main { padding: 12px 16px 32px; }
  .search { max-width: none; }
  .hide-sm { display: none; }
  th, td { padding: 8px 10px; }
  .toolbar .search { max-width: none; }
  .devtable .col-name { min-width: 0; }
  .devrow td.actions { white-space: normal; text-align: right; }
  .devrow td.actions .btn { margin: 2px 0 2px 4px; }
}
.device .right > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
@media (max-width: 640px) { .device .right { max-width: 46vw; } }

/* ===== visão geral em cartões ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; padding: 14px; }
.devcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); cursor: pointer; transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 10px; }
.devcard:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.devcard.flash { animation: flash 1.6s; }
.devcard.flash-new { animation: flashnew 2s; }
.dc-head { display: flex; align-items: center; gap: 10px; }
.dc-head .dot { flex: none; }
.dc-id { flex: 1; min-width: 0; }
.dc-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.dc-actions .btn { flex: 1; min-width: 84px; }

/* feed como gaveta recolhível na visão geral */
.feed-toggle { position: relative; }
.feed-toggle > summary { list-style: none; cursor: pointer; }
.feed-toggle > summary::-webkit-details-marker { display: none; }
.feed.drawer { position: absolute; right: 0; top: 36px; z-index: 20; width: min(380px, 90vw); max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }

/* ===== barra de ferramentas da visão geral ===== */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .tb-title { margin-right: auto; }
.toolbar .search { max-width: 280px; flex: 1 1 200px; }
.toolbar-chips { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.toolbar-chips .chip b { font-variant-numeric: tabular-nums; margin-left: 2px; padding: 0 5px; border-radius: 99px; background: rgba(128, 128, 128, .18); font-size: 11px; }
.toolbar-chips .chip.active b { background: rgba(255, 255, 255, .25); }

/* alternar lista / cartões */
.seg-view { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-view button { border: 0; background: var(--panel); color: var(--muted); font: inherit; font-weight: 600; font-size: 12px; padding: 6px 12px; cursor: pointer; }
.seg-view button + button { border-left: 1px solid var(--line); }
.seg-view button.active { background: var(--accent-soft); color: var(--accent); }

/* ===== tabela densa de celulares ===== */
.devtable td, .devtable th { padding: 8px 12px; }
.devtable th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.devtable th.sortable:hover { color: var(--text); }
.devtable th.num, .devtable td.num { text-align: center; }
.devtable .sort-ind { font-size: 9px; margin-left: 3px; vertical-align: middle; }
.devtable .col-dot { width: 20px; padding-right: 0; }
.devtable .col-name { min-width: 180px; }
.devtable .col-name b { font-weight: 600; }
.devtable .col-name .badge.accent { margin-left: 6px; }
.devtable .col-name .pkg { word-break: normal; overflow-wrap: anywhere; }
.devrow { cursor: pointer; }
.devrow:hover { background: var(--bg); }
.devrow.flash { animation: flash 1.6s; }
.devrow.flash-new { animation: flashnew 2s; }
.devrow td.actions { text-align: right; white-space: nowrap; }
.devrow td.actions .btn { padding: 4px 9px; }
.flag { font-size: 14px; line-height: 1; vertical-align: -1px; }
.warn-btn { color: var(--warn); font-weight: 800; }
/* indicadores de permissão (P/B/N) */
.perms { display: inline-flex; gap: 4px; }
.pdot { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; }
.pdot.ok { background: var(--ok-soft); color: var(--ok); }
.pdot.warn { background: var(--warn-soft); color: var(--warn); }

/* paginação */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.pager:empty { display: none; }
.pager-btns { display: flex; align-items: center; gap: 10px; }
.pager-cur { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== manutenção remota (console do operador, estilo Appium Inspector) ===== */
.maint-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* corpo em duas colunas: tela do celular à esquerda, lista de elementos à direita */
.maint-body-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.maint-main { flex: 1 1 300px; min-width: 0; }
.maint-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; }
.maint-side-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }

.maint-shot { text-align: center; margin-bottom: 10px; background: #000; border-radius: 12px; padding: 12px; }
.maint-shot .shot-img { max-width: 100%; max-height: 70vh; border: 1px solid #222; border-radius: 10px; background: #000; cursor: crosshair; }
.maint-shot .muted { color: #9aa4b2 !important; }
/* destaque (auto-foco) do controle da liberação sobre o print */
.maint-shot .shot-stage { vertical-align: top; }
.focus-box { position: absolute; border: 3px solid #ffd21a; border-radius: 8px; box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 16px 4px rgba(255,210,26,.65); background: rgba(255,210,26,.14); pointer-events: none; animation: focusPulse 1.1s ease-in-out infinite; }
.focus-tag { position: absolute; left: 0; top: -20px; background: #ffd21a; color: #111; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 5px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@keyframes focusPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
/* grupos de elementos por janela (tela/popup/teclado…) — recolhíveis */
/* flex-shrink:0: a lista (.maint-tree) é flex-column com max-height; sem isto os grupos
   encolhem (overflow:hidden zera o min-height) e o conteúdo é cortado sem barra de rolagem.
   Com isto, a lista transborda e rola normalmente fora da tela cheia. */
.mwin { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; flex-shrink: 0; }
summary.mwin-head { background: var(--bg2, rgba(127,127,127,.12)); padding: 7px 10px; font-size: 12px; border-bottom: 1px solid var(--line); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mwin:not([open]) > summary.mwin-head { border-bottom: none; }
summary.mwin-head::-webkit-details-marker { display: none; }
summary.mwin-head::before { content: "▾"; color: var(--muted); font-size: 11px; }
.mwin:not([open]) > summary.mwin-head::before { content: "▸"; }
.mwin > .mnode { margin: 6px 6px 0; }
.mwin > .mnode:last-child { margin-bottom: 6px; }
.mwin-head .pkg { font-size: 10px; }
.maint-tree { display: flex; flex-direction: column; gap: 6px; max-height: 68vh; overflow: auto; padding-right: 2px; }
.maint-auto { flex: none; }

/* cada elemento empilha: texto em cima, ações embaixo — nunca se sobrepõem, em qualquer largura */
.mnode { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.mnode:hover { border-color: var(--accent); }
.mn-main { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mn-act { display: flex; gap: 4px; flex-wrap: wrap; }

/* console do operador em tela cheia: duas colunas firmes, tela fixa à esquerda enquanto a lista rola */
.maint-card.maint-fs { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; overflow: auto; background: var(--panel, #111820); box-shadow: none; }
.maint-card.maint-fs .card-head { position: sticky; top: 0; background: inherit; z-index: 2; }
.maint-card.maint-fs .maint-bar { position: sticky; top: 52px; background: var(--panel, #111820); z-index: 1; }
@media (min-width: 900px) {
  .maint-card.maint-fs .maint-body-row { flex-wrap: nowrap; }
  .maint-card.maint-fs .maint-main { flex: 1 1 56%; position: sticky; top: 108px; }
  .maint-card.maint-fs .maint-side { flex: 1 1 44%; max-width: 560px; }
  .maint-card.maint-fs .maint-tree { max-height: none; }
}
.maint-card.maint-fs .maint-shot .shot-img { max-height: 80vh; }

/* painel de Automações: largura total, abaixo do corpo, recolhível (não disputa espaço com os elementos) */
.maint-auto-wrap { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.maint-auto-wrap > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.maint-auto-wrap > summary::-webkit-details-marker { display: none; }
.maint-auto-wrap > summary > span::before { content: "▸ "; color: var(--muted); font-size: 12px; }
.maint-auto-wrap[open] > summary > span::before { content: "▾ "; }
.maint-auto-wrap .maint-auto-body { padding: 4px 14px 14px; }
/* o modal de automação rola por dentro; botões Salvar/Cancelar ficam sempre visíveis */
dialog#autoDialog .step-row { align-items: center; }

/* página Automações */
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.auto-row .pkg { margin-top: 2px; }
.hint { font-size: 13px; color: var(--muted); background: var(--bg2, rgba(127,127,127,.12)); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.corr-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.corr-row .search { flex: 1 1 160px; min-width: 110px; }

/* ===== abas do detalhe ===== */
.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 14px; }
.tabs-bar button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-bar button:hover { color: var(--text); }
.tabs-bar button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- filtros de data/app + favoritos (lista de celulares) ---- */
.subfilters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 12px; }
.subfilters-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.appfilter { position: relative; }
.appfilter > summary { list-style: none; cursor: pointer; }
.appfilter > summary::-webkit-details-marker { display: none; }
.appfilter-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 300px; max-width: 86vw;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.appfilter-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.appfilter-item { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 7px; cursor: pointer; }
.appfilter-item:hover { background: var(--bg); }
.appfilter-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appfilter-count { font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 99px; padding: 1px 7px; }

.favbtn { background: none; border: none; cursor: pointer; font-size: 17px; line-height: 1; color: var(--muted);
  padding: 2px 4px; border-radius: 6px; }
.favbtn:hover { background: var(--bg); }
.favbtn.on { color: #e8a500; }
.devcard.fav { border-color: #e8a500; box-shadow: 0 0 0 1px #e8a500 inset; background: linear-gradient(180deg, var(--warn-soft), var(--panel) 40%); }
.devrow.fav { background: var(--warn-soft); }
.devrow.fav td { border-top: 1px solid #e8a50033; }
.devcard .dc-head { display: flex; align-items: center; gap: 8px; }
.devcard .dc-id { flex: 1; min-width: 0; }
.col-dot { white-space: nowrap; }

/* filtro de elementos na árvore de manutenção */
.elem-filter { margin: 0 0 8px; gap: 6px; }
.elem-filter .chip { font-size: 12px; padding: 3px 10px; }
