/* Panorama territorial: herda a identidade e os tokens do módulo eleitoral. */
.page-eleicoes .election-totals { padding: 18px; border-left: 0; border-radius: 8px; background: var(--soft); gap: 18px; }
.page-eleicoes .election-totals > div { --stat-color: var(--purple); min-width: 0; }
.page-eleicoes .election-totals > div:nth-child(2) { --stat-color: #126c70; }
.page-eleicoes .election-totals > div:nth-child(3) { --stat-color: #806300; }
.page-eleicoes .election-totals > div:nth-child(4) { --stat-color: #a12b4c; }
.page-eleicoes .election-totals > div:nth-child(5) { --stat-color: #74558c; }
.page-eleicoes .election-totals > div:nth-child(6) { --stat-color: #235c94; }
.page-eleicoes .election-totals dt { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--ink); line-height: 1.4; }
.page-eleicoes .election-totals dt::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--stat-color); }
.page-eleicoes .election-totals dd { color: var(--stat-color); font-size: 20px; margin-top: 6px; overflow-wrap: anywhere; }
.page-eleicoes .election-totals small { display: table; color: var(--stat-color); font-size: 11px; font-weight: 600; background: var(--paper); padding: 2px 6px; border-radius: 4px; margin-top: 4px; }
.election-overview { margin-top: 36px; font-variant-numeric: tabular-nums; }
.election-overview > section + section { margin-top: 36px; }
.election-overview-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.election-overview-heading h3 { --h3-size: 22px; --h3-weight: 800; margin: 0; color: var(--purple); line-height: 1.25; }
.election-overview-heading > span { font-size: 12px; color: var(--muted); }
.election-overview-note, .election-overview-status { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 8px 0 16px; }
.election-regions { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 8px; }
.election-region { min-width: 0; padding: 16px 12px; }
.election-region + .election-region { border-left: 1px solid var(--line); }
.election-region h4 { font-size: 15px; margin: 0 0 8px; font-weight: 800; }
.election-region-progress { font-size: 11px; color: var(--muted); margin: 0 0 6px; }
.election-region-progress strong { color: var(--ink); font-size: 17px; }
.election-region-status { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
.election-overview-candidates { padding: 0; margin: 0; list-style: none; }
.election-overview-candidates li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.election-overview-candidates strong { display: block; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.election-overview-candidates small { display: block; font-size: 10px; margin-top: 4px; color: var(--muted); }
.election-overview-candidates b { color: var(--regional-candidate); font-size: 15px; line-height: 1.4; white-space: nowrap; }
.election-region-time { font-size: 10px; color: var(--muted); line-height: 1.6; margin: 12px 0 0; }
.election-region-others { font-size: 11px; margin-top: 6px; }
.election-region-others summary { color: var(--purple); cursor: pointer; padding-block: 8px; }
.election-local-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.election-local-result { min-width: 0; background: var(--soft); padding: 20px; border-radius: 8px; }
.election-local-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.election-local-title h4 { margin: 0; font-size: 24px; font-weight: 800; color: var(--purple); }
.election-local-title a { font-size: 11px; color: var(--purple); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.election-local-result .election-overview-candidates li { grid-template-columns: minmax(0,1fr) auto; padding: 12px 0; }
.election-local-result .election-overview-candidates strong { font-size: 13px; }
.election-local-result .election-overview-candidates small { font-size: 12px; }
.election-local-result .election-overview-candidates b { font-size: 24px; }
.election-territory-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px 0 8px; }
.election-territory-filters label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.election-territory-filters :is(input,select) { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-height: 44px; padding: 8px 12px; color: var(--ink); font: inherit; font-size: 16px; width: 100%; }
.election-territory-search { flex: 1; min-width: 200px; }
.election-territory-submit, .election-table-pagination button { background: var(--yellow); border: 0; border-radius: 999px; padding: 10px 20px; min-height: 44px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.election-table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; scrollbar-color: var(--purple) var(--soft); scrollbar-width: thin; }
.election-table-hint { display: none; font-size: 12px; color: var(--muted); margin: 8px 0; }
.election-territory-table { border-collapse: collapse; width: 100%; min-width: 720px; text-align: left; font-size: 13px; }
.election-territory-table caption { text-align: left; background: var(--soft); padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--muted); }
.election-territory-table :is(th,td) { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.election-territory-table thead th { font-size: 11px; color: var(--muted); background: var(--soft); font-weight: 700; }
.election-territory-table tbody tr:last-child > * { border-bottom: 0; }
.election-territory-table tbody tr:hover { background: var(--soft); }
.election-territory-table th[scope="row"] { min-width: 145px; }
.election-territory-table a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.election-territory-table small { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; font-weight: 400; }
.election-table-candidates { list-style: none; padding: 0; margin: 0; min-width: 200px; }
.election-table-candidates li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; font-size: 10px; }
.election-table-candidates li + li { margin-top: 12px; }
.election-table-candidates strong { color: var(--regional-candidate); font-size: 13px; }
.election-table-candidates small { grid-column: 1 / -1; margin-top: 0; }
.election-table-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 16px; font-size: 12px; }
.election-table-pagination button:disabled { opacity: .5; cursor: default; }
.election-overview :is(a,button,input,select,summary,.election-table-scroll):focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
@media (max-width: 1050px) {
    .election-regions { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .election-region:nth-child(4) { border-left: 0; }
    .election-region:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 780px) {
    .election-table-hint { display: block; }
    .election-overview-heading { display: block; }
    .election-overview-heading > span { display: block; margin-top: 8px; }
    .election-local-results { grid-template-columns: 1fr; gap: 14px; }
    .election-territory-filters > label:not(.election-territory-search) { flex: 1; min-width: 130px; }
}
@media (max-width: 520px) {
    .election-regions { grid-template-columns: 1fr; }
    .election-region { padding: 16px; }
    .election-region + .election-region { border-left: 0; border-top: 1px solid var(--line); }
    .election-overview-candidates strong { font-size: 13px; }
    .election-overview-candidates small { font-size: 12px; }
    .election-overview-candidates b { font-size: 20px; }
    .election-region-time { font-size: 11px; }
    .election-local-title { display: block; }
    .election-local-title a { display: inline-block; margin-top: 8px; }
    .election-territory-search { flex-basis: 100%; }
    .election-table-pagination { justify-content: space-between; gap: 8px; }
    .election-overview-heading h3 { --h3-size: 20px; }
}
