﻿/*
 * Transparentômetro Municípios V2 — estilos públicos/front-end.
 *
 * Este arquivo é carregado no front-end pelo handle tmv2-style (wp_enqueue_scripts).
 * Ele concentra os estilos do shortcode, cards, tabela, mapa, painel/drawer e ficha pública.
 *
 * Estilos do admin devem ficar exclusivamente em tmv2-admin.css.
 * Não duplicar seletores: a seção "FICHA COMPLETA" usa .tmv2-ficha-page como escopo
 * para evitar conflitos com os seletores globais do drawer.
 */

.tmv2 {
  --tmv2-blue: #0756b8;
  --tmv2-blue-dark: #062b63;
  --tmv2-blue-text: #0b2b5c;
  --tmv2-bg: #f5f9ff;
  --tmv2-panel: #ffffff;
  --tmv2-border: #dbe8f7;
  --tmv2-border-strong: #bfd3ee;
  --tmv2-muted: #607295;
  --tmv2-soft-blue: #eaf3ff;
  --tmv2-green: #13a15c;
  --tmv2-amber: #f59e0b;
  --tmv2-purple: #6d3be8;
  --tmv2-shadow: 0 18px 46px rgba(7, 43, 99, .07);
  --tmv2-soft-shadow: 0 10px 28px rgba(7, 43, 99, .05);
  color: var(--tmv2-blue-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, var(--tmv2-bg) 46%, #f7fbff 100%);
  margin: 0;
  padding: 32px clamp(14px, 3vw, 42px) 0;
  width: 100%;
}

.tmv2,
.tmv2 * {
  box-sizing: border-box;
}

.tmv2 svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tmv2-shell {
  width: min(100%, 1580px);
  margin: 0 auto;
}

.tmv2-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: clamp(20px, 5vw, 96px);
  align-items: center;
  margin-bottom: 28px;
}

.tmv2-header-copy h2 {
  margin: 0 0 10px;
  color: #061f4d;
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: 0;
}

.tmv2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #dcecff;
  color: var(--tmv2-blue);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.tmv2-header-copy p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #29446f;
  font-size: 16px;
  line-height: 1.65;
}

.tmv2-update-card,
.tmv2-card,
.tmv2-kpi,
.tmv2-timeline-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--tmv2-border);
  box-shadow: var(--tmv2-soft-shadow);
}

.tmv2-update-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 42px;
  gap: 18px;
  align-items: center;
  min-height: 108px;
  padding: 20px;
  border-radius: 16px;
}

.tmv2-update-icon,
.tmv2-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
}

.tmv2-update-icon {
  width: 58px;
  height: 58px;
  background: #dcecff;
  color: var(--tmv2-blue);
}

.tmv2-update-icon svg {
  width: 31px;
  height: 31px;
}

.tmv2-update-card small,
.tmv2-update-card em {
  display: block;
  color: var(--tmv2-muted);
  font-size: 12px;
  font-style: normal;
}

.tmv2-update-card strong {
  display: block;
  margin: 5px 0;
  color: var(--tmv2-blue);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.tmv2-icon-button,
.tmv2-ghost-button,
.tmv2-range-chip,
.tmv2-filters button,
.tmv2-open,
.tmv2-btn {
  appearance: none;
  border: 1px solid var(--tmv2-border);
  background: #fff;
  color: var(--tmv2-blue-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tmv2-icon-button {
  width: 38px !important;
  height: 38px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--tmv2-blue);
}

.tmv2-icon-button:hover,
.tmv2-ghost-button:hover,
.tmv2-open:hover,
.tmv2-btn:hover {
  border-color: #aecaee;
  box-shadow: 0 8px 18px rgba(7, 86, 184, .12);
}

.tmv2-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.tmv2-kpi {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  border-radius: 16px;
}

.tmv2-kpi-icon {
  width: var(--tmv2-kpi-icon-circle, 62px);
  height: var(--tmv2-kpi-icon-circle, 62px);
  color: var(--tmv2-card-color, var(--tmv2-blue));
  background: var(--tmv2-card-bg, #dfeafe);
}

.tmv2-kpi-icon svg {
  width: var(--tmv2-kpi-icon-size, 31px);
  height: var(--tmv2-kpi-icon-size, 31px);
}

.tmv2-kpi-green .tmv2-kpi-icon {
  color: var(--tmv2-card-color, #087a3d);
  background: var(--tmv2-card-bg, #d9f6e4);
}

.tmv2-kpi-indigo .tmv2-kpi-icon {
  color: var(--tmv2-card-color, #223bd4);
  background: var(--tmv2-card-bg, #e4e8ff);
}

.tmv2-kpi-purple .tmv2-kpi-icon {
  color: var(--tmv2-card-color, var(--tmv2-purple));
  background: var(--tmv2-card-bg, #efe4ff);
}

.tmv2-kpi span {
  display: block;
  color: var(--tmv2-kpi-title-color, var(--tmv2-card-color));
  font-size: var(--tmv2-kpi-title-size, 13px);
  line-height: 1.25;
  font-weight: var(--tmv2-kpi-title-weight, 850);
}

.tmv2-kpi-green span {
  color: var(--tmv2-kpi-title-color, #087a3d);
}

.tmv2-kpi strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--tmv2-kpi-value-color, var(--tmv2-card-color));
  font-size: var(--tmv2-kpi-value-size, clamp(24px, 1.75vw, 31px));
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.tmv2-kpi-indigo strong {
  font-size: clamp(22px, 1.55vw, 28px);
}

.tmv2-kpi small {
  color: var(--tmv2-kpi-aux-color, var(--tmv2-muted));
  font-size: var(--tmv2-kpi-aux-size, 12px);
}

.tmv2-timeline-card {
  min-height: 178px;
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.tmv2-section-heading,
.tmv2-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tmv2-section-heading {
  margin-bottom: 18px;
}

.tmv2-section-heading h3,
.tmv2-card-heading h3,
.tmv2-detail-panel h3,
.tmv2-detail-panel h4 {
  margin: 0;
  color: #082653;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.tmv2-section-heading p {
  margin: 5px 0 0;
  color: var(--tmv2-muted);
  font-size: 12px;
}

.tmv2-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  white-space: nowrap;
}

.tmv2-range-chip svg {
  width: 15px;
  height: 15px;
}

.tmv2-timeline {
  position: relative;
  min-height: 98px;
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 34px 10px 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(168, 190, 222, .36) 24px),
    linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border-radius: 12px;
}

.tmv2-timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 38px;
  height: 3px;
  border-radius: 999px;
  background: #9fc2ff;
}

.tmv2-timeline-empty {
  position: absolute;
  left: 50%;
  top: 43%;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(92%, 640px);
  padding: 8px 18px;
  background: #fff;
  color: #6b7c9b;
  font-size: 13px;
  text-align: center;
}

.tmv2-timeline-empty::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e7f0ff;
  box-shadow: inset 0 0 0 7px #f4f8ff;
}

.tmv2-timeline-item {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 84px;
  text-align: center;
  color: #51698f;
  font-size: 12px;
  font-weight: 800;
}

.tmv2-timeline-point {
  width: 10px;
  height: 10px;
  display: block;
  margin: 0 auto 17px;
  border-radius: 50%;
  background: #7eaeff;
  box-shadow: 0 0 0 4px rgba(126, 174, 255, .18);
}

.tmv2-timeline-number {
  display: none;
}

.tmv2-tools {
  display: grid;
  grid-template-columns: minmax(320px, 600px) minmax(0, 1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 14px;
}

.tmv2-search {
  display: block;
}

.tmv2-search span {
  display: block;
  margin: 0 0 -1px 14px;
  color: #7182a0;
  font-size: 11px;
  font-weight: 800;
}

.tmv2-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 46px 0 16px;
  border: 1px solid var(--tmv2-border);
  border-radius: 10px;
  background: #fff;
  color: var(--tmv2-blue-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: var(--tmv2-soft-shadow);
}

.tmv2-search {
  position: relative;
}

.tmv2-search::after {
  display: none;
}

.tmv2-search-icon {
  position: absolute;
  right: 15px;
  bottom: 14px;
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #6c7f9f;
  pointer-events: none;
}

.tmv2-search-icon svg {
  width: 18px !important;
  height: 18px !important;
}

.tmv2-search input:focus {
  border-color: #8fb8ec;
  box-shadow: 0 0 0 4px rgba(7, 86, 184, .10);
}

.tmv2-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tmv2-filters button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 25px;
  border-radius: 9px;
  box-shadow: var(--tmv2-soft-shadow);
}

.tmv2-filters button.is-active {
  color: #fff;
  background: linear-gradient(180deg, #075fc7 0%, #064692 100%);
  border-color: #0756b8;
  box-shadow: 0 11px 22px rgba(7, 86, 184, .23);
}

.tmv2-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 1.15fr) minmax(320px, 380px);
  gap: 18px;
  align-items: stretch;
}

.tmv2-card {
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
}

.tmv2-card-heading {
  min-height: 48px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tmv2-border);
}

.tmv2-card-heading h3 span {
  color: #8aa0bf;
  font-size: 15px;
}

.tmv2-ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  background: #fff;
}

.tmv2-ghost-button svg {
  width: 15px;
  height: 15px;
}

.tmv2-map-stage {
  position: relative;
  min-height: 490px;
  height: clamp(500px, 42vw, 610px);
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 48%, rgba(255, 255, 255, .72) 0 21%, transparent 44%),
    linear-gradient(135deg, #ffffff 0%, #f4f9ff 54%, #d8edff 100%);
}

.tmv2-map-container {
  position: absolute;
  inset: 14px 12px 10px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmv2-map-container svg {
  display: block;
  width: min(100%, 790px) !important;
  height: min(100%, 560px) !important;
  max-height: 100%;
  filter: drop-shadow(0 20px 30px rgba(8, 38, 83, .08));
}

.tmv2-map-container path {
  cursor: pointer;
  stroke: #9fb4cf;
  stroke-width: .72;
  transition: fill .18s ease, stroke .18s ease, opacity .18s ease, filter .18s ease;
}

.tmv2-map-container path.is-muted {
  opacity: .24;
}

.tmv2-map-container path.is-selected {
  stroke: #083c87;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(7, 86, 184, .45));
}

.tmv2-map-controls {
  position: absolute;
  left: 16px;
  top: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tmv2-map-controls button {
  width: 34px !important;
  height: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tmv2-border);
  border-radius: 6px;
  background: #fff;
  color: var(--tmv2-blue-dark);
  font: inherit;
  font-size: 20px;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(7, 43, 99, .08);
}

.tmv2-map-controls svg {
  width: 16px;
  height: 16px;
}

.tmv2-map-legend {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--tmv2-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 26px rgba(7, 43, 99, .08);
}

.tmv2-map-legend strong,
.tmv2-map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tmv2-map-legend strong {
  margin-bottom: 9px;
  font-size: 12px;
}

.tmv2-map-legend span {
  color: #50668c;
  font-size: 12px;
  line-height: 1.8;
}

.tmv2-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.tmv2-dot-green {
  background: var(--tmv2-green);
}

.tmv2-dot-amber {
  background: #ffc857;
}

.tmv2-dot-gray {
  background: #a9b8ca;
}

.tmv2-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--tmv2-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(7, 43, 99, .16);
  font-size: 13px;
}

.tmv2-tooltip strong {
  display: block;
  color: #082653;
}

.tmv2-tooltip span {
  display: block;
  margin-top: 3px;
  color: var(--tmv2-muted);
}

.tmv2-table-card {
  display: flex;
  flex-direction: column;
}

.tmv2-table-wrap {
  min-height: 0;
  max-height: 580px;
  overflow: auto;
  margin: 0 12px;
  border: 1px solid #e8f0fa;
  border-radius: 10px;
}

.tmv2-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
}

.tmv2-table th:nth-child(1),
.tmv2-table td:nth-child(1) {
  width: 30%;
}

.tmv2-table th:nth-child(2),
.tmv2-table td:nth-child(2) {
  width: 18%;
}

.tmv2-table th:nth-child(3),
.tmv2-table td:nth-child(3) {
  width: 22%;
}

.tmv2-table th:nth-child(4),
.tmv2-table td:nth-child(4) {
  width: 18%;
}

.tmv2-table th:nth-child(5),
.tmv2-table td:nth-child(5) {
  width: 12%;
}

.tmv2-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 12px;
  background: #f3f7fc;
  color: #355070;
  text-align: left;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.tmv2-table td {
  padding: 11px 12px;
  border-top: 1px solid #e8f0fa;
  color: #1b3764;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmv2-table tr {
  cursor: pointer;
}

.tmv2-table tbody tr:hover {
  background: #f8fbff;
}

.tmv2-table tbody tr.is-selected {
  background: #eaf3ff;
  box-shadow: inset 0 0 0 2px #2d79e6;
}

.tmv2-table strong {
  display: block;
  color: #0d2b5c;
  font-size: 13px;
}

.tmv2-table small {
  display: block;
  margin-top: 2px;
  color: #6d7f9e;
  font-size: 11px;
}

.tmv2-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
}

.tmv2-status.with {
  border: 1px solid #a8e8c2;
  background: #e9fff2;
  color: #087a3d;
}

.tmv2-status.without {
  border: 1px solid #ffd594;
  background: #fff8eb;
  color: #d57900;
}

.tmv2-open {
  min-width: 50px;
  min-height: 31px;
  border-radius: 7px;
  color: var(--tmv2-blue);
  font-size: 12px;
}

.tmv2-table-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  color: #53698f;
  font-size: 12px;
}

.tmv2-detail-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 610px;
}

.tmv2-detail-preview,
.tmv2-detail-content {
  padding: 18px;
}

.tmv2-detail-preview p,
.tmv2-detail-panel p {
  color: #36547d;
  line-height: 1.55;
}

.tmv2-preview-art {
  width: min(210px, 76%);
  aspect-ratio: 1.45;
  margin: 32px auto 18px;
  border-radius: 50% 50% 34% 34%;
  background:
    radial-gradient(circle at 50% 28%, #ffffff 0 18%, transparent 19%),
    linear-gradient(180deg, #e9f3ff 0%, #d7e9fb 100%);
  position: relative;
  overflow: hidden;
}

.tmv2-preview-art::before {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 18%;
  height: 38%;
  border-radius: 12px 12px 3px 3px;
  background: #fff;
  border: 2px solid #bed4ee;
  box-shadow: -42px 18px 0 -7px #a9c8e8, 42px 18px 0 -7px #a9c8e8;
}

.tmv2-preview-art::after {
  content: "";
  position: absolute;
  left: 44%;
  bottom: 18%;
  width: 12%;
  height: 20%;
  border-radius: 20px 20px 0 0;
  background: #bed4ee;
}

.tmv2-tip,
.tmv2-lai-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 10px;
  background: #eef6ff;
  color: #2d4f7a;
  font-size: 13px;
}

.tmv2-tip strong,
.tmv2-lai-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--tmv2-blue-dark);
}

.tmv2-detail-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--tmv2-border);
}

.tmv2-detail-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.tmv2-city-seal {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7df, #dceeff);
  color: var(--tmv2-blue);
  font-size: 34px;
  font-weight: 900;
}

.tmv2-detail-head h3 {
  margin-top: 3px;
  font-size: 24px;
}

.tmv2-detail-head small {
  display: block;
  margin: 4px 0 8px;
  color: var(--tmv2-muted);
}

.tmv2-panel-close {
  /* Dimensões — sobrepõem herança do tema WordPress */
  width: auto !important;
  min-width: max-content;
  height: auto !important;
  min-height: 38px;
  max-height: none !important;
  aspect-ratio: auto !important;

  /* Layout horizontal */
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;

  /* Texto em linha única */
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;

  /* Visual */
  flex: 0 0 auto;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  background: #ffffff !important;
  color: #334155 !important;
  border-radius: 999px !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tmv2-panel-close:hover {
  background: #f8fafc !important;
  border-color: rgba(100, 116, 139, 0.45) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.tmv2-panel-close:active {
  transform: translateY(1px) !important;
}

.tmv2-panel-close-label {
  display: inline-block;
  white-space: nowrap;
}

.tmv2-panel-close-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.tmv2-detail-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--tmv2-border);
  border-radius: 10px;
}

.tmv2-detail-section h4 {
  margin-bottom: 12px;
  font-size: 15px;
}

.tmv2-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tmv2-detail-stat {
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e5effb;
  border-radius: 9px;
  background: #fff;
}

.tmv2-detail-stat span {
  display: block;
  color: var(--tmv2-blue);
  font-size: 11px;
  font-weight: 850;
}

.tmv2-detail-stat strong {
  display: block;
  margin-top: 6px;
  color: #082653;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 950;
}

.tmv2-detail-stat small {
  display: block;
  margin-top: 3px;
  color: var(--tmv2-muted);
  font-size: 10px;
}

.tmv2-origin-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 70px 42px;
  gap: 8px;
  align-items: center;
  margin: 11px 0;
  font-size: 13px;
  font-weight: 750;
}

.tmv2-origin-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7edf7;
}

.tmv2-origin-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ca6ff, #0756b8);
}

.tmv2-origin-value,
.tmv2-origin-percent {
  color: #24466f;
  text-align: right;
  font-size: 12px;
  white-space: nowrap;
}

.tmv2-record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tmv2-record-table th {
  padding: 9px 8px;
  background: #f4f8fd;
  color: #3b567b;
  text-align: left;
  text-transform: uppercase;
  font-size: 10px;
}

.tmv2-record-table td {
  padding: 10px 8px;
  border-top: 1px solid #e6effa;
  vertical-align: top;
}

.tmv2-record-table small {
  display: block;
  color: var(--tmv2-muted);
  margin-top: 2px;
}

.tmv2-record-empty {
  padding: 26px 10px;
  color: var(--tmv2-muted);
  text-align: center;
}

.tmv2-record-empty span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #eaf3ff;
  color: var(--tmv2-blue);
  font-size: 22px;
}

.tmv2-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.tmv2-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.tmv2-btn.primary {
  color: #fff;
  background: var(--tmv2-blue);
  border-color: var(--tmv2-blue);
}

.tmv2-btn.wide {
  grid-column: 1 / -1;
}

.tmv2-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 30px calc(clamp(14px, 3vw, 42px) * -1) 0;
  padding: 20px clamp(14px, 3vw, 42px);
  border-top: 1px solid var(--tmv2-border);
  color: #3f5578;
  font-size: 13px;
}

.tmv2-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tmv2-footer span:last-child {
  justify-self: end;
}

@media (max-width: 1280px) {
  .tmv2-layout {
    grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
  }

  .tmv2-detail-panel {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .tmv2-header,
  .tmv2-tools,
  .tmv2-layout,
  .tmv2-footer {
    grid-template-columns: 1fr;
  }

  .tmv2-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tmv2-footer span,
  .tmv2-footer span:last-child {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .tmv2 {
    padding: 22px 12px 0;
  }

  .tmv2-update-card,
  .tmv2-kpi,
  .tmv2-origin-row {
    grid-template-columns: 1fr;
  }

  .tmv2-update-card {
    gap: 12px;
  }

  .tmv2-kpis,
  .tmv2-detail-grid,
  .tmv2-actions {
    grid-template-columns: 1fr;
  }

  .tmv2-filters button {
    flex: 1 1 150px;
    justify-content: center;
    padding-inline: 14px;
  }

  .tmv2-map-stage {
    min-height: 430px;
    height: 70vh;
    max-height: 560px;
  }

  .tmv2-map-container {
    inset: 48px 8px 82px 8px;
  }

  .tmv2-map-controls {
    flex-direction: row;
  }

  .tmv2-table-wrap {
    margin: 0 8px;
  }

  .tmv2-table {
    min-width: 640px;
    table-layout: auto;
  }

  .tmv2-card-heading {
    align-items: center;
  }

  .tmv2-timeline {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .tmv2-timeline-item {
    flex: 0 0 120px;
  }
}

/* Public dashboard refinements: compact guidance card, cleaner map, two-column workspace and drawer details. */
.tmv2-kpi-red .tmv2-kpi-icon {
  color: var(--tmv2-card-color, #b91c1c);
  background: var(--tmv2-card-bg, #ffe4e4);
}

.tmv2-kpi-red span {
  color: var(--tmv2-kpi-title-color, #9f1d1d);
}

.tmv2-kpi .tmv2-kpi-icon svg,
.tmv2-update-icon svg,
.tmv2-filters svg,
.tmv2-ghost-button svg,
.tmv2-btn svg {
  display: block;
  flex: 0 0 auto;
}

.tmv2-tools {
  grid-template-columns: minmax(320px, 520px) auto minmax(260px, 360px);
  align-items: stretch;
}

.tmv2-info-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 70px;
  padding: 10px 14px;
  border: 1px solid var(--tmv2-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--tmv2-soft-shadow);
}

.tmv2-info-card img {
  width: var(--tm-info-img-maxw, 72px);
  max-width: var(--tm-info-img-maxw, 72px);
  height: var(--tm-info-img-maxh, 54px);
  max-height: var(--tm-info-img-maxh, 54px);
  object-fit: cover;
  border-radius: 10px;
  background: #edf5ff;
}

.tmv2-info-card strong,
.tmv2-info-card span {
  display: block;
}

.tmv2-info-card strong {
  color: var(--tm-info-title-color, var(--tmv2-blue-dark));
  font-size: var(--tm-info-title-size, 13px);
  line-height: 1.25;
}

.tmv2-info-card span {
  margin-top: 3px;
  color: var(--tm-info-desc-color, var(--tmv2-muted));
  font-size: var(--tm-info-desc-size, 12px);
  line-height: 1.35;
}

.tmv2-layout {
  grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.1fr);
}

.tmv2-map-card {
  background: #fff;
}

.tmv2-map-stage {
  background:
    radial-gradient(circle at 62% 45%, rgba(232, 243, 255, .7) 0 18%, transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-top: 1px solid #eef4fb;
}

.tmv2-map-container {
  inset: 18px 18px 12px 42px;
}

.tmv2-map-container svg {
  filter: drop-shadow(0 18px 30px rgba(8, 38, 83, .10));
}

.tmv2-map-container path {
  stroke: #7d97b8;
  stroke-width: .82;
}

.tmv2-map-container path.is-selected {
  stroke: #003a86;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 7px rgba(0, 75, 141, .5));
}

.tmv2-map-legend {
  border-color: #d6e5f5;
  box-shadow: 0 14px 30px rgba(7, 43, 99, .10);
}

.tmv2-dot-blue {
  background: #82c7ff;
}

.tmv2-dot-red {
  background: #ff8f8f;
}

.tmv2-dot-green {
  background: #82c7ff;
}

.tmv2-dot-amber {
  background: #ff8f8f;
}

.tmv2-map-card.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 90px rgba(6, 24, 55, .34);
}

.tmv2-map-card.is-expanded .tmv2-map-stage {
  flex: 1;
  height: auto;
  min-height: 0;
}

.tmv2-map-card:fullscreen,
.tmv2-map-card:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #fff;
}

.tmv2-map-card:fullscreen .tmv2-map-stage,
.tmv2-map-card:-webkit-full-screen .tmv2-map-stage {
  flex: 1;
  height: auto;
}

.tmv2-map-expanded-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  background: rgba(6, 24, 55, .52);
  backdrop-filter: blur(3px);
}

.tmv2.is-map-expanded .tmv2-map-expanded-backdrop {
  display: block;
}

.tmv2-drawer {
  position: fixed;
  inset: 0;
  z-index: 100001;
  pointer-events: none;
  visibility: hidden;
}

.tmv2-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.tmv2-drawer-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 24, 55, .34);
  opacity: 0;
  transition: opacity .22s ease;
  cursor: pointer;
}

.tmv2-drawer.is-open .tmv2-drawer-overlay {
  opacity: 1;
}

.tmv2-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  margin: 0;
  overflow: auto;
  background: #fff;
  box-shadow: -22px 0 70px rgba(6, 24, 55, .22);
  transform: translateX(104%);
  transition: transform .38s cubic-bezier(.22, .8, .22, 1);
}

.tmv2-drawer.is-open .tmv2-drawer-panel {
  transform: translateX(0);
}

.tmv2-drawer-content {
  min-height: 100%;
}

.tmv2-detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.tmv2-detail-content {
  padding-bottom: 28px;
}

@media (max-width: 1280px) {
  .tmv2-layout {
    grid-template-columns: minmax(400px, .95fr) minmax(500px, 1.05fr);
  }
}

@media (max-width: 1024px) {
  .tmv2-tools,
  .tmv2-layout {
    grid-template-columns: 1fr;
  }

  .tmv2-info-card {
    max-width: 520px;
  }
}

@media (max-width: 720px) {
  .tmv2-info-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .tmv2-info-card img {
    width: 64px;
    height: 50px;
  }

  .tmv2-map-card.is-expanded {
    inset: 8px;
  }

  .tmv2-drawer-panel {
    width: min(430px, 100%);
  }
}

/* Fine tuning requested after visual QA. */
.tmv2-kpi-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible;
  width: var(--tmv2-kpi-icon-circle, 62px) !important;
  height: var(--tmv2-kpi-icon-circle, 62px) !important;
}

.tmv2-kpi .tmv2-kpi-icon svg {
  width: var(--tmv2-kpi-icon-size, 32px) !important;
  height: var(--tmv2-kpi-icon-size, 32px) !important;
  min-width: var(--tmv2-kpi-icon-size, 32px);
  position: static !important;
  display: block !important;
}

.tmv2-kpi-indigo .tmv2-kpi-icon svg,
.tmv2-kpi-purple .tmv2-kpi-icon svg {
  width: 34px !important;
  height: 34px !important;
}

.tmv2-search span {
  margin: 0 0 7px 12px;
  color: #40577c;
  font-size: 13px;
}

.tmv2-search input {
  min-height: 58px;
  padding-right: 50px;
}

.tmv2-search-icon {
  right: 17px;
  top: 47px;
  bottom: auto;
  color: #536b92;
}

.tmv2-search-icon svg {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px;
}

.tmv2-heading-info {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  color: #7f96b8;
  vertical-align: -3px;
}

.tmv2-heading-info svg {
  width: 18px !important;
  height: 18px !important;
}

.tmv2-map-controls {
  gap: 8px;
}

.tmv2-map-controls button {
  color: var(--tmv2-blue-dark);
  font-size: 18px;
}

.tmv2-map-controls button:hover {
  color: #fff;
  background: var(--tmv2-blue);
  border-color: var(--tmv2-blue);
}

.tmv2-map-container svg {
  transition: transform .22s ease, width .22s ease, height .22s ease;
}

.tmv2-map-card.is-expanded .tmv2-map-container,
.tmv2-map-card:fullscreen .tmv2-map-container,
.tmv2-map-card:-webkit-full-screen .tmv2-map-container {
  inset: 60px 70px 54px;
}

.tmv2-map-card.is-expanded .tmv2-map-container svg,
.tmv2-map-card:fullscreen .tmv2-map-container svg,
.tmv2-map-card:-webkit-full-screen .tmv2-map-container svg {
  width: min(92vw, 1280px) !important;
  height: min(82vh, 900px) !important;
}

.tmv2-tip > span,
.tmv2-lai-note > span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dbeaff;
  color: var(--tmv2-blue);
  font-size: 15px;
  font-weight: 900;
}

.tmv2-lai-note {
  grid-template-columns: 30px minmax(0, 1fr);
}

.tmv2-drawer {
  visibility: visible;
}

.tmv2-drawer-panel {
  will-change: transform;
}

@media (max-width: 640px) {
  .tmv2-panel-close {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .tmv2-panel-close-icon {
    font-size: 16px;
  }
}


/* --- CSS Variables support for admin customization ----------------------- */
.tmv2-shell {
  width: min(100%, var(--tm-max-width, 1580px));
}

.tmv2-map-stage {
  height: var(--tm-map-height, clamp(500px, 42vw, 610px));
}

.tmv2-map-container path {
  stroke: var(--tm-map-stroke, #7d97b8);
  stroke-width: var(--tm-map-stroke-width, 0.82);
}

.tmv2-map-container path.is-muted {
  opacity: var(--tm-muted-opacity, 0.24);
}

.tmv2-map-container path.is-selected {
  stroke: var(--tm-map-sel-stroke, #003a86);
  stroke-width: var(--tm-map-sel-sw, 2.2);
}

.tmv2-table-wrap {
  max-height: var(--tm-table-height, 580px);
}


/* ================================================================
   FICHA COMPLETA DO MUNICÍPIO — tmv2-ficha-page
   ================================================================ */

/* Also needed: items message in drawer */
.tmv2-items-msg {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--tmv2-muted);
}

/* Ficha page base */
.tmv2-ficha-page {
  padding-bottom: 56px;
}

.tmv2-ficha-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 20px;
}

.tmv2-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--tmv2-soft-blue);
  color: var(--tmv2-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--tmv2-border);
  transition: background .15s, color .15s;
}

.tmv2-btn-back:hover {
  background: var(--tmv2-blue);
  color: #fff;
}

/* Header */
.tmv2-ficha-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid var(--tmv2-border);
  border-radius: 16px;
  box-shadow: var(--tmv2-soft-shadow);
  margin-bottom: 20px;
}

.tmv2-ficha-city-badge {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--tmv2-blue) 0%, var(--tmv2-blue-dark) 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
}

.tmv2-ficha-header-info {
  flex: 1 1 auto;
  min-width: 0;
}

.tmv2-ficha-header-info h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 900;
  color: #061f4d;
  line-height: 1.1;
}

.tmv2-ficha-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--tmv2-muted);
}

.tmv2-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}

.tmv2-btn-export:hover {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
}

/* Summary grid */
.tmv2-ficha-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.tmv2-ficha-stat {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--tmv2-border);
  border-radius: 12px;
  box-shadow: var(--tmv2-soft-shadow);
}

.tmv2-ficha-stat span {
  display: block;
  font-size: 12px;
  color: var(--tmv2-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.tmv2-ficha-stat strong {
  display: block;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  color: #061f4d;
  line-height: 1.1;
}

/* Origins bar */
.tmv2-ficha-origins {
  margin-bottom: 20px;
  padding: 20px 24px;
}

.tmv2-ficha-origins h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
  color: #061f4d;
}

/* Ficha origin rows — escopados para não conflitar com drawer */
.tmv2-ficha-origins .tmv2-origin-row {
  display: grid;
  grid-template-columns: 90px 1fr 140px 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.tmv2-ficha-origins .tmv2-origin-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--tmv2-border);
  overflow: hidden;
}

.tmv2-ficha-origins .tmv2-origin-bar i {
  display: block;
  height: 100%;
  background: var(--tmv2-blue);
  border-radius: 4px;
  transition: width .3s;
}

.tmv2-ficha-origins .tmv2-origin-value {
  text-align: right;
  font-weight: 700;
  color: #061f4d;
}

.tmv2-origin-pct {
  text-align: right;
  color: var(--tmv2-muted);
  font-size: 12px;
}

/* Card helper — escopo ficha para não redefinir .tmv2-card globalmente */
.tmv2-ficha-page .tmv2-card {
  background: #fff;
  border: 1px solid var(--tmv2-border);
  border-radius: 16px;
  box-shadow: var(--tmv2-soft-shadow);
}

/* Table card */
.tmv2-ficha-table-card {
  padding: 20px 24px 24px;
}

.tmv2-ficha-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tmv2-ficha-table-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #061f4d;
}

.tmv2-ficha-table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tmv2-ficha-search-input {
  padding: 7px 12px;
  border: 1px solid var(--tmv2-border);
  border-radius: 8px;
  font-size: 14px;
  min-width: 220px;
  color: var(--tmv2-blue-text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.tmv2-ficha-search-input:focus {
  border-color: var(--tmv2-blue);
  box-shadow: 0 0 0 2px rgba(7, 86, 184, .12);
}

.tmv2-ficha-per-page {
  padding: 7px 10px;
  border: 1px solid var(--tmv2-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--tmv2-blue-text);
  background: #fff;
  cursor: pointer;
}

/* Table styles */
.tmv2-ficha-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  /* No max-height here — the ficha uses pagination, not vertical scroll */
  max-height: none;
  border-radius: 10px;
  border: 1px solid var(--tmv2-border);
}

.tmv2-ficha-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto; /* override table-layout: fixed from .tmv2-table */
}

.tmv2-ficha-table th,
.tmv2-ficha-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--tmv2-border);
  white-space: nowrap;
}

.tmv2-ficha-table thead th {
  background: var(--tmv2-soft-blue);
  font-weight: 800;
  font-size: 12px;
  color: var(--tmv2-blue-dark);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Override .tmv2-table td: remove overflow:hidden / text-overflow:ellipsis */
.tmv2-ficha-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* Reset percentage widths herdados de .tmv2-table nth-child */
.tmv2-ficha-table th:nth-child(1), .tmv2-ficha-table td:nth-child(1),
.tmv2-ficha-table th:nth-child(2), .tmv2-ficha-table td:nth-child(2),
.tmv2-ficha-table th:nth-child(3), .tmv2-ficha-table td:nth-child(3),
.tmv2-ficha-table th:nth-child(4), .tmv2-ficha-table td:nth-child(4),
.tmv2-ficha-table th:nth-child(5), .tmv2-ficha-table td:nth-child(5) {
  width: auto;
}

/* Larguras mínimas por coluna */
.tmv2-ficha-table th[data-sort="nome_atracao"]       { min-width: 280px; }
.tmv2-ficha-table th[data-sort="nome_representante"]  { min-width: 260px; }
.tmv2-ficha-table th[data-sort="data_apresentacao"]   { min-width: 110px; }
.tmv2-ficha-table th[data-sort="valor_municipal"],
.tmv2-ficha-table th[data-sort="valor_estadual"],
.tmv2-ficha-table th[data-sort="valor_federal"]       { min-width: 120px; }
.tmv2-ficha-table th[data-sort="valor_total"]         { min-width: 140px; }

.tmv2-ficha-table tbody tr:last-child td {
  border-bottom: none;
}

.tmv2-ficha-table tbody tr:hover td {
  background: #f5f9ff;
}

.tmv2-ficha-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.tmv2-ficha-table th.sortable:hover {
  background: var(--tmv2-border);
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-style: normal;
  opacity: .6;
}

.tmv2-currency {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tmv2-ficha-empty {
  text-align: center;
  padding: 32px;
  color: var(--tmv2-muted);
}

/* Pagination */
.tmv2-ficha-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--tmv2-muted);
}

.tmv2-ficha-pag-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tmv2-pag-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--tmv2-border);
  border-radius: 8px;
  background: #fff;
  color: var(--tmv2-blue-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, color .12s;
}

.tmv2-pag-btn:hover:not(:disabled) {
  background: var(--tmv2-blue);
  color: #fff;
  border-color: var(--tmv2-blue);
}

.tmv2-pag-btn.is-active {
  background: var(--tmv2-blue);
  color: #fff;
  border-color: var(--tmv2-blue);
}

.tmv2-pag-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.tmv2-pag-ellipsis {
  padding: 0 4px;
  color: var(--tmv2-muted);
}

/* Status badges — escopados para ficha, para não sobrescrever .tmv2-status global do drawer */
.tmv2-ficha-page .tmv2-status.with {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  background: #d9f6e4;
  color: #087a3d;
  font-size: 12px;
  font-weight: 700;
}

.tmv2-ficha-page .tmv2-status.without {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  background: #ffe4e4;
  color: #9f1d1d;
  font-size: 12px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 680px) {
  .tmv2-ficha-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .tmv2-ficha-origins .tmv2-origin-row {
    grid-template-columns: 80px 1fr 110px 40px;
    font-size: 12px;
  }

  .tmv2-ficha-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tmv2-ficha-search-input {
    min-width: 100%;
  }

  .tmv2-ficha-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}
