.map-sidebar-copy {
    margin: 16px 0 0;
    color: var(--gray-500);
    font-size: 0.94rem;
}

.map-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    border: 1px solid rgba(30, 136, 229, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.07);
    font-size: 0.78rem;
    font-weight: 800;
}

.map-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--green-700);
    box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.14);
}

.map-workspace {
    position: relative;
    min-height: 480px;
    background: #dfe8f0;
    overflow: hidden;
}

.leaflet-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-height: 480px;
    background: #dfe8f0;
}

.leaflet-container {
    color: var(--gray-900);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.leaflet-interactive {
    cursor: pointer;
    transition: stroke-width 0.12s ease, fill-opacity 0.12s ease;
}

.leaflet-control-zoom {
    overflow: hidden;
    border: 1px solid rgba(217, 225, 234, 0.86) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 32px rgba(11, 31, 58, 0.14) !important;
}

.leaflet-control-zoom a {
    color: var(--blue-950) !important;
    border: 0 !important;
    font-weight: 800;
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(11, 31, 58, 0.18);
}

.leaflet-popup-content {
    margin: 14px 16px;
    color: var(--gray-900);
    font-size: 0.9rem;
}

.leaflet-popup-content strong {
    display: block;
    color: var(--blue-950);
    font-size: 1rem;
}

.map-popup-card {
    display: grid;
    gap: 8px;
    min-width: 148px;
}

.map-popup-card span {
    color: var(--gray-500);
    font-size: 0.82rem;
    font-weight: 700;
}

.map-popup-link {
    width: max-content;
    border: 0;
    padding: 0;
    color: var(--blue-700);
    background: transparent;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
}

.map-popup-link:hover {
    color: var(--blue-950);
}

.map-marker {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 10px;
    box-shadow: 0 12px 24px rgba(11, 31, 58, 0.24);
    transform: rotate(-45deg);
}

.map-marker::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
}

.map-marker-service {
    background: var(--blue-700);
}

.map-marker-notice {
    background: #f59e0b;
}

.map-marker-document {
    background: var(--blue-950);
}

.map-marker-denuncia {
    background: #c62828;
}

.map-floating-card {
    position: absolute;
    z-index: 410;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 44px rgba(11, 31, 58, 0.14);
    backdrop-filter: blur(14px);
}

.map-legend {
    top: 50%;
    right: 22px;
    left: auto;
    bottom: auto;
    display: none;
    gap: 9px;
    height: auto;
    max-height: none;
    min-width: 188px;
    padding: 16px;
    transform: translateY(-50%);
}

.map-legend.is-open {
    display: grid;
}

.map-legend strong {
    color: var(--blue-950);
    font-size: 0.92rem;
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 750;
}

.map-legend [data-legend-items] {
    display: grid;
    gap: 9px;
}

.legend-note {
    display: block;
    max-width: 220px;
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.legend {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.12);
}

.legend.regularizado {
    background: #2e7d32;
}

.legend.andamento {
    background: #f2c94c;
}

.legend.pendente {
    background: #d64545;
}

.map-legend-toggle {
    position: absolute;
    top: 50%;
    right: 22px;
    z-index: 420;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(217, 225, 234, 0.94);
    border-radius: 14px;
    color: #42526a;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.map-legend-toggle:hover,
.map-legend-toggle:focus-visible {
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(calc(-50% - 1px));
}

.map-legend-toggle.is-active {
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.1);
}

.map-legend-toggle span {
    width: 18px;
    height: 18px;
    background: currentColor;
    opacity: 0.88;
    -webkit-mask: var(--tool-icon) center / contain no-repeat;
    mask: var(--tool-icon) center / contain no-repeat;
}

.feature-panel {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 420;
    width: min(360px, calc(100% - 36px));
    max-height: calc(100% - 36px);
    overflow: auto;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 24px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 26px 70px rgba(11, 31, 58, 0.2);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(28px);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.feature-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.bi-drawer {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 415;
    width: min(380px, calc(100% - 36px));
    max-height: calc(100% - 36px);
    overflow: auto;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 24px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 26px 70px rgba(11, 31, 58, 0.18);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(28px);
    transition: transform 0.25s ease, opacity 0.25s ease, right 0.25s ease;
}

.bi-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.map-stage.has-feature-panel .bi-drawer.is-open {
    right: min(396px, calc(100% - 392px));
}

.bi-drawer-header h2 {
    margin: 16px 42px 10px 0;
    color: var(--blue-950);
    font-size: 1.45rem;
    line-height: 1.08;
}

.bi-drawer-header p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.92rem;
}

.bi-drawer-body {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.bi-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bi-card {
    padding: 16px;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
}

.bi-card span {
    display: block;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bi-card strong {
    display: block;
    margin-top: 6px;
    color: var(--blue-950);
    font-size: 1.55rem;
    line-height: 1.05;
}

.bi-card small {
    display: block;
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 0.8rem;
    line-height: 1.35;
}

.bi-section {
    display: grid;
    gap: 12px;
}

.bi-section h3 {
    margin: 0;
    color: var(--blue-950);
    font-size: 0.94rem;
}

.bi-bars {
    display: grid;
    gap: 10px;
}

.bi-bar {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 225, 234, 0.88);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bi-bar:hover,
.bi-bar.is-active {
    border-color: rgba(30, 136, 229, 0.28);
    box-shadow: 0 10px 24px rgba(11, 31, 58, 0.08);
    transform: translateY(-1px);
}

.bi-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--gray-900);
    font-size: 0.82rem;
    font-weight: 800;
}

.bi-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.95);
}

.bi-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.bi-rank-list {
    display: grid;
    gap: 10px;
}

.bi-rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 225, 234, 0.88);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--gray-900);
    font-size: 0.85rem;
    font-weight: 750;
}

.bi-rank-item strong {
    color: var(--blue-950);
}

.bi-footnote {
    color: var(--gray-500);
    font-size: 0.8rem;
    line-height: 1.45;
}

.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.panel-close::before,
.panel-close::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 10px;
    width: 14px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue-950);
}

.panel-close::before {
    transform: rotate(45deg);
}

.panel-close::after {
    transform: rotate(-45deg);
}

.panel-kicker {
    display: inline-flex;
    margin-right: 42px;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--blue-700);
    background: rgba(30, 136, 229, 0.08);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.feature-panel h3 {
    margin: 16px 42px 18px 0;
    color: var(--blue-950);
    font-size: 1.6rem;
    line-height: 1.08;
}

.panel-fields {
    display: grid;
    gap: 10px;
}

.panel-field {
    border: 1px solid rgba(217, 225, 234, 0.88);
    border-radius: 14px;
    padding: 13px 14px;
    background: #ffffff;
}

.panel-field span {
    display: block;
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.panel-field strong {
    display: block;
    color: var(--gray-900);
    font-size: 0.95rem;
    font-weight: 750;
}

.map-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 430;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 50px rgba(11, 31, 58, 0.16);
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.map-loading.is-hidden {
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px));
    pointer-events: none;
}

.map-loading span {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(30, 136, 229, 0.2);
    border-top-color: var(--blue-700);
    border-radius: 50%;
    animation: rd-spin 780ms linear infinite;
}

@keyframes rd-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rd-skeleton-sweep {
    from {
        background-position: -220px 0, 0 0, 0 0, 0 0;
    }

    to {
        background-position: calc(100vw + 220px) 0, 0 0, 0 0, 0 0;
    }
}

@media (max-width: 980px) {
    .map-workspace,
    .leaflet-map {
        min-height: 580px;
    }

    .map-section .map-workspace,
    .map-section .leaflet-map {
        min-height: 480px;
    }
}

@media (max-width: 680px) {
    .map-workspace,
    .leaflet-map {
        min-height: 560px;
    }

    .map-section .map-workspace,
    .map-section .leaflet-map {
        min-height: 480px;
    }

    .map-legend {
        top: auto;
        right: 14px;
        bottom: 70px;
        transform: none;
        min-width: 160px;
        padding: 13px;
    }

    .feature-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        max-height: 62%;
        transform: translateY(28px);
    }

    .feature-panel.is-open {
        transform: translateY(0);
    }

    .bi-drawer {
        top: auto;
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        max-height: 62%;
        transform: translateY(28px);
    }

    .bi-drawer.is-open {
        transform: translateY(0);
    }

    .map-stage.has-feature-panel .bi-drawer.is-open {
        right: 12px;
    }

    .bi-cards {
        grid-template-columns: 1fr;
    }
}

.legend.indefinido {
    background: #6b7280;
}

.legend.revenue-low {
    background: #2e7d32;
}

.legend.revenue-medium {
    background: #f9a825;
}

.legend.revenue-high {
    background: #c62828;
}

body.page-map,
body.map-app-page {
    height: 100vh;
    background: #eef2f6;
    overflow: hidden;
}

html:has(body.map-app-page) {
    height: 100%;
    overflow: hidden;
}

.map-app-page .site-shell {
    height: 100vh;
    overflow: hidden;
}

.map-app-page .site-header {
    background: rgba(255, 255, 255, 0.94);
}

.map-app {
    height: 100vh;
    padding-top: 64px;
}

.map-container,
.map-stage {
    position: fixed;
    inset: 0;
    top: 64px;
    width: 100vw;
    height: calc(100vh - 64px);
    background: #dfe8f0;
}

.map-stage.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 405;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent),
        linear-gradient(90deg, rgba(11, 31, 58, 0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(11, 31, 58, 0.05) 1px, transparent 1px),
        rgba(245, 247, 250, 0.24);
    background-size: 220px 100%, 48px 48px, 48px 48px, cover;
    animation: rd-skeleton-sweep 1.1s linear infinite;
    backdrop-filter: blur(2px);
}

.map-app-canvas,
.map-stage > .leaflet-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-height: 0;
    height: 100%;
}

.map-commandbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.map-commandbar > * {
    pointer-events: auto;
}

.map-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(420px, calc(100vw - 470px));
    min-height: 50px;
    border: 1px solid rgba(217, 225, 234, 0.94);
    border-radius: 18px;
    padding: 0 12px 0 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 46px rgba(11, 31, 58, 0.14);
    backdrop-filter: blur(18px);
}

.map-search span {
    width: 15px;
    height: 15px;
    border: 2px solid var(--blue-950);
    border-radius: 50%;
    position: relative;
}

.map-search span::after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: -5px;
    width: 8px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue-950);
    transform: rotate(45deg);
}

.map-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--blue-950);
    background: transparent;
    font-weight: 700;
}

.map-search button {
    position: relative;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: rgba(11, 31, 58, 0.06);
    cursor: pointer;
}

.map-search button::before,
.map-search button::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 8px;
    width: 14px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue-950);
}

.map-search button::before {
    transform: rotate(45deg);
}

.map-search button::after {
    transform: rotate(-45deg);
}

.map-filterbar,
.map-layer-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(217, 225, 234, 0.94);
    border-radius: 12px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.map-filterbar button,
.map-layer-toolbar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    border: 0;
    border-radius: 12px;
    padding: 0 11px;
    color: #42526a;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 850;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.map-layer-toolbar button {
    transition: opacity 0.18s ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.map-filterbar button:hover,
.map-layer-toolbar button:hover {
    transform: translateY(-1px);
}

.map-filterbar button.is-active,
.map-layer-toolbar button.is-active {
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.1);
}

.map-filterbar strong {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-950);
    font-size: 0.72rem;
}

.map-layer-toolbar {
    position: absolute;
    left: 68px;
    bottom: 24px;
    z-index: 10;
    display: none;
    flex-direction: row;
    max-width: calc(100vw - 92px);
    overflow: visible;
}

.map-layer-toolbar.is-open {
    display: flex;
}

.map-layer-toolbar button {
    position: relative;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    padding: 0;
}

.map-layer-toolbar button span {
    width: 18px;
    height: 18px;
    border-radius: 0;
    background: currentColor;
    opacity: 0.82;
    -webkit-mask: var(--tool-icon) center / contain no-repeat;
    mask: var(--tool-icon) center / contain no-repeat;
    transition: opacity 160ms ease, transform 160ms ease;
}

.map-layer-toolbar button.is-active span {
    background: currentColor;
    box-shadow: none;
    opacity: 1;
}

.map-layer-toolbar button:hover span,
.map-layer-toolbar button:focus-visible span {
    transform: scale(1.06);
}

.map-tools-toggle,
.map-legend-toggle {
    position: absolute;
    z-index: 420;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(217, 225, 234, 0.94);
    border-radius: 14px;
    color: #42526a;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.map-tools-toggle {
    left: 16px;
    bottom: 24px;
}

.map-tools-toggle:hover,
.map-tools-toggle:focus-visible,
.map-legend-toggle:hover,
.map-legend-toggle:focus-visible {
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
}

.map-tools-toggle.is-active,
.map-legend-toggle.is-active {
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.1);
}

.map-tools-toggle span,
.map-legend-toggle span {
    width: 18px;
    height: 18px;
    background: currentColor;
    opacity: 0.88;
    -webkit-mask: var(--tool-icon) center / contain no-repeat;
    mask: var(--tool-icon) center / contain no-repeat;
}

.map-layer-toolbar button::after,
.map-tools-toggle::after,
.map-legend-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 40;
    width: max-content;
    max-width: 190px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.96);
    background: rgba(18, 22, 28, 0.78);
    box-shadow: 0 16px 34px rgba(11, 31, 58, 0.22);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px) scale(0.96);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

.map-layer-toolbar button::after {
    left: calc(100% + 12px);
    bottom: 50%;
    transform: translateX(0) translateY(50%) scale(0.96);
}

.map-layer-toolbar button::before,
.map-tools-toggle::before,
.map-legend-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    z-index: 41;
    width: 9px;
    height: 9px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(18, 22, 28, 0.78);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px) rotate(45deg) scale(0.96);
    transition: opacity 140ms ease, transform 140ms ease;
}

.map-layer-toolbar button::before {
    left: calc(100% + 7px);
    bottom: 50%;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    transform: translateX(0) translateY(50%) rotate(45deg) scale(0.96);
}

.map-layer-toolbar button:hover::before,
.map-layer-toolbar button:hover::after,
.map-layer-toolbar button:focus-visible::before,
.map-layer-toolbar button:focus-visible::after,
.map-tools-toggle:hover::before,
.map-tools-toggle:hover::after,
.map-tools-toggle:focus-visible::before,
.map-tools-toggle:focus-visible::after,
.map-legend-toggle:hover::before,
.map-legend-toggle:hover::after,
.map-legend-toggle:focus-visible::before,
.map-legend-toggle:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.map-layer-toolbar button:hover::after,
.map-layer-toolbar button:focus-visible::after {
    transform: translateX(0) translateY(50%) scale(1);
}

.map-layer-toolbar button:hover::before,
.map-layer-toolbar button:focus-visible::before,
.map-tools-toggle:hover::before,
.map-tools-toggle:focus-visible::before,
.map-legend-toggle:hover::before,
.map-legend-toggle:focus-visible::before {
    transform: translateX(-50%) translateY(0) rotate(45deg) scale(1);
}

.map-layer-toolbar button:hover::before,
.map-layer-toolbar button:focus-visible::before {
    transform: translateX(0) translateY(50%) rotate(45deg) scale(1);
}

[data-tool-icon="lots"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 7.5 9 4l6 3.5 6-3.2v12.2L15 20l-6-3.5L3 19.7V7.5Zm7 7.3 4 2.3V9.2l-4-2.3v7.9Zm-2 0V6.9L5 8.6v7.9l3-1.7Zm8 2.3 3-1.7V7.6l-3 1.6v7.9Z'/%3E%3C/svg%3E");
}

[data-tool-icon="tools"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h7v7H4V5Zm9 0h7v7h-7V5ZM4 14h7v7H4v-7Zm9 0h7v7h-7v-7Zm-7-7v3h3V7H6Zm9 0v3h3V7h-3ZM6 16v3h3v-3H6Zm9 0v3h3v-3h-3Z'/%3E%3C/svg%3E");
}

[data-tool-icon="services"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 10h14l-1.2 9.2A2 2 0 0 1 15.8 21H8.2a2 2 0 0 1-2-1.8L5 10Zm3-6h8l2 4H6l2-4Zm1.2 2-.8 2h7.2l-.8-2H9.2ZM9 13v5h2v-5H9Zm4 0v5h2v-5h-2Z'/%3E%3C/svg%3E");
}

[data-tool-icon="notices"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10.5 17 5v14L4 13.5v-3Zm14.5-2.3 2-1.4v10.4l-2-1.4V8.2ZM6 11.8v.4l9 3.8V8l-9 3.8ZM7 15l4 1.7V19H8.5L7 15Z'/%3E%3C/svg%3E");
}

[data-tool-icon="documents"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h8l5 5v13H6V3Zm8 1.8V9h4.2L14 4.8ZM8 11v2h8v-2H8Zm0 4v2h8v-2H8Z'/%3E%3C/svg%3E");
}

[data-tool-icon="denuncias"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 2.8 20h18.4L12 2Zm0 5 1 7h-2l1-7Zm0 11.4a1.4 1.4 0 1 1 0-2.8 1.4 1.4 0 0 1 0 2.8Z'/%3E%3C/svg%3E");
}

[data-tool-icon="cluster"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 4a4 4 0 0 1 3.5 5.9l2.6 2.6A4 4 0 1 1 12.7 14l-2.6-2.6A4 4 0 1 1 8 4Zm9 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM8 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6 15a3 3 0 1 1-3 3 3 3 0 0 1 3-3Z'/%3E%3C/svg%3E");
}

[data-tool-icon="heatmap"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a7 7 0 0 1-7-7c0-3.4 2.1-5.9 4.2-8.2C10.4 5.4 11.6 4 12 2c3.4 2.2 6.8 5.7 6.8 11.4A6.8 6.8 0 0 1 12 22Zm.6-3a3.2 3.2 0 0 0 3.2-3.2c0-2.2-1.3-3.6-2.8-5.1-.2 1.3-.9 2.3-1.7 3.2-.8.9-1.5 1.8-1.5 3A2.8 2.8 0 0 0 12.6 19Z'/%3E%3C/svg%3E");
}

[data-tool-icon="revenue"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h16v2H4v-2Zm2-8h3v6H6v-6Zm5-6h3v12h-3V5Zm5 3h3v9h-3V8Zm-3-6 6 3-6 3V6H5V4h8V2Z'/%3E%3C/svg%3E");
}

[data-tool-icon="analysis"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Zm-7-7v3h3V6H6Zm9 0v3h3V6h-3ZM6 15v3h3v-3H6Zm9 0v3h3v-3h-3Z'/%3E%3C/svg%3E");
}

[data-tool-icon="bi"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v16H4V4Zm3 11v2h10v-2H7Zm0-4v2h6v-2H7Zm0-4v2h10V7H7Zm12 10V7h-2v10h2Z'/%3E%3C/svg%3E");
}

[data-tool-icon="editor"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 17.2V20h2.8L17.9 8.9l-2.8-2.8L4 17.2ZM19.2 7.6l1.1-1.1a1.5 1.5 0 0 0 0-2.1l-.7-.7a1.5 1.5 0 0 0-2.1 0l-1.1 1.1 2.8 2.8ZM4 4h8v2H6v6H4V4Zm14 8h2v8h-8v-2h6v-6Z'/%3E%3C/svg%3E");
}

[data-tool-icon="basemap"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 3 9 5-9 5-9-5 9-5Zm0 12 7.2-4 1.8 1-9 5-9-5 1.8-1 7.2 4Zm0 4 7.2-4 1.8 1-9 5-9-5 1.8-1 7.2 4Z'/%3E%3C/svg%3E");
}

[data-tool-icon="reset"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a9 9 0 1 1-8.7 11.3h2.2A7 7 0 1 0 7 7.8V11H3V4h2v2.2A9 9 0 0 1 12 3Zm1 5v5h4v2h-6V8h2Z'/%3E%3C/svg%3E");
}

[data-tool-icon="legend"] {
    --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v14H4V5Zm2 2v10h12V7H6Zm2 2h3v3H8V9Zm5 .5h3v1.8h-3V9.5ZM8 14h3v1.8H8V14Zm5 0h3v1.8h-3V14Z'/%3E%3C/svg%3E");
}

[data-analysis-toggle].is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #0b1f3a, #1e88e5);
}

[data-analysis-toggle].is-active span,
[data-heat-toggle].is-active span,
[data-revenue-toggle].is-active span,
[data-cluster-toggle].is-active span,
[data-basemap-toggle].is-active span {
    background: currentColor !important;
    box-shadow: none;
}

.basemap-panel {
    left: 76px;
    bottom: 24px;
    z-index: 430;
    display: none;
    width: min(560px, calc(100vw - 32px));
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 9px;
    padding: 10px;
}

.basemap-panel.is-open {
    display: grid;
}

.basemap-card {
    display: grid;
    gap: 7px;
    min-height: 116px;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 12px;
    padding: 8px;
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.geometry-editor-panel {
    left: 76px;
    bottom: 24px;
    z-index: 435;
    display: none;
    width: min(360px, calc(100vw - 96px));
    gap: 12px;
    padding: 14px;
}

.geometry-editor-panel.is-open {
    display: grid;
}

.geometry-editor-panel header {
    display: grid;
    gap: 2px;
    padding-right: 34px;
    position: relative;
}

.geometry-editor-panel header span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.geometry-editor-panel header strong {
    color: var(--blue-950);
    font-size: 1rem;
}

.geometry-editor-panel header button {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    cursor: pointer;
}

.geometry-editor-panel header button::before,
.geometry-editor-panel header button::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 8px;
    width: 14px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue-950);
}

.geometry-editor-panel header button::before {
    transform: rotate(45deg);
}

.geometry-editor-panel header button::after {
    transform: rotate(-45deg);
}

.geometry-editor-panel label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 850;
}

.geometry-editor-panel select,
.geometry-editor-panel input {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 12px;
    padding: 0 11px;
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
}

.geometry-editor-actions {
    display: grid;
    grid-template-columns: repeat(5, 40px);
    gap: 8px;
}

.geometry-editor-actions button,
.geometry-editor-footer button {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.1);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.geometry-editor-actions button span,
.geometry-editor-footer button span {
    width: 18px;
    height: 18px;
    background: currentColor;
    opacity: 0.86;
    -webkit-mask: var(--editor-action-icon) center / contain no-repeat;
    mask: var(--editor-action-icon) center / contain no-repeat;
    transition: opacity 160ms ease, transform 160ms ease;
}

.geometry-editor-actions button:hover,
.geometry-editor-actions button.is-active,
.geometry-editor-footer button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #0b1f3a, #1e88e5);
}

.geometry-editor-actions button:hover,
.geometry-editor-actions button:focus-visible,
.geometry-editor-footer button:hover,
.geometry-editor-footer button:focus-visible {
    transform: translateY(-1px);
}

.geometry-editor-actions button:hover span,
.geometry-editor-actions button:focus-visible span,
.geometry-editor-actions button.is-active span,
.geometry-editor-footer button:hover span,
.geometry-editor-footer button:focus-visible span {
    opacity: 1;
    transform: scale(1.06);
}

.geometry-editor-actions button::after,
.geometry-editor-footer button::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 50;
    width: max-content;
    max-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.96);
    background: rgba(18, 22, 28, 0.78);
    box-shadow: 0 16px 34px rgba(11, 31, 58, 0.22);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px) scale(0.96);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

.geometry-editor-actions button::before,
.geometry-editor-footer button::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    z-index: 51;
    width: 9px;
    height: 9px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(18, 22, 28, 0.78);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px) rotate(45deg) scale(0.96);
    transition: opacity 140ms ease, transform 140ms ease;
}

.geometry-editor-actions button:hover::before,
.geometry-editor-actions button:hover::after,
.geometry-editor-actions button:focus-visible::before,
.geometry-editor-actions button:focus-visible::after,
.geometry-editor-footer button:hover::before,
.geometry-editor-footer button:hover::after,
.geometry-editor-footer button:focus-visible::before,
.geometry-editor-footer button:focus-visible::after {
    opacity: 1;
}

.geometry-editor-actions button:hover::after,
.geometry-editor-actions button:focus-visible::after,
.geometry-editor-footer button:hover::after,
.geometry-editor-footer button:focus-visible::after {
    transform: translateX(-50%) translateY(0) scale(1);
}

.geometry-editor-actions button:hover::before,
.geometry-editor-actions button:focus-visible::before,
.geometry-editor-footer button:hover::before,
.geometry-editor-footer button:focus-visible::before {
    transform: translateX(-50%) translateY(0) rotate(45deg) scale(1);
}

[data-editor-icon="free"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 18.5c2.7-5 5.2-6.2 7.6-3.8 1.3 1.3 2.1 1 3.1-.8l1.8-3.3c1.1-2 2.4-2.5 3.8-1.4l1.2 1-1.3 1.5-1.2-1c-.3-.2-.6 0-.9.6L16.4 15c-1.8 3.3-4.1 3.8-6.2 1.6-1.3-1.3-2.8-.2-4.5 3L4 18.5ZM15.2 4.9l2.9-2.9 3.9 3.9-2.9 2.9-3.9-3.9ZM13.8 6.3l3.9 3.9-6.2 6.2H7.6v-3.9l6.2-6.2Z'/%3E%3C/svg%3E");
}

[data-editor-icon="straight"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 17.6 17.6 5 19 6.4 6.4 19 5 17.6ZM4 15a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16-10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
}

[data-editor-icon="perpendicular"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 19V5h2v12h12v2H5Zm6-5V8h2v4h4v2h-6Z'/%3E%3C/svg%3E");
}

[data-editor-icon="point"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a7 7 0 0 1 7 7c0 5.2-7 13-7 13S5 14.2 5 9a7 7 0 0 1 7-7Zm0 4.8a2.2 2.2 0 1 0 0 4.4 2.2 2.2 0 0 0 0-4.4Z'/%3E%3C/svg%3E");
}

[data-editor-icon="undo"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 7h6.5a5.5 5.5 0 1 1 0 11H8v-2h7.5a3.5 3.5 0 1 0 0-7H9v4L3 8l6-5v4Z'/%3E%3C/svg%3E");
}

[data-editor-icon="redo"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M15 7H8.5a5.5 5.5 0 1 0 0 11H16v-2H8.5a3.5 3.5 0 1 1 0-7H15v4l6-5-6-5v4Z'/%3E%3C/svg%3E");
}

[data-editor-icon="close-shape"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h10l5 8-5 8H7l-5-8 5-8Zm1.1 2-3.7 6 3.7 6h7.8l3.7-6-3.7-6H8.1Zm2.9 5V8h2v3h3v2h-5Z'/%3E%3C/svg%3E");
}

[data-editor-icon="snap"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h4v8a2 2 0 0 0 4 0V3h4v8a6 6 0 0 1-12 0V3Zm2 2v3h2V5H8Zm6 0v3h2V5h-2ZM4 19h16v2H4v-2Z'/%3E%3C/svg%3E");
}

[data-editor-icon="edit"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 17.2V20h2.8L18.6 8.2l-2.8-2.8L4 17.2Zm15.9-10.3 1-1a1.4 1.4 0 0 0 0-2l-.8-.8a1.4 1.4 0 0 0-2 0l-1 1 2.8 2.8Z'/%3E%3C/svg%3E");
}

[data-editor-icon="delete"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 4h8l1 2h4v2H3V6h4l1-2Zm-2 6h12l-1 11H7L6 10Zm3 2 .4 7h1.8l-.3-7H9Zm4 0-.3 7h1.8l.4-7H13Z'/%3E%3C/svg%3E");
}

[data-editor-icon="save"] {
    --editor-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h12l2 2v16H5V3Zm3 2v5h8V5H8Zm0 10v4h8v-4H8Zm2-10v3h4V5h-4Z'/%3E%3C/svg%3E");
}

.geometry-editor-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.geometry-editor-footer span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.3;
}

.geometry-editor-marker span {
    display: block;
    width: 22px;
    height: 22px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: var(--editor-color, #1e88e5);
    box-shadow: 0 10px 22px rgba(11, 31, 58, 0.2);
}

.geometry-editor-tooltip {
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 12px 28px rgba(11, 31, 58, 0.2);
    backdrop-filter: blur(14px);
    font-weight: 800;
}

.basemap-card:hover,
.basemap-card.is-active {
    border-color: rgba(30, 136, 229, 0.48);
    box-shadow: 0 10px 24px rgba(11, 31, 58, 0.12);
    transform: translateY(-1px);
}

.basemap-card.is-active {
    background: rgba(30, 136, 229, 0.08);
}

.basemap-card strong {
    font-size: 0.82rem;
    line-height: 1.05;
}

.basemap-card small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.2;
}

.basemap-preview {
    display: block;
    height: 48px;
    border: 1px solid rgba(11, 31, 58, 0.1);
    border-radius: 9px;
    overflow: hidden;
}

.basemap-preview.is-positron {
    background:
        linear-gradient(28deg, transparent 45%, rgba(148, 163, 184, 0.6) 46%, rgba(148, 163, 184, 0.6) 50%, transparent 51%),
        linear-gradient(90deg, rgba(226, 232, 240, 0.88) 1px, transparent 1px),
        linear-gradient(0deg, rgba(226, 232, 240, 0.88) 1px, transparent 1px),
        #f8fafc;
    background-size: 100% 100%, 19px 19px, 19px 19px, auto;
}

.basemap-preview.is-osm {
    background:
        linear-gradient(130deg, transparent 34%, rgba(59, 130, 246, 0.35) 35%, rgba(59, 130, 246, 0.35) 43%, transparent 44%),
        linear-gradient(40deg, transparent 46%, rgba(234, 179, 8, 0.42) 47%, rgba(234, 179, 8, 0.42) 54%, transparent 55%),
        linear-gradient(90deg, rgba(203, 213, 225, 0.9) 1px, transparent 1px),
        #eef7ef;
    background-size: 100% 100%, 100% 100%, 18px 18px, auto;
}

.basemap-preview.is-voyager {
    background:
        linear-gradient(115deg, transparent 39%, rgba(14, 165, 233, 0.36) 40%, rgba(14, 165, 233, 0.36) 48%, transparent 49%),
        linear-gradient(0deg, rgba(251, 146, 60, 0.3) 2px, transparent 2px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.52) 1px, transparent 1px),
        #fff7ed;
    background-size: 100% 100%, 22px 22px, 22px 22px, auto;
}

.basemap-preview.is-satellite {
    background:
        radial-gradient(circle at 24% 35%, rgba(190, 242, 100, 0.38), transparent 28%),
        radial-gradient(circle at 72% 62%, rgba(22, 101, 52, 0.5), transparent 30%),
        linear-gradient(130deg, rgba(120, 113, 108, 0.9), rgba(41, 37, 36, 0.92));
}

.basemap-preview.is-topo {
    background:
        repeating-radial-gradient(circle at 38% 56%, rgba(120, 113, 108, 0.56) 0 1px, transparent 1px 7px),
        linear-gradient(135deg, #fef3c7, #bbf7d0 55%, #bfdbfe);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(30, 136, 229, 0.22);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    color: #ffffff;
    background: linear-gradient(135deg, #0b1f3a, #1e88e5);
    font-weight: 900;
}

.map-app-legend {
    left: auto;
    right: 74px;
    top: 50%;
    bottom: auto;
    z-index: 10;
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
}

.map-kpi-bar {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
    width: min(620px, calc(100vw - 540px));
    transform: translateX(-50%);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.map-kpi-card {
    padding: 12px 14px;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.map-kpi-card span {
    display: block;
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.map-kpi-card strong {
    display: block;
    margin-top: 6px;
    color: var(--blue-950);
    font-size: 1.32rem;
    line-height: 1;
}

.map-executive-insight {
    position: absolute;
    top: 100px;
    right: 16px;
    z-index: 10;
    width: min(320px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(11, 31, 58, 0.12);
    backdrop-filter: blur(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.map-insight-label {
    display: inline-flex;
    color: var(--blue-700);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.map-executive-insight strong {
    display: block;
    margin-top: 10px;
    color: var(--blue-950);
    font-size: 1.05rem;
}

.map-executive-insight p {
    margin: 8px 0 0;
    color: var(--gray-500);
    font-size: 0.88rem;
    line-height: 1.45;
}

.operational-panel {
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: min(430px, calc(100% - 36px));
    max-height: none;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.operational-panel .panel-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(217, 225, 234, 0.9);
    background: rgba(255, 255, 255, 0.96);
}

.operational-panel .panel-header h2 {
    margin: 14px 44px 6px 0;
    color: var(--blue-950);
    font-size: 1.65rem;
    line-height: 1.08;
}

.operational-panel .panel-header p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.panel-body {
    overflow: auto;
    padding: 18px 22px 22px;
}

.panel-section {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-section h3 {
    margin: 0;
    color: var(--blue-950);
    font-size: 0.95rem;
}

.panel-summary {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.panel-summary strong {
    color: #26364c;
    line-height: 1.35;
}

.status-badge {
    display: inline-flex;
    width: max-content;
    border-radius: 999px;
    padding: 6px 10px;
    color: #334155;
    background: #eef2f6;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.status-regularizado {
    color: #1f5f25;
    background: rgba(46, 125, 50, 0.12);
}

.status-andamento {
    color: #8a6100;
    background: rgba(249, 168, 37, 0.17);
}

.status-pendente {
    color: #9d1f1f;
    background: rgba(198, 40, 40, 0.12);
}

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

.timeline {
    display: grid;
    gap: 10px;
}

.timeline span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-500);
    font-size: 0.88rem;
    font-weight: 750;
}

.timeline i {
    width: 14px;
    height: 14px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
}

.timeline .is-done {
    color: var(--blue-950);
}

.timeline .is-done i {
    border-color: var(--green-700);
    background: var(--green-700);
    box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.12);
}

.lot-timeline-feed {
    display: grid;
    gap: 12px;
}

.timeline-feed-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
}

.timeline-feed-item i {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--blue-700);
    box-shadow: 0 0 0 6px rgba(30, 136, 229, 0.1);
}

.timeline-feed-item.timeline-regularizado i {
    background: #2e7d32;
    box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.12);
}

.timeline-feed-item.timeline-pendente i {
    background: #c62828;
    box-shadow: 0 0 0 6px rgba(198, 40, 40, 0.1);
}

.timeline-feed-item.timeline-analise i,
.timeline-feed-item.timeline-andamento i {
    background: #f9a825;
    box-shadow: 0 0 0 6px rgba(249, 168, 37, 0.14);
}

.timeline-feed-item.timeline-validacao i {
    background: #7c3aed;
    box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12);
}

.timeline-feed-item span,
.timeline-feed-item small,
.lot-document-card span {
    color: var(--gray-500);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-feed-item strong,
.lot-document-card strong {
    display: block;
    margin-top: 4px;
    color: var(--blue-950);
}

.timeline-feed-item p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 0.88rem;
}

.lot-documents-list {
    display: grid;
    gap: 10px;
}

.lot-document-card {
    display: block;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 15px;
    padding: 13px;
    background: #ffffff;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.lot-document-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(11, 31, 58, 0.08);
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.panel-btn {
    min-height: 40px;
    border: 1px solid rgba(217, 225, 234, 0.96);
    border-radius: 13px;
    padding: 0 13px;
    color: var(--blue-950);
    background: #ffffff;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 850;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.panel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(11, 31, 58, 0.1);
}

.panel-btn-primary {
    color: var(--white);
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}

.panel-btn-danger {
    color: #9d1f1f;
    background: rgba(198, 40, 40, 0.08);
}

.service-list,
.result-list {
    display: grid;
    gap: 12px;
}

.service-card,
.result-list button,
.empty-state {
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 18px;
    padding: 15px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.service-card {
    display: grid;
    gap: 10px;
}

.service-card strong,
.empty-state strong,
.result-list strong {
    display: block;
    color: var(--blue-950);
}

.service-card span,
.service-card p,
.empty-state p,
.result-list span {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.86rem;
}

.result-list button {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.service-form {
    display: grid;
    gap: 12px;
}

.service-form label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.service-form input,
.service-form textarea {
    width: 100%;
    border: 1px solid rgba(217, 225, 234, 0.98);
    border-radius: 13px;
    padding: 11px 12px;
    color: var(--blue-950);
    background: #ffffff;
    outline: 0;
    font-size: 0.94rem;
    font-weight: 650;
    text-transform: none;
}

.service-form input:focus,
.service-form textarea:focus {
    border-color: rgba(30, 136, 229, 0.5);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}

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

.check-row {
    display: flex !important;
    align-items: center;
    grid-template-columns: none;
    flex-direction: row;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.toast-stack {
    position: absolute;
    top: 88px;
    left: 18px;
    z-index: 500;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.toast {
    border: 1px solid rgba(217, 225, 234, 0.92);
    border-left: 4px solid var(--green-700);
    border-radius: 15px;
    padding: 13px 14px;
    color: var(--blue-950);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(11, 31, 58, 0.16);
    font-size: 0.9rem;
    font-weight: 800;
    opacity: 0;
    transform: translateX(-14px) translateY(-4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(-14px) translateY(-4px);
}

.toast-error {
    border-left-color: #c62828;
}

.map-marker.is-selected {
    outline: 4px solid rgba(11, 31, 58, 0.24);
    box-shadow: 0 18px 34px rgba(11, 31, 58, 0.32);
}

.hidden {
    display: none !important;
}

.map-onboarding {
    position: absolute;
    inset: 0;
    top: 140px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 32px;
    transform: translateY(-30px);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.25);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.map-overlay {
    background: rgba(255, 255, 255, 0.25);
}

.onboarding-card {
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 28px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #0b1f3a, #1976d2);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 60px 120px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
    pointer-events: all;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInScale 0.4s ease forwards;
    transition: all 0.3s ease;
}

.onboarding-label {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 1px;
    font-weight: 800;
}

.onboarding-hint {
    display: block;
    margin: 8px 0 0;
    font-size: 12px;
    opacity: 0.7;
}

.onboarding-card h2 {
    margin: 12px 0;
    font-size: 34px;
    line-height: 1;
}

.onboarding-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
}

.onboarding-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.onboarding-actions button {
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.onboarding-actions button:hover {
    transform: translateY(-1px);
}

.onboarding-actions .btn-primary {
    background: linear-gradient(135deg, #0b1f3a, #1e88e5);
}

.onboarding-actions .btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.onboarding-actions .btn-primary {
    color: #0b1f3a;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.14);
}

.onboarding-actions .btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-welcome-overlay {
    position: absolute;
    inset: 0;
    z-index: 690;
    display: flex;
    align-items: center;
    padding: 92px 40px 40px;
    background:
        linear-gradient(90deg, rgba(11, 31, 58, 0.58), rgba(11, 31, 58, 0.2) 48%, rgba(11, 31, 58, 0.04)),
        radial-gradient(circle at 18% 45%, rgba(30, 136, 229, 0.28), transparent 28rem);
    opacity: 1;
    pointer-events: none;
    transition: opacity 260ms ease, visibility 260ms ease;
    backdrop-filter: blur(4px);
}

.map-welcome-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.map-welcome-card {
    width: min(520px, calc(100vw - 32px));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 36px);
    color: #ffffff;
    background: rgba(11, 31, 58, 0.78);
    box-shadow: 0 30px 90px rgba(11, 31, 58, 0.32);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.map-welcome-card .eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.map-welcome-card h1 {
    margin: 16px 0 14px;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.92;
    letter-spacing: 0;
}

.map-welcome-card p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.map-welcome-card .btn {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, #1e88e5, #1268b8 54%, #2e7d32);
    box-shadow: 0 20px 48px rgba(30, 136, 229, 0.28), 0 18px 42px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1120px) {
    .map-commandbar {
        right: auto;
    }

    .map-search {
        width: min(420px, calc(100vw - 360px));
    }

    .map-app-legend {
        right: 74px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .map-kpi-bar {
        left: 16px;
        width: calc(100vw - 460px);
        transform: none;
    }

    .operational-panel {
        width: min(410px, calc(100% - 36px));
    }
}

@media (max-width: 760px) {
    body.page-map,
    body.map-app-page {
        overflow: hidden;
    }

    .map-app {
        padding-top: 64px;
    }

    .map-stage {
        position: fixed;
        inset: 0;
        top: 64px;
        height: calc(100vh - 64px);
    }

    .map-commandbar {
        top: 16px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
        gap: 8px;
    }

    .map-search {
        width: 100%;
        min-height: 48px;
    }

    .map-filterbar {
        width: 100%;
        overflow-x: auto;
    }

    .map-filterbar button {
        white-space: nowrap;
    }

    .map-layer-toolbar {
        left: 68px;
        right: auto;
        bottom: 16px;
        max-width: none;
        max-height: calc(100vh - 168px);
        overflow-y: auto;
        overflow-x: visible;
    }

    .basemap-panel {
        left: 76px;
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 92px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: min(52vh, 420px);
        overflow-y: auto;
    }

    .geometry-editor-panel {
        left: 76px;
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 92px);
        max-height: min(64vh, 520px);
        overflow-y: auto;
    }

    .basemap-card {
        min-height: 104px;
    }

    .map-layer-toolbar button {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .map-app-legend {
        top: auto;
        right: 16px;
        bottom: 72px;
        min-width: 132px;
        padding: 10px;
        gap: 7px;
        font-size: 0.78rem;
        transform: none;
    }

    .map-legend-toggle {
        top: auto;
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
        transform: none;
    }

    .map-legend-toggle:hover,
    .map-legend-toggle:focus-visible {
        transform: translateY(-1px);
    }

    .map-kpi-bar {
        top: 122px;
        left: 16px;
        width: calc(100% - 32px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        transform: none;
    }

    .map-executive-insight {
        top: auto;
        right: 16px;
        bottom: 124px;
        width: calc(100% - 32px);
    }

    .map-onboarding {
        justify-content: center;
        padding: 40px 16px;
        transform: translateY(-20px);
    }

    .onboarding-card {
        width: 100%;
    }

    .map-welcome-overlay {
        align-items: flex-end;
        padding: 78px 16px 96px;
        background:
            linear-gradient(0deg, rgba(11, 31, 58, 0.62), rgba(11, 31, 58, 0.1) 62%, rgba(11, 31, 58, 0)),
            radial-gradient(circle at 50% 72%, rgba(30, 136, 229, 0.22), transparent 18rem);
    }

    .map-welcome-card {
        width: 100%;
        border-radius: 20px;
    }

    .operational-panel {
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        transform: translateY(100%);
    }

    .operational-panel.is-open {
        transform: translateY(0);
    }

    .panel-grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
