:root {
  --bg: #080d1a;
  --bg-2: #0c1324;
  --card: #10182c;
  --card-2: #141e36;
  --line: #1f2b47;
  --line-2: #2a3859;
  --text: #e8edf7;
  --muted: #8592ad;
  --faint: #5c6884;
  --orange: #f58220;
  --orange-2: #ff9d47;
  --orange-soft: rgba(245, 130, 32, .14);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, .14);
  --red: #f04f4f;
  --red-soft: rgba(240, 79, 79, .14);
  --yellow: #f5b521;
  --yellow-soft: rgba(245, 181, 33, .14);
  --blue: #4b8bff;
  --blue-soft: rgba(75, 139, 255, .14);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.25);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(245,130,32,.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(75,139,255,.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange-2), var(--orange));
  box-shadow: 0 6px 18px rgba(245,130,32,.35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-name span { color: var(--orange); }
.brand-sub { font-size: 11px; color: var(--faint); margin-top: -2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px;
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s; white-space: nowrap;
}
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { background: var(--orange-soft); color: var(--orange-2); }
.nav a.active svg { color: var(--orange); }
.nav a .soon { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: var(--card-2); color: var(--faint); }
.nav svg, .ico { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--orange-2);
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--faint); font-size: 11px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(8,13,26,.75); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.search input { flex: 1; background: none; border: 0; outline: 0; min-width: 0; }
.search kbd { font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.topbar .spacer { flex: 1; }
.pill-demo {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px;
  background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(245,181,33,.3);
}
.btn.menu-btn { display: none; }

.content { padding: 26px 28px 40px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; }
.crumbs { font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.crumbs a:hover { color: var(--orange-2); }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g-3 { grid-template-columns: 1.1fr 1fr 1fr; }
.g-2-1 { grid-template-columns: 1.6fr 1fr; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(180deg, var(--card), rgba(16,24,44,.85));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  min-width: 0;
}
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card h2 .ico { color: var(--orange); width: 16px; height: 16px; }
.card .link { font-size: 12px; color: var(--muted); }
.card .link:hover { color: var(--orange-2); }

/* KPIs */
.kpi-row { display: flex; align-items: center; gap: 22px; }
.kpis { display: grid; gap: 10px; flex: 1; }
.kpi { display: flex; align-items: baseline; gap: 8px; }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; align-self: center; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font-size: 24px; font-weight: 700; }
.donut .center small { color: var(--muted); font-size: 11px; }

.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.tile { padding: 16px 18px; }
.tile .label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.tile .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .hint { font-size: 12px; color: var(--faint); }
.tile.accent { border-color: rgba(245,130,32,.35); background: linear-gradient(160deg, rgba(245,130,32,.16), var(--card) 60%); }

/* bars */
.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.bar-row .num { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 64px; text-align: right; }
.bar-row .num b { color: var(--text); font-weight: 600; }
.track { height: 9px; background: var(--card-2); border-radius: 99px; overflow: hidden; position: relative; }
.fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--orange-2)); }
.fill.blue { background: linear-gradient(90deg, #2f6fe6, var(--blue)); }
.fill.ghost { position: absolute; inset: 0 auto 0 0; background: rgba(245,130,32,.25); }
a.bar-row:hover .name { color: var(--orange-2); }

.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--card-2); gap: 2px; }
.stack span { height: 100%; }
.legend { display: grid; gap: 8px; margin-top: 16px; }
.legend a { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.legend a:hover { background: var(--card-2); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .range { color: var(--faint); font-size: 12px; }
.legend .cnt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-otimo { background: var(--green); } .c-bom { background: #7ed957; } .c-atencao { background: var(--yellow); }
.c-critico { background: var(--red); } .c-sem { background: var(--line-2); }

/* listas */
.rows { display: grid; }
.rows a, .rows > div {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 6px; border-bottom: 1px solid var(--line);
}
.rows a:last-child, .rows > div:last-child { border-bottom: 0; }
.rows a:hover { background: var(--card-2); border-radius: 8px; }
.rows .t { min-width: 0; }
.rows .t b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .t small { color: var(--faint); font-size: 12px; }
.empty { color: var(--faint); text-align: center; padding: 26px 10px; font-size: 13px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.off { background: var(--red-soft); color: var(--red); }
.badge.warn { background: var(--yellow-soft); color: var(--yellow); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.neutral { background: var(--card-2); color: var(--muted); }
.sig { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.sig.otimo { color: var(--green); } .sig.bom { color: #7ed957; } .sig.atencao { color: var(--yellow); }
.sig.critico { color: var(--red); } .sig.sem { color: var(--faint); }

/* tabela */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { max-width: 360px; }
.select, .input {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: 0; min-width: 0;
}
.select:focus, .input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--card-2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pager .btns { display: flex; gap: 8px; }

/* botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card-2);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s;
}
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); border-color: transparent; color: #1a0e02; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--red); border-color: rgba(240,79,79,.35); background: var(--red-soft); }
.btn.ghost { background: transparent; }
.btn .ico { width: 16px; height: 16px; }
.btn.spin .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* tela do equipamento */
.dev-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; }
.dev-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange); border: 1px solid rgba(245,130,32,.3);
}
.dev-icon svg { width: 28px; height: 28px; }
.dev-head h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dev-head .meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.dev-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button, .tabs a {
  text-decoration: none;
  background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs button.active, .tabs a.active { color: var(--orange-2); border-bottom-color: var(--orange); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.gauge { display: grid; place-items: center; gap: 6px; padding: 6px 0; }
.gauge .big { font-size: 34px; font-weight: 700; font-family: var(--mono); letter-spacing: -.03em; }
.gauge .scale { width: 100%; height: 10px; border-radius: 99px; position: relative;
  background: linear-gradient(90deg, var(--red) 0 23%, var(--yellow) 23% 35%, #7ed957 35% 60%, var(--green) 60%); }
.gauge .needle { position: absolute; top: -5px; width: 4px; height: 20px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.4); transform: translateX(-50%); }
.gauge .ticks { width: 100%; display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.meter { display: grid; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; font-size: 13px; }
.meter .top b { font-variant-numeric: tabular-nums; }

.wifi-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--card-2); display: grid; gap: 12px; }
.wifi-card .head { display: flex; align-items: center; gap: 10px; }
.wifi-card .head .ico { color: var(--orange); }
.wifi-card .head b { font-size: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field .with-btn { display: flex; gap: 6px; }
.field .with-btn .input { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 19px; }
.ping-out { font-family: var(--mono); font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 90px; white-space: pre-wrap; color: var(--muted); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(800px 500px at 20% 20%, rgba(245,130,32,.22), transparent 60%), linear-gradient(160deg, #0d1630, #070b16);
  border-right: 1px solid var(--line);
}
.login-art h2 { font-size: 38px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; max-width: 520px; }
.login-art h2 span { color: var(--orange); }
.login-art p { color: var(--muted); max-width: 460px; font-size: 15px; }
.login-art .grid-bg { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(600px 400px at 70% 70%, #000, transparent 75%); }
.login-art > * { position: relative; }
.login-feats { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.login-feats span { display: flex; align-items: center; gap: 8px; }
.login-feats .ico { color: var(--orange); }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-box { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login-box h1 { margin: 0; font-size: 24px; }
.login-box .input { padding: 11px 14px; }
.login-box .btn { justify-content: center; padding: 11px; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--red-soft); color: #ff8a8a; border: 1px solid rgba(240,79,79,.3); }

/* modal & toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(3,6,14,.7); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal p { color: var(--muted); margin: 0 0 18px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 60; }
.toast { background: var(--card-2); border: 1px solid var(--line-2); border-left: 3px solid var(--green); border-radius: 10px; padding: 12px 16px; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13px; animation: rise .25s ease; }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--yellow); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 160px; border: 1px solid var(--line); }
@keyframes sk { to { background-position: -200% 0; } }

/* responsivo */
@media (max-width: 1200px) {
  .g-3 { grid-template-columns: 1fr 1fr; }
  .g-3 > :first-child { grid-column: 1 / -1; }
  .stat-tiles, .g-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .side { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .btn.menu-btn { display: inline-flex; }
  .g-3, .g-2-1, .g-2 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 12px 16px; }
  .dev-head { grid-template-columns: auto 1fr; }
  .dev-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .kv { grid-template-columns: 120px 1fr; }
}
@media (max-width: 520px) {
  .stat-tiles, .g-4 { grid-template-columns: 1fr; }
  .kpi-row { flex-direction: column; align-items: flex-start; }
  .bar-row { grid-template-columns: 90px 1fr auto; }
}

/* WAN detalhada / LAN-DHCP (v0.2) */
.card h3.sub { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.lan-form { display: grid; gap: 14px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }

/* Histórico / gráficos / portas (v0.3) */
.chart { width: 100%; height: 160px; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--yellow); stroke-dasharray: 4 4; stroke-width: 1; opacity: .7; }
.chart .ref.bad { stroke: var(--red); }
.chart .ref-t { fill: var(--muted); font-size: 9px; }
.chart .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-leg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart-leg i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart-leg b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.ports { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.port { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.port b { color: var(--text); }
.port.up { border-color: var(--green); background: var(--green-soft); }
.port.up span { color: var(--green); font-weight: 600; }

/* Raio-X (v0.4) */
.xray-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0 4px; }
.xray-head.off { border-color: var(--red); background: var(--red-soft); }
.xray-head.warn { border-color: var(--yellow); background: var(--yellow-soft); }
.xray-head.ok { border-color: var(--green); background: var(--green-soft); }
.xray-head .muted { font-size: 12px; margin-left: auto; }
.finding { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding .badge { justify-self: start; }
.finding b { display: block; font-size: 13.5px; }
.finding small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.45; }
details.prev { margin-top: 12px; font-size: 13px; color: var(--muted); }
details.prev summary { cursor: pointer; }
details.prev > div { padding: 6px 0; }
.chbars { display: flex; gap: 4px; align-items: flex-end; height: 150px; }
.chb { flex: 1; display: grid; grid-template-rows: 16px 1fr 18px; height: 100%; text-align: center; font-size: 11px; color: var(--muted); min-width: 0; }
.chb .bar { position: relative; background: transparent; border-bottom: 2px solid var(--line); border-radius: 4px 4px 0 0; overflow: hidden; }
.chb .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--blue-soft); border-top: 2px solid var(--blue); }
.chb .bar i.s { background: var(--blue); opacity: .55; border: 0; }
.chb.own .bar { outline: 2px solid var(--orange); }
.chb.own .c { color: var(--orange); font-weight: 700; }
@media (max-width: 700px) { .finding { grid-template-columns: 1fr; gap: 4px; } }

/* Alertas (v0.5) */
.nav-count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.nav-count:empty { display: none; }
.nav-count.bad { background: var(--red); color: #fff; }
.nav-count.warn { background: var(--yellow); color: #111; }
.alert-list { display: grid; gap: 10px; margin-bottom: 16px; }
.alert-card { border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 10px; padding: 12px 14px; background: var(--card); display: grid; gap: 6px; }
.alert-card.off { border-left-color: var(--red); }
.alert-card.acked { opacity: .7; }
.alert-card .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.alert-card .when { margin-left: auto; font-size: 12px; }
.alert-card .title { font-weight: 600; }
.alert-card .acts { display: flex; justify-content: flex-end; }
.dev-alerts { display: grid; gap: 8px; margin: 0 0 14px; }

.ico.flip { transform: rotate(180deg); }

/* Ações em massa (v0.7) */
.fix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fix-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; }
.fix-opt input { justify-self: start; }
.fix-opt small { color: var(--muted); line-height: 1.45; }
.fix-opt .imp b { display: inline; color: var(--text); }
.fix-opt:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.fix-opt.danger:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.mass-sum { border: 1px solid var(--yellow); background: var(--yellow-soft); border-radius: 10px; padding: 12px 14px; margin: 12px 0; display: grid; gap: 4px; }
.mass-sum.off { border-color: var(--red); background: var(--red-soft); }
.finding { grid-template-columns: 96px 1fr auto; }

a.btn { text-decoration: none; }
