/* Radar MS — Estratégia no Mapa */
/* Estilos isolados da feature. */

/* ════════════════════════════════════════════════════════════
   Navbar única (liquid glass v3) — bottom-center
   Agrupa Áreas / Tema / Toolbar; clica pra abrir cada um.
   ════════════════════════════════════════════════════════════ */
#estr-navbar {
    position: absolute;
    left: 50%; bottom: 14px;
    transform: translateX(-50%);
    z-index: 600;
    background:
        linear-gradient(180deg,
          rgba(255, 255, 255, 0.34),
          rgba(255, 255, 255, 0.16) 35%,
          rgba(255, 255, 255, 0.22));
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 18px;
    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    padding: 6px;
    display: flex;
    align-items: stretch;
    gap: 4px;
}
.estr-navbar-btn {
    position: relative;
    height: 40px; padding: 0 16px;
    display: flex; align-items: center; gap: 8px;
    border-radius: 13px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(20,20,20,0.78);
    font-size: 12.5px; font-weight: 600; letter-spacing: -0.1px;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    overflow: hidden;
}
.estr-navbar-btn::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.25s ease;
}
.estr-navbar-btn i, .estr-navbar-btn span { position: relative; z-index: 1; }
.estr-navbar-btn i { width: 16px; height: 16px; stroke-width: 2; }
.estr-navbar-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.estr-navbar-btn:hover::before { opacity: 1; }
.estr-navbar-btn:active { transform: translateY(0) scale(0.97); }
.estr-navbar-btn.active {
    background: linear-gradient(135deg, rgba(80,140,255,0.65), rgba(70,120,235,0.5));
    color: #fff;
    border-color: rgba(180,210,255,0.65);
    box-shadow: 0 6px 18px rgba(80,140,255,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.estr-navbar-btn.active::before { opacity: 0; }
.estr-navbar-sep {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.12), transparent);
    margin: 6px 2px;
}

/* ── Comportamento de abertura controlado pela navbar ─────────
   Os 3 elementos ficam escondidos por default; .estr-active
   (toggleda pelo handler em estrategia-mapa.js) os exibe.
   Usamos !important pra sobrescrever o display:flex das
   declarações originais sem ter que reescrevê-las. */
#estr-toolbar,
#estr-mapstyle,
#estr-right-panel { display: none !important; }
#estr-toolbar.estr-active,
#estr-mapstyle.estr-active,
#estr-right-panel.estr-active { display: flex !important; }

/* Reposicionamento centrado acima da navbar (estilo v3) */
#estr-mapstyle.estr-active {
    left: 50%;
    bottom: 72px;
    top: auto;
    transform: translateX(-50%);
}
#estr-toolbar.estr-active {
    left: 50% !important;
    bottom: 72px;
    top: auto !important;
    transform: translateX(-50%);
    flex-direction: row !important;
    padding: 6px;
}
/* Esconde o drag handle quando a toolbar está fixa acima da navbar */
#estr-toolbar.estr-active .estr-tb-drag { display: none; }
/* Divisores ficam verticais quando em linha */
#estr-toolbar.estr-active .estr-tb-divider {
    width: 1px;
    height: auto;
    margin: 4px 2px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.12), transparent);
}

/* ════════════════════════════════════════════════════════════
   Toolbar flutuante (C3)
   ════════════════════════════════════════════════════════════ */
/* === LIQUID GLASS (visionOS) — toolbar flutuante === */
#estr-toolbar {
    position: absolute;
    top: 14px;
    left: 60px;
    z-index: 500;
    background:
        linear-gradient(180deg,
          rgba(255, 255, 255, 0.34),
          rgba(255, 255, 255, 0.16) 35%,
          rgba(255, 255, 255, 0.22));
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 18px;
    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
#estr-toolbar.dragging {
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
    cursor: grabbing;
}
.estr-tb-drag {
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: grab;
    border-radius: var(--r-sm);
    margin-bottom: 2px;
}
.estr-tb-drag:hover { color: var(--text-secondary); background: var(--bg-card-hover); }
.estr-tb-drag:active { cursor: grabbing; }
.estr-tb-drag i { width: 14px; height: 14px; }
.estr-tb-row {
    display: flex;
    gap: 4px;
}
.estr-tb-btn {
    position: relative;
    width: 38px; height: 38px;
    background: transparent;
    color: rgba(0, 0, 0, 0.78);
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s;
    overflow: hidden;
}
.estr-tb-btn::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.08));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.estr-tb-btn:hover {
    transform: translateY(-3px) scale(1.06);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.estr-tb-btn:hover::before { opacity: 1; }
.estr-tb-btn:active { transform: translateY(-1px) scale(1.02); }
.estr-tb-btn.active {
    background: linear-gradient(135deg, rgba(80,140,255,0.7), rgba(70,120,235,0.55));
    color: #fff;
    border-color: rgba(180, 210, 255, 0.7);
    box-shadow: 0 6px 18px rgba(80,140,255,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.estr-tb-btn.active::before { opacity: 0; }
.estr-tb-btn .lucide,
.estr-tb-btn i {
    width: 18px; height: 18px;
    position: relative; z-index: 1;
    stroke-width: 1.9;
}
.estr-tb-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}

/* ════════════════════════════════════════════════════════════
   Painel lateral direito (C6)
   ════════════════════════════════════════════════════════════ */
/* === LIQUID GLASS — painel direito de áreas === */
#estr-right-panel {
    position: absolute;
    top: 14px; right: 14px; bottom: 14px;
    width: 340px;
    z-index: 500;
    background:
        linear-gradient(180deg,
          rgba(255, 255, 255, 0.32),
          rgba(255, 255, 255, 0.16) 30%,
          rgba(255, 255, 255, 0.22));
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 22px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    color: rgba(20, 20, 20, 0.88);
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.32, 1.4, 0.55, 1);
    overflow: hidden;
}
#estr-right-panel.collapsed {
    transform: translateX(calc(100% - 36px));
}
#estr-right-panel.collapsed > .estr-rp-filters,
#estr-right-panel.collapsed > .estr-rp-list,
#estr-right-panel.collapsed > .estr-rp-details {
    display: none;
}
#estr-right-panel.collapsed > .estr-rp-head h4 { display: none; }
#estr-right-panel.collapsed .estr-rp-collapse i { transform: rotate(180deg); }

.estr-rp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.estr-rp-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: rgba(20, 20, 20, 0.92);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.estr-rp-count {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.65);
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11px;
    margin-left: 6px;
}
.estr-rp-collapse {
    background: transparent; border: 0; cursor: pointer;
    color: rgba(0, 0, 0, 0.5);
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}
.estr-rp-collapse:hover { color: rgba(0,0,0,0.85); background: rgba(255,255,255,0.4); transform: scale(1.08); }
.estr-rp-collapse i { transition: transform 0.2s ease; }

.estr-rp-filters {
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex; flex-direction: column; gap: 10px;
}
.estr-rp-filters input {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 8px 12px;
    color: rgba(20, 20, 20, 0.9);
    font-size: 12px;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}
.estr-rp-filters input::placeholder { color: rgba(0, 0, 0, 0.4); }
.estr-rp-filters input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(80, 140, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(80, 140, 255, 0.15);
}
.estr-rp-chips {
    display: flex; flex-wrap: wrap; gap: 5px;
}
.estr-chip {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.7);
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.estr-chip:hover {
    transform: translateY(-1px) scale(1.04);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.estr-chip[data-active="1"] {
    background: linear-gradient(135deg, rgba(80,140,255,0.7), rgba(70,120,235,0.55));
    color: #fff;
    border-color: rgba(180, 210, 255, 0.7);
    box-shadow: 0 4px 12px rgba(80,140,255,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
}
.estr-chip-dot {
    width: 8px; height: 8px; border-radius: 99px; display: inline-block;
}

.estr-rp-list {
    flex: 1; overflow: auto;
    padding: 4px 0;
}
.estr-rp-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}
.estr-rp-item {
    display: grid;
    grid-template-columns: 6px 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.18s, transform 0.2s;
    color: rgba(20, 20, 20, 0.88);
}
.estr-rp-item:hover    { background: rgba(255, 255, 255, 0.32); transform: translateX(2px); }
.estr-rp-item.selected {
    background: linear-gradient(90deg, rgba(80,140,255,0.18), rgba(80,140,255,0.06));
    box-shadow: inset 3px 0 0 rgba(80,140,255,0.7);
}
.estr-rp-bullet {
    width: 8px; height: 8px; border-radius: 99px;
}
.estr-rp-item-name {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.estr-rp-item-sub {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.estr-rp-item-status { color: var(--text-muted); width: 14px; height: 14px; }
.estr-rp-item-btn {
    background: transparent; border: 0; cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--r-sm);
}
.estr-rp-item-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.estr-rp-details {
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    background: var(--bg-elevated);
    max-height: 50%;
    overflow: auto;
}
.estr-rp-details-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
}
.estr-rp-details-head h5 {
    margin: 0;
    font-size: 14px; font-weight: 800;
    color: var(--text-title);
    line-height: 1.2;
}
.estr-rp-pill {
    font-size: 10px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.estr-rp-meta {
    margin-top: 10px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    font-size: 11px;
}
.estr-rp-meta > div { display: flex; flex-direction: column; gap: 2px; }
.estr-rp-meta b { color: var(--text-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.estr-rp-meta span { color: var(--text-primary); font-weight: 600; }
.estr-rp-notas {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--bg-card);
    border-radius: var(--r-md);
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.estr-rp-metrics {
    margin-top: 10px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.estr-metric {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.estr-metric-wide {
    grid-column: 1 / -1;          /* ocupa as 2 colunas do grid */
}
.estr-metric-wide span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.estr-metric i {
    width: 18px; height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.estr-metric > div { display: flex; flex-direction: column; line-height: 1; }
.estr-metric b {
    font-size: 16px; font-weight: 800; color: var(--text-primary);
}
.estr-metric span {
    font-size: 10px; color: var(--text-muted); margin-top: 2px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.estr-rp-actions {
    margin-top: 12px;
    display: flex; gap: 6px;
    justify-content: flex-end;
}

/* Breakdown de lideranças dentro da área (point-in-polygon) — seção própria */
.estr-lid-section {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex; flex-direction: column;
    gap: 6px;
}
.estr-lid-section.estr-lid-empty {
    flex-direction: row; align-items: center;
    color: var(--text-muted);
    font-size: 11.5px;
    padding: 9px 12px;
}
.estr-lid-section.estr-lid-empty i {
    width: 16px; height: 16px;
    margin-right: 8px;
}
.estr-lid-section-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}
.estr-lid-section-title {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.estr-lid-section-total {
    font-size: 13px; font-weight: 800;
    color: var(--text-title);
    background: var(--bg-input);
    border-radius: 99px;
    padding: 1px 9px;
    min-width: 22px;
    text-align: center;
}
.estr-lid-row {
    display: grid;
    grid-template-columns: 8px 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    min-height: 22px;
}
.estr-lid-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.estr-lid-label {
    color: var(--text-primary); font-weight: 700;
    white-space: nowrap;
}
.estr-lid-num {
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 12px;
    text-align: right;
    min-width: 22px;
}
.estr-lid-names {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}
.estr-lid-expand {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 9px;
    font-size: 10.5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 700;
    justify-self: end;
    font-family: inherit;
}
.estr-lid-expand:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════
   Bloco de votos do TSE (point-in-polygon dentro do detalhe da área)
   ════════════════════════════════════════════════════════════ */
.estr-tse-section {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex; flex-direction: column;
    gap: 8px;
}
.estr-tse-section.estr-tse-empty {
    flex-direction: row; align-items: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 9px 12px;
    gap: 8px;
}
.estr-tse-section.estr-tse-empty i {
    width: 14px; height: 14px;
    flex-shrink: 0;
}
.estr-tse-section.estr-tse-empty code {
    background: var(--bg-input);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}
.estr-tse-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.estr-tse-title {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.estr-tse-secoes {
    font-size: 10px; font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 1px 7px;
    border-radius: 99px;
}
.estr-tse-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 5px 8px;
    color: var(--text-primary);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
}
.estr-tse-loading,
.estr-tse-empty-inner {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 12px 0;
}
.estr-tse-total {
    font-size: 16px; font-weight: 800;
    color: var(--text-title);
    text-align: center;
    padding: 2px 0 4px;
}
.estr-tse-total span {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 4px;
}
.estr-tse-row {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
}
.estr-tse-row:last-of-type { border-bottom: 0; }
.estr-tse-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}
.estr-tse-rank.top-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1f2937; }
.estr-tse-rank.top-2 { background: linear-gradient(135deg, #d1d5db, #9ca3af); color: #1f2937; }
.estr-tse-rank.top-3 { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }
.estr-tse-name b {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.estr-tse-name small {
    display: block;
    color: var(--text-muted);
    font-size: 9.5px;
    margin-top: 1px;
    letter-spacing: 0.02em;
}
.estr-tse-votes {
    text-align: right;
    white-space: nowrap;
}
.estr-tse-votes b {
    display: block;
    color: var(--text-title);
    font-weight: 800;
    font-size: 12px;
    line-height: 1.2;
}
.estr-tse-votes small {
    display: block;
    color: var(--primary);
    font-size: 9.5px;
    font-weight: 700;
    margin-top: 1px;
}
.estr-tse-more {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    padding-top: 4px;
}
.estr-tse-foot {
    display: flex; justify-content: space-between;
    gap: 6px;
    padding: 8px 0 2px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    color: var(--text-muted);
}
.estr-tse-foot b {
    color: var(--text-secondary);
    font-weight: 800;
    margin-left: 3px;
}

/* Lista de locais de votação dentro do polígono */
.estr-tse-locais-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.estr-tse-locais-head > span:first-child {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.estr-tse-locais-count {
    font-size: 11px; font-weight: 800;
    color: var(--text-title);
    background: var(--bg-input);
    padding: 1px 8px;
    border-radius: 99px;
    min-width: 22px;
    text-align: center;
}
.estr-tse-locais-list {
    display: flex; flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}
.estr-tse-local-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background 0.12s ease;
}
.estr-tse-local-item:hover {
    background: var(--bg-card-hover);
}
.estr-tse-local-info {
    flex: 1; min-width: 0;
}
.estr-tse-local-info b {
    display: block;
    font-size: 11.5px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.estr-tse-local-info small {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.estr-tse-local-ico {
    width: 12px; height: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.estr-tse-local-item:hover .estr-tse-local-ico {
    color: var(--primary);
}

/* ════════════════════════════════════════════════════════════
   Switcher de estilo de mapa (bottom-right do mapa)
   ════════════════════════════════════════════════════════════ */
/* === LIQUID GLASS — switcher Tema / Satélite / Escuro === */
#estr-mapstyle {
    position: absolute;
    left: 50%; bottom: 14px;
    transform: translateX(-50%);
    z-index: 500;
    background:
        linear-gradient(180deg,
          rgba(255, 255, 255, 0.34),
          rgba(255, 255, 255, 0.18));
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    padding: 6px;
    display: flex;
    gap: 4px;
}
.estr-mapstyle-btn {
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.1px;
    color: rgba(0, 0, 0, 0.78);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    overflow: hidden;
}
.estr-mapstyle-btn::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.08));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.estr-mapstyle-btn:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.estr-mapstyle-btn:hover::before { opacity: 1; }
.estr-mapstyle-btn[data-active="1"] {
    background: linear-gradient(135deg, rgba(80,140,255,0.7), rgba(70,120,235,0.55));
    color: #fff;
    border-color: rgba(180, 210, 255, 0.7);
    box-shadow: 0 6px 18px rgba(80,140,255,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.estr-mapstyle-btn[data-active="1"]::before { opacity: 0; }
.estr-mapstyle-btn i {
    width: 13px; height: 13px;
    position: relative; z-index: 1;
    stroke-width: 1.9;
}

/* ════════════════════════════════════════════════════════════
   Pingos modernos das lideranças (gradiente + sombra + ponto interno)
   ════════════════════════════════════════════════════════════ */
.estr-lid-pin {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.estr-lid-pin:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 12px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.08);
}
.estr-lid-pin-inner {
    width: 6px; height: 6px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
}
.estr-lid-pin-0 { background: linear-gradient(135deg, #7c8eff, #4257ff); }
.estr-lid-pin-1 { background: linear-gradient(135deg, #c4a8ff, #9476ff); }
.estr-lid-pin-2 { background: linear-gradient(135deg, #34d8a4, #06b88b); }
.estr-lid-pin-3 { background: linear-gradient(135deg, #b0b0b0, #6e6e6e); }

/* Glow sutil em todos os polígonos da feature */
.leaflet-overlay-pane svg path.leaflet-interactive {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
}

/* ════════════════════════════════════════════════════════════
   Pinos de locais de votação TSE (uma escola = um pino, várias urnas)
   ════════════════════════════════════════════════════════════ */
.estr-tse-pin {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.estr-tse-pin:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 14px rgba(245,158,11,0.55);
}
.estr-tse-pin-count {
    font-size: 10px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

/* Popup de local de votação */
.leaflet-popup.estr-local-popup-wrap .leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 0;
}
.leaflet-popup.estr-local-popup-wrap .leaflet-popup-content {
    margin: 0;
    width: 300px !important;
}
.leaflet-popup.estr-local-popup-wrap .leaflet-popup-tip {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.estr-local-popup {
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 8px;
}
.estr-local-popup-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.estr-local-popup-head b {
    display: block;
    font-size: 13px;
    color: var(--text-title);
    line-height: 1.25;
}
.estr-local-popup-head span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
    display: block;
}
.estr-local-popup-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 5px 8px;
    color: var(--text-primary);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
}
.estr-local-popup-loading,
.estr-local-popup-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 10px 0;
}
.estr-local-popup-total {
    text-align: center;
    padding: 2px 0;
}
.estr-local-popup-total b {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-title);
}
.estr-local-popup-total span {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 5px;
}
.estr-local-popup-row {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
}
.estr-local-popup-row:last-of-type { border-bottom: 0; }
.estr-local-popup-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}
.estr-local-popup-rank.top-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1f2937; }
.estr-local-popup-rank.top-2 { background: linear-gradient(135deg, #d1d5db, #9ca3af); color: #1f2937; }
.estr-local-popup-rank.top-3 { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }
.estr-local-popup-name b {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.estr-local-popup-name small {
    display: block;
    color: var(--text-muted);
    font-size: 9.5px;
    margin-top: 1px;
}
.estr-local-popup-votes {
    text-align: right;
    white-space: nowrap;
}
.estr-local-popup-votes b {
    display: block;
    font-weight: 800;
    color: var(--text-title);
    font-size: 12px;
    line-height: 1.2;
}
.estr-local-popup-votes small {
    display: block;
    color: var(--primary);
    font-size: 9.5px;
    margin-top: 1px;
    font-weight: 700;
}
.estr-local-popup-foot {
    border-top: 1px solid var(--border);
    padding-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}
.estr-local-popup-foot b {
    color: var(--text-secondary);
    font-weight: 800;
}

/* ════════════════════════════════════════════════════════════
   Modais (C5/C8/C9)
   ════════════════════════════════════════════════════════════ */
.estr-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.estr-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
}
.estr-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--border);
}
.estr-modal-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.02em;
}
.estr-modal-close {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: inline-flex;
    border-radius: var(--r-sm);
}
.estr-modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.estr-modal-body {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.estr-modal-foot {
    padding: 12px 24px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.estr-field { display: flex; flex-direction: column; gap: 6px; }
.estr-field > span {
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.estr-field > span i { color: var(--error); font-style: normal; }
.estr-field input, .estr-field select, .estr-field textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 11px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--t);
}
.estr-field input:focus, .estr-field select:focus, .estr-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.estr-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.estr-resp-toggle {
    display: inline-flex;
    background: var(--bg-input);
    border-radius: var(--r-md);
    padding: 2px;
    margin-bottom: 4px;
    width: fit-content;
}
.estr-resp-toggle button {
    background: transparent;
    border: 0;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--r-sm);
}
.estr-resp-toggle button.active {
    background: var(--bg-card);
    color: var(--primary);
}

.estr-suggestions {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-top: 4px;
    max-height: 200px;
    overflow: auto;
}
.estr-suggestions:empty { display: none; }
.estr-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 2px;
}
.estr-suggestion:last-child { border-bottom: 0; }
.estr-suggestion:hover { background: var(--bg-card-hover); }
.estr-suggestion b { font-size: 13px; color: var(--text-primary); }
.estr-suggestion span { font-size: 11px; color: var(--text-muted); }

.estr-btn {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--r-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--t);
    display: inline-flex; align-items: center; gap: 6px;
}
.estr-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.estr-btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.estr-btn-primary {
    background: var(--primary);
    color: white;
}
.estr-btn-primary:hover { background: var(--primary-dark); }
.estr-btn-danger {
    background: var(--error);
    color: white;
}
.estr-btn-danger:hover { background: var(--danger); filter: brightness(0.9); }
.estr-btn i { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════
   Tipos manager (C8)
   ════════════════════════════════════════════════════════════ */
.estr-tipo-header,
.estr-tipo-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 40px;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
}
.estr-tipo-header {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
.estr-tipo-row input[type="color"] {
    width: 50px; height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 2px;
    cursor: pointer;
}
.estr-tipo-row input[type="text"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 6px 9px;
    color: var(--text-primary);
    font-size: 13px;
}
.estr-tipo-del {
    background: transparent; border: 0; cursor: pointer;
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center;
}
.estr-tipo-del:hover { color: var(--error); background: var(--bg-card-hover); }

/* ════════════════════════════════════════════════════════════
   Export PNG (C9)
   ════════════════════════════════════════════════════════════ */
.estr-export-preview {
    background: var(--bg-card);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.estr-export-map {
    width: 100%; height: 380px;
}
.estr-export-card {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}
.estr-export-card-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px;
}
.estr-export-card-head h4 {
    margin: 0; font-size: 14px; font-weight: 700;
    color: var(--text-title);
    letter-spacing: -0.01em;
}
.estr-export-pill {
    font-size: 9px; font-weight: 700;
    padding: 2px 7px; border-radius: 99px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.estr-export-meta {
    font-size: 11px; color: var(--text-muted);
    margin-bottom: 10px;
    display: flex; gap: 14px;
    flex-wrap: wrap;
}
.estr-export-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.estr-export-stats > div {
    background: var(--bg-elevated);
    border-radius: var(--r-md);
    padding: 7px 8px;
    text-align: center;
}
.estr-export-stats b {
    display: block;
    font-size: 15px; font-weight: 800;
    color: var(--text-title);
    line-height: 1;
}
.estr-export-stats span {
    display: block;
    margin-top: 3px;
    font-size: 9px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.estr-export-detail {
    margin-top: 6px;
    padding: 6px 10px;
    background: var(--bg-elevated);
    border-radius: var(--r-md);
    font-size: 11px;
    line-height: 1.45;
}
.estr-export-detail b {
    display: inline-block;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 6px;
    vertical-align: middle;
}
.estr-export-detail span {
    color: var(--text-primary);
    font-weight: 500;
}
.estr-export-notas {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: var(--r-md);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════
   Toasts (C10)
   ════════════════════════════════════════════════════════════ */
#estr-toast-host {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 2000;
    display: flex; flex-direction: column; gap: 8px;
}
.estr-toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    font-size: 13px;
    color: var(--text-primary);
    transform: translateY(20px); opacity: 0;
    transition: var(--t);
    max-width: 320px;
}
.estr-toast.show { transform: translateY(0); opacity: 1; }
.estr-toast-error   { border-color: var(--error);   color: var(--error); }
.estr-toast-success { border-color: var(--success); color: var(--success); }
