 
        * { box-sizing: border-box; }

        body, html {
            height: 100%;
            margin: 0;
            font-family: 'Inter', sans-serif;
            overflow: hidden;
        }

        .app-shell {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .map-stage {
            position: relative;
            width: 100%;
            height: calc(100vh - 56px);
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* ── Header ── */
        .header-green {
            background-color: #1b5e20;
            color: white;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 0 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            position: relative;
            z-index: 1000;
        }
        .header-spacer {
            width: 46px;
            flex-shrink: 0;
        }
        .header-title {
            font-size: 17px;
            font-weight: 700;
            margin: 0;
            letter-spacing: 0.5px;
            text-align: center;
            flex: 1;
            min-width: 0;
        }
        .btn-login {
            background-color: rgba(255,255,255,0.18);
            color: white;
            border: 1px solid rgba(255,255,255,0.35);
            padding: 6px 14px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            font-size: 13px;
            transition: all 0.2s;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .btn-login:hover {
            background-color: white;
            color: #1b5e20;
            text-decoration: none;
        }

        /* ── Peta ── */
        #map {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }

        /* ── Search bar (Google Maps style) ── */
        .search-overlay {
            position: absolute;
            top: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 500;
            width: min(92%, 480px);
            background: white;
            border-radius: 24px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.25);
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0 12px 0 14px;
            height: 46px;
        }

        .custom-layer-menu {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 550;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .layer-menu-toggle {
            width: 42px;
            height: 42px;
            border: 1px solid rgba(27, 94, 32, 0.15);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
            color: #1b5e20;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            z-index: 700;
        }

        .layer-menu-toggle:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
        }

        .layer-menu-panel {
            display: none;
            margin-top: 8px;
            width: min(220px, calc(100vw - 36px));
            background: rgba(255, 255, 255, 0.98);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            padding: 8px;
            backdrop-filter: blur(6px);
        }

        .custom-layer-menu.open .layer-menu-panel {
            display: block;
        }

        .layer-option {
            width: 100%;
            border: none;
            background: transparent;
            color: #1f2937;
            text-align: left;
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .layer-option:hover,
        .layer-option.active {
            background: rgba(27, 94, 32, 0.08);
        }

        .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
            box-shadow: inset 0 0 0 2px rgba(0,0,0,0.08);
        }

        .dot-google { background: linear-gradient(135deg, #2e7d32, #81c784); }
        .dot-esri { background: linear-gradient(135deg, #1e88e5, #90caf9); }
        .dot-osm { background: linear-gradient(135deg, #ef6c00, #ffcc80); }
        .search-overlay .fa-search {
            color: #aaa;
            font-size: 14px;
            flex-shrink: 0;
        }
        .search-input {
            flex: 1 1 auto;
            border: none;
            outline: none;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            color: #333;
            background: transparent;
            min-width: 0;
        }
        .search-input::placeholder { color: #aaa; }
        .search-btn {
            background: none;
            border: none;
            color: #1b5e20;
            padding: 0 6px;
            font-size: 17px;
            cursor: pointer;
        }

        /* ── Error notif ── */
        #pesan-error-cari {
            position: absolute;
            top: 72px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 600;
            background: #d32f2f;
            color: white;
            padding: 6px 18px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            box-shadow: 0 2px 10px rgba(0,0,0,0.25);
            display: none;
            white-space: nowrap;
        }

        /* ── Legenda (kiri bawah) ── */
        .legend-overlay {
            position: absolute;
            bottom: 28px;
            left: 16px;
            z-index: 500;
            background: white;
            padding: 12px 15px;
            border-radius: 10px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.2);
            min-width: 175px;
            max-width: calc(100% - 32px);
        }
        .legend-title {
            font-weight: 700;
            font-size: 13px;
            margin-bottom: 8px;
            border-bottom: 1px solid #eee;
            padding-bottom: 6px;
            color: #333;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 6px;
            font-size: 13px;
            color: #444;
        }
        .legend-color {
            width: 13px;
            height: 13px;
            border-radius: 50%;
            margin-right: 9px;
            flex-shrink: 0;
            border: 1px solid rgba(0,0,0,0.15);
        }

        /* ── Marker lahan (besar & kontras) ── */
        .land-marker-icon {
            color: var(--mc, #388e3c);
            filter: drop-shadow(0 0 6px white) drop-shadow(0 0 10px white) drop-shadow(0 3px 6px rgba(0,0,0,0.6));
            font-size: 48px;
            line-height: 1;
            position: relative;
            text-align: center;
            display: block;
            transition: transform 0.18s ease;
            cursor: pointer;
        }
        .land-marker-icon:hover {
            transform: scale(1.25) translateY(-4px);
            filter: drop-shadow(0 0 8px white) drop-shadow(0 0 14px white) drop-shadow(0 4px 8px rgba(0,0,0,0.7));
        }
        /* Titik putih di tengah pin */
        .land-marker-icon::after {
            content: '';
            position: absolute;
            width: 12px; height: 12px;
            background: white;
            border-radius: 50%;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            box-shadow: 0 0 4px rgba(0,0,0,0.3);
        }

        /* ── Pin merah klik lokasi ── */
        .click-pin-marker {
            font-size: 38px;
            color: #e53935;
            filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4));
            animation: pin-bounce 0.3s cubic-bezier(0.34,1.56,0.64,1);
            display: block;
            text-align: center;
            line-height: 1;
            position: relative;
        }
        .click-pin-marker::after {
            content: '';
            position: absolute;
            width: 8px; height: 8px;
            background: white;
            border-radius: 50%;
            top: 9px;
            left: 50%;
            transform: translateX(-50%);
        }
        @keyframes pin-bounce {
            0%   { transform: translateY(-24px) scale(0.75); opacity: 0; }
            65%  { transform: translateY(3px) scale(1.05); opacity: 1; }
            100% { transform: translateY(0) scale(1); opacity: 1; }
        }

        /* ── Popup Google Maps style ── */
        .leaflet-popup-content-wrapper {
            border-radius: 10px !important;
            padding: 0 !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.22) !important;
            overflow: hidden;
        }
        .leaflet-popup-content {
            margin: 0 !important;
            width: auto !important;
        }
        .leaflet-popup-tip-container { margin-top: -1px; }
        .leaflet-popup-tip { box-shadow: none !important; }

        /* popup lahan */
        .popup-lahan { min-width: 280px; font-family: 'Inter', sans-serif; }
        .popup-lahan .popup-header {
            padding: 12px 15px 10px;
            border-bottom: 1px solid #f0f0f0;
        }
        .popup-lahan .popup-header h4 {
            margin: 0 0 2px;
            font-size: 15px;
            font-weight: 700;
            color: #1b5e20;
        }
        .popup-lahan .popup-header .badge-komoditas {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: #f1f8e9;
            color: #33691e;
            font-size: 12px;
            font-weight: 600;
            padding: 3px 9px;
            border-radius: 12px;
        }
        .popup-lahan .popup-body {
            padding: 10px 15px 12px;
        }
        .popup-lahan .info-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 7px;
            font-size: 13px;
        }
        .popup-lahan .info-row .lbl {
            color: #888;
            min-width: 80px;
            flex-shrink: 0;
        }
        .popup-lahan .info-row .val {
            color: #222;
            font-weight: 600;
        }
        .popup-lahan .popup-preview {
            background: #f8fdf4;
            border: 1px solid #c8e6c9;
            border-radius: 7px;
            overflow: hidden;
            margin-top: 4px;
        }
        .popup-lahan .popup-footer {
            padding: 9px 15px;
            border-top: 1px solid #f0f0f0;
            display: flex;
            gap: 8px;
        }
        .popup-lahan .btn-gmaps {
            flex: 1;
            text-align: center;
            background: #1b5e20;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            padding: 6px 0;
            font-size: 12px;
            font-weight: 600;
        }
        .popup-lahan .btn-gmaps:hover { background: #2e7d32; color: white; text-decoration: none; }
        .popup-lahan .btn-salin {
            flex: 1;
            text-align: center;
            background: #f5f5f5;
            color: #333;
            text-decoration: none;
            border-radius: 6px;
            padding: 6px 0;
            font-size: 12px;
            font-weight: 600;
            border: none;
            cursor: pointer;
        }

        /* popup titik lokasi */
        .popup-lokasi { min-width: 270px; font-family: 'Inter', sans-serif; }
        .popup-lokasi .lok-header {
            background: linear-gradient(135deg, #1565c0, #1976d2);
            color: white;
            padding: 10px 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .popup-lokasi .lok-header span { font-size: 14px; font-weight: 700; }
        .popup-lokasi .lok-coord {
            background: #e3f2fd;
            padding: 9px 14px;
            font-family: monospace;
            font-size: 13px;
            font-weight: 700;
            color: #0d47a1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .popup-lokasi .btn-copy-coord {
            background: #1565c0;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 3px 10px;
            font-size: 11px;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.2s;
        }
        .popup-lokasi .btn-copy-coord:hover { background: #0d47a1; }
        .popup-lokasi .lok-body { padding: 10px 14px 5px; }
        .popup-lokasi .lok-address {
            font-size: 13px;
            color: #333;
            line-height: 1.5;
            margin-bottom: 8px;
        }
        .popup-lokasi .lok-detail {
            font-size: 12px;
            color: #666;
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 3px 10px;
        }
        .popup-lokasi .lok-detail .dk { color: #999; }
        .popup-lokasi .lok-detail .dv { font-weight: 600; color: #333; }
        .popup-lokasi .lok-footer {
            padding: 8px 14px 12px;
            display: flex;
            gap: 7px;
        }
        .popup-lokasi .btn-gmaps-link {
            flex: 1;
            text-align: center;
            background: #4285F4;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            padding: 6px 0;
            font-size: 12px;
            font-weight: 600;
        }
        .popup-lokasi .btn-gmaps-link:hover { color: white; text-decoration: none; background: #3367d6; }
        .popup-lokasi .btn-osm-link {
            flex: 1;
            text-align: center;
            background: #7CB342;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            padding: 6px 0;
            font-size: 12px;
            font-weight: 600;
        }
        .popup-lokasi .btn-osm-link:hover { color: white; text-decoration: none; background: #558B2F; }
        .popup-lokasi .lok-loading {
            padding: 20px 14px;
            text-align: center;
            color: #888;
            font-size: 13px;
        }

        /* ── Adaptasi form mobile ── */
        @media (max-width: 576px) {
            body, html {
                overflow: hidden;
            }

            .header-green {
                height: 62px;
                padding: 0 12px;
            }
            .header-spacer {
                width: 38px;
            }
            .header-title {
                font-size: 12.5px;
                letter-spacing: 0;
                line-height: 1.2;
                max-width: 140px;
            }
            .btn-login {
                width: 38px;
                height: 36px;
                padding: 0;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                font-size: 16px;
            }
            .btn-login .login-label {
                display: none;
            }

            .map-stage {
                height: calc(100vh - 62px);
            }

            .search-overlay {
                top: 14px;
                width: calc(100% - 24px);
                height: 50px;
                padding: 0 10px 0 12px;
                border-radius: 12px;
            }
            .search-overlay .fa-search {
                font-size: 13px;
            }
            .search-input {
                min-width: 0;
                font-size: 13px;
            }
            .search-btn {
                width: 38px;
                height: 38px;
                border-radius: 9px;
                background: #1b5e20;
                color: white;
                padding: 0;
            }
            #pesan-error-cari {
                top: 72px;
                max-width: calc(100% - 32px);
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .legend-overlay {
                right: 12px;
                bottom: 16px;
                left: 12px;
                min-width: 0;
                max-width: none;
                padding: 10px 12px;
                border-radius: 12px;
            }
            .legend-title {
                margin-bottom: 7px;
                padding-bottom: 5px;
                font-size: 12px;
            }
            .legend-item {
                display: inline-flex;
                margin: 0 10px 4px 0;
                font-size: 12px;
            }
            .legend-color {
                width: 11px;
                height: 11px;
                margin-right: 6px;
            }

            .leaflet-popup-content-wrapper {
                max-width: calc(100vw - 28px);
            }
            .popup-lahan,
            .popup-lokasi {
                min-width: 0;
                width: min(280px, calc(100vw - 56px));
            }
            .popup-lahan .info-row {
                gap: 7px;
            }
            .popup-lahan .info-row .lbl {
                min-width: 68px;
            }
            .custom-layer-menu {
                top: 72px;
                right: 12px;
            }

            .layer-menu-toggle {
                width: 38px;
                height: 38px;
                border-radius: 10px;
                font-size: 16px;
            }

            .leaflet-control-zoom {
                margin-top: 134px !important;
            }
        }

        @media (min-width: 577px) {
            .login-label {
                display: inline;
            }
        }

        /* Tooltip lahan */
        .lahan-tooltip {
            background: rgba(27,94,32,0.9) !important;
            border: none !important;
            color: white !important;
            border-radius: 8px !important;
            font-size: 12px !important;
            padding: 5px 10px !important;
            font-family: 'Inter', sans-serif !important;
        }
        .lahan-tooltip::before { border-top-color: rgba(27,94,32,0.9) !important; }
    