:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e6e8ec;
  --text: #14161a;
  --text-2: #555b66;
  --muted: #8a909b;
  --accent: #2a78d6;
  --accent-soft: #e8f1fc;
  --side: #10141c;
  --side-text: #aeb4c0;
  --side-active: #1d2433;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --good: #16a34a;   --good-soft: #e7f6ec;
  --warning: #d97706; --warning-soft: #fdf3e2;
  --critical: #dc2626; --critical-soft: #fdeaea;
  --neutral: #6b7280; --neutral-soft: #eef0f3;
  --hot: #e5484d; --warm: #f59e0b; --cold: #3b82f6;
  --shadow: 0 1px 2px rgba(16, 20, 28, .04), 0 4px 16px rgba(16, 20, 28, .05);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1016; --surface: #161a22; --surface-2: #1b2029; --border: #262c37;
    --text: #eef0f3; --text-2: #b4bac5; --muted: #7d8592;
    --accent: #3987e5; --accent-soft: #1a2a40;
    --side: #0a0d12; --side-active: #1a2030;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
    --good-soft: #10291a; --warning-soft: #2e2210; --critical-soft: #331414; --neutral-soft: #20252e;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1016; --surface: #161a22; --surface-2: #1b2029; --border: #262c37;
  --text: #eef0f3; --text-2: #b4bac5; --muted: #7d8592;
  --accent: #3987e5; --accent-soft: #1a2a40;
  --side: #0a0d12; --side-active: #1a2030;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
  --good-soft: #10291a; --warning-soft: #2e2210; --critical-soft: #331414; --neutral-soft: #20252e;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--side); color: var(--side-text); padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, #3987e5, #6250d6); color: #fff; font-size: 15px;
}
.brand b { display: block; font-size: 15px; }
.brand small { color: var(--side-text); font-size: 11.5px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  color: var(--side-text); font-weight: 500; margin-bottom: 2px;
}
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #3987e5; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count {
  margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
}
.side-foot { margin-top: auto; font-size: 12px; padding: 10px; border-top: 1px solid #222936; }
.side-foot .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 19px; font-weight: 700; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 12px; width: 280px;
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; }
.content { padding: 24px 28px 60px; max-width: 1480px; }

/* ---------- elements ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--critical); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.card-h h3 { font-size: 14.5px; font-weight: 650; }
.card-h .hint { color: var(--muted); font-size: 12px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 10px 18px 18px; }

.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.g-2 { grid-template-columns: 2fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-half { grid-template-columns: 1fr 1fr; }
@media (max-width: 1150px) { .g-2, .g-3, .g-half { grid-template-columns: 1fr; } }

.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .label { color: var(--text-2); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: 28px; font-weight: 750; margin-top: 6px; letter-spacing: -.02em; }
.kpi .foot { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi .ico {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.kpi .ico svg { width: 16px; height: 16px; }
.kpi.alert .ico { background: var(--critical-soft); color: var(--critical); }
.kpi.ok .ico { background: var(--good-soft); color: var(--good); }
.kpi.warn .ico { background: var(--warning-soft); color: var(--warning); }

.hero {
  display: flex; align-items: center; gap: 18px; padding: 20px 22px; margin-bottom: 16px; border-radius: var(--radius);
  background: linear-gradient(120deg, #1c3f72 0%, #2a5cb8 55%, #5b4fd1 100%); color: #fff;
}
.hero h2 { font-size: 20px; }
.hero p { margin: 4px 0 0; opacity: .85; }
.hero .spacer { flex: 1; }
.hero .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,.24); }
.hero .btn.white { background: #fff; color: #1c3f72; }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 190px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; cursor: default; }
.bar-row .name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--accent); transition: width .6s ease; min-width: 3px; }
.bar-row .n { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-row.clickable { cursor: pointer; }
.bar-row.clickable:hover .name { color: var(--text); }

.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel-step { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; cursor: pointer; }
.funnel-step .track { height: 26px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.funnel-step .fill { height: 100%; border-radius: 7px; display: flex; align-items: center; padding-left: 8px; color: #fff; font-size: 11.5px; font-weight: 600; min-width: 4px; transition: width .6s; }
.funnel-step .n { text-align: right; font-weight: 700; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; }
.list-item:first-child { border-top: 0; }
.list-item:hover .li-title { color: var(--accent); }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
  flex: none; color: #fff;
}
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2);
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.critical { background: var(--critical-soft); color: var(--critical); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.heat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.heat i { width: 8px; height: 8px; border-radius: 50%; }
.heat.quente { color: var(--hot); } .heat.quente i { background: var(--hot); }
.heat.morno { color: var(--warm); } .heat.morno i { background: var(--warm); }
.heat.frio { color: var(--cold); } .heat.frio i { background: var(--cold); }

.score { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score .track { width: 54px; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.score .fill { height: 100%; border-radius: 4px; }

.ring { position: relative; width: 86px; height: 86px; }
.ring svg { transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.ring .v small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; text-align: center; margin-top: -4px; }

/* ---------- tables ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.select, .input, textarea.input {
  border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 8px 11px; outline: 0;
}
.select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { width: 100%; resize: vertical; min-height: 90px; line-height: 1.5; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
.t td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover { background: var(--surface-2); }
.t .who { display: flex; align-items: center; gap: 10px; }
.t .who b { display: block; font-weight: 600; }
.t .who span { color: var(--muted); font-size: 12.5px; }
.chk { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
}
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .n { opacity: .6; margin-left: 4px; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 8px; }

/* ---------- relances ---------- */
.fu { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--border); }
.fu:first-child { border-top: 0; }
.fu-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fu-subject { font-weight: 650; margin: 6px 0 4px; }
.fu-body { color: var(--text-2); font-size: 13px; white-space: pre-wrap; max-height: 64px; overflow: hidden; position: relative; }
.fu-body.open { max-height: none; }
.fu-strategy {
  margin-top: 8px; font-size: 12.5px; background: var(--accent-soft); color: var(--text); padding: 8px 11px;
  border-radius: 9px; display: flex; gap: 8px;
}
.fu-strategy svg { width: 15px; height: 15px; flex: none; color: var(--accent); margin-top: 1px; }
.fu-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 130px; }
.due { font-size: 12.5px; font-weight: 600; }
.due.late { color: var(--critical); }
.due.today { color: var(--warning); }

/* ---------- contacto ---------- */
.profile { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .profile { grid-template-columns: 1fr; } }
.p-head { display: flex; gap: 14px; align-items: center; padding: 20px; }
.p-head h2 { font-size: 18px; }
.kv { display: grid; grid-template-columns: 105px 1fr; gap: 8px 10px; font-size: 13px; padding: 4px 20px 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.insight {
  margin: 0 20px 16px; padding: 13px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border);
}
.insight h4 { margin: 0 0 4px; font-size: 13px; display: flex; gap: 7px; align-items: center; }
.insight p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.stats4 div { padding: 12px 8px; text-align: center; border-left: 1px solid var(--border); }
.stats4 div:first-child { border-left: 0; }
.stats4 b { display: block; font-size: 18px; }
.stats4 span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 14px; }
.tab { padding: 12px 12px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.tab .n { background: var(--surface-2); border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 4px; }

.timeline { padding: 8px 20px 20px; }
.tl { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.tl::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); z-index: 1; }
.tl-ico svg { width: 14px; height: 14px; }
.tl-ico.in { background: var(--good-soft); color: var(--good); border-color: transparent; }
.tl-ico.out { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; }
.tl-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tl-card .subj { font-weight: 600; }
.tl-card .body { white-space: pre-wrap; font-size: 13px; color: var(--text-2); margin-top: 6px; max-height: 120px; overflow: hidden; }
.tl-card.expanded .body { max-height: none; }
.tl-small { font-size: 12.5px; color: var(--text-2); padding-top: 6px; }

.research-item { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 12px; }
.research-item:first-child { border-top: 0; }

/* ---------- formulários / modal ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field .input, .field .select { width: 100%; }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { width: 36px; height: 20px; appearance: none; background: var(--border); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 18px; }

.modal-back { position: fixed; inset: 0; background: rgba(10, 13, 20, .45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; width: min(680px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(900px, 100%); }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-h h3 { font-size: 16px; flex: 1; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--text); color: var(--surface); padding: 11px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); max-width: 380px; animation: fade .2s; }
.toast.error { background: var(--critical); color: #fff; }

.analysis-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); margin-top: 12px; }
.analysis-box .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.analysis-box .big { font-size: 17px; font-weight: 700; }
.meter { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--critical), #d4d4d8 50%, var(--good)); position: relative; margin: 8px 0 2px; }
.meter i { position: absolute; top: -4px; width: 4px; height: 16px; background: var(--text); border-radius: 2px; transform: translateX(-2px); }
.signals { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.signals span { font-size: 11.5px; background: var(--surface); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }

.vars { display: flex; flex-wrap: wrap; gap: 5px; }
.vars code { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; cursor: pointer; }
.vars code:hover { border-color: var(--accent); color: var(--accent); }
code.block { display: block; white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 12px; word-break: break-all; }
.api-row { display: grid; grid-template-columns: 70px 300px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; align-items: start; }
.api-row:first-child { border-top: 0; }
.method { font-weight: 700; font-size: 11.5px; font-family: ui-monospace, monospace; }
.method.GET { color: var(--good); } .method.POST { color: var(--accent); } .method.PUT { color: var(--warning); }
.seq-steps { display: flex; align-items: center; gap: 0; flex-wrap: wrap; padding: 6px 0; }
.seq-step { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; min-width: 150px; }
.seq-step b { display: block; font-size: 12.5px; }
.seq-step span { font-size: 11.5px; color: var(--muted); }
.seq-arrow { padding: 0 8px; color: var(--muted); font-size: 12px; text-align: center; }
.step-edit { display: grid; grid-template-columns: 40px 120px 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; }
  .brand, .side-foot { display: none; }
  .nav { display: flex; gap: 4px; }
  .nav a span.lbl { display: none; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .search { width: 100%; order: 5; }
  .content { padding: 16px; }
  .form { grid-template-columns: 1fr; }
  .api-row { grid-template-columns: 1fr; gap: 4px; }
  .fu { grid-template-columns: 1fr; }
  .hero { flex-wrap: wrap; }
  .hero .spacer { display: none; }
  .g-kpi { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 23px; }
}

/* ---------- auditoria ---------- */
.audit-bar { display: flex; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.audit-bar .input { flex: 1; min-width: 200px; }
.audit-sum { display: flex; gap: 18px; align-items: center; padding: 18px 20px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 0 20px 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.check .ci { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; background: var(--neutral-soft); color: var(--neutral); }
.check.ok .ci { background: var(--good-soft); color: var(--good); }
.check.warn .ci { background: var(--warning-soft); color: var(--warning); }
.check.bad .ci { background: var(--critical-soft); color: var(--critical); }
.check .cl { font-size: 12px; color: var(--muted); }
.check .cv { font-weight: 600; font-size: 13px; word-break: break-word; }
.check .ch { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pitch { margin-top: 4px; color: var(--text-2); font-style: italic; font-size: 13px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 10px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bars.wide .bar-row { grid-template-columns: 190px 1fr 38px; }
.p-head .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.research-item .badge { align-self: flex-start; }

/* ---------- logotipo ---------- */
.brand { flex-direction: column; align-items: stretch; gap: 8px; padding: 0 2px 20px; text-decoration: none; }
.brand-card { display: block; background: #fff; border-radius: 12px; height: 86px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.brand-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 47%; display: block; }
.brand small { text-align: center; color: var(--side-text); font-size: 11.5px; letter-spacing: .02em; }
.hero-logo { width: 190px; height: 86px; border-radius: 14px; background: #fff; flex: none; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.hero-logo img { width: 100%; height: 100%; object-fit: cover; object-position: center 47%; display: block; }
@media (max-width: 820px) { .hero-logo { width: 130px; height: 60px; border-radius: 12px; } }
.r-sum { white-space: pre-wrap; font-size: 13px; }
.r-sum.long { max-height: 110px; overflow: hidden; cursor: pointer; position: relative; }
.r-sum.long::after { content: "… clique para ler tudo"; position: absolute; right: 0; bottom: 0; background: var(--surface); padding-left: 8px; color: var(--accent); font-size: 12px; }
.r-sum.long.open { max-height: none; }
.r-sum.long.open::after { content: none; }

@media (max-width: 1100px) { .hero-logo { display: none; } }
