.geo-control-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.geo-global-filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px;
    border-bottom: 1px solid #e1e9e6;
    background: #f7faf8;
}

.geo-global-filter-tabs button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 5px 2px;
    background: transparent;
    color: #65756f;
    font-size: 0.58rem;
    font-weight: 800;
    cursor: pointer;
}

.geo-global-filter-tabs button i {
    font-size: 0.9rem;
}

.geo-global-filter-tabs button.active {
    border-color: #b9d2c9;
    background: #eaf3ef;
    color: #2f5f52;
    box-shadow: inset 0 0 0 1px rgba(59, 101, 91, 0.08);
}

.geo-global-panel-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.geo-climate-refresh-box {
    display: grid;
    gap: 12px;
}

.geo-climate-refresh-box > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    border-radius: 11px;
    padding: 11px;
    background: #eef5f2;
    color: #496159;
    font-size: 0.68rem;
    line-height: 1.45;
}

.geo-climate-refresh-box > div i {
    margin-top: 2px;
    color: #3b655b;
}

.geo-climate-refresh-box .btn-secondary {
    width: 100%;
    justify-content: center;
}

.geo-detail-panel {
    box-shadow: -18px 0 38px rgba(20, 43, 35, 0.16);
}

.owner-summary-card strong,
.owner-terrain-card strong {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .geo-global-filter-tabs button span {
        display: none;
    }

    .geo-global-filter-tabs button {
        min-height: 42px;
    }
}



/* Ambas tarjetas deben permanecer visibles. */
.geo-map-stage.has-detail-panel .leaflet-popup,
.geo-map-stage:has(.geo-detail-panel) .leaflet-popup {
    display: block !important;
}


/* ================================================================
   SEPARACIÓN ENTRE POPUP DEL TERRENO Y FICHA TERRITORIAL
   ================================================================ */

.geo-map-stage.has-detail-panel .leaflet-popup {
    margin-left: -48px;
    transition: margin-left 180ms ease;
}

.geo-map-stage.has-detail-panel .leaflet-popup-content-wrapper {
    box-shadow:
        0 16px 42px rgba(18, 33, 28, 0.22),
        0 0 0 1px rgba(59, 101, 91, 0.08);
}

.geo-map-stage.has-detail-panel .geo-detail-panel {
    border-left: 1px solid #d8e3df;
    box-shadow: -14px 0 36px rgba(18, 33, 28, 0.14);
}

@media (max-width: 1150px) {
    .geo-map-stage.has-detail-panel .leaflet-popup {
        margin-left: -28px;
    }
}

@media (max-width: 820px) {
    .geo-map-stage.has-detail-panel .leaflet-popup {
        margin-left: 0;
    }
}


/* ================================================================
   CAPAS RECOMENDADAS SIN BOTONES DUPLICADOS
   ================================================================ */

.geo-recommended-section {
    padding-top: 10px;
    padding-bottom: 10px;
    background: linear-gradient(
        135deg,
        rgba(59, 101, 91, .08),
        rgba(255, 255, 255, .96));
}

.geo-recommended-action {
    display: grid;
    gap: 9px;
}

.geo-recommended-action > div {
    display: grid;
    gap: 2px;
}

.geo-recommended-action strong {
    color: #294b40;
    font-size: .68rem;
}

.geo-recommended-action small {
    color: #71817b;
    font-size: .55rem;
    line-height: 1.35;
}

.geo-recommended-action .btn-secondary {
    justify-content: center;
    width: 100%;
    min-height: 34px;
    font-size: .58rem;
}
