/* Chocolate Monitor – tema escuro "crypto intelligence dashboard"
   Espaçamento: 4 / 8 / 12 / 16 / 24 / 32  ·  Tipos: 11 / 12 / 13 / 14 / 16 / 20 / 24 */
:root {
  /* superfícies */
  --bg: #0a0c10; --bg2: #0d1015; --panel: #111419; --panel2: #171b22; --panel3: #1d222b;
  --line: rgba(255, 255, 255, .06); --line2: rgba(255, 255, 255, .10); --line3: rgba(255, 255, 255, .16);
  /* texto */
  --text: #e4e8ee; --strong: #f5f7fa; --muted: #8b94a5; --dim: #5f6878;
  /* marca */
  --accent: #00e5a0; --accent-hi: #3cf0b8; --accent2: #5cc8ff; --accentbg: rgba(0, 229, 160, .08); --accentline: rgba(0, 229, 160, .28);
  /* prioridades */
  --critical: #ff4d6a; --high: #ff9447; --medium: #f2c94c; --low: #5aa9ff;
  --confirmed: #00e5a0; --code: #5aa9ff; --possible: #f2c94c; --known: #6b7484;
  /* tipografia */
  --mono: "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* forma */
  --r: 12px; --r-sm: 8px; --r-xs: 6px;
  --ctl: 34px; --ctl-sm: 28px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--panel3); padding: 1px 5px; border-radius: 4px; }
b, strong { font-weight: 600; }
.hidden { display: none !important; }
::selection { background: rgba(0, 229, 160, .28); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .09); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .16); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--bg2); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 24px; }
.brand b { letter-spacing: .02em; font-size: 15px; color: var(--strong); font-weight: 700; white-space: nowrap; }
.brand small { display: block; color: var(--dim); font-size: 11.5px; letter-spacing: .02em; margin-top: 1px; }
.radar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent); position: relative; box-shadow: 0 0 16px rgba(0, 229, 160, .25); overflow: hidden; flex: none; }
.radar::after { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(0, 229, 160, .65), transparent 30%); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

nav { display: grid; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 0 12px; height: 36px; border-radius: var(--r-sm); font-weight: 500; font-size: 13.5px; position: relative; }
nav a span { width: 18px; text-align: center; color: var(--dim); font-size: 13px; transition: color .12s; }
nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
nav a.active { background: var(--accentbg); color: var(--strong); }
nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
nav a.active span { color: var(--accent); }
nav em { margin-left: auto; font-style: normal; }
nav em.pill { min-width: 22px; height: 20px; padding: 0 7px; justify-content: center; font-size: 11px; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.side-foot #roleInfo { margin-top: 0 !important; color: var(--dim); }
.live { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.live.on i { background: var(--accent); box-shadow: 0 0 0 3px rgba(0, 229, 160, .15); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 32px; height: 56px; border-bottom: 1px solid var(--line); background: rgba(10, 12, 16, .82); backdrop-filter: saturate(140%) blur(10px); position: sticky; top: 0; z-index: 10; }
.crumbs { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs b { color: var(--strong); font-weight: 600; }
.top-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.view { padding: 24px 32px 64px; max-width: 1480px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
#tab { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.view > *, #tab > * { margin-top: 0; margin-bottom: 0; min-width: 0; }

/* ------------------------------------------------------------------ tipografia */
h1 { font-size: 20px; line-height: 1.3; margin: 0; color: var(--strong); font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h1.wrap { display: block; word-break: break-all; font-family: var(--mono); font-size: 16px; font-weight: 500; }
h2 { font-size: 14px; line-height: 1.4; margin: 0; color: var(--strong); font-weight: 600; }
h3 { font-size: 11px; margin: 0 0 8px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.sub { color: var(--muted); font-size: 12.5px; }
h1 + .sub, .page-head .sub { margin-top: 4px; }

/* ------------------------------------------------------------------ cards e grades */
.grid { display: grid; gap: 16px; min-width: 0; }
.cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.two { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.card > h2:first-child { margin-bottom: 12px !important; }
.card > h2 + .sub { margin-top: -6px; margin-bottom: 16px !important; }

.card.stat { padding: 16px; display: flex; flex-direction: column; gap: 4px; min-height: 104px; }
.card.stat .k { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.stat .v { font-size: 26px; line-height: 1.2; font-weight: 650; color: var(--strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.stat .hint { color: var(--dim); font-size: 11.5px; line-height: 1.4; margin-top: auto; }
.card.stat.accent .v { color: var(--accent); }
.card.stat.crit { border-color: rgba(255, 77, 106, .22); background: linear-gradient(180deg, rgba(255, 77, 106, .06), transparent 70%), var(--panel); }
.card.stat.crit .v { color: var(--critical); }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-width: 0; }
.panel-head > a { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.panel-head > a:hover { color: var(--accent); }
.panel-head > div:first-child { min-width: 0; }
.page-head { margin-bottom: 0; align-items: flex-end; flex-wrap: wrap; padding-bottom: 4px; }
.page-head .sub { max-width: 760px; }

/* ------------------------------------------------------------------ botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl); background: var(--panel2); border: 1px solid var(--line2); color: var(--text); padding: 0 14px; border-radius: var(--r-sm); cursor: pointer; font: 500 13px var(--sans); white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--panel3); border-color: var(--line3); color: var(--strong); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04150f; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #04150f; }
.btn.danger { color: #ff8a9c; }
.btn.danger:hover { background: rgba(255, 77, 106, .1); border-color: rgba(255, 77, 106, .45); color: var(--critical); }
.btn.sm { height: var(--ctl-sm); padding: 0 10px; font-size: 12px; border-radius: var(--r-xs); }
.btn:disabled, .btn:disabled:hover { opacity: .5; cursor: default; background: var(--panel2); border-color: var(--line2); color: var(--text); }
.btn.primary:disabled, .btn.primary:disabled:hover { background: var(--accent); border-color: var(--accent); color: #04150f; }
select.btn { padding-right: 30px; }
.icon-btn { background: none; border: 1px solid var(--line2); color: var(--text); border-radius: var(--r-sm); width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.mobile-only { display: none; }

/* ------------------------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.card > .table-wrap:last-child { margin-bottom: -8px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(255, 255, 255, .025); }
td b { color: var(--strong); }
td .sub { font-size: 12px; }
td.mono { white-space: nowrap; font-variant-numeric: tabular-nums; }
.trunc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td > .trunc { display: block; }
.wrap { word-break: break-all; }
.nowrap { white-space: nowrap; }

/* lista compacta (mudanças) */
.list-table { table-layout: fixed; }
.list-table td { padding-top: 10px; padding-bottom: 10px; }
.list-table td.c-prio { width: 80px; }
.list-table td.c-when { width: 84px; text-align: right; white-space: nowrap; }
.list-table .trunc { max-width: 100%; color: var(--text); }
.list-table .sub.trunc { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ------------------------------------------------------------------ selos (pills) */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .03em; line-height: 1; background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line2); white-space: nowrap; vertical-align: middle; }
h1 .pill { font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.pill small { display: none; }
.p-CRITICAL, .p-HIGH, .p-MEDIUM, .p-LOW { min-width: 64px; justify-content: center; text-transform: uppercase; letter-spacing: .05em; }
.p-CRITICAL { background: rgba(255, 77, 106, .12); color: var(--critical); border-color: rgba(255, 77, 106, .32); }
.p-HIGH { background: rgba(255, 148, 71, .11); color: var(--high); border-color: rgba(255, 148, 71, .3); }
.p-MEDIUM { background: rgba(242, 201, 76, .10); color: var(--medium); border-color: rgba(242, 201, 76, .28); }
.p-LOW { background: rgba(90, 169, 255, .10); color: var(--low); border-color: rgba(90, 169, 255, .28); }
nav em.p-CRITICAL, nav em.p-HIGH, td .p-HIGH, td .p-LOW, .badge-row .p-HIGH { min-width: 0; text-transform: none; letter-spacing: .02em; }
.c-CONFIRMED { background: rgba(0, 229, 160, .10); color: var(--confirmed); border-color: rgba(0, 229, 160, .3); }
.c-IDENTIFIED_IN_CODE { background: rgba(90, 169, 255, .10); color: var(--code); border-color: rgba(90, 169, 255, .28); }
.c-POSSIBLE_ASSOCIATION { background: rgba(242, 201, 76, .10); color: var(--possible); border-color: rgba(242, 201, 76, .28); }
.c-KNOWN_INFRASTRUCTURE { color: var(--known); }
.s-idle, .s-active, .s-ok { color: var(--accent); border-color: rgba(0, 229, 160, .25); background: rgba(0, 229, 160, .07); }
.s-idle::before, .s-active::before, .s-ok::before, .s-scanning::before, .s-queued::before, .s-running::before, .s-error::before, .s-partial::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.s-scanning, .s-queued, .s-running { color: var(--accent2); border-color: rgba(92, 200, 255, .3); background: rgba(92, 200, 255, .07); }
.s-scanning::before, .s-queued::before, .s-running::before { animation: pulse 1.2s infinite; }
.s-error { color: var(--critical); border-color: rgba(255, 77, 106, .3); background: rgba(255, 77, 106, .08); }
.s-paused, .s-removed { color: var(--dim); }
.s-partial { color: var(--medium); border-color: rgba(242, 201, 76, .25); }
.chain { display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.chain.solana { color: #b88cff; } .chain.evm { color: #7fb0ff; } .chain.bitcoin { color: #f5a94a; }
td .chain + .sub { font-size: 11px; color: var(--dim); }

/* ------------------------------------------------------------------ endereços */
.addr { font-family: var(--mono); font-size: 12.5px; color: var(--strong); word-break: break-all; }
td .addr, a.addr { white-space: nowrap; word-break: normal; }
.copy { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--dim); margin-left: 6px; font-size: 12px; width: 20px; height: 20px; border-radius: 4px; vertical-align: middle; transition: color .12s, background .12s; }
.copy:hover { color: var(--accent); background: var(--accentbg); }

/* ------------------------------------------------------------------ alertas */
.alert-list { display: flex; flex-direction: column; }
.alert-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.alert-row:first-child { padding-top: 4px; }
.alert-row:last-child { border-bottom: 0; padding-bottom: 0; }
.alert-row .ar-prio { padding-top: 1px; }
.alert-row .ar-body { min-width: 0; display: grid; gap: 4px; }
.alert-row .t { color: var(--strong); font-weight: 600; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.alert-row .m { color: var(--muted); font-size: 12.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ev-box { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; font-size: 12.5px; }
.ev-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline; }
.ev-k { color: var(--muted); font-size: 11.5px; }
.ev-row > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.ev-q { font-style: italic; }
@media (max-width: 600px) { .ev-row { grid-template-columns: 1fr; gap: 0; } }
/* evidência recolhível — some da lista até você querer ver */
details.ev { margin-top: 8px; }
details.ev > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; width: fit-content; color: var(--muted); font-size: 11.5px; font-weight: 500; border: 1px solid var(--line2); border-radius: 999px; list-style: none; user-select: none; transition: color .12s, border-color .12s, background-color .12s; }
details.ev > summary::-webkit-details-marker { display: none; }
details.ev > summary::before { content: "▸"; font-size: 9px; color: var(--dim); transition: transform .15s; }
details.ev[open] > summary::before { transform: rotate(90deg); }
details.ev > summary:hover { color: var(--accent); border-color: var(--accentline); background: var(--accentbg); }
details.ev[open] > summary { margin-bottom: 8px; }
details.ev[open] > summary::after { content: "fechar"; color: var(--dim); font-size: 11px; }
details.ev .ev-box { margin-top: 0; animation: enter .16s ease-out; }
.alert-row .ar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--dim); font-size: 12px; margin-top: 2px; }
.alert-row .ar-meta > * + *::before { content: "·"; margin-right: 8px; color: var(--dim); }
.alert-row .ar-meta a { color: var(--muted); }
.alert-row .ar-meta a:hover { color: var(--accent); }
.alert-row .ar-meta a.ar-site { color: var(--text); font-weight: 500; }
.alert-row .ar-meta .ar-read { margin-left: auto; height: 24px; padding: 0 8px; font-size: 11.5px; background: transparent; border-color: var(--line2); color: var(--muted); }
.alert-row .ar-meta .ar-read::before { content: none; }
.alert-row .ar-meta .ar-read:hover { color: var(--accent); border-color: var(--accentline); background: var(--accentbg); }
.alert-row.unread .t::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; box-shadow: 0 0 0 3px rgba(0, 229, 160, .14); }
.alert-row:not(.unread) .t { color: var(--text); font-weight: 500; }

/* ajuda "O que isso significa?" */
.help { font-size: 12px; margin-top: 2px; }
.help summary { cursor: pointer; color: var(--dim); font-size: 12px; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; border-radius: 4px; }
.help summary:hover { color: var(--muted); }
.help summary::-webkit-details-marker { display: none; }
.help summary::before { content: "?"; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font-size: 9px; font-weight: 700; }
.help summary::after { content: "▾"; font-size: 10px; transition: transform .15s; }
.help[open] summary::after { transform: rotate(180deg); }
.help[open] summary { margin-bottom: 8px; color: var(--muted); }
.help > div { background: rgba(255, 255, 255, .025); border-left: 2px solid var(--accentline); padding: 4px 12px; color: var(--text); line-height: 1.55; }
.help > div:first-of-type { padding-top: 8px; border-top-right-radius: var(--r-xs); }
.help > div:last-of-type { padding-bottom: 8px; border-bottom-right-radius: var(--r-xs); }
.help > div b { color: var(--strong); }
.help > div.sub { color: var(--muted); font-style: italic; }

/* ------------------------------------------------------------------ abas do site */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; font-size: 13px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--strong); border-color: var(--accent); }
.tabs a em { font-style: normal; color: var(--dim); font-size: 11px; background: rgba(255, 255, 255, .05); padding: 1px 6px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tabs a.active em { color: var(--accent); background: var(--accentbg); }

.site-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.site-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.site-head .sub { margin-top: 6px; line-height: 1.6; }
.site-head .sub a { color: var(--accent); }
.site-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.site-head + .tabs { margin-top: 0; }

/* linha de metadados do site — pílulas organizadas no lugar do amontoado de "·" */
.site-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 12.5px; }
.site-meta > a { color: var(--accent); font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 2px; }
.site-meta > a:hover { color: var(--accent-hi); }
.site-meta > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; color: var(--text); white-space: nowrap; }
.site-meta > span i { font-style: normal; color: var(--dim); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.kv { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 10px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.kv dd.wrap, .kv dd.addr, .kv dd.mono { display: block; }
.kv dd > div { width: 100%; }

/* ------------------------------------------------------------------ código / comparação */
.diff { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: #07090c; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: auto; max-height: 70vh; }
.diff .ln { display: grid; grid-template-columns: 52px 52px 1fr; }
.diff .ln > span { padding: 0 10px; white-space: pre-wrap; word-break: break-all; }
.diff .ln > span.n { color: var(--dim); text-align: right; user-select: none; border-right: 1px solid var(--line); }
.diff .add { background: rgba(0, 229, 160, .07); } .diff .add > span:last-child { color: #8bf5cf; }
.diff .del { background: rgba(255, 77, 106, .07); } .diff .del > span:last-child { color: #ff9aac; }
.diff .hunk { background: rgba(92, 200, 255, .06); color: var(--accent2); }
.diff .hunk > span:last-child { color: var(--accent2); }
.side-by-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.code { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: #07090c; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow: auto; max-height: 70vh; white-space: pre-wrap; word-break: break-all; margin: 0; }
.code .hl { background: rgba(242, 201, 76, .25); color: #fff; outline: 1px solid rgba(242, 201, 76, .5); }
.snippet { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--muted); background: #07090c; border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--r-xs); word-break: break-all; white-space: pre-wrap; margin-top: 4px; max-height: 9em; overflow: auto; }
td .snippet { margin-top: 0; }
.snippet mark, .code mark { background: rgba(242, 201, 76, .22); color: #fff; border-radius: 2px; }

/* ------------------------------------------------------------------ formulários */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); align-content: start; }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; }
.form > .sub { margin-top: -8px !important; font-size: 12px; color: var(--dim); line-height: 1.5; }
.form .checks { display: flex; gap: 8px 24px; flex-wrap: wrap; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.form .checks label { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 400; font-size: 13px; cursor: pointer; }
.form .badge-row { padding-top: 4px; }
input:not([type]), input[type=text], input[type=url], input[type=number], input[type=password], select, textarea { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); height: var(--ctl); padding: 0 12px; border-radius: var(--r-sm); font: 13px var(--sans); width: 100%; transition: border-color .12s, box-shadow .12s; }
input:not([type]) { box-sizing: border-box; }
input::placeholder, textarea::placeholder { color: var(--dim); }
select, select.btn { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b94a5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
select option { background: var(--panel); color: var(--text); }
textarea { font-family: var(--mono); font-size: 12px; min-height: 76px; height: auto; padding: 8px 12px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--line3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 229, 160, .14); }
input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input[type=text] { width: auto; min-width: 180px; }
.filters input[type=checkbox], .form input[type=checkbox] { min-width: 0; width: 15px; }
.filters label { display: inline-flex; align-items: center; gap: 8px; height: var(--ctl); cursor: pointer; }
.filters > .sub { margin-left: 4px; }

/* ---- form limpo / mastigado ---- */
.form .hint { color: var(--dim); font-size: 12px; line-height: 1.55; font-weight: 400; }
.form .hint b { color: var(--muted); font-weight: 600; }
.form .opt { color: var(--dim); font-weight: 400; font-size: 11px; }
.form label.big > input { height: 44px; font-size: 15px; padding: 0 14px; }
.form .suffixed { position: relative; display: block; }
.form .suffixed > input { padding-right: 46px; }
.form .suffixed > span { position: absolute; right: 12px; top: 0; height: var(--ctl); display: flex; align-items: center; color: var(--dim); font-size: 12px; pointer-events: none; }
/* pílula "este site é meu" */
.form label.toggle-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r-sm); cursor: pointer; font-weight: 400; transition: border-color .12s, background-color .12s; }
.form label.toggle-card:hover { border-color: var(--line3); }
.form label.toggle-card:has(input:checked) { border-color: var(--accentline); background: var(--accentbg); }
.form label.toggle-card input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.form label.toggle-card b { color: var(--strong); font-size: 13.5px; }
.form label.toggle-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 4px; font-weight: 400; }
/* opções avançadas recolhidas */
details.adv { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg2); }
details.adv > summary { cursor: pointer; padding: 12px 16px; color: var(--text); font-weight: 500; font-size: 13px; list-style: none; display: flex; align-items: center; gap: 8px; user-select: none; }
details.adv > summary small { color: var(--dim); font-weight: 400; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "▸"; color: var(--dim); font-size: 11px; transition: transform .15s; }
details.adv[open] > summary::before { transform: rotate(90deg); }
details.adv[open] > summary { border-bottom: 1px solid var(--line); }
details.adv .adv-body { padding: 16px; display: grid; gap: 16px; animation: enter .16s ease-out; }
details.adv .adv-body > .hint { margin-top: -8px; }

/* ------------------------------------------------------------------ modal / toasts */
.modal { position: fixed; inset: 0; background: rgba(3, 5, 8, .72); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 24px; }
.modal-box { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 24px; width: min(640px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 64px rgba(0, 0, 0, .6); animation: pop .16s ease; }
.modal-box > h2:first-child { font-size: 16px; margin-bottom: 20px !important; }
.modal-box.wide { width: min(1100px, 100%); }

/* ---- testes de ataque: cartões claros, config recolhida ---- */
.atk-intro { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0 0 14px; }
.atk-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 18px; }
.atk-sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); margin: 0 0 10px; }
.atk-card { background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 12px; }
.atk-card .atk-h { display: flex; align-items: center; gap: 8px; color: var(--strong); font-weight: 600; font-size: 13.5px; }
.atk-card .desc { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 6px 0 10px; }
.atk-card .desc code { font-size: 11.5px; }
.warn-tag { font-size: 10.5px; font-weight: 600; color: var(--high); background: rgba(255, 148, 71, .1); border: 1px solid rgba(255, 148, 71, .28); border-radius: 999px; padding: 1px 8px; }
details.atk-fields { margin-top: 2px; }
details.atk-fields > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; color: var(--text); font-size: 12.5px; font-weight: 500; border: 1px solid var(--line2); border-radius: var(--r-xs); list-style: none; user-select: none; width: fit-content; }
details.atk-fields > summary::-webkit-details-marker { display: none; }
details.atk-fields > summary::before { content: "▸"; color: var(--dim); font-size: 10px; transition: transform .15s; }
details.atk-fields[open] > summary::before { transform: rotate(90deg); }
details.atk-fields > summary:hover { border-color: var(--line3); color: var(--strong); }
details.atk-fields[open] > summary { margin-bottom: 12px; }
.atk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.atk-grid label, details.atk-fields > label { display: grid; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); align-content: start; }
details.atk-fields > label { margin-top: 12px; }
.atk-grid label.chk { display: flex; align-items: center; gap: 8px; align-self: end; color: var(--text); font-weight: 400; cursor: pointer; }
.atk-grid label.span2 { grid-column: 1 / -1; }
details.atk-fields .btn { margin-top: 12px; }
.atk-subsec { font-size: 12.5px; font-weight: 600; color: var(--strong); margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.atk-auto { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: 12px 0 0; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r-sm); cursor: pointer; }
.atk-auto input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.atk-auto b { color: var(--strong); font-size: 13px; }
.atk-auto small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.atk-auto:has(input:checked) { border-color: var(--accentline); background: var(--accentbg); }
details.atk-fields .atk-auto + .btn { margin-top: 10px; }
@media (max-width: 600px) { .atk-grid { grid-template-columns: 1fr; } }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: var(--r-sm); max-width: 380px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); animation: slide .25s ease; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.toast.CRITICAL { border-left-color: var(--critical); } .toast.HIGH { border-left-color: var(--high); } .toast.MEDIUM { border-left-color: var(--medium); } .toast.LOW { border-left-color: var(--low); }
.toast b { display: block; color: var(--strong); font-size: 13px; margin-bottom: 2px; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

/* ------------------------------------------------------------------ blocos informativos */
.empty { color: var(--dim); text-align: center; padding: 32px 16px; font-size: 13px; line-height: 1.6; display: grid; justify-items: center; gap: 10px; }
.empty::before { content: ""; width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed var(--line3); background: radial-gradient(circle, var(--line3) 2.5px, transparent 3px); }
td .empty { padding: 24px 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px 24px; font-size: 12px; color: var(--muted); padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); }
.legend div { display: flex; gap: 10px; align-items: center; min-width: 0; }
.legend div > span:last-child { min-width: 0; line-height: 1.45; }
.legend .pill { flex: none; }
.notice { border: 1px solid rgba(242, 201, 76, .2); background: rgba(242, 201, 76, .05); color: #e3d3a0; padding: 12px 16px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.55; }
.notice b { color: #f3e2ad; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 56px; padding: 0 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.spark i { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(0, 229, 160, .25)); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.spark i:hover { opacity: 1; }
.onchain { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px; font-size: 12.5px; }
.onchain table td { padding: 6px 8px; }
.onchain pre { margin: 8px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }
.onchain details summary { cursor: pointer; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.log { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; max-height: 50vh; overflow: auto; background: #07090c; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.log .warn { color: var(--medium); } .log .error { color: var(--critical); } .log .info { color: var(--muted); }
.tab-help { color: var(--muted); font-size: 12.5px; line-height: 1.5; padding: 0 2px; }
.intro { background: linear-gradient(90deg, rgba(0, 229, 160, .07), rgba(0, 229, 160, .02)); border: 1px solid rgba(0, 229, 160, .16); border-radius: var(--r); padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.intro b { color: var(--text); }
.intro .pill { height: 20px; min-width: 0; margin: 0 1px; }
.card .tab-help { margin: -8px 0 8px; font-size: 12px; color: var(--dim); }

/* permissões e acesso */
.viewer .admin-only { display: none !important; }
.editor .admin-strict { display: none !important; }
.locked .sidebar nav, .locked .top-actions, .locked .side-foot .live { display: none; }
.locked .side-foot { border-top: 0; }
.login-card { width: min(400px, 100%); margin: 72px auto 0; padding: 32px; align-self: center; }
.login-card .brand { padding: 0 0 24px !important; }
.login-card h1 { font-size: 18px; margin-bottom: 8px; }
.login-card .form .btn { width: 100%; }
.login-card #loginErr { color: var(--critical); min-height: 1em; }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1400px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) { .two { grid-template-columns: minmax(0, 1fr); } .side-by-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 248px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  .sidebar.open { transform: none; }
  .mobile-only { display: inline-block; }
  .view { padding: 16px 16px 48px; }
  .topbar { padding: 0 16px; gap: 8px; }
  .top-actions .btn { padding: 0 10px; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card.stat { min-height: 92px; padding: 12px; }
  .card.stat .v { font-size: 22px; }
  .form .row { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .site-head .actions { margin-left: 0; justify-content: flex-start; }
  .page-head { align-items: flex-start; }
  .filters select, .filters input[type=text] { flex: 1 1 160px; min-width: 0; }
  .legend { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .legend div { flex-direction: column; align-items: flex-start; gap: 4px; }
  .list-table td.c-prio { width: 76px; }
  .list-table td.c-when { width: 72px; }
  h1 { font-size: 18px; }
}
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
td.num .sub { font-size: 12px; }

/* ---------------------------------------------------------------- motion
   Only where it carries information: changing screen, a new alert arriving, the unread counter going up,
   toasts entering/leaving, the logo sweeping while a scan runs. Everything else stays still. */
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
#view.enter > * { animation: enter .2s cubic-bezier(.2, .7, .2, 1) both; }
#view.enter > *:nth-child(2) { animation-delay: .03s; }
#view.enter > *:nth-child(3) { animation-delay: .06s; }
@keyframes freshIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes freshGlow { 0%, 30% { background: rgba(0, 229, 160, .10); box-shadow: inset 3px 0 0 var(--accent); } 100% { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
.alert-row.fresh { animation: freshIn .28s cubic-bezier(.2, .7, .2, 1), freshGlow 2.6s ease-out; border-radius: 8px; }
.toast.out { opacity: 0; transform: translateX(16px); transition: opacity .2s ease, transform .2s ease; }
@keyframes bump { 35% { transform: scale(1.3); } }
.pill.bump { animation: bump .36s cubic-bezier(.3, 1.6, .5, 1); }
.radar::after { animation-play-state: paused; opacity: .45; transition: opacity .3s; }
body.busy .radar::after { animation-play-state: running; opacity: 1; }
tbody tr { transition: background-color .12s; }
.help[open] > div { animation: enter .16s ease-out; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font: 500 12px var(--sans); cursor: pointer; transition: color .12s, border-color .12s, background-color .12s; }
.chip:hover { color: var(--accent); border-color: var(--accentline); background: var(--accentbg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
