/* ── Quadro comparativo (#/comparar) ───────────────────────── */

/* Abertura */
.cmp-head { padding-block: 56px 40px; }
.cmp-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 64px; }
.cmp-head-copy { display: grid; gap: 20px; max-width: 780px; }
.cmp-head-copy .lead { max-width: 60ch; font-size: 1.125rem; }
.cmp-head-side { display: grid; justify-items: start; gap: 14px; padding: 0 0 6px 32px; border-left: 1px solid var(--fz-line); }
.cmp-total { display: grid; gap: 2px; }
.cmp-total strong {
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--fz-primary);
}
.cmp-total span { font-size: var(--fz-text-body-sm); color: var(--fz-ink-soft); }

.cmp-body { padding-bottom: var(--fz-sp-section); }
.cmp-caption { font-size: var(--fz-text-caption); line-height: 1.5; color: var(--fz-ink-soft); }
.cmp-muted { color: var(--fz-ink-soft); font-weight: 400; }

/* Filtros */
.cmp-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 20px;
  background: var(--fz-white);
  border: 1px solid var(--fz-line);
  border-radius: var(--fz-r-sm);
}
.cmp-chip svg { color: var(--fz-accent-deep); }
.cmp-chip[aria-pressed="true"] svg { color: var(--fz-accent-soft); }

/* Gráfico + leituras */
.cmp-analysis { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 24px; }
.cmp-chart {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 20px 24px 22px;
  background: var(--fz-white);
  border: 1px solid var(--fz-line);
  border-radius: var(--fz-r-sm);
}
.cmp-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.cmp-chart-title { font-size: var(--fz-text-title); font-weight: 600; letter-spacing: -0.02em; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fz-text-caption); color: var(--fz-ink-soft); }
.cmp-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.cmp-legend i { display: inline-grid; place-items: center; flex: none; font-style: normal; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 161, 81, .55); border: 1px solid var(--fz-accent-deep); }
.lg-ring { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--fz-primary); background: radial-gradient(circle, var(--fz-primary) 0 3px, transparent 3.5px); }
.lg-sel { width: 16px; height: 16px; border-radius: 50%; background: var(--fz-primary); color: var(--fz-on-primary); font-size: 10px; font-weight: 700; }
.lg-med { width: 20px; height: 0; border-top: 2px dashed var(--fz-primary); }

.cmp-plot { position: relative; min-width: 0; }
.cmp-pt .cmp-outlier { fill: var(--fz-primary); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--fz-white); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }

/* Callout do ponto */
.cmp-co {
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: min(280px, 86%);
  padding: 14px 16px 10px;
  background: var(--fz-white);
  border: 1px solid var(--fz-line-strong);
  border-radius: var(--fz-r-sm);
  box-shadow: 0 18px 40px -20px rgba(5, 16, 9, .5);
  transform: translate(-50%, calc(-100% - 16px));
}
.cmp-co[data-place="below"] { transform: translate(-50%, 16px); }
.cmp-co[data-edge="l"] { transform: translate(-14%, calc(-100% - 16px)); }
.cmp-co[data-edge="r"] { transform: translate(-86%, calc(-100% - 16px)); }
.cmp-co[data-edge="l"][data-place="below"] { transform: translate(-14%, 16px); }
.cmp-co[data-edge="r"][data-place="below"] { transform: translate(-86%, 16px); }
.cmp-co-x {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  border-radius: var(--fz-r-xs);
  color: var(--fz-ink-soft);
}
.cmp-co-x:hover { background: var(--fz-surface); color: var(--fz-ink); }
.cmp-co :focus-visible { outline: 2px solid var(--fz-ring); outline-offset: -2px; }
.cmp-co-t { padding-right: 36px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: var(--fz-ink); }
.cmp-co-m { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 4px; font-size: var(--fz-text-caption); color: var(--fz-ink-soft); }
.cmp-co-v { margin-top: 6px; font-size: var(--fz-text-body-sm); color: var(--fz-ink-soft); font-variant-numeric: tabular-nums; }
.cmp-co-v strong { font-size: 1.15rem; font-weight: 700; color: var(--fz-ink); }
.cmp-co-v span { font-size: 12px; }
.cmp-co-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 2px;
  padding: 0;
  background: transparent;
  border: 0;
  font-weight: 600;
  color: var(--fz-accent-deep);
}
.cmp-co-go:hover { color: var(--fz-primary); }
.cmp-co-list { display: grid; margin-top: 8px; border-top: 1px solid var(--fz-line); }
.cmp-co-list button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--fz-line);
  text-align: left;
  font-weight: 600;
  color: var(--fz-ink);
}
.cmp-co-list li:last-child button { border-bottom: 0; }
.cmp-co-list button:hover { color: var(--fz-primary); background: var(--fz-paper-2); }
.cmp-co-list small { font-size: 12px; font-weight: 400; color: var(--fz-ink-soft); font-variant-numeric: tabular-nums; }
.cmp-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--fz-body), sans-serif; }
.cmp-grid { stroke: var(--fz-line); stroke-width: 1; }
.cmp-grid, .cmp-tick, .cmp-axis, .cmp-median { pointer-events: none; }
.cmp-grid.v { stroke-dasharray: 2 4; }
.cmp-tick { fill: var(--fz-ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.cmp-axis { fill: var(--fz-ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.cmp-median line { stroke: var(--fz-primary); stroke-width: 1.5; stroke-dasharray: 6 5; }
.cmp-median text { fill: var(--fz-primary); font-size: 12.5px; font-weight: 600; paint-order: stroke; stroke: var(--fz-white); stroke-width: 4px; stroke-linejoin: round; }
.cmp-pt { cursor: pointer; outline: none; }
.cmp-pt .hit { fill: transparent; }
.cmp-pt .dot { fill: var(--fz-accent); fill-opacity: .5; stroke: var(--fz-accent-deep); stroke-width: 1; transition: fill-opacity .16s ease; }
.cmp-pt .ring { fill: none; stroke: var(--fz-primary); stroke-width: 2; }
.cmp-pt.is-open .dot { fill: var(--fz-primary); fill-opacity: 1; stroke: var(--fz-white); stroke-width: 1.5; }
.cmp-pt.is-sel .dot { fill: var(--fz-primary); fill-opacity: 1; stroke: var(--fz-white); stroke-width: 2; }
.cmp-pt text { fill: var(--fz-on-primary); font-size: 10px; font-weight: 700; pointer-events: none; }
.cmp-pt:hover .dot { fill-opacity: 1; }
.cmp-pt.is-hl .hit { fill: var(--fz-accent-dim); stroke: var(--fz-accent-deep); stroke-width: 1.5; }
.cmp-pt:focus-visible .hit { stroke: var(--fz-ring); stroke-width: 2.5; }
.cmp-axis-x { font-size: var(--fz-text-caption); color: var(--fz-ink-soft); text-align: right; }
.cmp-noprice {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--fz-line);
  font-size: var(--fz-text-caption);
  line-height: 1.5;
  color: var(--fz-ink-soft);
}

.cmp-notes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--fz-paper-2);
  border: 1px solid var(--fz-line);
  border-radius: var(--fz-r-sm);
}
.cmp-notes ol { display: grid; gap: 0; }
.cmp-notes li { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--fz-line); }
.cmp-notes li:first-child { border-top: 0; padding-top: 4px; }
.cmp-note-k { font-size: var(--fz-text-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fz-accent-deep); }
.cmp-notes li p { font-size: 15px; line-height: 1.5; color: var(--fz-ink-soft); }
.cmp-notes strong { color: var(--fz-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-notes-empty { font-size: var(--fz-text-body-sm); color: var(--fz-ink-soft); }
.cmp-notes > .cmp-caption { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--fz-line); }

.cmp-invite { margin-top: 24px; }

/* Comparar selecionadas */
.cmp-sel {
  margin-top: 24px;
  padding: 24px;
  background: var(--fz-white);
  border: 1px solid var(--fz-primary);
  border-radius: var(--fz-r-sm);
  box-shadow: 0 0 0 4px var(--fz-accent-dim);
  scroll-margin-top: 104px;
}
.cmp-sel[hidden] { display: none; }
.cmp-sel:focus { outline: none; }
.cmp-sel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.cmp-sel-head h2 { font-size: var(--fz-text-headline); line-height: 1.08; }
.cmp-sel-head .cmp-caption { margin-top: 6px; }
.cmp-sel-head .btn.text { min-height: 44px; }
.cmp-sel-wrap { overflow-x: auto; }
.cmp-sel-table { width: 100%; min-width: calc(180px + var(--n) * 170px); border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.cmp-sel-table thead th { padding: 0 12px 12px; text-align: left; vertical-align: bottom; }
.cmp-sel-th { display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.cmp-sel-table thead td { width: 180px; }
.cmp-sel-n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--fz-primary);
  color: var(--fz-on-primary);
  font-size: 12px;
  font-weight: 700;
}
.cmp-sel-name { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.cmp-sel-name small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 3px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--fz-ink-soft); font-variant-numeric: tabular-nums; }
.cmp-x {
  background: transparent;
  border: 0;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--fz-r-xs);
  color: var(--fz-ink-soft);
  transition: background-color .16s ease, color .16s ease;
}
.cmp-x:hover { background: var(--fz-surface); color: var(--fz-ink); }
.cmp-x:focus-visible { outline: 2px solid var(--fz-ring); outline-offset: -2px; }
.cmp-sel-table tbody th, .cmp-sel-table tbody td { padding: 11px 12px; border-top: 1px solid var(--fz-line); text-align: left; vertical-align: top; }
.cmp-sel-table tbody th { font-size: var(--fz-text-ui); font-weight: 500; color: var(--fz-ink-soft); }
.cmp-sel-table tbody th small { display: block; font-size: 12px; color: var(--fz-ink-soft); opacity: .85; }
.cmp-sel-table tbody td { font-size: 15px; color: var(--fz-ink); }
.cmp-sel-table tbody td strong { font-weight: 700; }
.cmp-go { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--fz-accent-deep); }
.cmp-go:hover { color: var(--fz-primary); }
.cmp-lock-sm { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fz-text-caption); color: var(--fz-ink-soft); }

/* Linha de status */
.cmp-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 44px; margin: 28px 0 14px; }
.cmp-count { font-size: var(--fz-text-body-sm); color: var(--fz-ink-soft); font-variant-numeric: tabular-nums; }
.cmp-count strong { color: var(--fz-ink); }
.cmp-linked { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fz-text-caption); color: var(--fz-ink-soft); }
.cmp-linked svg { color: var(--fz-accent-deep); }
#cmp-dir:disabled { opacity: .45; cursor: default; }
#cmp-dir:disabled:hover { background: var(--fz-white); border-color: var(--fz-line-strong); }
.cmp-msg { flex: 1; font-size: var(--fz-text-body-sm); color: var(--fz-ink); }
.cmp-msg:not(:empty) { display: inline-flex; align-items: center; gap: 8px; }
.cmp-msg:not(:empty)::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fz-warn); flex: none; }
.cmp-msort { display: none; }
.cmp-clear { min-height: 44px; margin-left: auto; }
.cmp-clear[hidden] { display: none; }

/* Tabela */
.cmp-table-wrap { background: var(--fz-white); border: 1px solid var(--fz-line); border-radius: var(--fz-r-sm); overflow: clip; }
.cmp-table-wrap[hidden] { display: none; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.cmp-table thead { position: sticky; top: 76px; z-index: 2; }
.cmp-table thead th, .cmp-table thead td { background: var(--fz-paper-2); }
.cmp-table thead tr:last-child > * { border-bottom: 1px solid var(--fz-line-strong); box-shadow: 0 1px 0 var(--fz-line-strong); }
.cmp-band > * { padding: 10px 12px 0; }
.cmp-band-terr {
  text-align: left;
  font-size: var(--fz-text-label-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fz-ink-soft);
  border-left: 1px solid var(--fz-line);
}
.cmp-band-terr svg { display: inline; vertical-align: -2px; margin-right: 6px; color: var(--fz-accent-deep); }
.cmp-table thead th { padding: 0; text-align: left; vertical-align: bottom; font-weight: 600; }
.cmp-table thead th.r { text-align: right; }
.cmp-table thead th.is-terr { background: var(--fz-surface); }
.cmp-table thead th.is-terr[data-col="areaUtil"], .cmp-table td[data-col="areaUtil"], .cmp-table td.cmp-locked { border-left: 1px solid var(--fz-line); }
.cmp-table thead button {
  background: transparent;
  border: 0;
  display: flex;
  align-items: flex-end;
  justify-content: inherit;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px 10px;
  text-align: inherit;
  font-size: var(--fz-text-label-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fz-ink-soft);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}
.cmp-table thead th.r button { justify-content: flex-end; }
.cmp-table thead button:hover { color: var(--fz-ink); background: var(--fz-accent-dim); }
.cmp-table thead button:focus-visible { outline: 2px solid var(--fz-ring); outline-offset: -2px; }
.cmp-th-l { display: grid; gap: 2px; }
.cmp-th-l small { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fz-ink-soft); opacity: .85; }
.cmp-sort { display: inline-grid; flex: none; transform: rotate(90deg); opacity: .3; transition: transform .16s var(--fz-ease), opacity .16s ease; }
th[aria-sort="ascending"] .cmp-sort { transform: rotate(-90deg); opacity: 1; color: var(--fz-primary); }
th[aria-sort="descending"] .cmp-sort { opacity: 1; color: var(--fz-primary); }
th[aria-sort="ascending"] button, th[aria-sort="descending"] button { color: var(--fz-ink); }

.cmp-table tbody tr { transition: background-color .16s ease; }
.cmp-table tbody tr:hover { background: var(--fz-paper-2); }
.cmp-table tbody tr.is-sel { background: var(--fz-accent-dim); }
.cmp-table tbody tr.is-hl { background: var(--fz-surface); box-shadow: inset 3px 0 0 var(--fz-primary); }
.cmp-table tbody tr.is-sel.is-hl { background: var(--fz-accent-dim); }
.cmp-table tbody > tr > * { padding: 10px 12px; border-top: 1px solid var(--fz-line); vertical-align: middle; }
.cmp-table tbody > tr:first-child > * { border-top: 0; }
.cmp-table .r { text-align: right; white-space: nowrap; }
.cmp-table td[data-col="relevo"], .cmp-table td[data-col="alt"] { white-space: nowrap; }
.cmp-table td[data-col="rha"] { font-weight: 600; }
.cmp-sub { margin-left: 4px; font-size: 12px; color: var(--fz-ink-soft); }
.cmp-table tbody th { text-align: left; font-weight: 400; }
.cmp-name { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--fz-ink); }
a.cmp-name { display: inline; text-decoration: underline; text-decoration-color: var(--fz-line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .16s ease, color .16s ease; }
a.cmp-name svg { display: inline; margin-left: 5px; vertical-align: -2px; color: var(--fz-accent-deep); }
a.cmp-name:hover { color: var(--fz-primary); text-decoration-color: currentColor; }
a.cmp-name:focus-visible { outline: 2px solid var(--fz-ring); outline-offset: 2px; border-radius: var(--fz-r-xs); }
.cmp-reg { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 2px; font-size: 12.5px; color: var(--fz-ink-soft); }
.cmp-open { display: inline-flex; align-items: center; gap: 5px; color: var(--fz-ink); font-weight: 500; }
.cmp-open .dot { width: 6px; height: 6px; }
.cmp-locked {
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(8, 21, 13, .025) 7px 14px);
}
.cmp-lock { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fz-text-caption); color: var(--fz-ink-soft); }
.cmp-lock svg, .cmp-lock-sm svg { flex: none; color: var(--fz-ink-soft); }

/* Caixa de seleção (alvo 44px) */
.cmp-pick { width: 52px; padding: 0 0 0 4px !important; }
.cmp-check { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
/* native box (square corners read as checkbox, not radio) */
.cmp-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--fz-primary); cursor: pointer; }
.cmp-check input:focus-visible { outline: 2px solid var(--fz-ring); outline-offset: 2px; }

/* Estado vazio */
.cmp-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--fz-line-strong);
  border-radius: var(--fz-r-sm);
  background: var(--fz-paper-2);
}
.cmp-empty[hidden] { display: none; }
.cmp-empty p { max-width: 46ch; color: var(--fz-ink-soft); }
.cmp-empty .btn { margin-top: 8px; }
.cmp-empty-title { font-size: var(--fz-text-title); }
.cmp-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--fz-line);
  border-radius: var(--fz-r-sm);
  background: var(--fz-white);
  color: var(--fz-primary);
}

/* Bandeja da seleção (fixa no rodapé enquanto a tabela rola) */
.cmp-tray {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  margin: 20px auto 0;
  padding: 6px 6px 6px 22px;
  background: var(--fz-white);
  border: 1px solid var(--fz-line-strong);
  border-radius: var(--fz-r-sm);
  box-shadow: 0 16px 40px -18px rgba(5, 16, 9, .45);
}
.cmp-tray[hidden] { display: none; }
.cmp-tray-n { font-size: var(--fz-text-body-sm); color: var(--fz-ink-soft); font-variant-numeric: tabular-nums; }
.cmp-tray-n strong { color: var(--fz-ink); }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .cmp-table-wrap { overflow-x: auto; }
  .cmp-table { min-width: 1080px; }
  .cmp-table thead { position: static; }
}
@media (max-width: 1080px) {
  .cmp-head-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cmp-head-side { grid-template-columns: auto auto; align-items: end; justify-content: start; gap: 12px 24px; padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--fz-line); }
  .cmp-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-chip { grid-column: 1 / -1; justify-self: start; }
  .cmp-analysis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cmp-head { padding-block: 32px 28px; }
  .cmp-head-side { grid-template-columns: minmax(0, 1fr); }
  .cmp-head-side .demo-note { white-space: normal; height: auto; min-height: 24px; padding-block: 5px; line-height: 1.3; }
  .cmp-tools { padding: 16px; gap: 12px 10px; }
  .cmp-chip { width: 100%; justify-content: center; }
  .cmp-chart { padding: 16px; }
  .cmp-axis-x { text-align: left; }
  /* narrow chart: callout docks to the edge away from the point instead of floating over it */
  .cmp-co, .cmp-co[data-edge], .cmp-co[data-place] { left: 6px !important; right: 6px; top: 6px !important; bottom: auto; width: auto; max-width: none; transform: none; }
  .cmp-co[data-place="below"] { top: auto !important; bottom: 6px; }
  .cmp-notes { padding: 20px; }
  .cmp-sel { padding: 18px 16px; }
  .cmp-sel-table { min-width: calc(130px + var(--n) * 150px); }
  .cmp-sel-table thead td { width: 130px; }
  .cmp-sel-name { font-size: 15px; }

  .cmp-linked, .cmp-msg { flex-basis: 100%; }
  .cmp-msg:empty { display: none; }
  .cmp-msort { display: grid; flex: 1 1 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
  .cmp-clear { margin-left: 0; }

  /* Tabela vira cartões */
  .cmp-table-wrap { overflow: visible; background: none; border: 0; border-radius: 0; }
  .cmp-table { min-width: 0; display: block; }
  .cmp-table thead { display: none; }
  .cmp-table tbody { display: grid; gap: 12px; }
  .cmp-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 14px 16px 16px;
    background: var(--fz-white);
    border: 1px solid var(--fz-line);
    border-radius: var(--fz-r-sm);
  }
  .cmp-table tbody tr.is-hl { box-shadow: inset 3px 0 0 var(--fz-primary), 0 0 0 1px var(--fz-primary); }
  .cmp-table tbody > tr > * { padding: 0; border: 0 !important; }
  .cmp-table tbody th[data-col="mun"] { grid-column: 1 / -1; padding: 0 48px 8px 0; border-bottom: 1px solid var(--fz-line) !important; }
  .cmp-name, a.cmp-name { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 1.05rem; }
  a.cmp-name svg { margin-left: 0; flex: none; }
  .cmp-table td.cmp-pick { position: absolute; top: 4px; right: 4px; width: auto; padding: 0 !important; }
  .cmp-table td[data-label] { display: block; text-align: left; white-space: normal; }
  .cmp-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: var(--fz-text-label-sm);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fz-ink-soft);
  }
  .cmp-table td.cmp-locked { grid-column: 1 / -1; padding: 10px 12px; border-radius: var(--fz-r-xs); background-color: var(--fz-paper-2); }
  .cmp-tray { padding-left: 18px; gap: 12px; }
}
/* tabela paginada */
.cmp-more-wrap:empty { display: none; }
.cmp-more { display: grid; justify-items: center; gap: 2px; width: 100%; margin-top: 12px; padding: 14px; border: 1px dashed var(--fz-line-strong); border-radius: var(--fz-r-sm); background: transparent; font: inherit; font-weight: 600; color: var(--fz-ink); cursor: pointer; }
.cmp-more small { font-weight: 400; color: var(--fz-ink-soft); }
.cmp-more:hover { border-color: var(--fz-accent-deep); background: var(--fz-accent-dim); }

/* ── Tabela em foco (sem gráfico): busca, filtros alinhados, cabeçalho e coluna do anúncio fixos ── */
.cmp-tools { grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(0, 1fr)); margin-bottom: 20px; }
.cmp-tools .fz-field { display: grid; gap: 6px; align-items: stretch; }
.cmp-tools .fz-label { font-size: var(--fz-text-caption); font-weight: 600; color: var(--fz-ink-soft); }
.cmp-tools .fz-select { position: relative; display: block; }
.cmp-tools .fz-select select { width: 100%; }
.cmp-tools .fz-select svg { top: 50%; margin-top: -8px; }
.cmp-q { position: relative; display: block; }
.cmp-q svg { position: absolute; left: 12px; top: 50%; margin-top: -8px; color: var(--fz-ink-soft); pointer-events: none; transform: none; right: auto; }
.cmp-q input { width: 100%; height: 44px; padding: 0 12px 0 36px; border: 1px solid var(--fz-line-strong); border-radius: var(--fz-r-sm); background: var(--fz-white); font: inherit; font-size: var(--fz-text-body-sm); color: var(--fz-ink); }
.cmp-q input:hover { border-color: var(--fz-accent-deep); }
.cmp-q input:focus-visible { outline: 2px solid var(--fz-ring); outline-offset: 1px; }
/* coluna do anúncio fixa ao rolar a tabela para o lado; linhas zebradas para seguir a linha com o olho */
/* a tabela rola dentro da própria janela (altura da tela): cabeçalho fixo no topo e coluna do anúncio fixa à esquerda */
.cmp-table-wrap { max-height: calc(100dvh - 110px); overflow: auto; overscroll-behavior: contain; }
.cmp-table-wrap .cmp-table thead { top: 0; }
.cmp-table thead th[data-col="mun"] { z-index: 3; }
.cmp-table tbody > tr > th[data-col="mun"], .cmp-table thead th[data-col="mun"] { position: sticky; left: 0; z-index: 1; background: inherit; }
.cmp-table tbody > tr { background: var(--fz-white); }
.cmp-table tbody > tr:nth-child(even) { background: #f8fbf9; }
.cmp-table tbody > tr:hover, .cmp-table tbody > tr:hover > th[data-col="mun"] { background: #e8f5ec; }
.cmp-table thead th[data-col="mun"] { background: var(--fz-paper-2); }
@media (max-width: 1100px) { .cmp-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cmp-search { grid-column: 1 / -1; } }
@media (max-width: 760px) { .cmp-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cmp-table-wrap { max-height: none; overflow: visible; } } /* celular: a tabela vira cards e rola com a página */
