body {
    background-color: #111827;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    body::-webkit-scrollbar {
        display: none;
    }

.navbar {
    min-height: 10px;
    padding: 0.3rem 0.8rem;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px;
    /* background-color: #212930; */
}

.navbar-brand span {
    font-size: 1rem;
    font-weight: 600;
    color: #00ff88;
    text-shadow: 0 0 4px rgba(0, 255, 136, 0.6);
    letter-spacing: 0.5px;
}

.nav-actions {
    display: flex;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 6px;
}

    .nav-actions .action-btn {
        border-radius: 6px;
        font-weight: 500;
        font-size: 0.75rem;
        padding: 4px 8px;
        transition: all 0.2s ease;
    }

        .nav-actions .action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
        }

    .nav-actions .btn-primary:hover {
        background-color: #1e90ff;
        box-shadow: 0 0 6px rgba(30, 144, 255, 0.7);
    }

    .nav-actions .btn-success:hover {
        background-color: #28a745;
        box-shadow: 0 0 6px rgba(40, 167, 69, 0.7);
    }

    .nav-actions .btn-outline-light:hover {
        color: #fff;
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
    }

.navbar .btn {
    border-radius: 6px;
    font-size: 0.75rem;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

    .navbar .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    }

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#map {
    width: 100%;
    min-height: 95vh;
    margin-top: -15px;
}

#map {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#layer-opacity-controls {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #212930 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    padding: 10px;
}

    #layer-opacity-controls h6 {
        font-weight: bold;
        letter-spacing: 1px;
    }

.card {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.card-body h6 {
    font-weight: bold;
    color: #ffd65a;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }

.form-select {
    background-color: #1e1e1e;
    color: #eaeaea;
    border: 1px solid #444;
    border-radius: 8px;
}

    .form-select:focus {
        border-color: #00ff88;
        box-shadow: 0 0 6px rgba(0, 255, 136, 0.6);
    }

@media (max-width: 768px) {
    #map {
        height: 60vh;
    }

    aside {
        margin-top: 1rem;
    }
}

#layer-opacity-controls {
    position: fixed;
    left: 20px;
    z-index: 1050;
    width: 260px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

#sugarcane-color-box {
    width: 16px;
    height: 16px;
    background: #4caf50;
    border: 2px solid #2e7d32;
    border-radius: 3px;
}

.panel-card {
    background-color: #212930;
    color: #f5f5f5;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px;
    margin-bottom: 8px;
}

    .panel-card:hover {
        transform: translateY(-2px);
        box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.6);
    }

.panel-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0.4rem;
}

.form-select {
    background-color: #1e1e1e;
    color: #eaeaea;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .form-select:focus {
        border-color: #00ff88;
        box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
    }

aside .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #8cc540 !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

    aside .form-label i {
        font-size: 0.9rem;
        color: #8cc540;
    }

.action-btn,
aside .btn {
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

    .action-btn:hover,
    aside .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

#sidePanel {
    background: #212930;
    border-radius: 8px;
    padding: 10px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.7);
}

#map {
    height: 80vh;
    width: 100%;
}

@media (max-width: 992px) {
    #map {
        height: 50vh;
    }

    #sidePanel {
        margin-top: 20px;
    }
}

#growerPanelWrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

#growerToggleBtn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    background-color: #1e2a35;
    border: 2px solid white;
    font-size: 1rem;
}

#growersPanelContainer {
    position: fixed;
    bottom: 0;
    left: 0;
    max-width: 100%;
    background: #0e141b;
    color: white;
    transition: transform 0.4s ease;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    pointer-events: auto;
    padding: 5px 15px;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.8);
    z-index: 9998;
}

.growers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: #1e2a35;
    border-radius: 10px;
    margin-bottom: 12px;
}

    .growers-header h6 {
        color: #8fff9f;
        font-weight: bold;
    }

    .growers-header button {
        border-radius: 30%;
        font-weight: bold;
        padding: 2px 6px;
    }

.growers-content-row {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: flex-start;
}

.growers-list-card {
    flex: 0 0 45%;
    background-color: #111820;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    padding: 12px;
    max-height: 40vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-weight: 600;
    position: relative;
}

    .growers-list-card h6 {
        color: #8fff9f;
        font-weight: bold;
        margin-bottom: 8px;
    }

.table-wrapper {
    overflow-x: auto;
}

#growersTable thead tr {
    background-color: #1b252f;
    color: #a5ffaf;
    text-align: left;
}

#growerRows {
    color: #fff;
}

.grower-detail-card {
    flex: 0 0 50%;
    background-color: #111820;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.2);
    padding: 14px;
    color: white;
    display: none;
    font-weight: 500;
}

    .grower-detail-card h6 {
        color: #ffd65a;
        font-weight: bold;
    }

#growerDetailContent {
    font-size: 0.9rem;
    line-height: 1.5;
}

#sidePanel {
    position: relative;
    max-height: none;
    background-color: #212930;
    border-radius: 8px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.7);
}

#statsPanel {
    position: fixed;
    top: 60px;
    right: 0;
    width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #0e141b, #1a1f27);
    color: #f5f5f5;
    border-left: 2px solid #28a745;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.8);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 2000;
    font-size: large;
}

    #statsPanel.hidden {
        transform: translateX(100%);
        box-shadow: none;
    }

    #statsPanel.visible {
        transform: translateX(0);
    }

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #1e2a35, #2a3a45);
    padding: 12px 16px;
    border-radius: 16px 0 0 0;
    box-shadow: inset 0 -2px 6px rgba(0, 255, 136, 0.3);
}

    .stats-header h5 {
        color: #28a745;
        margin: 0;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

.close-stats {
    background: #222;
    border: 1px solid #555;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .close-stats:hover {
        background: #28a745;
        color: #fff;
        border-color: #28a745;
        transform: rotate(90deg);
    }

.stats-section h5 {
    margin: 0 0 8px 0;
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}

#planner_level {
    font-size: 1.3rem;
    color: orangered;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

#planner_name {
    font-size: 1.1rem;
    color: orangered;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(144, 255, 255, 0.6);
}

#planner_area {
    color: #fff;
    font-weight: bold;
}

.stats-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.planner-id span:first-child {
    font-weight: 600;
    color: #28a745;
}

.planner-id span:last-child {
    color: #bbb;
}

.stats-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 14px;
    background: #151b22;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stats-box-header {
    padding: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    background: linear-gradient(90deg, cornflowerblue, #4a90e2);
    color: #fff;
    border-radius: 10px 10px 0 0;
}

    .stats-box-header.surveyed {
        background: linear-gradient(90deg, #e6ffe6, #b2f0b2);
        color: forestgreen;
    }

#planner_crops_table {
    width: 100% !important;
    border-collapse: collapse;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
    margin: 0;
}

    #planner_crops_table th,
    #planner_crops_table td {
        padding: 6px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

.table th {
    color: #28a745;
    font-weight: 600;
}

.acre-title {
    color: forestgreen !important;
    margin-top: 14px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

.map-stats-panel {
    background: #111820;
    border-radius: 10px;
    padding: 12px;
    box-shadow: inset 0 0 8px rgba(0, 255, 136, 0.2);
}

.total-area strong {
    color: #fff;
}

.total-area span {
    color: #00ff88;
    font-weight: bold;
}

.form-range {
    --track-color: #0d6efd;
    --thumb-color: #ffab00;
}

    .form-range::-webkit-slider-runnable-track {
        background: var(--track-color);
        height: 6px;
    }

    .form-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: var(--thumb-color);
        border-radius: 50%;
    }

#common-header-container {
    font-family: sans-serif;
    font-size: x-large;
    text-decoration: none !important;
}

    #common-header-container .ms-3 {
        font-weight: 700;
    }

    #common-header-container .nav-pills {
        padding-bottom: 0px !important;
        border-bottom: 0px !important;
        font-size: 15px !important;
        gap: 0px !important;
    }

        #common-header-container .nav-pills .nav-link {
            border: 0px !important;
        }

    #common-header-container .dropdown img {
        border-color: rgba(var(--bs-success-rgb), var(--bs-border-opacity)) !important;
        border-width: 3px !important
    }

    #common-header-container .dropdown a span i {
        color: #198754 !important;
        font-size: large;
    }

    #common-header-container .dropdown-divider {
        height: 0 !important;
        margin: 0.5rem 0 !important;
        overflow: hidden !important;
    }

    #common-header-container .dropdown ul {
        border: 1px solid #c4c4c0 !important;
    }

    #common-header-container .dropdown .ms-3 .fw-bold {
        font-size: larger;
    }

    #common-header-container .dropdown .ms-3 #header-user-role {
        font-size: 14px;
        color: #198754 !important;
    }

    #common-header-container .dropdown .ms-3 #header-vendor-name-full {
        font-size: 15px;
        font-weight: 100;
    }

    #common-header-container .dropdown .dropdown-item i {
        margin-right: 0px !important;
    }

#layer-opacity-controls {
    transition: transform 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

#showLegendBtn {
    transition: opacity 0.3s ease;
}

.grower-hidden {
    display: none !important;
}

@media (max-width: 992px) {
    #growersPanelContainer {
        width: 100% !important;
        left: 0 !important;
    }

    #growerToggleBtn {
        left: 50%;
    }
}

@media (min-width: 768px) {
    .detail-top-row,
    .detail-bottom-row {
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 767px) {
    .detail-top-row,
    .detail-bottom-row {
        flex-direction: column;
        align-items: center;
    }

        .detail-top-row > div:first-child {
            text-align: center;
            margin-bottom: 15px;
        }

        .detail-top-row > div:last-child,
        .detail-bottom-row > div {
            width: 100%;
            text-align: center;
        }

    #growerDetailPanel {
        height: auto;
        max-height: 60vh;
    }
}

#searchGrowers::placeholder {
    color: #fff;
    opacity: 1;
}

#mauza-layer-toggle, #Parcels-layer-toggle, #CropShapes-layer-toggle, #growers-layer-toggle, #circle-layer-toggle, #CropShapesHarvested-layer-toggle, #group-layer-toggle, #unit-layer-toggle {
    background: #212529;
    border: transparent !important;
    padding: 0px !important;
    margin: 0px !important;
    font-size: 0.9rem !important;
}

    #mauza-layer-toggle div, #Parcels-layer-toggle div, #CropShapes-layer-toggle div, #growers-layer-toggle div, #circle-layer-toggle div, #CropShapesHarvested-layer-toggle div, group-layer-toggle div, #unit-layer-toggle div {
        padding: 0px !important;
        margin: 0px !important;
    }

    #CropShapesHarvested-layer-toggle label, #CropShapesHarvested-layer-toggle i, #CropShapesHarvested-layer-toggle span,
    #circle-layer-toggle label, #circle-layer-toggle i, #circle-layer-toggle span,
    #mauza-layer-toggle label, #mauza-layer-toggle i, #mauza-layer-toggle span,
    #Parcels-layer-toggle label, #Parcels-layer-toggle i, #Parcels-layer-toggle span,
    #group-layer-toggle label, #group-layer-toggle i, #group-layer-toggle span,
    #unit-layer-toggle label, #unit-layer-toggle i, #unit-layer-toggle span,
    #CropShapes-layer-toggle label, #CropShapes-layer-toggle i, #CropShapes-layer-toggle span,
    #growers-layer-toggle label, #growers-layer-toggle i, #growers-layer-toggle span,
    #landmarks-layer-toggle, #landmarks-layer-toggle i, #landmarks-layer-toggle span,
    #LoaneeGrowers-toggle, #LoaneeGrowers-toggle-icon i, #LoaneeGrowers-toggle-icon span, #LoaneeGrowers-opacity-value {
        color: white !important;
    }

#summaryTab .nav-link {
    color: #cfd3d6;
    background-color: #1e2935;
    border: 1px solid #444;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px 6px 0 0;
}

    #summaryTab .nav-link.active {
        color: white;
        background-color: #8cc540;
        border-color: #8cc540;
    }

    #summaryTab .nav-link:hover:not(.active) {
        color: #8cc540;
        border-color: #8cc540;
    }

.maplibregl-popup.custom-landmark-popup .maplibregl-popup-content {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
}

.maplibregl-popup.custom-landmark-popup .maplibregl-popup-tip {
    border-top-color: white !important;
}

#loaneeToggleBtn {
    HEIGHT: 36PX;
    FONT-SIZE: 1rem;
}

/* ============================================================
   PREMIUM THEME OVERLAY
   Modern glassmorphic refinement layered on top of the legacy
   styles above. Scoped under body.ff-map so it only touches this
   page; !important is used only where the HTML carries inline
   styles. Visual-only — no positioning/size/z-index changes.
   ============================================================ */
.ff-map {
    --ff-emerald: #22c55e;
    --ff-emerald-light: #4ade80;
    --ff-emerald-dark: #15803d;
    --ff-glass: rgba(18, 25, 35, 0.82);
    --ff-glass-strong: rgba(13, 19, 27, 0.90);
    --ff-border: rgba(255, 255, 255, 0.09);
    --ff-text: #e6edf3;
    --ff-muted: #94a3b8;
    --ff-shadow: 0 14px 38px rgba(0, 0, 0, 0.55);
    --ff-radius: 16px;
    --ff-blur: saturate(150%) blur(18px);
}

/* ---- Map canvas: deeper, softer frame ---- */
.ff-map #map {
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55) !important;
}

/* ---- Side panel becomes a transparent shell; its cards are the glass ---- */
.ff-map #sidePanel {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.ff-map .panel-card,
.ff-map #sidePanel .card,
.ff-map #levelStatsCard {
    background: var(--ff-glass) !important;
    -webkit-backdrop-filter: var(--ff-blur);
    backdrop-filter: var(--ff-blur);
    border: 1px solid var(--ff-border) !important;
    border-radius: var(--ff-radius) !important;
    box-shadow: var(--ff-shadow) !important;
}

.ff-map .panel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.35) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34, 197, 94, 0.12) !important;
}

/* Card headings / labels: unify onto the emerald family */
.ff-map .card-body h6 { color: #fcd34d; }
.ff-map aside .form-label,
.ff-map aside .form-label i { color: var(--ff-emerald-light) !important; }

/* ---- Form controls: dark glass with emerald focus ring ---- */
.ff-map .form-select,
.ff-map .form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--ff-text) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ff-map .form-select:focus,
.ff-map .form-control:focus {
    border-color: var(--ff-emerald) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.ff-map .form-select option { background-color: #131a24; color: var(--ff-text); }
.ff-map input::placeholder { color: rgba(255, 255, 255, 0.55) !important; }

/* ---- Buttons: premium emerald gradient ---- */
.ff-map .btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.32) !important;
    letter-spacing: .2px;
}

.ff-map .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.48) !important;
}

/* ---- Tabs: soft pills with emerald active state ---- */
.ff-map #summaryTab { border: none !important; gap: 6px; }
.ff-map #summaryTab .nav-link {
    color: var(--ff-muted) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    transition: all .2s ease;
}
.ff-map #summaryTab .nav-link.active {
    color: #06240f !important;
    background: linear-gradient(135deg, #4ade80, #22c55e) !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}
.ff-map #summaryTab .nav-link:hover:not(.active) {
    color: var(--ff-emerald-light) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
}

/* ---- Legend / opacity controls: frosted glass ---- */
.ff-map #layer-opacity-controls {
    background: var(--ff-glass) !important;
    -webkit-backdrop-filter: var(--ff-blur);
    backdrop-filter: var(--ff-blur);
    border: 1px solid var(--ff-border) !important;
    border-radius: var(--ff-radius) !important;
    box-shadow: var(--ff-shadow) !important;
}

/* ---- Stats panel: frosted with emerald accent edge ---- */
.ff-map #statsPanel {
    background: var(--ff-glass-strong) !important;
    -webkit-backdrop-filter: saturate(150%) blur(24px);
    backdrop-filter: saturate(150%) blur(24px);
    border-left: 1px solid rgba(34, 197, 94, 0.55) !important;
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.6) !important;
}
.ff-map .stats-header {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.02)) !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ff-map .stats-header h5,
.ff-map .stats-section h5 { color: var(--ff-emerald-light) !important; }
.ff-map .stats-box {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
}
.ff-map .map-stats-panel {
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12) !important;
    border-radius: 12px !important;
}
.ff-map .close-stats:hover {
    background: var(--ff-emerald) !important;
    border-color: var(--ff-emerald) !important;
}

/* ---- Grower bottom sheet: frosted glass ---- */
.ff-map #growersPanelContainer {
    background: var(--ff-glass-strong) !important;
    -webkit-backdrop-filter: saturate(150%) blur(24px);
    backdrop-filter: saturate(150%) blur(24px);
    border-top: 1px solid var(--ff-border);
    border-radius: 22px 22px 0 0 !important;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.7) !important;
}
.ff-map #growerToggleBtn,
.ff-map #loaneeToggleBtn {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45) !important;
    font-weight: 600;
}
.ff-map #growersContent,
.ff-map #growerDetailPanel,
.ff-map .growers-list-card,
.ff-map .grower-detail-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--ff-border) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* ---- Modern thin scrollbars ---- */
.ff-map ::-webkit-scrollbar { width: 8px; height: 8px; }
.ff-map ::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.35);
    border-radius: 8px;
}
.ff-map ::-webkit-scrollbar-thumb:hover { background: rgba(34, 197, 94, 0.55); }
.ff-map ::-webkit-scrollbar-track { background: transparent; }






/* ============================================================
   PREMIUM REFINEMENT — layer 2
   Depth, motion, and typographic polish on top of the existing
   overlay. Visual-only: no positioning, sizing, or z-index changes.
   ============================================================ */

/* ---- Ambient background: subtle emerald bloom behind everything ---- */
body.ff-map::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.13) 0%, transparent 45%),
        radial-gradient(circle at 88% 76%, rgba(74, 222, 128, 0.08) 0%, transparent 48%);
}

.ff-map .container-fluid,
.ff-map .header { position: relative; }

/* ---- Header: glass instead of flat gradient ---- */
.ff-map .header {
    background: linear-gradient(120deg, rgba(23, 51, 27, 0.92) 0%, rgba(44, 94, 46, 0.88) 55%, rgba(28, 82, 42, 0.92) 100%);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* Thin emerald accent line under the header */
.ff-map .header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.75), transparent);
}

.ff-map .header .user-panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background .25s ease, border-color .25s ease;
}
.ff-map .header .user-panel:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(34, 197, 94, 0.35);
}

.ff-map .header .logo-text { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }

/* ---- Cards: crisper edge highlight + smoother lift ---- */
.ff-map .panel-card,
.ff-map #sidePanel .card,
.ff-map #levelStatsCard {
    position: relative;
    overflow: hidden;
    transition: transform .28s cubic-bezier(.22,.61,.36,1),
                box-shadow .28s ease,
                border-color .28s ease;
}

/* Top edge sheen — reads as light catching the glass */
.ff-map .panel-card::before,
.ff-map #levelStatsCard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    pointer-events: none;
}

/* ---- Stat numbers: tighter, more deliberate typography ---- */
.ff-map .card-text.fs-4,
.ff-map .card-text.fs-5 {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 14px currentColor;
    opacity: 0.98;
}

.ff-map .card-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px !important;
    opacity: 0.75;
}

/* ---- Tabs: pill row on a recessed track ---- */
.ff-map #summaryTab {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 12px !important;
    padding: 4px;
}
.ff-map #summaryTab .nav-link {
    background: transparent !important;
    border: none !important;
    font-size: 0.82rem !important;
}
.ff-map #summaryTab .nav-link.active {
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---- Progress bar: glossy segments ---- */
.ff-map .progress {
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.35) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}
.ff-map .progress-bar {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ---- Bottom sheet toggle: floating pill ---- */
.ff-map #growerToggleBtn {
    padding: 9px 22px !important;
    letter-spacing: .3px;
    transition: transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease;
}
.ff-map #growerToggleBtn:hover {
    transform: translateX(-50%) translateY(-3px) !important;
    box-shadow: 0 14px 34px rgba(34, 197, 94, 0.55) !important;
}

/* ---- Grower list rows ---- */
.ff-map #growerList .list-group-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    color: var(--ff-text) !important;
    margin-bottom: 6px;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ff-map #growerList .list-group-item:hover {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    transform: translateX(3px);
}

/* ---- Legend / stats close button ---- */
.ff-map #collapseLegendBtn,
.ff-map #showLegendBtn {
    border-radius: 8px !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* ---- Respect reduced-motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
    .ff-map * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}