Files
sabia/apps/gui/ui/app.css
T
Lucas Rayan 6e0cd7cf10 feat(ui): ataques (Evil Twin, regras/máscara, WPS), captura mais robusta
- app.js/app.css/index.html: telas novas para Evil Twin (PSK e
  Enterprise), regras de mutação/máscara na quebra de senha, WPS,
  indicador de modo (monitor/gerenciado) movido para baixo do seletor de
  interface, e aviso específico quando a placa não entrega captura de
  verdade (ver bug de ScanSnapshot.warning no engine).
- Lista de redes/BSSIDs não reordena mais a cada poll: ordem de chegada
  como critério de desempate e sinal arredondado em buckets de 4 dBm,
  porque reordenar pelo sinal instantâneo fazia as linhas flutuarem de
  posição debaixo do cursor a cada atualização.
- "Forçar handshake" religa a captura sozinho se ela tiver sido parada
  (esperando o AP reaparecer no canal certo antes de disparar o job, e
  travando o alvo numa variável local pra não perder o BSSID se o diálogo
  fechar no meio da espera).
- Grid da aba Ataques trocado de CSS grid pra colunas (alvenaria): cards
  com alturas muito diferentes na mesma linha deixavam buracos vazios
  enormes com align-items:start.
- check-ui-i18n.mjs: ajustes de cobertura para as novas telas.
2026-10-24 14:54:49 -03:00

462 lines
32 KiB
CSS

:root {
--bg: #f5f5f7;
--surface: #ffffff;
--surface-2: #fafafc;
--side: rgba(246, 246, 248, 0.82);
--text: #1d1d1f;
--text-2: #6e6e73;
--text-3: #8e8e93;
--line: rgba(0, 0, 0, 0.09);
/* "canto" — cobre quente, o peito do sabiá-laranjeira */
--accent: #b45309;
--accent-ink: #ffffff;
--accent-soft: rgba(180, 83, 9, 0.11);
/* "sinal" — ciano, a onda que o rádio enxerga */
--signal: #0891b2;
--signal-soft: rgba(8, 145, 178, 0.12);
--ok: #1a8f3c;
--warn: #b26a00;
--bad: #d12b2b;
--ok-soft: rgba(26, 143, 60, 0.12);
--warn-soft: rgba(178, 106, 0, 0.13);
--bad-soft: rgba(209, 43, 43, 0.11);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
--radius: 16px;
--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
--side-w: 280px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #000000;
--surface: #1c1c1e;
--surface-2: #232326;
--side: rgba(28, 28, 30, 0.8);
--text: #f5f5f7;
--text-2: #a1a1a6;
--text-3: #7d7d82;
--line: rgba(255, 255, 255, 0.1);
--accent: #f59e0b;
--accent-ink: #1f1300;
--accent-soft: rgba(245, 158, 11, 0.15);
--signal: #22d3ee;
--signal-soft: rgba(34, 211, 238, 0.14);
--ok: #32d74b;
--warn: #ffb340;
--bad: #ff6961;
--ok-soft: rgba(50, 215, 75, 0.15);
--warn-soft: rgba(255, 179, 64, 0.15);
--bad-soft: rgba(255, 105, 97, 0.15);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
}
}
:root[data-theme="dark"] {
--bg: #000000; --surface: #1c1c1e; --surface-2: #232326; --side: rgba(28, 28, 30, 0.8);
--text: #f5f5f7; --text-2: #a1a1a6; --text-3: #7d7d82; --line: rgba(255, 255, 255, 0.1);
--accent: #f59e0b; --accent-ink: #1f1300; --accent-soft: rgba(245, 158, 11, 0.15);
--signal: #22d3ee; --signal-soft: rgba(34, 211, 238, 0.14);
--ok: #32d74b; --warn: #ffb340; --bad: #ff6961;
--ok-soft: rgba(50, 215, 75, 0.15); --warn-soft: rgba(255, 179, 64, 0.15); --bad-soft: rgba(255, 105, 97, 0.15);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
margin: 0; background: var(--bg); color: var(--text);
font: 15px/1.45 var(--font);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--signal) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; }
.sidebar {
background: var(--side);
backdrop-filter: saturate(180%) blur(24px);
-webkit-backdrop-filter: saturate(180%) blur(24px);
border-right: 1px solid var(--line);
display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
padding: 18px 12px 12px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 10px 20px; }
.brand img { width: 34px; height: 34px; }
.brand strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.brand small { color: var(--text-2); font-size: 12px; }
.side-title { padding: 14px 10px 6px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.list:empty::after { content: attr(data-empty); display: block; padding: 6px 10px; color: var(--text-3); font-size: 13px; }
.dev {
width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center;
padding: 9px 10px; border-radius: 12px; transition: background .15s;
}
.dev:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.dev[aria-current="true"], .dev[aria-pressed="true"] { background: var(--accent-soft); }
.dev .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--text-2); }
.dev[aria-current="true"] .ico, .dev[aria-pressed="true"] .ico { color: var(--accent); }
.dev .t { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev .s { display: block; font-size: 11.5px; color: var(--text-2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iface-pick { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0 10px 4px; }
.iface-pick .select { width: 100%; min-width: 0; }
.iface-pick .pill { align-self: flex-start; }
.side-foot { margin-top: auto; padding: 14px 4px 4px; font-size: 11.5px; color: var(--text-3); display: grid; gap: 8px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot button { background: transparent; border: 0; color: var(--text-3); cursor: pointer; }
.side-foot .foot-row > button:not(.icon-btn) { text-decoration: underline; text-underline-offset: 2px; }
.side-foot button:hover { color: var(--text-2); }
.icon-btn { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0; }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.theme-switch { display: inline-flex; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.theme-switch button { border: 0; background: transparent; cursor: pointer; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; color: var(--text-2); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); font-weight: 600; }
.main { overflow-y: auto; min-width: 0; }
.page { max-width: 1040px; margin: 0 auto; padding: 30px 36px 100px; animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* -------------------------------------------------------- topo + linha de sinal */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h1 { font-size: 21px; }
.topbar .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.wave { width: 100%; height: 34px; margin: 18px 0 26px; }
.wave path { fill: none; stroke: var(--line); stroke-width: 1.6; }
.wave path.live { stroke: var(--signal); opacity: 0; transition: opacity .25s; }
.wave.scanning path.live { opacity: 1; }
.wave.scanning path.flat { opacity: 0; }
/* ------------------------------------------------------------ aviso */
.notice { display: flex; gap: 10px; background: var(--surface); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13px; color: var(--text-2); margin-bottom: 20px; align-items: flex-start; }
.notice svg { flex: none; margin-top: 2px; color: var(--warn); }
.notice.warn { background: var(--warn-soft); } .notice.warn svg { color: var(--warn); }
.notice.bad { background: var(--bad-soft); } .notice.bad svg { color: var(--bad); }
.notice b { color: var(--text); }
/* ------------------------------------------------------------ controles */
.controls { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.controls .group { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2); }
.pill.on { background: var(--signal-soft); color: var(--signal); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.on .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.btn { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 13.5px; cursor: pointer; background: color-mix(in srgb, var(--text) 9%, transparent); transition: transform .12s, filter .15s, background .15s; display: inline-flex; gap: 8px; align-items: center; }
.btn:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.live { background: var(--bad); color: #fff; }
.btn.live:hover { filter: brightness(1.06); }
/* ------------------------------------------------------------ tabela */
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 2px 10px; }
.result-summary { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.result-head strong { font-size: 15px; }
.result-summary span { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-tools { display: flex; align-items: center; gap: 8px; }
.result-tools .filter { border: 0; border-radius: 10px; padding: 7px 12px; width: 210px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); font: inherit; font-size: 12.5px; }
.result-tools .filter::placeholder { color: var(--text-3); }
.result-tools .select { width: auto; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; }
.ap-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.net-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 11px 14px; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border-bottom: 1px solid var(--line); }
tbody td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.ssid { font-weight: 600; }
td.ssid em { color: var(--text-3); font-weight: 400; font-style: normal; }
/* rede agrupada por ESSID; cada BSSID vira uma linha expansível */
.caret-cell { width: 34px; padding-left: 10px; padding-right: 0; }
.expander { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.expander:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.expander svg { transition: transform .18s; }
.net-row.open .expander svg { transform: rotate(90deg); }
.net-row.open > td { background: color-mix(in srgb, var(--text) 3%, transparent); }
.net-name .ssid { display: block; font-weight: 600; line-height: 1.25; }
.net-name .ssid em { color: var(--text-3); font-weight: 400; font-style: normal; }
.net-sub { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.flag { font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2); white-space: nowrap; }
.flag-warn { background: var(--warn-soft); color: var(--warn); }
.net-sec .sec-tag + .sec-tag { margin-left: 4px; }
.net-chan .chans { font-variant-numeric: tabular-nums; font-weight: 600; }
.net-band { display: block; font-size: 10.5px; color: var(--text-3); }
.net-signal, .net-clients { white-space: nowrap; font-variant-numeric: tabular-nums; }
.net-clients { color: var(--text-2); }
.detail-row td { padding: 4px 14px 10px 46px; background: var(--surface-2); }
.detail-row:hover { background: transparent; }
.bssid-list { display: grid; gap: 1px; }
.bssid-item { display: grid; grid-template-columns: minmax(150px, 1.4fr) 132px 112px minmax(92px, .8fr) 84px 1fr; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; }
.bssid-item:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.bssid { color: var(--text-2); font-size: 11.5px; }
.bssid-meta, .bssid-clients { color: var(--text-3); font-size: 12px; }
.bssid-flags { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.sec-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sec-open { background: var(--bad-soft); color: var(--bad); }
.sec-wep, .sec-wpa { background: var(--warn-soft); color: var(--warn); }
.sec-wpa2, .sec-wpa3, .sec-owe { background: var(--ok-soft); color: var(--ok); }
.sec-eap { background: var(--signal-soft); color: var(--signal); }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 14px; vertical-align: middle; margin-right: 6px; }
.signal-bars i { width: 3px; background: var(--line); border-radius: 1px; display: block; }
.signal-bars i.on { background: var(--signal); }
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty-state svg { color: var(--text-3); margin-bottom: 14px; }
.empty-state h2 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; max-width: 360px; margin: 0 auto; }
/* ------------------------------------------------------------ configurações */
dialog { border: 0; border-radius: 20px; padding: 24px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
dialog h2 { font-size: 20px; margin-bottom: 16px; }
dialog menu { display: flex; gap: 10px; justify-content: flex-end; padding: 0; margin: 22px 0 0; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.select { width: 100%; border: 0; border-radius: 12px; padding: 9px 14px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); font: inherit; cursor: pointer; }
.select option { background-color: var(--surface); color: var(--text); }
/* ------------------------------------------------------------ detalhes do alvo */
.ssid-btn { display: block; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; line-height: 1.25; }
.ssid-btn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.bssid-item { cursor: pointer; }
.bssid-item:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.target-dlg { width: min(980px, calc(100vw - 32px)); max-height: min(90vh, 900px); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.target-dlg:not([open]) { display: none; }
.target-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 12px; }
.target-head h2 { font-size: 22px; line-height: 1.2; }
.target-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; color: var(--text-2); font-size: 12.5px; margin-top: 5px; }
.target-sub .mono { color: var(--text-2); font-size: 12px; }
.target-sub .sec-tag { margin-left: 2px; }
.dot-sep { color: var(--text-3); }
.bssid-select { width: auto; max-width: 320px; padding: 4px 8px; border-radius: 8px; font-size: 11.5px; }
.tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; color: var(--text-2); padding: 9px 12px 11px; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-2); font-size: 10.5px; line-height: 17px; text-align: center; }
.tab-panel { padding: 18px 24px 26px; overflow-y: auto; min-height: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.detail-card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 10px; }
.detail-wide { margin-top: 12px; }
.kv { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.risk { border-radius: 12px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 12px; border: 1px solid transparent; }
.risk-bad { background: var(--bad-soft); color: var(--bad); }
.risk-warn { background: var(--warn-soft); color: var(--warn); }
.risk-info { background: var(--signal-soft); color: var(--signal); }
.risk strong { font-weight: 700; }
.flag-ok { background: var(--ok-soft); color: var(--ok); }
.flag-bad { background: var(--bad-soft); color: var(--bad); }
.clients-card { margin-top: 2px; overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table .row-actions { text-align: right; white-space: nowrap; }
.mini-table th { padding: 9px 12px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); text-align: left; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 9px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-table .probes { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.mini-table .device-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.clients-card .mini-table { table-layout: fixed; }
.clients-card .mini-table th:nth-child(1) { width: 20%; }
.clients-card .mini-table th:nth-child(2) { width: 18%; }
.clients-card .mini-table th:nth-child(3) { width: 12%; }
.clients-card .mini-table th:nth-child(4) { width: 7%; }
.clients-card .mini-table th:nth-child(5) { width: 10%; }
.clients-card .mini-table th:nth-child(6) { width: 12%; }
.clients-card .mini-table th:nth-child(7) { width: 21%; }
.clients-card .row-actions .btn { padding: 6px 10px; }
.clients-card .client-name, .clients-card .client-sub { max-width: 100%; }
.client-name { font-weight: 600; color: var(--text); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-sub { color: var(--text-3); font-size: 10.5px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-inline { text-align: center; padding: 46px 20px; color: var(--text-2); background: var(--surface-2); border-radius: 14px; }
.empty-inline strong { color: var(--text); display: block; margin-bottom: 4px; }
.empty-inline p { margin: 0; font-size: 13px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; margin: 4px 0 14px; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--accent); }
/* Colunas CSS em vez de grid: os cards de ataque têm alturas muito
diferentes entre si (Deauth/Handshake são enormes, PMF/WPS são curtos).
Num grid de 2 colunas comum, o par mais curto de uma linha deixava um
vão vazio enorme embaixo (a altura da linha é a do item mais alto, e
align-items:start não estica o curto pra preencher). Colunas fazem os
cards fluírem como alvenaria: cada um só ocupa a altura que precisa, o
próximo entra logo abaixo, sem buracos. */
.attack-grid { column-count: 2; column-gap: 12px; }
.attack-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; break-inside: avoid; margin: 0 0 12px; display: inline-block; width: 100%; }
.attack-deauth, .attack-wide { column-span: all; }
.attack-deauth .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attack-deauth .detail-actions { align-items: center; }
.attack-card h3 { font-size: 14px; margin-bottom: 5px; }
.attack-card .hint { margin: 6px 0 10px; }
.attack-card .btn { margin-top: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.field { display: grid; gap: 5px; margin: 9px 0; }
.field-label { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.input { width: 100%; border: 1px solid transparent; border-radius: 10px; padding: 8px 11px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); font: inherit; font-size: 12.5px; }
.input:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.hint { color: var(--text-3); font-size: 12px; margin: 0; line-height: 1.4; }
.hint.bad { color: var(--bad); }
.hint code { background: color-mix(in srgb, var(--text) 7%, transparent); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }
.hs-list { display: grid; gap: 6px; margin-bottom: 8px; }
.hs-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.hs-main { min-width: 0; display: grid; gap: 2px; }
.hs-meta { color: var(--text-3); font-size: 11px; }
.hs-flags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.crack-box { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.crack-ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.crack-box .mono { margin-right: 4px; }
.crack-head { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--text-2); }
.crack-bar { width: 100%; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.crack-bar i { display: block; width: 35%; height: 100%; border-radius: 999px; background: var(--accent); animation: crack-slide 1.1s ease-in-out infinite; }
@keyframes crack-slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
/* ------------------------------------------------------------ responsivo */
@media (max-width: 760px) {
.app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.sidebar { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; overflow-x: auto; }
.brand { padding: 4px 10px; }
.side-title, .side-foot { display: none; }
.list { display: flex; }
.result-tools { width: 100%; }
.result-tools .filter { flex: 1; width: auto; }
.net-table { min-width: 560px; }
.bssid-item { grid-template-columns: 1fr auto; }
.bssid-meta, .bssid-sig, .bssid-flags { grid-column: 1 / -1; }
.bssid-flags { justify-content: flex-start; }
.target-dlg { width: calc(100vw - 16px); max-height: 94vh; }
.target-head { padding: 16px 16px 10px; }
.tabs { padding: 0 10px; overflow-x: auto; }
.tab-panel { padding: 14px 14px 20px; }
.detail-grid { grid-template-columns: 1fr; }
.attack-grid { column-count: 1; }
.field-row { grid-template-columns: 1fr; }
.detail-card, .attack-card { padding: 12px; }
}
/* --------------------------------------------------- análise de canais */
.top-actions { display: flex; align-items: center; gap: 10px; }
.view-switch { display: inline-flex; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.view-switch button { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); background: transparent; cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.alert-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.alert-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.alert-high .alert-dot { background: var(--bad); }
.alert-low .alert-dot { background: var(--text-3); }
.alert-title { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-more { color: var(--text-3); font-size: 11.5px; padding: 0 4px; }
.channel-card { padding: 16px; }
.channel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.band-switch { display: inline-flex; gap: 4px; }
.band-switch button { border: 1px solid transparent; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.band-switch button[aria-pressed="true"] { background: var(--signal-soft); color: var(--signal); border-color: color-mix(in srgb, var(--signal) 35%, transparent); }
.sp-legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-3); font-size: 11px; }
.sp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sp-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.spectrum { width: 100%; height: auto; display: block; background: color-mix(in srgb, var(--text) 3%, transparent); border-radius: 12px; }
.sp-grid { stroke: var(--line); stroke-width: 1; }
.sp-axis { stroke: color-mix(in srgb, var(--text) 22%, transparent); stroke-width: 1; }
.sp-db, .sp-chan { fill: var(--text-3); font-size: 9px; font-family: var(--mono); }
.sp-name { fill: var(--text-2); font-size: 9px; font-weight: 600; }
.sp-lobe path { transition: fill-opacity .15s; }
.sp-lobe:hover path { fill-opacity: .38; }
.channel-grid { display: grid; grid-template-columns: 190px 1fr; gap: 18px; margin-top: 14px; }
.channel-grid h3 { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.chan-best-num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--signal); margin: 0 0 6px; }
.chan-list { display: grid; gap: 6px; }
.chan-list h3 { margin: 0 0 2px; }
.chan-row { display: grid; grid-template-columns: 46px 1fr 48px 128px; align-items: center; gap: 8px; font-size: 12px; }
.chan-row .chan-n { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.chan-bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.chan-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.chan-bar i.diff-mid { background: var(--warn); }
.chan-bar i.diff-high { background: var(--bad); }
.chan-score { font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: right; }
.chan-aps { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.chan-best .chan-n, .chan-best .chan-aps { color: var(--signal); }
/* ------------------------------------------------- saúde do espectro (SMART) */
.chan-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 2px 0 16px; }
.chan-tile { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 0 0 1px var(--line); }
.chan-tile small { color: var(--text-3); font-size: 12px; }
.chan-tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.chan-tile.status.ok { background: var(--ok-soft); } .chan-tile.status.ok b { color: var(--ok); }
.chan-tile.status.warn { background: var(--warn-soft); } .chan-tile.status.warn b { color: var(--warn); }
.chan-tile.status.bad { background: var(--bad-soft); } .chan-tile.status.bad b { color: var(--bad); }
.chan-tile b span { font-weight: 500; opacity: .8; font-size: 13px; margin-left: 4px; }
.chan-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 5px; flex: none; }
.chan-dot.warn { background: var(--warn); }
.chan-dot.bad { background: var(--bad); }
.chan-attrs { margin-top: 4px; }
.chan-attrs summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 6px 0; list-style: none; }
.chan-attrs summary::-webkit-details-marker { display: none; }
.chan-attrs summary::before { content: '▸ '; display: inline-block; width: 12px; }
.chan-attrs[open] summary::before { content: '▾ '; }
.chan-table .dim { color: var(--text-3); font-size: 11.5px; }
.chan-table tr.chan-best-row td { color: var(--signal); font-weight: 600; }
.mini-tag { font-size: 8.5px; padding: 1px 4px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
/* ------------------------------------------------ clientes e linha do tempo */
.spark { display: inline-block; width: 62px; height: 16px; vertical-align: middle; margin-left: 6px; }
.spark path { fill: none; stroke: var(--signal); stroke-width: 1.4; }
.spark-big { display: block; width: 100%; height: 70px; margin: 10px 0 0; }
.timeline-card { margin-top: 12px; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.timeline { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 5px; max-height: 260px; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 84px 112px 1fr; align-items: baseline; gap: 8px; font-size: 12px; border-bottom: 1px solid var(--line); padding: 5px 2px; }
.timeline li > .mono:first-child { white-space: nowrap; }
.tl-kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.tl-deauth { color: var(--bad); }
.tl-associate { color: var(--ok); }
.tl-probe { color: var(--signal); }
.tl-detail { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ------------------------------------------------------------- WPS e relatório */
.term { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-2); font: 11.5px/1.5 var(--mono); white-space: pre-wrap; max-height: 180px; overflow: auto; }
.report-dlg { width: min(1060px, 96vw); height: 92vh; max-height: 92vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.report-dlg:not([open]) { display: none; }
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.report-head h2 { font-size: 17px; margin: 0 0 2px; }
.report-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-tools .mono { font-size: 11.5px; color: var(--text-2); min-width: 38px; text-align: center; }
.report-view { flex: 1; overflow: auto; background: color-mix(in srgb, var(--text) 8%, var(--bg)); padding: 16px; }
.report-canvas { margin: 0 auto; transform-origin: top center; background: #fff; box-shadow: 0 6px 30px rgba(0, 0, 0, .18); }
.report-canvas iframe { border: 0; display: block; background: #fff; }
@media (max-width: 760px) {
.top-actions { gap: 6px; }
.channel-grid { grid-template-columns: 1fr; }
.chan-row { grid-template-columns: 42px 1fr 44px; }
.chan-aps { grid-column: 2 / -1; }
.report-dlg { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
.report-view { padding: 8px; }
}