.mpe-map-widget {
    --mpe-map-height: 720px;
    --mpe-blue: #003f8f;
    --mpe-blue-700: #002f73;
    --mpe-blue-100: #eef5ff;
    --mpe-blue-050: #f7fbff;
    --mpe-red: #e5232e;
    --mpe-ink: #071d3f;
    --mpe-muted: #4b5f7c;
    --mpe-border: #d8e4f5;
    box-sizing: border-box;
    color: var(--mpe-ink);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    margin: 2rem auto;
    max-width: 1760px;
    width: 94%;
}

.mpe-map-copy {
    margin: 0 auto 1.15rem;
    max-width: 920px;
}

.mpe-map-copy h2 {
    color: var(--mpe-blue);
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 0 1rem;
    padding: 0;
    text-align: center;
}

.mpe-map-intro {
    color: #122849;
    font-size: 1rem;
    line-height: 1.72;
    margin: 0 auto;
    max-width: 86ch;
    text-align: justify;
}

.mpe-map-intro p {
    margin: 0 0 0.8rem;
}

.mpe-map-divider {
    border-top: 1px solid var(--mpe-border);
    margin: 1.35rem 0 1.45rem;
}

.mpe-map-stage {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.mpe-map-canvas {
    background: #f8fbff;
    border: 1px solid var(--mpe-border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(7, 29, 63, 0.08);
    height: var(--mpe-map-height);
    min-height: 360px;
    overflow: hidden;
    position: relative;
    width: min(100%, 1480px);
    z-index: 0;
}

.mpe-map-canvas::after {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--mpe-border);
    border-left: 4px solid var(--mpe-blue);
    border-radius: 6px;
    bottom: 1rem;
    color: var(--mpe-muted);
    content: "Adicione latitude e longitude nos cadastros para exibir alfinetes.";
    display: none;
    font-size: 0.85rem;
    left: 1rem;
    max-width: min(330px, calc(100% - 2rem));
    padding: 0.62rem 0.75rem;
    position: absolute;
    z-index: 500;
}

.mpe-map-no-visible-markers::after {
    display: block;
}

.mpe-map-error {
    align-items: center;
    color: var(--mpe-muted);
    display: flex;
    font-weight: 800;
    height: 100%;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.mpe-marker {
    align-items: center;
    display: flex;
    height: 28px;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
    width: 28px;
}

.mpe-marker span {
    background: var(--mpe-red);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 0 0 2px rgba(0, 63, 143, 0.18), 0 5px 14px rgba(7, 29, 63, 0.25);
    display: block;
    height: 20px;
    transform: rotate(-45deg);
    width: 20px;
}

.mpe-marker span::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    display: block;
    height: 6px;
    margin: 4px;
    width: 6px;
}

.mpe-marker.is-muted {
    transform: scale(0.76);
}

.mpe-popup {
    color: var(--mpe-ink);
    display: grid;
    gap: 0.28rem;
    min-width: 220px;
}

.mpe-popup strong {
    color: var(--mpe-blue);
    font-size: 1rem;
}

.mpe-popup span,
.mpe-popup em,
.mpe-popup p {
    margin: 0;
}

.mpe-popup em {
    color: var(--mpe-blue-700);
    font-style: normal;
    font-weight: 800;
}

.mpe-popup a {
    color: var(--mpe-blue);
    font-weight: 800;
}

.mpe-popup-more {
    background: var(--mpe-blue);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
    justify-self: start;
    margin-top: 0.35rem;
    padding: 0.45rem 0.7rem;
}

.mpe-popup-more:hover,
.mpe-popup-more:focus {
    background: var(--mpe-blue-700);
    color: #fff;
    outline: 0;
}

.mpe-city-popup .leaflet-popup-content-wrapper {
    background: #fff;
    border: 1px solid #bfd2ed;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(7, 29, 63, 0.22);
    padding: 0;
}

.mpe-city-popup .leaflet-popup-content {
    margin: 0;
    width: min(460px, 82vw) !important;
}

.mpe-city-popup .leaflet-popup-close-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--mpe-border);
    border-radius: 50%;
    color: var(--mpe-blue) !important;
    display: flex;
    font-size: 18px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    line-height: 1;
    right: 10px;
    top: 10px;
    width: 28px;
}

.mpe-city-popup .leaflet-popup-tip {
    box-shadow: 0 8px 18px rgba(7, 29, 63, 0.12);
}

.mpe-city-box {
    color: var(--mpe-ink);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.mpe-city-box-header {
    background: linear-gradient(135deg, var(--mpe-blue) 0%, #0b5db8 100%);
    border-radius: 8px 8px 0 0;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 3rem 1rem 1rem;
}

.mpe-city-box-header div:first-child {
    display: grid;
    gap: 0.18rem;
}

.mpe-city-box-header span {
    color: #d9e8ff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mpe-city-box-header strong {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.15;
}

.mpe-city-box-badges {
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.mpe-city-box-badges em {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    padding: 0.32rem 0.55rem;
}

.mpe-city-location-list {
    background: #f7fbff;
    display: grid;
    gap: 0.7rem;
    max-height: 390px;
    overflow: auto;
    padding: 0.8rem;
}

.mpe-city-location-item {
    background: #fff;
    border: 1px solid var(--mpe-border);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
}

.mpe-city-location-title {
    align-items: start;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.mpe-city-location-title strong {
    color: var(--mpe-blue);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.28;
}

.mpe-city-location-title em {
    background: var(--mpe-blue-100);
    border: 1px solid #c9daf3;
    border-radius: 999px;
    color: var(--mpe-blue);
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
}

.mpe-city-location-meta {
    display: grid;
    gap: 0.42rem;
}

.mpe-city-location-meta p {
    display: grid;
    gap: 0.1rem;
    margin: 0;
}

.mpe-city-location-meta b {
    color: var(--mpe-blue-700);
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mpe-city-location-meta span {
    color: var(--mpe-muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.mpe-city-location-item a {
    align-self: start;
    background: var(--mpe-blue);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    justify-self: start;
    padding: 0.42rem 0.65rem;
    text-decoration: none;
}

.mpe-city-location-item a:hover,
.mpe-city-location-item a:focus {
    background: var(--mpe-blue-700);
    color: #fff;
}

.mpe-stat-section {
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    border: 1px solid var(--mpe-border);
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.35rem auto 0;
    max-width: 1480px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(7, 29, 63, 0.06);
}

.mpe-stat-card {
    align-items: center;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--mpe-border);
    display: grid;
    gap: 0.2rem 0.9rem;
    grid-template-columns: 54px 1fr;
    min-height: 126px;
    padding: 1.15rem 1.35rem;
    position: relative;
}

.mpe-stat-card:last-child {
    border-right: 0;
}

.mpe-stat-card::before {
    background: var(--mpe-blue);
    content: "";
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 0.18s ease;
    width: 4px;
}

.mpe-stat-card:hover::before {
    opacity: 1;
}

.mpe-stat-icon {
    align-self: center;
    background: var(--mpe-blue-100);
    border: 1px solid #c9daf3;
    border-radius: 8px;
    display: block;
    grid-row: span 2;
    height: 54px;
    position: relative;
    width: 54px;
}

.mpe-stat-card-cities .mpe-stat-icon::before {
    border: 2px solid var(--mpe-blue);
    border-radius: 6px;
    content: "";
    height: 25px;
    left: 13px;
    position: absolute;
    top: 12px;
    transform: rotate(-8deg);
    width: 22px;
}

.mpe-stat-card-cities .mpe-stat-icon::after {
    background: var(--mpe-blue);
    border-radius: 50%;
    content: "";
    height: 7px;
    left: 27px;
    position: absolute;
    top: 23px;
    width: 7px;
}

.mpe-stat-card-locations .mpe-stat-icon::before {
    background: var(--mpe-blue);
    border-radius: 50% 50% 50% 0;
    content: "";
    height: 23px;
    left: 15px;
    position: absolute;
    top: 11px;
    transform: rotate(-45deg);
    width: 23px;
}

.mpe-stat-card-locations .mpe-stat-icon::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 7px;
    left: 23px;
    position: absolute;
    top: 19px;
    width: 7px;
}

.mpe-stat-card-materials .mpe-stat-icon::before,
.mpe-stat-card-materials .mpe-stat-icon::after {
    border: 2px solid var(--mpe-blue);
    border-radius: 4px;
    content: "";
    height: 24px;
    position: absolute;
    width: 18px;
}

.mpe-stat-card-materials .mpe-stat-icon::before {
    background: #fff;
    left: 14px;
    top: 12px;
}

.mpe-stat-card-materials .mpe-stat-icon::after {
    background: var(--mpe-blue-100);
    left: 22px;
    top: 17px;
}

.mpe-stat-card strong {
    color: var(--mpe-blue);
    font-size: clamp(2.25rem, 3vw, 3.1rem);
    font-weight: 800;
    line-height: 1;
}

.mpe-stat-card span {
    color: var(--mpe-muted);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
}

.mpe-repository-action {
    display: flex;
    justify-content: center;
    margin: 1.35rem auto 0;
    max-width: 1480px;
}

.mpe-repository-action a {
    align-items: center;
    background: var(--mpe-blue);
    border: 1px solid var(--mpe-blue);
    border-radius: 6px;
    box-shadow: 0 10px 22px rgba(0, 63, 143, 0.16);
    color: #fff;
    display: inline-flex;
    font-size: 0.96rem;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 0 1.35rem;
    text-decoration: none;
}

.mpe-repository-action a:hover,
.mpe-repository-action a:focus {
    background: var(--mpe-blue-700);
    border-color: var(--mpe-blue-700);
    color: #fff;
    outline: 0;
}

.mpe-map-credit {
    color: var(--mpe-muted);
    font-size: 0.78rem;
    margin: 0.55rem auto 0;
    max-width: 1480px;
}

.mpe-map-widget .leaflet-container {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.mpe-map-widget .leaflet-control-zoom {
    border: 1px solid var(--mpe-border);
    box-shadow: 0 8px 20px rgba(7, 29, 63, 0.08);
}

.mpe-map-widget .leaflet-control-zoom a {
    color: var(--mpe-blue);
}

@media (max-width: 900px) {
    .mpe-map-widget {
        width: 94%;
    }
}

@media (max-width: 720px) {
    .mpe-stat-section {
        grid-template-columns: 1fr;
    }

    .mpe-stat-card {
        border-bottom: 1px solid var(--mpe-border);
        border-right: 0;
    }

    .mpe-stat-card:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 640px) {
    .mpe-map-widget {
        margin-block: 1.25rem;
        width: 94%;
    }

    .mpe-map-copy h2 {
        font-size: 1.75rem;
    }

    .mpe-map-canvas {
        min-height: 320px;
    }
}
