/* Google Sans local para manter a interface disponível sem conexão. */
@font-face {
  font-family: 'Google Sans';
  src: url('assets/fonts/GoogleSans.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
}
@font-face {
  font-family: 'Google Sans';
  src: url('assets/fonts/GoogleSans-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400 700;
  font-display: block;
}
/* Tema claro. Reutiliza os componentes e fluxos do painel original. */
html.fonts-loading body { visibility: hidden; }
:root {
  color-scheme: light;
  --bg-main: #f5f7fa;
  --bg-card: #fff;
  --bg-card-hover: #eef3f7;
  --border-color: #e1e7ee;
  --border-focus: #a9b9ca;
  --text-primary: #1b2b40;
  --text-secondary: #52657a;
  --text-muted: #62748a;
  --lula-red: #ce3646;
  --lula-red-dark: #a62435;
  --lula-bg: #fff0f1;
  --bolsonaro-blue: #2869c4;
  --bolsonaro-blue-dark: #18509d;
  --bolsonaro-bg: #edf4ff;
  --accent-green: #13785c;
  --accent-gold: #956111;
  --accent-orange: #b85015;
  --radius-lg: 16px;
  --font-family: 'Google Sans', sans-serif;
}
body, body * { font-family: var(--font-family) !important; }
body { background: var(--bg-main); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #19755f; outline-offset: 3px; }
button { min-height: 36px; }
input::placeholder { color: #718096; }
header { padding: 20px 28px; background: #fff; backdrop-filter: none; gap: 24px; position: relative; }
.logo-badge { background: #e9f4ef; color: #16624e; width: 46px; height: 46px; border: 0; border-radius: 12px; }
.logo-area { gap: 12px; min-width: 0; }
.title-group h1 { background: none; -webkit-text-fill-color: initial; font-size: 19px; color: #1b2b40; letter-spacing: -.6px; }
.title-group p { font-size: 12px; margin-top: 3px; }
.brand-year { color: #687b8e; font-size: 13px; font-weight: 500; margin-left: 9px; letter-spacing: 0; }
.offline-badge { color: #496658; display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; }
.offline-badge>span, .scope-dot { width: 6px; height: 6px; background: #27805e; border-radius: 50%; display: inline-block; }
.turno-switch { background: #f2f5f8; border: 1px solid var(--border-color); border-radius: 10px; padding: 4px; }
.turno-btn { border-radius: 7px; font-size: 12px; padding: 8px 14px; white-space: nowrap; }
.turno-btn.active { background: #fff; border: 0; color: #174e40; box-shadow: 0 1px 5px #1b2b4014; }
.turno-btn:hover { background: #e8eef3; }
.nav-tabs { padding: 0 20px; margin-bottom: 24px; background: #fff; gap: 26px; border: 1px solid var(--border-color); border-radius: 10px; }
.analysis-tabs { display: flex; gap: 26px; overflow-x: auto; min-width: 0; }
.analysis-turno { margin-left: auto; align-self: center; flex-shrink: 0; }
.table-footnote { color: var(--text-secondary); font-size: 11px; margin-top: 14px; }
.sections-search-panel h2 { font-size: 20px; letter-spacing: -.5px; }
.sections-search-panel>p { color: var(--text-secondary); font-size: 13px; margin-top: 5px; }
.sections-location-controls { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(180px, 1fr) minmax(220px, 1.5fr); gap: 16px; margin-top: 20px; }
.sections-location-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.sections-location-controls input, .sections-location-controls select { width: 100%; }
.sections-city-results { margin-top: 14px; padding: 8px; background: #f7faf8; border: 1px solid #d2e3da; border-radius: 10px; max-height: 280px; overflow-y: auto; }
.sections-city-results>p { font-size: 12px; color: var(--text-secondary); padding: 6px 8px; }
.sections-city-results>button { display: block; width: 100%; text-align: left; padding: 12px; border: 0; border-top: 1px solid #e0e9e4; background: transparent; color: #17654f; cursor: pointer; font-size: 12px; }
.sections-city-results>button:hover, .sections-city-results>button.highlighted { background: #e5f1eb; }
.sections-empty { padding: 50px 24px; text-align: center; color: var(--text-secondary); font-size: 13px; border: 1px dashed #c9d5df; border-radius: 12px; margin-top: 20px; }
.sections-page .modal-card.modal-large { width: 100%; max-width: none; max-height: none; display: block; overflow: visible; box-shadow: none; margin-top: 20px; }
.sections-page .modal-body { overflow: visible; }
.sections-page .modal-header { position: static; }
.row-virada { border-left: 3px solid #c28b23; }
.row-virada td:first-child { border-left: 3px solid #c28b23; }
.downloads-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 8px 0 24px; }
.downloads-heading h2 { font-size: 25px; letter-spacing: -.7px; margin: 5px 0; }
.downloads-heading>div>p:last-child, .downloads-description { color: var(--text-secondary); font-size: 12px; margin: 6px 0 16px; }
.download-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.download-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 22px; border: 1px solid var(--border-color); background: #fff; border-radius: 12px; }
.download-card h3 { font-size: 17px; letter-spacing: -.3px; }
.download-card p { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.download-card label { color: var(--text-secondary); font-size: 11px; }
.download-format { color: #17654f; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.download-size { color: var(--text-secondary); font-size: 11px; }
.download-action { display: block; padding: 10px 12px; color: #fff; background: #19755f; border: 1px solid #19755f; border-radius: 7px; font-size: 12px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; }
.download-action:hover { color: #fff; background: #125a49; }
.download-link { display: inline-block; color: #17654f; font-size: 12px; text-decoration: none; padding: 5px 0; }
.download-link:hover { text-decoration: underline; }
.downloads-filters { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.downloads-filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.downloads-table-scroll { overflow-x: auto; }
.downloads-table-scroll a { white-space: nowrap; }
.tab-btn { padding: 17px 0; gap: 8px; font-size: 13px; border-bottom-width: 2px; }
.tab-btn>span { font-size: 18px; font-weight: 400; }
.tab-btn.active { color: #16624e; border-bottom-color: #19755f; }
main { width: 100%; max-width: none; padding: 30px 28px 20px; }
.page-intro { display: flex; align-items: center; justify-content: space-between; margin: 0 0 25px; gap: 16px; }
.eyebrow { color: #62748a; letter-spacing: 1.5px; font-size: 10px; font-weight: 700; }
.page-intro h2 { font-size: clamp(23px, 2.1vw, 32px); letter-spacing: -1px; font-weight: 650; margin: 5px 0 4px; }
.page-intro>div>p:last-child { color: var(--text-secondary); font-size: 13px; }
.scope-label { display: flex; gap: 10px; align-items: center; padding: 11px 18px; background: #fff; border: 1px solid var(--border-color); border-radius: 10px; flex-shrink: 0; }
.scope-label strong { display: block; font-size: 12px; font-weight: 650; }
.scope-label div>span { display: block; color: var(--text-muted); font-size: 11px; }
.kpi-grid { gap: 16px; }
.overview-kpis { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.overview-kpis>.kpi-card { grid-column: span 2; }
.overview-kpis>.candidate-kpi { grid-column: span 6; }
.kpi-card, .map-container, .drill-panel, .data-table-wrap, .candidatos-section, .pop-card { backdrop-filter: none; box-shadow: 0 2px 5px #22354d03; }
.kpi-card { padding: 20px; border-radius: 12px; }
.kpi-card:hover { transform: none; border-color: #c2cedb; }
.kpi-card.lula, .kpi-card.bolsonaro, .kpi-card.branco, .kpi-card.nulo { border-left-width: 1px; }
.candidate-kpi { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 0; }
.candidate-kpi.lula { background: linear-gradient(115deg, #fff 65%, #fff3f3); border-top: 3px solid #ce3646; }
.candidate-kpi.bolsonaro { background: linear-gradient(115deg, #fff 65%, #eef5ff); border-top: 3px solid #2869c4; }
.candidate-identity { grid-column: 1 / -1; display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.kpi-portrait { width: 64px; height: 64px; object-fit: cover; object-position: center 22%; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 1px #dfe5ec; }
.candidate-identity h3 { font-size: 21px; font-weight: 650; letter-spacing: -.5px; margin: 1px 0 3px; }
.party-label { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; }
.party-logo { object-fit: contain; width: 38px; height: 26px; }
.party-label .party-logo { width: 23px; height: 20px; }
.candidate-kpi .kpi-title { grid-column: 1 / -1; margin-bottom: 2px; }
.kpi-title { color: var(--text-secondary); font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: .1px; gap: 8px; flex-wrap: wrap; }
.kpi-value { font-size: clamp(22px, 2.1vw, 30px); font-weight: 650; letter-spacing: -1px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.candidate-kpi .kpi-value { font-size: 35px; grid-column: 1 / -1; }
.kpi-card.lula .kpi-value { color: #b52b3c; }
.kpi-card.bolsonaro .kpi-value { color: #225ba7; }
.kpi-card.branco .kpi-value { color: #52657a; }
.kpi-card.nulo .kpi-value { color: #a34a16; }
.other-candidates-kpi .kpi-value { color: #80580b; }
.transition-balance-kpi .kpi-value { color: #13785c; }
.kpi-balance-details { margin-top: 12px; font-size: 10px; color: var(--text-secondary); }
.kpi-balance-details summary { cursor: pointer; color: #17654f; padding: 4px 0; }
#kpi-saldo-composicao>div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--border-color); }
#kpi-saldo-composicao strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 11px; line-height: 1.6; margin-top: 6px; }
.candidate-kpi .kpi-sub, .candidate-kpi .progress-bar-wrap { grid-column: 1 / -1; }
.progress-bar-wrap, .cand-bar-wrap { background: #e9eef4; height: 5px; margin-top: 10px; }
.progress-bar-fill, .cand-bar-fill { box-shadow: none; }
.tag { font-size: 10px; border-radius: 5px; padding: 3px 7px; letter-spacing: 0; line-height: 1.5; }
.tag-red { color: #b62a3d; background: #ffedef; border-color: #f1c7ce; }
.tag-blue { color: #225ba7; background: #edf4ff; border-color: #cfdef3; }
.tag-branco { color: #52657a; background: #f0f3f7; border-color: #dce3eb; }
.tag-nulo { color: #a34a16; background: #fff2e9; border-color: #f0d8c5; }
.tag-green { color: #13785c; background: #eaf6f0; border-color: #c9e6d8; }
.tag-gold { color: #8b5b0b; background: #fff6df; border-color: #ecdcb3; }
.dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(330px, 1fr); gap: 20px; align-items: stretch; }
.dashboard-grid>* { min-width: 0; }
.map-container, .drill-panel { padding: 22px; }
.map-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.map-title { font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
.map-header p { margin-top: 4px; }
.map-legend { gap: 14px; font-size: 10px; color: var(--text-secondary); flex-wrap: wrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: none !important; }
.map-search-input-box { background: #f7f9fb; border: 1px solid #dfe6ee; box-shadow: none; padding: 10px 12px; backdrop-filter: none; border-radius: 8px; }
.map-search-input-box:focus-within { border-color: #19755f; box-shadow: 0 0 0 3px #19755f17; }
.map-search-input { min-width: 0; font-size: 12px; }
.map-search-input::placeholder { color: #718096; }
.map-search-clear { color: #52657a; min-width: 30px; }
.map-search-dropdown { background: white; border-color: #cbd8d1; box-shadow: 0 12px 30px #1b2b401a; }
.map-search-item { border-color: #e7edf3; gap: 10px; }
.map-search-item:hover, .map-search-item.highlighted { background: #edf5f1; }
.map-search-item-title { font-size: 12px; flex-wrap: wrap; }
.map-search-item-sub { font-size: 10px; color: #52657a; }
#leaflet-map { height: 470px; background: #f0f4f7; border: 1px solid #e5ebf1; box-shadow: none; background-image: radial-gradient(#cbd5df 1px, transparent 1px); background-size: 18px 18px; }
.leaflet-bar { border-color: #d7e1e9 !important; box-shadow: 0 2px 8px #1b2b4010 !important; }
.leaflet-bar a { background: #fff !important; color: #30465a !important; border-color: #e1e7ee !important; }
.leaflet-bar a:hover { background: #e8f2ee !important; color: #17654f !important; }
.leaflet-custom-tooltip { background: #fff !important; color: #1b2b40 !important; border-color: #d3dfe8 !important; box-shadow: 0 8px 24px #1b2b4020 !important; }
.state-map-tooltip { position: fixed; width: 480px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; z-index: 1500; padding: 12px 16px 16px; background: #fff; color: var(--text-primary); border: 1px solid #cdd9e3; border-radius: 12px; box-shadow: 0 12px 40px #1b2b4033; font: 13px/1.5 var(--font-family); white-space: normal; }
.state-tooltip-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--text-secondary); font-size: 11px; }
.state-tooltip-toolbar button { border: 0; background: #f0f4f7; color: #52657a; border-radius: 6px; min-width: 30px; min-height: 30px; font-size: 20px; cursor: pointer; }
.state-tooltip-content>div { min-width: 0 !important; max-width: none !important; font-family: inherit !important; }
.leaflet-tooltip:before { border-color: transparent !important; }
.leaflet-custom-tooltip.city-tooltip { width: min(270px, calc(100vw - 48px)); max-width: none !important; padding: 12px !important; font-size: 12px !important; line-height: 1.5 !important; border-radius: 10px !important; box-sizing: border-box; opacity: 1 !important; pointer-events: auto !important; }
.city-tooltip { transition: none !important; }
.city-tooltip:before { display: none !important; }
.hover-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #e1e7ee; }
.hover-heading strong { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.hover-heading>span { background: #eef3f7; padding: 2px 6px; border-radius: 4px; color: #52657a; font-size: 11px; }
.hover-period { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; color: #52657a; font-size: 11px; }
.hover-candidate { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 8px; padding: 7px 0; }
.hover-candidate>span { font-weight: 600; }
.hover-candidate strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.hover-candidate small { color: #52657a; font-size: 11px; }
.hover-winner { margin-top: 6px; color: var(--text-secondary); font-size: 11px; border-top: 1px solid var(--border-color); padding-top: 8px; }
.hover-zones { width: 100%; margin-top: 10px; padding: 7px 9px; border: 1px solid #c9e0d4; border-radius: 6px; background: #edf6f1; color: #17654f; cursor: pointer; font-size: 11px; }
.hover-zones:hover { background: #deeee4; }
.hover-lula { color: #b62a3d; }
.hover-bolsonaro { color: #225ba7; }
.hover-totals { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid #edf1f5; font-size: 11px; color: #52657a; }
.hover-totals strong { color: #1b2b40; font-weight: 600; font-variant-numeric: tabular-nums; }
.hover-hint { margin-top: 8px; padding-top: 10px; border-top: 1px solid #e1e7ee; color: #17654f; font-size: 11px; }
.hover-note { padding-top: 12px; color: #52657a; }
.hover-comparison { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 6px 0 10px; font-size: 10px; font-variant-numeric: tabular-nums; }
.hover-comparison th, .hover-comparison td { text-align: right; padding: 8px 3px; vertical-align: top; border-bottom: 1px solid #edf1f5; }
.hover-comparison th:first-child { text-align: left; width: 27%; }
.hover-comparison th:last-child { width: 17%; }
.hover-comparison thead th { color: #52657a; font-weight: 500; }
.hover-comparison small { display: block; font-size: 9px; color: #52657a; margin-top: 3px; }
.map-caption { display: flex; justify-content: space-between; gap: 10px; color: #62748a; font-size: 10px; margin-top: 12px; }
.drill-panel { min-height: 0; gap: 16px; }
.drill-header { align-items: flex-start; gap: 10px; padding-bottom: 16px; }
.drill-title-area h2 { font-size: 16px; font-weight: 650; }
.drill-title-area p { font-size: 11px; margin-top: 5px; }
.filter-bar { gap: 8px; }
.search-input, .filter-select { background: #f7f9fb; color: #293e52; border: 1px solid #dfe6ee; padding: 10px 12px; font-size: 12px; min-height: 40px; max-width: 100%; }
.search-input { min-width: 150px; }
.filter-select { min-width: 0; }
.items-list { max-height: 500px; gap: 8px; }
.item-row { background: #fff; padding: 12px; border-radius: 9px; gap: 10px; }
.item-row:hover { background: #f8fafc; transform: none; border-color: #afc5ba; }
.item-main { gap: 10px; min-width: 0; }
.item-info-title { font-size: 12px; overflow-wrap: anywhere; }
.item-info-sub { font-size: 10px; }
.winner-badge { width: 30px; height: 30px; flex-shrink: 0; font-size: 10px; }
.item-pct { font-size: 13px; }
.item-pct.lula { color: #b52b3c; }
.item-pct.bolsonaro { color: #225ba7; }
.item-delta.positive { background: #eaf6f0; color: #13785c; }
.item-delta.negative { background: #ffedef; color: #b62a3d; }
.item-stats { flex-shrink: 0; }
.btn-card-action, .back-btn, .btn-load-more { background: #f3f6f9; color: #3e566e; border-color: #dce4ec; }
.btn-card-action { min-height: 28px; font-size: 10px; }
.btn-card-action.primary { background: #edf5f1; color: #17654f; border-color: #cadfd3; }
.btn-card-action:hover, .btn-card-action.primary:hover, .back-btn:hover, .btn-load-more:hover { background: #e3f0e9; color: #15513f; border-color: #a0c3ae; box-shadow: none; transform: none; }
.candidatos-section { margin-top: 24px; padding: 24px; }
.candidatos-header { margin-bottom: 20px; gap: 16px; }
.candidatos-badge { background: #edf5f1; color: #17654f; border: 1px solid #d6e8dd; white-space: nowrap; }
.candidatos-title-group h3 { font-size: 17px; letter-spacing: -.3px; }
.candidatos-title-group p { font-size: 12px; margin-top: 3px; }
.candidatos-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cand-card { background: #fff; padding: 18px; gap: 12px; border-left-width: 1px !important; border-top: 3px solid var(--candidate-color, #8b9bac); }
.cand-card:hover { background: #fcfdfd; box-shadow: 0 5px 18px #1b2b400d; }
.cand-card-top { margin: 0; align-items: center; gap: 10px; }
.portrait-wrap { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #e9eef3; position: relative; flex-shrink: 0; }
.portrait-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: #354f65; }
.candidate-photo { display: block; width: 100%; height: 100%; aspect-ratio: 1; border-radius: 50%; clip-path: circle(50%); flex-shrink: 0; object-fit: cover; object-position: center 22%; position: relative; }
.cand-rank { background: #f1f4f8; font-size: 10px; padding: 4px 8px; color: #52657a; }
.cand-name { white-space: normal; font-size: 13px; line-height: 1.4; font-weight: 650; text-transform: none; }
.cand-party { display: flex; align-items: center; gap: 8px; font-size: 10px; margin: 7px 0 0; }
.party-up { background: #a51e2d; border-radius: 4px; padding: 2px; }
.party-missão { background: #27352b; border-radius: 4px; padding: 4px; }
.candidate-photo[src$="rui-costa-pimenta.jpg"] { object-position: 65% center; }
.cand-card .party-logo { width: 46px; height: 29px; }
.cand-votes { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.cand-pct { font-size: 13px; }
.cand-bar-wrap { margin-top: 4px; }
.data-table-wrap { min-width: 0; }
#tab-lula-mudanca>div { grid-template-columns: minmax(0, 1fr) !important; }
table.data-table { font-size: 12px; font-variant-numeric: tabular-nums; }
table.data-table th { font-size: 10px; background: #f7f9fb; padding: 12px; white-space: nowrap; }
table.data-table td { border-bottom-color: #e8edf3; padding: 13px 12px; }
table.data-table tr:hover td { background: #f5f9f7; }
.badge-favorite { color: #865a0e; background: #fff6dc; border-color: #ead9ad; }
.btn-star { min-width: 32px; text-shadow: none !important; }
.pop-card { background: #fff; }
.pop-card-uf-badge, .pop-turno-box { background: #f5f7fa; border-color: #e2e8ef; }
.pop-turnos-compare { border-color: #e2e8ef; }
.modal-overlay { background: #192e4966; backdrop-filter: blur(5px); }
.modal-card { background: #fff; border-color: #d8e1eb; box-shadow: 0 24px 80px #14283d33; }
.modal-kpi-bar { background: #f6f8fb; }
.modal-kpi-item { background: #fff; border-color: #dfe6ee; }
.modal-tabs { background: #edf2f6; }
.modal-tab-btn { font-size: 11px; }
.modal-tab-btn:hover { color: #175640; }
.modal-tab-btn.active { background: #19755f; color: #fff; box-shadow: none; }
.modal-controls-bar { background: #fff; }
.modal-search-box { min-width: 180px; }
.modal-search-box input { width: 100%; }
.secoes-table th { background: #f2f6f9; box-shadow: 0 1px 0 #dce4ed; }
.close-modal-btn { color: #52657a; min-width: 40px; min-height: 40px; border-radius: 8px; flex-shrink: 0; }
.close-modal-btn:hover { background: #edf2f6; }
.badge-virada { color: #80580b; background: #fff6d9; border-color: #d6ba6c; animation: none; }
.badge-zero-urna { color: #ac293b; background: #ffedef; border-color: #e7bdc5; }
.btn-voltar-brasil, .city-focus-banner { background: #fff; color: #1b2b40; border-color: #b2cfc0; box-shadow: 0 4px 20px #1b2b401a; backdrop-filter: none; }
.btn-voltar-brasil:hover { background: #edf5f1; color: #175640; border-color: #19755f; box-shadow: none; transform: none; }
.city-focus-title { color: #17654f; }
.city-focus-desc { color: #52657a; }
.btn-focus-action.primary { background: #19755f; color: #fff; }
.btn-focus-action.primary:hover { background: #125a49; box-shadow: none; }
.btn-focus-action.close { background: #f0f3f6; color: #52657a; }
.spinner { border-color: #dde7e1; border-left-color: #19755f; }
.load-error { padding: 24px; text-align: center; color: #a0283a; background: #fff3f4; border: 1px solid #edd1d5; border-radius: 10px; }
.load-error button { margin-top: 14px; }
button:disabled, input:disabled, select:disabled { opacity: .5; cursor: wait; }
.site-footer { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding: 22px 0 4px; margin-top: 30px; border-top: 1px solid #dee6ed; font-size: 11px; color: #62748a; }
.site-footer a { color: #17654f; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 3000; background: #19755f; color: white; padding: 12px 18px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { #leaflet-map { height: 520px; } }
@media (min-width: 1250px) { #tab-lula-mudanca>div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } }
@media (max-width: 1180px) {
  .download-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-tabs { flex-wrap: wrap; gap: 0; }
  .analysis-tabs { flex: 1 1 100%; }
  .analysis-turno { margin: 8px 0 12px auto; }
  .overview-kpis>.kpi-card { grid-column: span 4; }
  .overview-kpis>.candidate-kpi { grid-column: span 6; }
  header { flex-wrap: wrap; gap: 16px; }
  .controls-area { margin-left: auto; }
  .offline-badge { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); }
  .kpi-title .tag { font-size: 9px; }
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .items-list { max-height: 400px; }
  .overview-kpis>.kpi-card { grid-column: span 6; }
  .map-header { flex-direction: column; }
  .nav-tabs { gap: 22px; }
  .city-focus-banner { left: 10px; right: 10px; transform: none; max-width: none; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .candidate-kpi .kpi-value { font-size: 30px; }
}
@media (max-width: 600px) {
  .download-cards { grid-template-columns: 1fr; }
  .downloads-heading h2 { font-size: 22px; }
  .downloads-filters label { flex: 1 1 100%; }
  .sections-location-controls { grid-template-columns: 1fr; gap: 12px; }
  .analysis-tabs { gap: 22px; }
  .analysis-turno { width: 100%; }
  .analysis-turno .turno-btn { flex: 1; padding: 8px 4px; font-size: 11px; }
  .leaflet-custom-tooltip.city-tooltip { padding: 12px !important; }
  .city-tooltip .hover-hint { display: none; }
  .city-tooltip .hover-period { margin: 8px 0; }
  .city-tooltip .hover-comparison th, .city-tooltip .hover-comparison td { padding: 5px 2px; }
  .city-tooltip .hover-totals { padding: 5px 0; }
  header { padding: 16px; }
  .title-group h1 { font-size: 17px; }
  .brand-year { font-size: 11px; }
  .controls-area { width: 100%; }
  .controls-area .turno-switch { width: 100%; }
  .controls-area .turno-btn { flex: 1; padding: 8px 4px; font-size: 11px; }
  .nav-tabs { padding: 0 16px; gap: 22px; }
  .tab-btn { font-size: 12px; padding: 13px 0; }
  main { padding: 22px 16px 16px; }
  .page-intro { align-items: flex-start; }
  .page-intro h2 { font-size: 23px; max-width: 250px; }
  .page-intro>div>p:last-child { font-size: 12px; max-width: 230px; }
  .scope-label { padding: 7px 9px; gap: 6px; }
  .scope-label div>span { display: none; }
  .scope-label strong { font-size: 10px; }
  .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .overview-kpis { gap: 10px; }
  .kpi-card { padding: 14px; }
  .overview-kpis>.candidate-kpi { grid-column: 1 / -1; }
  .candidate-kpi { padding: 18px; }
  .candidate-identity { margin-bottom: 14px; }
  .kpi-value { font-size: 23px; overflow-wrap: anywhere; }
  .kpi-title { font-size: 10px; align-items: flex-start; }
  .kpi-sub { font-size: 10px; }
  .map-container, .drill-panel, .data-table-wrap, .candidatos-section { padding: 16px; }
  #leaflet-map { height: 370px; }
  .map-title { font-size: 15px; }
  .map-caption { flex-wrap: wrap; }
  .filter-bar>* { flex: 1 1 140px; width: auto !important; }
  .filter-bar .turno-switch { flex-wrap: wrap; }
  .item-row { padding: 10px; }
  .item-info-sub { font-size: 9px; }
  .item-info-title { font-size: 11px; }
  .candidatos-title-group { flex-wrap: wrap; }
  .candidatos-grid { grid-template-columns: 1fr; }
  .cand-card { padding: 18px; }
  .cand-card-top .portrait-wrap { width: 74px; height: 74px; }
  .cand-name { font-size: 15px; }
  .modal-overlay { padding: 8px; }
  .modal-card.modal-large { width: 100%; max-height: 95dvh; display: block; overflow: auto; overscroll-behavior: contain; }
  .modal-header, .modal-body { padding: 16px; }
  .modal-header { position: sticky; top: 0; z-index: 30; background: #fff; }
  .modal-body { overflow-y: visible; }
  .modal-header h3 { font-size: 15px !important; }
  .modal-header p { font-size: 11px !important; }
  .modal-kpi-bar { padding: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .modal-kpi-item { padding: 10px; min-width: 0; }
  .modal-kpi-item-val { font-size: 15px; }
  .modal-controls-bar { padding: 12px; gap: 10px; }
  .modal-controls-bar>* { max-width: 100%; }
  .modal-tabs { overflow-x: auto; width: 100%; }
  .modal-tab-btn { white-space: nowrap; padding: 8px; }
  .modal-search-box { flex: 1 1 100%; max-width: none; }
  .modal-controls-bar>.filter-select { width: 100%; }
  .site-footer { flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
